|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.fikin.pojostate.state.AbstractState
public abstract class AbstractState
Prototype implementation of State interface.
It provides with default handling for all methods.
Subclasses can modify any of them to suite their needs better. created on Mar 6, 2007
| Nested Class Summary | |
|---|---|
protected class |
AbstractState.PropertyNameComparator
This class is solely created to be used by getProperty(String)
to search in the Vector with Properties for given name. |
| Field Summary |
|---|
| Fields inherited from interface net.sf.fikin.pojostate.State |
|---|
SORT_ASC, SORT_BY_DESC, SORT_BY_NAME, SORT_BY_VALUE, SORT_DESC |
| Constructor Summary | |
|---|---|
AbstractState()
|
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object arg0)
adds the given object to the collection with Properties |
void |
add(Property property)
|
boolean |
addAll(java.util.Collection arg0)
not implemented, dummy method |
void |
clear()
not implemented, dummy method |
java.lang.Object |
clone()
implements cloning |
boolean |
contains(java.lang.Object o)
|
boolean |
containsAll(java.util.Collection arg0)
test if given collection is present in the Properties |
java.lang.ClassLoader |
getClassLoader()
|
StateFormat |
getFormat()
get state's formatting object Formatting object is responsible to convey this State
object to a string representation. |
java.util.Locale |
getLocale()
|
java.lang.Object |
getObject()
|
java.util.Vector |
getProperties()
|
Property |
getProperty(java.lang.String propertyName)
look for Property object with given UI name |
boolean |
isEmpty()
|
java.util.Iterator |
iterator()
|
boolean |
remove(java.lang.Object o)
not implemented, dummy method |
boolean |
removeAll(java.util.Collection arg0)
not implemented, dummy method |
boolean |
retainAll(java.util.Collection arg0)
not implemented, dummy method |
void |
setClassLoader(java.lang.ClassLoader loader)
|
void |
setFormat(StateFormat format)
assign the formating object |
void |
setLocale(java.util.Locale locale)
|
void |
setObject(java.lang.Object object)
assign the underlying POJO |
protected void |
setProperties(java.util.Vector properties)
|
int |
size()
|
void |
sort(int leadField,
int order)
sort the objects directly in the underlying collection |
protected java.lang.Object[] |
sortArray(int leadField,
int order)
implementation of the sorting subclasses can utilize it in their particular implementation of sort(int,int) method. |
java.lang.Object[] |
toArray()
|
java.lang.Object[] |
toArray(java.lang.Object[] arg0)
|
java.lang.String |
toString()
print the State in its appropriate textual format. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.fikin.pojostate.StatePrototype |
|---|
newProperty |
| Methods inherited from interface net.sf.fikin.pojostate.State |
|---|
update |
| Methods inherited from interface java.util.Collection |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public AbstractState()
| Method Detail |
|---|
public java.lang.ClassLoader getClassLoader()
getClassLoader in interface Statepublic void setClassLoader(java.lang.ClassLoader loader)
setClassLoader in interface StatePrototypeloader - The loader to set.public java.util.Locale getLocale()
getLocale in interface Statepublic void setLocale(java.util.Locale locale)
setLocale in interface StatePrototypelocale - The locale to set.public java.util.Vector getProperties()
protected void setProperties(java.util.Vector properties)
public void add(Property property)
property - to add the listpublic java.lang.Object getObject()
getObject in interface Statepublic void setObject(java.lang.Object object)
setObject in interface StatePrototypeobject - public StateFormat getFormat()
State
Formatting object is responsible to convey this State
object to a string representation. >Typical layout formats is to be
expected to be tabular text, XML, HTML or similar.
This object is used by State.toString() too.
getFormat in interface Statepublic void setFormat(StateFormat format)
setFormat in interface StatePrototypeformat - public Property getProperty(java.lang.String propertyName)
Property object with given UI name
getProperty in interface StatepropertyName - to look for
Property object with that UI name or null if no such
found
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface StatePrototypeclone in class java.lang.Objectjava.lang.CloneNotSupportedException
public void sort(int leadField,
int order)
sort in interface StateleadField - order -
protected java.lang.Object[] sortArray(int leadField,
int order)
subclasses can utilize it in their particular implementation of
sort(int,int) method.
leadField - is the leading propertyorder - is ascending or descending
public java.lang.String toString()
This implementation is a dynamic i.e. uses the assigned formatter object to generate the appearance upon each call.
toString in interface StatetoString in class java.lang.ObjectgetFormat().format( this )public int size()
size in interface java.util.Collectionpublic boolean isEmpty()
isEmpty in interface java.util.Collectionpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectionpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectionpublic java.lang.Object[] toArray()
toArray in interface java.util.Collectionpublic java.lang.Object[] toArray(java.lang.Object[] arg0)
toArray in interface java.util.Collectionpublic boolean add(java.lang.Object arg0)
add in interface java.util.Collectionpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionpublic boolean containsAll(java.util.Collection arg0)
containsAll in interface java.util.Collectionarg0 -
public boolean addAll(java.util.Collection arg0)
addAll in interface java.util.Collectionpublic boolean removeAll(java.util.Collection arg0)
removeAll in interface java.util.Collectionpublic boolean retainAll(java.util.Collection arg0)
retainAll in interface java.util.Collectionpublic void clear()
clear in interface java.util.Collection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||