Package org.apache.wicket.util.value
Class IntValue
- java.lang.Object
-
- org.apache.wicket.util.value.IntValue
-
- All Implemented Interfaces:
Serializable,Comparable<IntValue>
public class IntValue extends Object implements Comparable<IntValue>, Serializable
A base class based on the Javaintprimitive for value classes that want to implement standard operations on that value without the pain of aggregating anIntegerobject.- Since:
- 1.2.6
- Author:
- Jonathan Locke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected intvaluetheintvalue
-
Constructor Summary
Constructors Constructor Description IntValue(int value)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(IntValue that)booleanequals(Object that)Compares thisObjectto a givenObject.booleangreaterThan(int value)Compares thisIntValuewith a primitiveintvalue.booleangreaterThan(IntValue that)Compares thisIntValuewith anotherIntValue.inthashCode()Returns the hash code for thisObject.booleanlessThan(int that)Compares thisIntValuewith a primitiveintvalue.booleanlessThan(IntValue that)Compares thisIntValuewith anotherIntValue.StringtoString()Converts thisLongValueto aString.
-
-
-
Field Detail
-
value
protected final int value
theintvalue
-
-
Constructor Detail
-
IntValue
public IntValue(int value)
Constructor.- Parameters:
value- theintvalue
-
-
Method Detail
-
compareTo
public final int compareTo(IntValue that)
- Specified by:
compareToin interfaceComparable<IntValue>- Parameters:
that- The object to compare with- Returns:
- 0 if equal, -1 if less than or 1 if greater than
-
greaterThan
public final boolean greaterThan(int value)
Compares thisIntValuewith a primitiveintvalue.- Parameters:
value- theintvalue to compare with- Returns:
trueif thisIntValueis greater than the givenintvalue
-
greaterThan
public final boolean greaterThan(IntValue that)
Compares thisIntValuewith anotherIntValue.- Parameters:
that- theIntValueto compare with- Returns:
trueif thisIntValueis greater than the givenIntValue
-
hashCode
public final int hashCode()
Returns the hash code for thisObject.
-
lessThan
public final boolean lessThan(int that)
Compares thisIntValuewith a primitiveintvalue.- Parameters:
that- theintvalue to compare with- Returns:
trueif thisIntValueis less than the givenintvalue
-
lessThan
public final boolean lessThan(IntValue that)
Compares thisIntValuewith anotherIntValue.- Parameters:
that- theIntValueto compare with- Returns:
trueif thisIntValueis less than the givenIntValue
-
-