simpledb.query
Class IntConstant

java.lang.Object
  extended by simpledb.query.IntConstant
All Implemented Interfaces:
Comparable<Constant>, Constant

public class IntConstant
extends 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.
 
Method Summary
 Object asJavaVal()
          Unwraps the Integer and returns it.
 int compareTo(Constant c)
           
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntConstant

public IntConstant(int n)
Create a constant by wrapping the specified int.

Parameters:
n - the int value
Method Detail

asJavaVal

public 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(Object obj)
Overrides:
equals in class Object

compareTo

public int compareTo(Constant c)
Specified by:
compareTo in interface Comparable<Constant>

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.