Interface LinkedListSet<I extends LinkedListSetEntry<I,O>,O>
-
- All Known Implementing Classes:
ComparatorLinkedListSet,StrictLinkedListSet
public interface LinkedListSet<I extends LinkedListSetEntry<I,O>,O>Linked List maintaining a unique set ofLinkedListSetEntry.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddEntry(I entry)Adds aLinkedListSetEntryto thisLinkedListSet.LinkedListSetItem<I>copyEntries()Creates a copy of thisLinkedListSetreturning the head of the copy.IgetHead()Obtains the head of thisLinkedListSet.IgetTail()Obtains the tail of thisLinkedListSet.IpurgeEntries()Purges allLinkedListSetEntryinstances within thisLinkedListSet.booleanremoveEntry(I entry)Removes thisLinkedListSetEntryfrom theLinkedListSet.
-
-
-
Method Detail
-
getHead
I getHead()
Obtains the head of thisLinkedListSet.- Returns:
- Head
LinkedListSetEntryof thisLinkedListSet.
-
getTail
I getTail()
Obtains the tail of thisLinkedListSet.- Returns:
- Tail of this
LinkedListSet.
-
addEntry
void addEntry(I entry) throws java.lang.IllegalStateException
Adds aLinkedListSetEntryto thisLinkedListSet.- Parameters:
entry-LinkedListSetEntryto be added to thisLinkedListSet.- Throws:
java.lang.IllegalStateException- IfLinkedListSetEntryis not valid for thisLinkedListSet.
-
removeEntry
boolean removeEntry(I entry) throws java.lang.IllegalStateException
Removes thisLinkedListSetEntryfrom theLinkedListSet.- Parameters:
entry-LinkedListSetEntryto be removed from thisLinkedListSet.- Returns:
trueif theLinkedListSetEntryjust removed was the lastLinkedListSetEntryin theLinkedListSet.- Throws:
java.lang.IllegalStateException- IfLinkedListSetEntryis not valid for thisLinkedListSet.
-
purgeEntries
I purgeEntries()
Purges allLinkedListSetEntryinstances within thisLinkedListSet.- Returns:
- Head of the
LinkedListSet(before the purge) so that may action theLinkedListSetEntryinstances.
-
copyEntries
LinkedListSetItem<I> copyEntries()
Creates a copy of this
LinkedListSetreturning the head of the copy.The returned copy is
Threadsafe to iterate.- Returns:
- Head
LinkedListSetItemof the copy.
-
-