public class LinkedHashSet<E> extends LinkedHashSet<E> implements BackedSCO
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
allowNulls |
protected SetStore<E> |
backingStore |
protected boolean |
initialising |
protected boolean |
isCacheLoaded |
protected boolean |
useCache |
delegate, ownerMmd, ownerOP| Constructor and Description |
|---|
LinkedHashSet(ObjectProvider op,
AbstractMemberMetaData mmd)
Constructor, using the ObjectProvider of the "owner" and the field name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E element)
Method to add an element to the LinkedHashSet.
|
boolean |
addAll(Collection elements)
Method to add a collection to the LinkedHashSet.
|
void |
clear()
Method to clear the LinkedHashSet
|
Object |
clone()
Creates and returns a copy of this object.
|
boolean |
contains(Object element)
Accessor for whether an element is contained in this Set.
|
boolean |
containsAll(Collection c)
Accessor for whether a collection is contained in this Set.
|
boolean |
equals(Object o) |
void |
forEach(java.util.function.Consumer action) |
Store |
getBackingStore() |
LinkedHashSet |
getValue()
Accessor for the unwrapped value that we are wrapping.
|
int |
hashCode() |
void |
initialise()
Method to initialise the SCO for use.
|
void |
initialise(LinkedHashSet c)
Method to initialise the SCO from an existing value.
|
void |
initialise(LinkedHashSet<E> newValue,
Object oldValue)
Method to initialise the SCO for use, where replacing an old value with a new value such as when calling a setter field
passing in a new value.
|
boolean |
isEmpty()
Accessor for whether the LinkedHashSet is empty.
|
boolean |
isLoaded()
Method to return if the SCO has its contents loaded.
|
Iterator<E> |
iterator()
Accessor for an iterator for the Set.
|
void |
load()
Method to effect the load of the data in the SCO.
|
protected void |
loadFromStore()
Method to load all elements from the "backing store" where appropriate.
|
java.util.stream.Stream |
parallelStream() |
boolean |
remove(Object element)
Method to remove an element from the LinkedHashSet.
|
boolean |
remove(Object element,
boolean allowCascadeDelete)
Method to remove an element from the collection, and observe the flag for whether to allow cascade delete.
|
boolean |
removeAll(Collection elements)
Method to remove all elements from the collection from the LinkedHashSet.
|
boolean |
retainAll(Collection c)
Method to retain a Collection of elements (and remove all others).
|
int |
size()
Accessor for the size of the LinkedHashSet.
|
Spliterator |
spliterator() |
java.util.stream.Stream |
stream() |
Object[] |
toArray()
Method to return the list as an array.
|
Object[] |
toArray(Object[] a)
Method to return the list as an array.
|
void |
unsetOwner()
Method to unset the owner and backing store information.
|
void |
updateEmbeddedElement(E element,
int fieldNumber,
Object value,
boolean makeDirty)
Method to update an embedded element in this collection.
|
protected Object |
writeReplace()
The writeReplace method is called when ObjectOutputStream is preparing
to write the object to the stream.
|
attachCopy, detachCopy, getFieldName, getOwner, makeDirty, setValuetoStringfinalize, getClass, notify, notifyAll, wait, wait, waitremoveIfprotected transient boolean allowNulls
protected transient boolean useCache
protected transient boolean isCacheLoaded
protected transient boolean initialising
public LinkedHashSet(ObjectProvider op, AbstractMemberMetaData mmd)
op - The owner ObjectProvidermmd - Metadata for the memberpublic void initialise(LinkedHashSet<E> newValue, Object oldValue)
SCOinitialise in interface SCO<LinkedHashSet<E>>initialise in class LinkedHashSet<E>newValue - New value (to wrap)oldValue - Old value (to use in deciding what needs deleting etc)public void initialise(LinkedHashSet c)
initialise in interface SCO<LinkedHashSet<E>>initialise in class LinkedHashSet<E>c - The object to set frompublic void initialise()
initialise in interface SCO<LinkedHashSet<E>>initialise in class LinkedHashSet<E>public LinkedHashSet getValue()
getValue in interface SCO<LinkedHashSet<E>>getValue in class LinkedHashSet<E>public void load()
load in interface SCOContainer<LinkedHashSet<E>>load in class LinkedHashSet<E>public boolean isLoaded()
isLoaded in interface SCOContainer<LinkedHashSet<E>>isLoaded in interface BackedSCOisLoaded in class LinkedHashSet<E>protected void loadFromStore()
public Store getBackingStore()
getBackingStore in interface BackedSCOpublic void updateEmbeddedElement(E element, int fieldNumber, Object value, boolean makeDirty)
updateEmbeddedElement in interface SCOCollection<LinkedHashSet<E>,E>updateEmbeddedElement in class LinkedHashSet<E>element - The elementfieldNumber - Number of field in the elementvalue - New value for this fieldmakeDirty - Whether to make the SCO field dirty.public void unsetOwner()
unsetOwner in interface SCO<LinkedHashSet<E>>unsetOwner in class LinkedHashSet<E>public Object clone()
clone in interface SCO<LinkedHashSet<E>>clone in class LinkedHashSet<E>public boolean contains(Object element)
contains in interface Collection<E>contains in interface Set<E>contains in class LinkedHashSet<E>element - The elementpublic boolean containsAll(Collection c)
containsAll in interface Collection<E>containsAll in interface Set<E>containsAll in class LinkedHashSet<E>c - The collectionpublic boolean equals(Object o)
equals in interface Collection<E>equals in interface Set<E>equals in class LinkedHashSet<E>public void forEach(java.util.function.Consumer action)
public int hashCode()
hashCode in interface Collection<E>hashCode in interface Set<E>hashCode in class LinkedHashSet<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface Set<E>isEmpty in class LinkedHashSet<E>public int size()
size in interface Collection<E>size in interface Set<E>size in class LinkedHashSet<E>public Object[] toArray()
toArray in interface Collection<E>toArray in interface Set<E>toArray in class LinkedHashSet<E>public Object[] toArray(Object[] a)
toArray in interface Collection<E>toArray in interface Set<E>toArray in class LinkedHashSet<E>a - The runtime types of the array being defined by this parampublic boolean add(E element)
add in interface Collection<E>add in interface Set<E>add in class LinkedHashSet<E>element - The new elementpublic boolean addAll(Collection elements)
addAll in interface Collection<E>addAll in interface Set<E>addAll in class LinkedHashSet<E>elements - The collectionpublic void clear()
clear in interface Collection<E>clear in interface Set<E>clear in class LinkedHashSet<E>public boolean remove(Object element)
remove in interface Collection<E>remove in interface Set<E>remove in class LinkedHashSet<E>element - The elementpublic boolean remove(Object element, boolean allowCascadeDelete)
remove in interface SCOCollection<LinkedHashSet<E>,E>remove in class LinkedHashSet<E>element - The elementallowCascadeDelete - Whether to allow cascade deletepublic boolean removeAll(Collection elements)
removeAll in interface Collection<E>removeAll in interface Set<E>removeAll in class LinkedHashSet<E>elements - The collection of elements to removepublic boolean retainAll(Collection c)
retainAll in interface Collection<E>retainAll in interface Set<E>retainAll in class LinkedHashSet<E>c - The collection to retainprotected Object writeReplace() throws ObjectStreamException
writeReplace in class LinkedHashSet<E>ObjectStreamException - if an error occurspublic Spliterator spliterator()
spliterator in interface Iterable<E>spliterator in interface Collection<E>spliterator in interface Set<E>spliterator in class LinkedHashSet<E>public java.util.stream.Stream stream()
stream in interface Collection<E>stream in class LinkedHashSet<E>public java.util.stream.Stream parallelStream()
parallelStream in interface Collection<E>parallelStream in class LinkedHashSet<E>Copyright © 2020. All rights reserved.