com.endeca.navigation
Class Property

java.lang.Object
  extended by com.endeca.navigation.Property
All Implemented Interfaces:
Comparable, Map.Entry

public class Property
extends Object
implements Map.Entry, Comparable

Class representing a name/value Endeca property pair.


Method Summary
 int compareTo(Object o)
          Compares this object to other Property o.
 boolean equals(Object o)
          Compares the specified object with this for equality.
 Object getKey()
          Gets the name of the property.
 Object getValue()
          Gets the value of the property.
 int hashCode()
          Generates the hash code for this object.
 Object setValue(Object value)
          Unsupported method for Map.Entry interface compatibility.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKey

public Object getKey()
Gets the name of the property. Returned object is of type String.

Specified by:
getKey in interface Map.Entry
Returns:
Key of the property.

getValue

public Object getValue()
Gets the value of the property. Returned object is of type String.

Specified by:
getValue in interface Map.Entry
Returns:
Value of the property.

setValue

public Object setValue(Object value)
Unsupported method for Map.Entry interface compatibility. Will throw UnsupportedOperationException

Specified by:
setValue in interface Map.Entry
Throws:
UnsupportedOperationException - If this method is called.

equals

public boolean equals(Object o)
Compares the specified object with this for equality.

Specified by:
equals in interface Map.Entry
Overrides:
equals in class Object
Returns:
true if the object can be cast as a Map.Entry and has the same key and value and false if not.

hashCode

public int hashCode()
Generates the hash code for this object.

Specified by:
hashCode in interface Map.Entry
Overrides:
hashCode in class Object
Returns:
The hash code for this map entry.

compareTo

public int compareTo(Object o)
Compares this object to other Property o. Casts o as Property and returns a negative int if this is less than o, zero if they are the same, and a positive int if this is greater than o. This method is implemented so as to support the comparable interface so that this class can be used in Abstract classes such as TreeMap.

Specified by:
compareTo in interface Comparable
Returns:
Negative int if this is less than o, 0 if they are equal, and a positive int if this is greater than o.
Throws:
ClassCastException - If o can't be cast as a Property.


2010 Endeca Technologies, Inc.
Endeca Confidential