org.codehaus.plexus.classworlds.realm
Class Entry

java.lang.Object
  extended by org.codehaus.plexus.classworlds.realm.Entry
All Implemented Interfaces:
java.lang.Comparable

public class Entry
extends java.lang.Object
implements java.lang.Comparable

Import description entry.

Author:
bob mcwhirter

Method Summary
 int compareTo(java.lang.Object thatObj)
          Compare this entry to another for relative ordering.
 boolean equals(java.lang.Object thatObj)
          Test this entry for equality to another.
 int hashCode()
          

Consistent with equals(java.lang.Object), this method creates a hashCode based on the packagename.

 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

compareTo

public int compareTo(java.lang.Object thatObj)
Compare this entry to another for relative ordering.

The natural ordering of Entry objects is reverse-alphabetical based upon package name.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
thatObj - The object to compare.
Returns:
-1 if this object sorts before that object, 0 if they are equal, or 1 if this object sorts after that object.

equals

public boolean equals(java.lang.Object thatObj)
Test this entry for equality to another.

Consistent with compareTo(java.lang.Object), this method tests for equality purely on the package name.

Overrides:
equals in class java.lang.Object
Parameters:
thatObj - The object to compare
Returns:
true if the two objects are semantically equivalent, otherwise false.

hashCode

public int hashCode()

Consistent with equals(java.lang.Object), this method creates a hashCode based on the packagename.

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2002-2009 Codehaus. All Rights Reserved.