static class UnitCache.CacheKey extends java.lang.Object implements java.lang.Comparable<UnitCache.CacheKey>
This class also implements the comparable interface so that it is possible to sort units in the order of their symbols. If two symbols are equal the one with the lowes quantity id is sorted first.
Modifier and Type | Field and Description |
---|---|
private int |
quantityId |
private java.lang.String |
symbol |
Constructor and Description |
---|
UnitCache.CacheKey(int quantityId,
java.lang.String symbol) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(UnitCache.CacheKey o) |
boolean |
equals(java.lang.Object other) |
int |
hashCode()
From the Object class
---------------------
|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int compareTo(UnitCache.CacheKey o)
compareTo
in interface java.lang.Comparable<UnitCache.CacheKey>