Class LiteralTerm<T>
- java.lang.Object
-
- org.jreliability.booleanfunction.common.LiteralTerm<T>
-
- Type Parameters:
T
- the type of the variable
- All Implemented Interfaces:
Term
public class LiteralTerm<T> extends java.lang.Object implements Term
TheLiteralTerm
represents a literal, i.e. the used variable. ALiteralTerm
equals anotherLiteralTerm
if their variables are equal.
-
-
Constructor Summary
Constructors Constructor Description LiteralTerm(T variable)
Constructs aLiteralTerm
with a given variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
T
get()
Returns the variable.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
variable
protected final T variable
The variable or literal.
-
-
Constructor Detail
-
LiteralTerm
public LiteralTerm(T variable)
Constructs aLiteralTerm
with a given variable.- Parameters:
variable
- the variable
-
-
Method Detail
-
get
public T get()
Returns the variable.- Returns:
- the variable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-