|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--wtanaka.praya.obj.Obj
|
+--wtanaka.praya.obj.NormalFolder
|
+--wtanaka.praya.obj.LimitFolder
LimitFolder limits the size of a folder based on age, or a maximum size of the folder, or both.
Return to
or the Praya Homepage
| Field Summary | |
private long |
m_delay
|
private int |
m_numObjs
|
| Fields inherited from class wtanaka.praya.obj.NormalFolder |
folderListeners, m_storage, MAGIC_NUMBER, name, parent, serialVersionUID, sortKey |
| Fields inherited from class wtanaka.praya.obj.Obj |
CONTENTS, date, DATE, FROM, privThread, REVCONTENTS, REVDATE, REVFROM, REVSCORE, REVSUBJECT, SCORE, secretObject, SUBJECT |
| Constructor Summary | |
LimitFolder()
|
|
| Method Summary | |
void |
add(Obj a)
Adds the given object to the end of this folder. |
private void |
limitBySize()
Limits the folder based on size. |
private void |
limitByTime()
|
void |
setSizeLimit(int numObjs)
Sets the maximum number of Objs that can be in the folder. |
void |
setTimelimit(long delay)
If delay is < 0, there is no time limit. |
| Methods inherited from class wtanaka.praya.obj.NormalFolder |
addFolderListener, elements, fireAdded, fireRemoved, getChildAt, getContents, getName, getNumChildren, getParent, indexOf, isTrashCanUsed, mergeSort, readExternal, remove, remove, remove, removeFolderListener, selectSort, setName, sort, toString, writeExternal |
| Methods inherited from class wtanaka.praya.obj.Obj |
getFrom, getSubject, getTimeStamp, isPrivileged, lessThan, setPrivilegedThread, setSecretObject, setTimeStamp |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private long m_delay
private int m_numObjs
| Constructor Detail |
public LimitFolder()
| Method Detail |
public void setTimelimit(long delay)
public void setSizeLimit(int numObjs)
numObjs - if this is negative, there is no limit. Otherwise,
when adding Objs to the folder, if the size would go over numObjs, the
oldest one will be deleted before the new one is added.private void limitBySize()
private void limitByTime()
public void add(Obj a)
NormalFolderadd in class NormalFolderwtanaka.praya.obj.NormalFoldera - the object to add to the folder. It cannot be null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||