de.uni_tuebingen.sfb.lichtenstein.formulas
Class Predicate

java.lang.Object
  extended by de.uni_tuebingen.sfb.lichtenstein.formulas.Variable
      extended by de.uni_tuebingen.sfb.lichtenstein.formulas.SetDenotator
          extended by de.uni_tuebingen.sfb.lichtenstein.formulas.Predicate
All Implemented Interfaces:
Serializable

public class Predicate
extends SetDenotator

A class representing a predicate. It registers a label with which it corresponds in the model structure.

Author:
Hendrik Maryns
See Also:
Serialized Form

Constructor Summary
Predicate(String label)
          Initialize a new predicate, with a given label.
 
Method Summary
 boolean equals(Object other)
          Indicates whether some other object is "equal to" this one.
 String getLabel()
          Get the label of this predicate.
 int hashCode()
          Returns a hash code value for the object.
 String toString()
          Returns a string representation of the object.
 
Methods inherited from class de.uni_tuebingen.sfb.lichtenstein.formulas.SetDenotator
contains, logicalEquals, subset, superset
 
Methods inherited from class de.uni_tuebingen.sfb.lichtenstein.formulas.Variable
getName
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Predicate

public Predicate(String label)
Initialize a new predicate, with a given label.

Parameters:
label - The label of the predicate.
Postcondition:
The label is set to the given label.
| new.getLabel() == label
Method Detail

getLabel

public String getLabel()
Get the label of this predicate.

Returns:
The label is the same as the name.

equals

public boolean equals(Object other)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Returns:
Two predicates are equal if they have the same label.
| let otherPredicate = (Predicate) other in | result == otherPredicate.getLabel().equals(getLabel())

hashCode

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

Overrides:
hashCode in class Object
Returns:
The hash code is based on the hash code of the label.
| result == getLabel().hashCode()

toString

public String toString()
Returns a string representation of the object.

Overrides:
toString in class Variable
Returns:
The label.
| result == getLabel()