Class LazyList.IntegerRangeList

  • All Implemented Interfaces:
    java.lang.Iterable<java.lang.Integer>, java.util.Collection<java.lang.Integer>, java.util.List<java.lang.Integer>, org.eclipse.emf.common.util.EList<java.lang.Integer>
    Enclosing class:
    LazyList<E>

    public static class LazyList.IntegerRangeList
    extends LazyList<java.lang.Integer>
    LazyList that represents a range running from a first to last Integer.
    • Field Detail

      • first

        protected final int first
      • last

        protected final int last
    • Constructor Detail

      • IntegerRangeList

        public IntegerRangeList​(int first,
                                int last)
        Parameters:
        first - the first object of the range to include
        last - the last object of the range to include
    • Method Detail

      • createCache

        protected void createCache()
        Creates the cache collections.
        Overrides:
        createCache in class LazyList<java.lang.Integer>
      • first

        public java.lang.Integer first()
        Returns the first element in self.
        Overrides:
        first in class LazyList<java.lang.Integer>
        Returns:
        The first element in self.
      • get

        public java.lang.Integer get​(int index)
        Specified by:
        get in interface java.util.List<java.lang.Integer>
        Overrides:
        get in class LazyList<java.lang.Integer>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<java.lang.Integer>
        Overrides:
        indexOf in class LazyList<java.lang.Integer>
      • last

        public java.lang.Integer last()
        Returns the last element in self.
        Overrides:
        last in class LazyList<java.lang.Integer>
        Returns:
        The last element in self.
      • lastIndexOf

        public int lastIndexOf​(java.lang.Object o)
        Specified by:
        lastIndexOf in interface java.util.List<java.lang.Integer>
        Overrides:
        lastIndexOf in class LazyList<java.lang.Integer>
      • listIterator

        public java.util.ListIterator<java.lang.Integer> listIterator()
        Specified by:
        listIterator in interface java.util.List<java.lang.Integer>
        Overrides:
        listIterator in class LazyList<java.lang.Integer>
      • listIterator

        public java.util.ListIterator<java.lang.Integer> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<java.lang.Integer>
        Overrides:
        listIterator in class LazyList<java.lang.Integer>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<java.lang.Integer>
        Specified by:
        contains in interface java.util.List<java.lang.Integer>
        Overrides:
        contains in class LazyCollection<java.lang.Integer>
      • count

        public int count​(java.lang.Object object)
        Returns the number of times that object occurs in the collection self.
        Overrides:
        count in class LazyCollection<java.lang.Integer>
        Parameters:
        object - the object to check for
        Returns:
        The number of times that object occurs in the collection self.
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<java.lang.Integer>
        Specified by:
        isEmpty in interface java.util.List<java.lang.Integer>
        Overrides:
        isEmpty in class LazyCollection<java.lang.Integer>
      • iterator

        public java.util.Iterator<java.lang.Integer> iterator()
        Specified by:
        iterator in interface java.util.Collection<java.lang.Integer>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Integer>
        Specified by:
        iterator in interface java.util.List<java.lang.Integer>
        Overrides:
        iterator in class LazyCollection<java.lang.Integer>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<java.lang.Integer>
        Specified by:
        size in interface java.util.List<java.lang.Integer>
        Overrides:
        size in class LazyCollection<java.lang.Integer>