torero.model
Class AttributeAssingnment.AttribKey

java.lang.Object
  |
  +--torero.model.AttributeAssingnment.AttribKey
All Implemented Interfaces:
Serializable
Enclosing class:
AttributeAssingnment

public class AttributeAssingnment.AttribKey
extends Object
implements Serializable

The inner AttribKey class is used to represent the the elements that can be assigned to each other. It consists of a ListElement and an Attribute that is from the list of Attributes the referencing Symbol of the ListElement has.

See Also:
Serialized Form

Constructor Summary
AttributeAssingnment.AttribKey(Production.ListElement le, Attribute attrib)
          This constructor takes a ListElement and an Attribute from the list of Attributes the referencing Symbol of the ListElement has.
 
Method Summary
 boolean equals(Object o)
          Two AttribKeys are equal if they are referencing to the same ListElement and Attribute.
 Attribute getAttribute()
          Returns the Attribute part of the AttribKey Object.
 Production.ListElement getListElement()
          Returns the ListElement part of the AttribKey Object.
 int hashCode()
           
 boolean isCompatible(AttributeAssingnment.AttribKey ak)
          Two AttribKeys are compatible if their ListElements are compatible and they have the same Attribute.
 boolean isMemberOf(Production pr)
          Checks if this AttribKey is an Inner Object of the given Production (is defined in it's scope).
 boolean looksequal(AttributeAssingnment.AttribKey ak)
          Two AttribKeys look equal if their ListElements are referencing to the same Symbol and they have the same Attribute.
 String stringRep()
          Returns a unique Key for this Object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeAssingnment.AttribKey

public AttributeAssingnment.AttribKey(Production.ListElement le,
                                      Attribute attrib)
This constructor takes a ListElement and an Attribute from the list of Attributes the referencing Symbol of the ListElement has.
Parameters:
le - takes a ListElement
attrib - an Attribute from the list of Attributes the referencing Symbol of the ListElement has
Method Detail

getListElement

public Production.ListElement getListElement()
Returns the ListElement part of the AttribKey Object.
Returns:
returns the ListElement part of the AttribKey Object

getAttribute

public Attribute getAttribute()
Returns the Attribute part of the AttribKey Object.
Returns:
returns the Attribute part of the AttribKey Object

stringRep

public String stringRep()
Returns a unique Key for this Object.
Returns:
returns a unique Key for this Object

toString

public String toString()
Overrides:
toString in class Object

isMemberOf

public boolean isMemberOf(Production pr)
Checks if this AttribKey is an Inner Object of the given Production (is defined in it's scope).
Parameters:
pr - takes the production used as criterion
Returns:
true if this AttribKey is an Inner Class Object of the given Production.

equals

public boolean equals(Object o)
Two AttribKeys are equal if they are referencing to the same ListElement and Attribute.
Overrides:
equals in class Object

looksequal

public boolean looksequal(AttributeAssingnment.AttribKey ak)
Two AttribKeys look equal if their ListElements are referencing to the same Symbol and they have the same Attribute.

isCompatible

public boolean isCompatible(AttributeAssingnment.AttribKey ak)
Two AttribKeys are compatible if their ListElements are compatible and they have the same Attribute.
See Also:
Production.ListElement

hashCode

public int hashCode()
Overrides:
hashCode in class Object