Package com.android.sdklib.repository
Class IdDisplay
- java.lang.Object
-
- com.android.sdklib.repository.IdDisplay
-
- All Implemented Interfaces:
java.lang.Comparable<IdDisplay>
- Direct Known Subclasses:
IdDisplayType,IdDisplayType,IdDisplayType
public abstract class IdDisplay extends java.lang.Object implements java.lang.Comparable<IdDisplay>
A string with both user-friendly and easily-parsed versions. Contains stubs to be overridden by xjc-generated classes.
-
-
Constructor Summary
Constructors Constructor Description IdDisplay()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(IdDisplay o)static IdDisplaycreate(java.lang.String id, java.lang.String display)booleanequals(java.lang.Object o)abstract java.lang.StringgetDisplay()Gets the user-friendly version of the string.abstract java.lang.StringgetId()Gets the machine-friendly version of the string.inthashCode()static java.lang.StringidToDisplay(java.lang.String id)Computes a display-friendly tag string based on the id.abstract voidsetDisplay(java.lang.String display)Sets the user-friendly version of the string.abstract voidsetId(java.lang.String id)Sets the machine-friendly version of the string.java.lang.StringtoString()Returns a string representation for *debug* purposes only, not for UI display.
-
-
-
Method Detail
-
create
public static IdDisplay create(@NonNull java.lang.String id, @NonNull java.lang.String display)
-
setId
public abstract void setId(@NonNull java.lang.String id)Sets the machine-friendly version of the string.
-
setDisplay
public abstract void setDisplay(@NonNull java.lang.String display)Sets the user-friendly version of the string.
-
getId
@NonNull public abstract java.lang.String getId()
Gets the machine-friendly version of the string.
-
getDisplay
@NonNull public abstract java.lang.String getDisplay()
Gets the user-friendly version of the string.
-
compareTo
public int compareTo(IdDisplay o)
- Specified by:
compareToin interfacejava.lang.Comparable<IdDisplay>
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
Returns a string representation for *debug* purposes only, not for UI display.- Overrides:
toStringin classjava.lang.Object
-
idToDisplay
@NonNull public static java.lang.String idToDisplay(@NonNull java.lang.String id)Computes a display-friendly tag string based on the id. This is typically used when there's no display attribute.- Parameters:
id- A non-null id to sanitize for display.- Returns:
- The id with all non-alphanum symbols replaced by spaces and trimmed.
-
-