Package org.zkoss.bind.proxy
Class AbstractCollectionProxy<E>
java.lang.Object
org.zkoss.bind.proxy.AbstractCollectionProxy<E>
- All Implemented Interfaces:
Serializable,Iterable<E>,Collection<E>,javassist.util.proxy.Proxy,FormProxyObject
public abstract class AbstractCollectionProxy<E>
extends Object
implements Collection<E>, javassist.util.proxy.Proxy, FormProxyObject, Serializable
This class provides a skeletal implementation of the Collection
- Since:
- 8.0.0
- Author:
- jumperchen
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends E> c) voidcacheSavePropertyBinding(String property, SavePropertyBinding s) Cache save property binding by property stringvoidclear()Set<org.zkoss.util.Pair<String,SavePropertyBinding>> Collect all of collect cached save property bindingsbooleanbooleancontainsAll(Collection<?> c) protected <T> TcreateProxyObject(T t) protected <T extends Collection<E>>
TgetCache()Returns the origin object.protected abstract Collection<E>booleanisEmpty()booleanReturns whether the form proxy object is dirty or not, including all of its attributes.iterator()voidvoidbooleanbooleanremoveAll(Collection<?> c) protected ObjectreplaceOrigin(Object origin) voidResets all of the changes of this form from the origin object.booleanretainAll(Collection<?> c) protected voidsetDirty(boolean d) voidsetFormOwner(Object owner, FormBinding binding) Sets the owner of this form with its binding.voidsetHandler(javassist.util.proxy.MethodHandler mi) voidSet the property of current form proxy object and it's creatorintsize()voidSaves all of the changes of this form to the origin object.protected static booleantestEquals(Object e, Object o) Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
Field Details
-
_dirty
protected boolean _dirty -
isImmutableElements
protected boolean isImmutableElements
-
-
Constructor Details
-
AbstractCollectionProxy
-
-
Method Details
-
initCache
-
getCache
-
getOriginObject
Description copied from interface:FormProxyObjectReturns the origin object.- Specified by:
getOriginObjectin interfaceFormProxyObject
-
replaceOrigin
-
onDirtyChange
public void onDirtyChange() -
onDataChange
-
setDirty
protected void setDirty(boolean d) -
setHandler
public void setHandler(javassist.util.proxy.MethodHandler mi) - Specified by:
setHandlerin interfacejavassist.util.proxy.Proxy
-
size
public int size()- Specified by:
sizein interfaceCollection<E>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>
-
contains
- Specified by:
containsin interfaceCollection<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>
-
iterator
-
toArray
- Specified by:
toArrayin interfaceCollection<E>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<E>
-
add
- Specified by:
addin interfaceCollection<E>
-
remove
- Specified by:
removein interfaceCollection<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>
-
isFormDirty
public boolean isFormDirty()Description copied from interface:FormProxyObjectReturns whether the form proxy object is dirty or not, including all of its attributes.- Specified by:
isFormDirtyin interfaceFormProxyObject
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>
-
resetFromOrigin
public void resetFromOrigin()Description copied from interface:FormProxyObjectResets all of the changes of this form from the origin object.- Specified by:
resetFromOriginin interfaceFormProxyObject
-
submitToOrigin
Description copied from interface:FormProxyObjectSaves all of the changes of this form to the origin object.- Specified by:
submitToOriginin interfaceFormProxyObject
-
testEquals
-
setFormOwner
Description copied from interface:FormProxyObjectSets the owner of this form with its binding.- Specified by:
setFormOwnerin interfaceFormProxyObject- Parameters:
owner- the object associated with this form.
-
createProxyObject
protected <T> T createProxyObject(T t) -
cacheSavePropertyBinding
Description copied from interface:FormProxyObjectCache save property binding by property string- Specified by:
cacheSavePropertyBindingin interfaceFormProxyObject- Parameters:
property- the property of save property bindings- the save property binding
-
collectCachedSavePropertyBinding
Description copied from interface:FormProxyObjectCollect all of collect cached save property bindings- Specified by:
collectCachedSavePropertyBindingin interfaceFormProxyObject
-
setPath
Description copied from interface:FormProxyObjectSet the property of current form proxy object and it's creator- Specified by:
setPathin interfaceFormProxyObject- Parameters:
property- p the propertyparent- parent the parent proxy node
-