simpledb.query
Class StringConstant

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

public class StringConstant
extends Object
implements Constant

The class that wraps Java strings as database constants.

Author:
Edward Sciore

Constructor Summary
StringConstant(String s)
          Create a constant by wrapping the specified string.
 
Method Summary
 String asJavaVal()
          Unwraps the string 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

StringConstant

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

Parameters:
s - the string value
Method Detail

asJavaVal

public 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(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.