lt.monarch.chart.style
Class Key

java.lang.Object
  extended by lt.monarch.chart.style.Key
All Implemented Interfaces:
java.io.Serializable

public class Key
extends java.lang.Object
implements java.io.Serializable

Stylesheet property key. It is used to speed up the search. It intern's and hashes the subkeys in advance and defines a incomplete but fast equals function.

See Also:
Serialized Form

Constructor Summary
Constructor and Description
Key(java.lang.String tag, java.lang.String attribute)
          Constructs a new Key with the specified tag and attribute.
 
Method Summary
Modifier and Type Method and Description
protected  boolean equals(Key otherKey)
           
 boolean equals(java.lang.Object o)
          Indicates whether some other key is "equal to" this one.
 java.lang.String getAttribute()
          Returns the attribute name of the Key.
 java.lang.String getTag()
          Returns a tag of the Key.
 int hashCode()
          Returns the hash code value of the Key object.
 java.lang.String toString()
          Returns the string representation of the Key object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Key

public Key(java.lang.String tag,
           java.lang.String attribute)
Constructs a new Key with the specified tag and attribute.

Parameters:
tag - the tag
attribute - the attribute name
Method Detail

getTag

public java.lang.String getTag()
Returns a tag of the Key.

Returns:
the tag

getAttribute

public java.lang.String getAttribute()
Returns the attribute name of the Key.

Returns:
the attribute name

toString

public java.lang.String toString()
Returns the string representation of the Key object.

Overrides:
toString in class java.lang.Object
Returns:
the string representation of the Key object

hashCode

public int hashCode()
Returns the hash code value of the Key object. The hash code value for Key object is calculated as: tag.hashCode() ^ attribute.hashCode()

Overrides:
hashCode in class java.lang.Object
Returns:
the hash code value

equals

public boolean equals(java.lang.Object o)
Indicates whether some other key is "equal to" this one. Two keys are equal if their tags and attributes are the same.

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare
Returns:
true if this key is the same as the o argument; false otherwise

equals

protected boolean equals(Key otherKey)