Class BlockList

  • All Implemented Interfaces:
    java.lang.Iterable<Block>, java.util.Collection<Block>, java.util.List<Block>

    public class BlockList
    extends java.lang.Object
    implements java.util.List<Block>
    • Constructor Summary

      Constructors 
      Constructor Description
      BlockList()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(int index, Block element)  
      boolean add​(Block e)  
      boolean addAll​(int index, java.util.Collection<? extends Block> c)  
      boolean addAll​(java.util.Collection<? extends Block> c)  
      void clear()  
      boolean contains​(java.lang.Object o)  
      boolean containsAll​(java.util.Collection<?> c)  
      Block get​(int index)  
      int indexOf​(java.lang.Object o)  
      void insert​(Block newBlock, Block nextBlock)
      newBlock gets inserted before nextBlock.
      boolean isEmpty()  
      java.util.Iterator<Block> iterator()  
      int lastIndexOf​(java.lang.Object o)  
      java.util.ListIterator<Block> listIterator()  
      java.util.ListIterator<Block> listIterator​(int index)  
      Block remove​(int index)  
      boolean remove​(java.lang.Object o)  
      boolean removeAll​(java.util.Collection<?> c)  
      void replace​(Block oldBlock, Block newBlock)  
      boolean retainAll​(java.util.Collection<?> c)  
      Block set​(int index, Block element)  
      int size()  
      java.util.List<Block> subList​(int fromIndex, int toIndex)  
      java.lang.Object[] toArray()  
      <T> T[] toArray​(T[] array)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        equals, hashCode, replaceAll, sort, spliterator
    • Constructor Detail

      • BlockList

        public BlockList()
    • Method Detail

      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<Block>
        Specified by:
        size in interface java.util.List<Block>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<Block>
        Specified by:
        isEmpty in interface java.util.List<Block>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<Block>
        Specified by:
        contains in interface java.util.List<Block>
      • iterator

        public java.util.Iterator<Block> iterator()
        Specified by:
        iterator in interface java.util.Collection<Block>
        Specified by:
        iterator in interface java.lang.Iterable<Block>
        Specified by:
        iterator in interface java.util.List<Block>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<Block>
        Specified by:
        toArray in interface java.util.List<Block>
      • toArray

        public <T> T[] toArray​(T[] array)
        Specified by:
        toArray in interface java.util.Collection<Block>
        Specified by:
        toArray in interface java.util.List<Block>
      • add

        public boolean add​(Block e)
        Specified by:
        add in interface java.util.Collection<Block>
        Specified by:
        add in interface java.util.List<Block>
      • insert

        public void insert​(Block newBlock,
                           Block nextBlock)
        newBlock gets inserted before nextBlock.
        Parameters:
        newBlock -
        nextBlock -
      • replace

        public void replace​(Block oldBlock,
                            Block newBlock)
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<Block>
        Specified by:
        remove in interface java.util.List<Block>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<Block>
        Specified by:
        containsAll in interface java.util.List<Block>
      • addAll

        public boolean addAll​(java.util.Collection<? extends Block> c)
        Specified by:
        addAll in interface java.util.Collection<Block>
        Specified by:
        addAll in interface java.util.List<Block>
      • addAll

        public boolean addAll​(int index,
                              java.util.Collection<? extends Block> c)
        Specified by:
        addAll in interface java.util.List<Block>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<Block>
        Specified by:
        removeAll in interface java.util.List<Block>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<Block>
        Specified by:
        retainAll in interface java.util.List<Block>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<Block>
        Specified by:
        clear in interface java.util.List<Block>
      • get

        public Block get​(int index)
        Specified by:
        get in interface java.util.List<Block>
      • set

        public Block set​(int index,
                         Block element)
        Specified by:
        set in interface java.util.List<Block>
      • add

        public void add​(int index,
                        Block element)
        Specified by:
        add in interface java.util.List<Block>
      • remove

        public Block remove​(int index)
        Specified by:
        remove in interface java.util.List<Block>
      • indexOf

        public int indexOf​(java.lang.Object o)
        Specified by:
        indexOf in interface java.util.List<Block>
      • lastIndexOf

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

        public java.util.ListIterator<Block> listIterator()
        Specified by:
        listIterator in interface java.util.List<Block>
      • listIterator

        public java.util.ListIterator<Block> listIterator​(int index)
        Specified by:
        listIterator in interface java.util.List<Block>
      • subList

        public java.util.List<Block> subList​(int fromIndex,
                                             int toIndex)
        Specified by:
        subList in interface java.util.List<Block>