| Method from org.displaytag.properties.SortOrderEnum Detail: |
public boolean equals(Object o) {
if (this == o)
{
return true;
}
return false;
}
Only a single instance of a specific enumeration can be created, so we can check using ==. |
public static SortOrderEnum fromCode(int key) {
for (int i = 0; i < ALL.length; i++)
{
if (key == ALL[i].getCode())
{
return ALL[i];
}
}
// lookup failed
return null;
}
lookup a SortOrderEnum by key. |
public static SortOrderEnum fromCode(Integer key) {
if (key == null)
{
return null;
}
return fromCode(key.intValue());
}
lookup a SortOrderEnum by an Integer key. |
public static SortOrderEnum fromIntegerCode(Integer key) {
return fromCode(key);
} Deprecated! use - fromCode(Integer)
lookup a SortOrderEnum by an Integer key. |
public static SortOrderEnum fromName(String code) {
for (int i = 0; i < ALL.length; i++)
{
if (ALL[i].getName().equals(code))
{
return ALL[i];
}
}
// lookup failed
return null;
}
Lookup a SortOrderEnum by a String key. |
public int getCode() {
return this.enumCode;
}
|
public String getName() {
return this.enumName;
}
|
public int hashCode() {
return new HashCodeBuilder(1123997057, -1289836553).append(this.enumCode).toHashCode();
}
|
public static Iterator iterator() {
return new ArrayIterator(ALL);
}
returns an iterator on all the enumerated instaces. |
public String toString() {
return getName();
}
returns the enumeration description. |