com.android.sdklib.repository.descriptors
Class IdDisplay

java.lang.Object
  extended by com.android.sdklib.repository.descriptors.IdDisplay
All Implemented Interfaces:
java.lang.Comparable<IdDisplay>

public final class IdDisplay
extends java.lang.Object
implements java.lang.Comparable<IdDisplay>

Immutable structure that represents a tuple (id-string + display-string.)


Constructor Summary
IdDisplay(java.lang.String id, java.lang.String display)
          Creates a new immutable tuple (id-string + display-string.)
 
Method Summary
 int compareTo(IdDisplay tag)
          IdDisplay instances are the same if they have the same id.
 boolean equals(java.lang.Object obj)
          Equality of IdDisplay instances only rely on the id equality.
 java.lang.String getDisplay()
           
 java.lang.String getId()
           
 int hashCode()
          Hash code of IdDisplay instances only rely on the id hash code.
 java.lang.String toString()
          Returns a string representation for *debug* purposes only, not for UI display.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdDisplay

public IdDisplay(@NonNull
                 java.lang.String id,
                 @NonNull
                 java.lang.String display)
Creates a new immutable tuple (id-string + display-string.)

Parameters:
id - The non-null id string.
display - The non-null display string.
Method Detail

getId

@NonNull
public java.lang.String getId()

getDisplay

@NonNull
public java.lang.String getDisplay()

compareTo

public int compareTo(IdDisplay tag)
IdDisplay instances are the same if they have the same id. The display value is not used for comparison or ordering.

Specified by:
compareTo in interface java.lang.Comparable<IdDisplay>

hashCode

public int hashCode()
Hash code of IdDisplay instances only rely on the id hash code.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Equality of IdDisplay instances only rely on the id equality. The display value is not used for comparison or ordering.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Returns a string representation for *debug* purposes only, not for UI display.

Overrides:
toString in class java.lang.Object