Class ItemListBaseImpl<T extends SimpleItem>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<T>
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.ItemListBaseImpl<T>
-
- Type Parameters:
T- The actual item type
- All Implemented Interfaces:
ItemListBase<T>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<T>,java.util.Collection<T>,java.util.List<T>,java.util.RandomAccess
- Direct Known Subclasses:
ItemListImpl
public class ItemListBaseImpl<T extends SimpleItem> extends java.util.ArrayList<T> implements ItemListBase<T>
Standard implementation of ItemListBase interface based on the ArrayList class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ItemListBaseImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(TechKey techKey)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.booleancontains(java.lang.String handle)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.Tget(TechKey techKey)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.Tget(java.lang.String handle)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.intindexOf(TechKey techKey)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.intindexOf(java.lang.String handle)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. booleanremove(TechKey techKey)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.booleanremove(java.lang.String handle)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.-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods 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 Detail
-
contains
public boolean contains(java.lang.String handle)
Description copied from interface:ItemListBaseReturns 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.- Specified by:
containsin interfaceItemListBase<T extends SimpleItem>- Parameters:
handle- handle to search for- Returns:
- true if this list contains an element with the given handle
-
contains
public boolean contains(TechKey techKey)
Description copied from interface:ItemListBaseReturns 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.- Specified by:
containsin interfaceItemListBase<T extends SimpleItem>- Parameters:
techKey- techKey to search for- Returns:
- true if this list contains an element with the given technical key
-
get
public T get(java.lang.String handle)
Description copied from interface:ItemListBaseReturns 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.- Specified by:
getin interfaceItemListBase<T extends SimpleItem>- 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
public T get(TechKey techKey)
Description copied from interface:ItemListBaseReturns 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.- Specified by:
getin interfaceItemListBase<T extends SimpleItem>- 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
public int indexOf(java.lang.String handle)
Description copied from interface:ItemListBaseReturns 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. - Specified by:
indexOfin interfaceItemListBase<T extends SimpleItem>- Parameters:
handle- item handle- Returns:
- index in the item list, or -1 if such an element does not exists.
-
indexOf
public int indexOf(TechKey techKey)
Description copied from interface:ItemListBaseReturns 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.- Specified by:
indexOfin interfaceItemListBase<T extends SimpleItem>- Parameters:
techKey- item key- Returns:
- index in the item list, or -1 if such an element does not exists.
-
remove
public boolean remove(java.lang.String handle)
Description copied from interface:ItemListBaseRemove 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.- Specified by:
removein interfaceItemListBase<T extends SimpleItem>- Parameters:
handle- of element to remove from the list- Returns:
- true if this list contained the specified element
-
remove
public boolean remove(TechKey techKey)
Description copied from interface:ItemListBaseRemove 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.- Specified by:
removein interfaceItemListBase<T extends SimpleItem>- Parameters:
techKey- index of element to remove from the list- Returns:
- true if this list contained the specified element
-
-