Package org.eclipse.osgi.framework.util
Interface KeyedElement
public interface KeyedElement
NOTE: This interface defines an element that could be inserted into an
internal class called
KeyedHashSet
. This internal class
KeyedHashSet
has been deleted. The KeyedElement interface has
remained because of the use of it in ClasspathEntry
. A keyed
element can easily be put into a standard Map implementation by using the
keyed element key for the mapping.
An element of an KeyedHashSet
. A KeyedElement privides the key
which is used to hash the elements in an KeyedHashSet
.
- Since:
- 3.2
-
Method Summary
Modifier and TypeMethodDescriptionboolean
compare
(KeyedElement other) Compares this element with a specified elementgetKey()
Returns the key for this elementint
Returns the hash code of the key
-
Method Details
-
getKeyHashCode
int getKeyHashCode()Returns the hash code of the key- Returns:
- the hash code of the key
-
compare
Compares this element with a specified element- Parameters:
other
- the element to compare with- Returns:
- returns true if the specified element equals this element
-
getKey
Object getKey()Returns the key for this element- Returns:
- the key for this element
-