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>, Serializable, Cloneable, Iterable<T>, Collection<T>, List<T>, RandomAccess
Direct Known Subclasses:
ItemListImpl

public class ItemListBaseImpl<T extends SimpleItem> extends ArrayList<T> implements ItemListBase<T>
Standard implementation of ItemListBase interface based on the ArrayList class.
See Also:
  • Constructor Details

    • ItemListBaseImpl

      public ItemListBaseImpl()
  • Method Details

    • contains

      public boolean contains(String handle)
      Description copied from interface: ItemListBase
      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.
      Specified by:
      contains in interface ItemListBase<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: ItemListBase
      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.
      Specified by:
      contains in interface ItemListBase<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(String handle)
      Description copied from interface: ItemListBase
      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.
      Specified by:
      get in interface ItemListBase<T extends SimpleItem>
      Parameters:
      handle - the handle of the item that should be retrieved
      Returns:
      the item with the given handle or null if no item for that key was found.
    • get

      public T get(TechKey techKey)
      Description copied from interface: ItemListBase
      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.
      Specified by:
      get in interface ItemListBase<T extends SimpleItem>
      Parameters:
      techKey - the technical key of the item that should be retrieved
      Returns:
      the item with the given techical key or null if no item for that key was found.
    • indexOf

      public int indexOf(String handle)
      Description copied from interface: ItemListBase
      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.
      Specified by:
      indexOf in interface ItemListBase<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: ItemListBase
      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.
      Specified by:
      indexOf in interface ItemListBase<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(String handle)
      Description copied from interface: ItemListBase
      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.
      Specified by:
      remove in interface ItemListBase<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: ItemListBase
      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.
      Specified by:
      remove in interface ItemListBase<T extends SimpleItem>
      Parameters:
      techKey - index of element to remove from the list
      Returns:
      true if this list contained the specified element