|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.limegroup.gnutella.gui.tables.SizeHolder
Wrapper class that holds on to the size integer for a file so that we don't have to read it from disk every time while sorting.
Constructor Summary | |
SizeHolder(int size)
The constructor sets the size and string variables, creating a formatted string in kilobytes from the size value. |
Method Summary | |
int |
compareTo(java.lang.Object o)
|
int |
getSize()
Returns the size of the file in kilobytes. |
void |
setSize(int size)
Sets the size held. |
java.lang.String |
toString()
Returns the string value of this size, formatted with commas and "KB" appended to the end. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SizeHolder(int size)
size
- the size of the file in kilobytesMethod Detail |
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public java.lang.String toString()
public void setSize(int size)
size
- the new size to holdpublic int getSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |