net.sf.jso.query
Class Variable

java.lang.Object
  extended bynet.sf.jso.query.Variable
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class Variable
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable, java.lang.Cloneable

Query variable. A variable is a named instance of a class in a query.

See Also:
Serialized Form

Constructor Summary
Variable(java.lang.Class aClass)
          Constructs the variable.
Variable(java.lang.String aName, java.lang.Class aClass)
          Constructs the variable.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this variable.
 int compareTo(java.lang.Object o)
          Compares the variable wiht anoter one.
 boolean equals(java.lang.Object o)
          Indicates whether some other variable is "equal to" this one.
 java.lang.String getName()
          Returns variable's name.
 java.lang.Class getVariableClass()
          Returns variable's class.
 int hashCode()
          Returns a hash code value for the variable.
 java.lang.String toString()
          Returns a string representation of the variable.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable(java.lang.String aName,
                java.lang.Class aClass)
Constructs the variable.

Parameters:
aName - Variable's name.
aClass - Variable's class.

Variable

public Variable(java.lang.Class aClass)
Constructs the variable. Variable's name is set to class' (non qualified) name.

Parameters:
aClass - Variable's class.
Method Detail

hashCode

public int hashCode()
Returns a hash code value for the variable.

Returns:
A hash code value for the variable.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other variable is "equal to" this one.

Parameters:
o - The object with which to compare.
Returns:
true if the variable is the same as the OID argument; false otherwise.

toString

public java.lang.String toString()
Returns a string representation of the variable.

Returns:
A string representation of the variable.

compareTo

public int compareTo(java.lang.Object o)
Compares the variable wiht anoter one.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - The object to be compared
Returns:
A negative integer, zero, or a positive integer as the variable is less than, equal to, or greater than the specified variable.

clone

public java.lang.Object clone()
Creates and returns a copy of this variable.

Returns:
A clone of this instance.

getVariableClass

public java.lang.Class getVariableClass()
Returns variable's class.

Returns:
Variable's class.

getName

public java.lang.String getName()
Returns variable's name.

Returns:
Variable's name.