com.bigdata.relation.rule
Class Constant<E>

java.lang.Object
  extended by com.bigdata.relation.rule.Constant<E>
All Implemented Interfaces:
IConstant<E>, IVariableOrConstant<E>, Serializable

public final class Constant<E>
extends Object
implements IConstant<E>

A constant.

Version:
$Id: Constant.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson
See Also:
Serialized Form

Constructor Summary
Constant(E value)
           
 
Method Summary
 boolean equals(IVariableOrConstant<E> o)
          Return true if this is the same variable or if both values are Constant whose values are the same.
 boolean equals(Object o)
           
 E get()
          Return the bound value.
 String getName()
          Return the name of a variable.
 int hashCode()
          The hash code of the value that would be returned by IVariableOrConstant.get()
 boolean isConstant()
          Return true iff this is a constant.
 boolean isVar()
          Return true iff this is a variable.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Constant

public Constant(E value)
Method Detail

isVar

public final boolean isVar()
Description copied from interface: IVariableOrConstant
Return true iff this is a variable.

Specified by:
isVar in interface IVariableOrConstant<E>

isConstant

public final boolean isConstant()
Description copied from interface: IVariableOrConstant
Return true iff this is a constant.

Specified by:
isConstant in interface IVariableOrConstant<E>

toString

public String toString()
Overrides:
toString in class Object

equals

public final boolean equals(IVariableOrConstant<E> o)
Description copied from interface: IVariableOrConstant
Return true if this is the same variable or if both values are Constant whose values are the same.

Specified by:
equals in interface IVariableOrConstant<E>

equals

public final boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public final int hashCode()
Description copied from interface: IConstant
The hash code of the value that would be returned by IVariableOrConstant.get()

Specified by:
hashCode in interface IConstant<E>
Overrides:
hashCode in class Object

get

public E get()
Description copied from interface: IVariableOrConstant
Return the bound value.

Specified by:
get in interface IVariableOrConstant<E>

getName

public String getName()
Description copied from interface: IVariableOrConstant
Return the name of a variable.

Specified by:
getName in interface IVariableOrConstant<E>


Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.