simpledb.query
Class StringConstant

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

public class StringConstant
extends java.lang.Object
implements Constant

The class that wraps Java strings as database constants.

Author:
Edward Sciore

Constructor Summary
StringConstant(java.lang.String s)
          Create a constant by wrapping the specified string.
 
Method Summary
 java.lang.String asJavaVal()
          Unwraps the string and returns it.
 int compareTo(Constant c)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringConstant

public StringConstant(java.lang.String s)
Create a constant by wrapping the specified string.

Parameters:
s - the string value
Method Detail

asJavaVal

public java.lang.String asJavaVal()
Unwraps the string 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