Package io.ebeaninternal.json
Class ModifyAwareSet<E>
- java.lang.Object
-
- io.ebeaninternal.json.ModifyAwareSet<E>
-
- All Implemented Interfaces:
ModifyAwareOwner
,Serializable
,Iterable<E>
,Collection<E>
,Set<E>
public class ModifyAwareSet<E> extends Object implements Set<E>, ModifyAwareOwner
Wraps a Set for the purposes of detecting modifications.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModifyAwareSet(ModifyAwareOwner owner, Set<E> underlying)
Create with an Owner that is notified of modifications.ModifyAwareSet(Set<E> underlying)
Create as top level with it's own ModifyAwareOwner instance wrapping the given Set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(E o)
boolean
addAll(Collection<? extends E> collection)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> collection)
boolean
equals(Object o)
int
hashCode()
boolean
isEmpty()
boolean
isMarkedDirty()
Return true if the value is considered dirty.Iterator<E>
iterator()
void
markAsModified()
Marks the object as modified.boolean
remove(Object o)
boolean
removeAll(Collection<?> collection)
void
resetMarkedDirty()
Reset the dirty state to clean.boolean
retainAll(Collection<?> collection)
int
size()
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.Set
spliterator
-
-
-
-
Constructor Detail
-
ModifyAwareSet
public ModifyAwareSet(Set<E> underlying)
Create as top level with it's own ModifyAwareOwner instance wrapping the given Set.
-
ModifyAwareSet
public ModifyAwareSet(ModifyAwareOwner owner, Set<E> underlying)
Create with an Owner that is notified of modifications.
-
-
Method Detail
-
isMarkedDirty
public boolean isMarkedDirty()
Description copied from interface:ModifyAwareOwner
Return true if the value is considered dirty. Note that this resets the dirty status back to clean.- Specified by:
isMarkedDirty
in interfaceModifyAwareOwner
-
markAsModified
public void markAsModified()
Description copied from interface:ModifyAwareOwner
Marks the object as modified.- Specified by:
markAsModified
in interfaceModifyAwareOwner
-
resetMarkedDirty
public void resetMarkedDirty()
Description copied from interface:ModifyAwareOwner
Reset the dirty state to clean.- Specified by:
resetMarkedDirty
in interfaceModifyAwareOwner
-
hashCode
public int hashCode()
-
addAll
public boolean addAll(Collection<? extends E> collection)
-
clear
public void clear()
-
containsAll
public boolean containsAll(Collection<?> collection)
- Specified by:
containsAll
in interfaceCollection<E>
- Specified by:
containsAll
in interfaceSet<E>
-
isEmpty
public boolean isEmpty()
-
removeAll
public boolean removeAll(Collection<?> collection)
-
retainAll
public boolean retainAll(Collection<?> collection)
-
size
public int size()
-
-