public class ObjectUsageCount extends Object implements Comparator<ObjectUsageCount>, Comparable<ObjectUsageCount>
Constructor and Description |
---|
ObjectUsageCount(String objectName,
int nrUses) |
Modifier and Type | Method and Description |
---|---|
int |
compare(ObjectUsageCount count1,
ObjectUsageCount count2) |
int |
compareTo(ObjectUsageCount count) |
static ObjectUsageCount |
fromString(String string) |
int |
getNrUses() |
String |
getObjectName() |
int |
increment()
Increment the nr of uses with 1
|
void |
reset() |
void |
setNrUses(int nrUses) |
void |
setObjectName(String objectName) |
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals
public ObjectUsageCount(String objectName, int nrUses)
objectName
- nrUses
- public static ObjectUsageCount fromString(String string)
public int compare(ObjectUsageCount count1, ObjectUsageCount count2)
compare
in interface Comparator<ObjectUsageCount>
public int compareTo(ObjectUsageCount count)
compareTo
in interface Comparable<ObjectUsageCount>
public void reset()
public int increment()
public int getNrUses()
public void setNrUses(int nrUses)
nrUses
- the nrUses to setpublic String getObjectName()
public void setObjectName(String objectName)
objectName
- the objectName to set