Interface ItemListBase<T extends SimpleItem>
- Type Parameters:
T- Actual Item Type
- All Superinterfaces:
Collection<T>,Iterable<T>,List<T>
- All Known Subinterfaces:
ItemList
- All Known Implementing Classes:
ItemListBaseImpl,ItemListImpl
This Interface derives from the standard List interface. It Represents a List of anything extending
ItemBase Interface. The concrete type can be specified via generics. In addition to the standard List
interface it provides additional get,remove and contains methods using the techKey or the item handle as identifier.-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns true if this list contains an element with the given technical key
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.booleanReturns true if this list contains an element with the given handle
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.Returns the item specified by the given technical key.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.Returns the item specified by the given handle.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.intReturns the index for the item with the given key.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.intReturns the index for the item with the given handle.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last. booleanRemove the given element from this list, if it exists.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.booleanRemove the given element from this list, if it exists.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
contains
Returns true if this list contains an element with the given handle
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
handle- handle to search for- Returns:
- true if this list contains an element with the given handle
-
contains
Returns true if this list contains an element with the given technical key
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
techKey- techKey to search for- Returns:
- true if this list contains an element with the given technical key
-
get
Returns the item specified by the given handle.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
handle- the handle of the item that should be retrieved- Returns:
- the item with the given handle or
nullif no item for that key was found.
-
get
Returns the item specified by the given technical key.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
techKey- the technical key of the item that should be retrieved- Returns:
- the item with the given techical key or
nullif no item for that key was found.
-
indexOf
Returns the index for the item with the given handle.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last. - Parameters:
handle- item handle- Returns:
- index in the item list, or -1 if such an element does not exists.
-
indexOf
Returns the index for the item with the given key.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
techKey- item key- Returns:
- index in the item list, or -1 if such an element does not exists.
-
remove
Remove the given element from this list, if it exists.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
handle- of element to remove from the list- Returns:
- true if this list contained the specified element
-
remove
Remove the given element from this list, if it exists.
Note - This implementation assumes that the list is small and performs a simple search running in the list from the first element to the last.- Parameters:
techKey- index of element to remove from the list- Returns:
- true if this list contained the specified element
-