simpledb.query
Class IntConstant
java.lang.Object
simpledb.query.IntConstant
- All Implemented Interfaces:
- java.lang.Comparable<Constant>, Constant
public class IntConstant
- extends java.lang.Object
- implements Constant
The class that wraps Java ints as database constants.
- Author:
- Edward Sciore
Constructor Summary |
IntConstant(int n)
Create a constant by wrapping the specified int. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
IntConstant
public IntConstant(int n)
- Create a constant by wrapping the specified int.
- Parameters:
n
- the int value
asJavaVal
public java.lang.Object asJavaVal()
- Unwraps the Integer and returns it.
- Specified by:
asJavaVal
in interface Constant
- Returns:
- the Java value of the constant
- See Also:
Constant.asJavaVal()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(Constant c)
- Specified by:
compareTo
in interface java.lang.Comparable<Constant>
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object