Class IntArrayList

java.lang.Object
com.semedy.reasoner.utils.IntArrayList

public class IntArrayList extends Object
List for ints based on arrays
Author:
juergen
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    add(int i)
    add a new element
    void
    append an int array list at the end
    void
    clear list
    int
    get(int i)
    get element at index i
    boolean
    remove(int i)
    remove an element from list
    void
    set(int i, int value)
    replace element at index i by value
    int
    get the size of the list
    long
    get the size of the list in bytes

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IntArrayList

      public IntArrayList()
  • Method Details

    • sizeInBytes

      public long sizeInBytes()
      get the size of the list in bytes
      Returns:
    • add

      public boolean add(int i) throws IOException
      add a new element
      Parameters:
      i - , the element to add
      Returns:
      has element been added
      Throws:
      IOException
    • remove

      public boolean remove(int i)
      remove an element from list
      Parameters:
      i - , element to be removed
      Returns:
      element has been removed
    • get

      public int get(int i)
      get element at index i
      Parameters:
      i -
      Returns:
    • set

      public void set(int i, int value)
      replace element at index i by value
      Parameters:
      i - , index
      value - , new value
    • size

      public int size()
      get the size of the list
      Returns:
    • clear

      public void clear()
      clear list
    • append

      public void append(IntArrayList L) throws IOException
      append an int array list at the end
      Parameters:
      L - , list to append
      Throws:
      IOException