|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.PropsList
public class PropsList
This class represents a list of Props stored in memory. It can be extended to provide alternate storage layers, or used externally with associated Import and Export agents.
| Field Summary | |
|---|---|
protected boolean |
dirty
|
protected FlushInterface |
flushHandler
|
protected IPropsChangeListener |
propsChangeListener
|
protected java.util.List |
propsList
|
protected java.lang.Object[] |
synchObject
|
| Constructor Summary | |
|---|---|
PropsList()
|
|
| Method Summary | |
|---|---|
void |
addProps(Props p)
Adds the specified Props to this list. |
Props |
createProps()
Creates a new Props and adds it to this list. |
void |
flush()
Calls the FlushInterface implementation assigned to this object. |
Props |
getProps(java.lang.String key,
java.lang.Object value)
Returns the first matching Props in the list based on specified key and value. |
java.util.List |
listProps()
Returns a List containing all of the Props contained by this List. |
java.util.List |
listProps(java.lang.String key,
java.lang.Object value)
Returns a List containing a subset of the Props contained by this list specified by a matching key and value. |
java.util.List |
listProps(java.lang.String key,
java.lang.Object value,
java.lang.String sortBy)
Returns a List containing a subset of the Props contained by this list specified by a matching key and value. |
java.util.List |
listPropsMatchingRegEx(java.lang.String key,
java.lang.String regex)
Returns a List containing a subset of the Props contained by this list specified by a matching property containing a regular expression. |
java.util.List |
listPropsRegExMatching(java.lang.String key,
java.lang.String str)
Returns a List containing a subset of the Props contained by this list specified by a matching property containing a regular expression. |
boolean |
needsToSave()
Returns true if any of the data managed by this list has been changed. |
boolean |
removeProps(Props p)
If the list contains the specified Props it is removed and true is return; otherwise it returns false. |
boolean |
removeProps(java.lang.String key,
java.lang.Object value)
Removes all Props from the list with matching key and value. |
void |
resetNeedsToSave()
Resets the changed (dirty) state of this PropsList. |
void |
setFlushHandler(FlushInterface flushHandler)
Sets the FlushInterface implementation called by this class when its flush() method is called. |
protected void |
setPropsChangeListener(IPropsChangeListener propsChangeListener)
Sets the PropsChangeListener implementation called by Props added or created in this PropsList. |
static java.util.List |
sortPropsList(java.util.List propsList,
java.lang.String key)
Static method for sorting a List containing Props alphabetically by the specified key. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.Object[] synchObject
protected java.util.List propsList
protected boolean dirty
protected IPropsChangeListener propsChangeListener
protected FlushInterface flushHandler
| Constructor Detail |
|---|
public PropsList()
| Method Detail |
|---|
public void addProps(Props p)
public Props createProps()
public void flush()
public Props getProps(java.lang.String key,
java.lang.Object value)
public java.util.List listProps()
public java.util.List listProps(java.lang.String key,
java.lang.Object value)
public java.util.List listProps(java.lang.String key,
java.lang.Object value,
java.lang.String sortBy)
public java.util.List listPropsRegExMatching(java.lang.String key,
java.lang.String str)
public java.util.List listPropsMatchingRegEx(java.lang.String key,
java.lang.String regex)
public boolean needsToSave()
public void resetNeedsToSave()
public boolean removeProps(Props p)
public boolean removeProps(java.lang.String key,
java.lang.Object value)
public void setFlushHandler(FlushInterface flushHandler)
protected void setPropsChangeListener(IPropsChangeListener propsChangeListener)
public static java.util.List sortPropsList(java.util.List propsList,
java.lang.String key)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||