Interface SimpleListAccess<T>

  • Type Parameters:
    T -
    All Superinterfaces:
    java.lang.Iterable<T>
    All Known Subinterfaces:
    AlternativeProductList
    All Known Implementing Classes:
    AlternativeProductListImpl

    public interface SimpleListAccess<T>
    extends java.lang.Iterable<T>
    Some older list based business objects are working with an underlying array list but do neither implement the List interface, nor do they provide direct access to the underlying list in in a common way. Still they have the method of this interface in common. So they can now be accessed in a unified way using this interface.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isEmpty()
      checks if the list is empty
      java.util.Iterator<T> iterator()
      returns an iterator
      int size()
      returns the size of the list
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Method Detail

      • size

        int size()
        returns the size of the list
        Returns:
        size of the list
      • iterator

        java.util.Iterator<T> iterator()
        returns an iterator
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Returns:
        iterator
      • isEmpty

        boolean isEmpty()
        checks if the list is empty
        Returns:
        returns true, only if is the list is empty