static class UnitCache.CacheKey extends Object implements 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 String |
symbol |
Constructor and Description |
---|
UnitCache.CacheKey(int quantityId,
String symbol) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(UnitCache.CacheKey o) |
boolean |
equals(Object other) |
int |
hashCode()
From the Object class
---------------------
|
private final int quantityId
private final String symbol
UnitCache.CacheKey(int quantityId, String symbol)
public int hashCode()
public int compareTo(UnitCache.CacheKey o)
compareTo
in interface Comparable<UnitCache.CacheKey>