net.obsearch.index.utils
Class IntegerHolder

java.lang.Object
  extended by net.obsearch.index.utils.IntegerHolder
All Implemented Interfaces:
Comparable<IntegerHolder>

public class IntegerHolder
extends Object
implements Comparable<IntegerHolder>

This class holds an integer.

Since:
0
Author:
Arnoldo Jose Muller Molina

Constructor Summary
IntegerHolder(int value)
          Public constructor.
 
Method Summary
 void add(int x)
          adds the value of x to this object's integer value.
 int compareTo(IntegerHolder o)
          Compares this IntegerHolder to another IntegerHolder.
 void dec()
          Decrement the integer by 1.
 int getValue()
           
 void inc()
          Increment the integer by 1.
 void setValue(int value)
          Sets the value of the internal integer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntegerHolder

public IntegerHolder(int value)
Public constructor.

Parameters:
value - the value to set.
Method Detail

getValue

public int getValue()
Returns:
the value of the integer

setValue

public void setValue(int value)
Sets the value of the internal integer.

Parameters:
value - The new value.

inc

public void inc()
Increment the integer by 1.


dec

public void dec()
Decrement the integer by 1.


toString

public String toString()
Overrides:
toString in class Object
Returns:
String representation of the integer.

add

public void add(int x)
adds the value of x to this object's integer value.

Parameters:
x - the value to add.

compareTo

public int compareTo(IntegerHolder o)
Compares this IntegerHolder to another IntegerHolder.

Specified by:
compareTo in interface Comparable<IntegerHolder>


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.