korat.utils
Interface IIntList

All Known Implementing Classes:
IntList, IntListAI, IntListBS

public interface IIntList

Author:
Sasa Misailovic

Method Summary
 boolean add(int arg0)
          Adds an element to the end of IIntList.
 void clear()
          Clears all elements from the list.
 boolean contains(int elem)
          Returns whether list contains element elem
 int get(int index)
          Gets i-th element from the list.
 boolean isEmpty()
          Returns true if there are no elements in the list, false if there is at least one element in the list
 int numberOfElements()
          Returns number of the elements contained in this list.
 int removeLast()
          Removes last element from the IIntList.
 int set(int index, int elem)
          Sets i-th element of the list to value elem.
 int[] toArray()
          Returns array representation of IntList elements
 

Method Detail

numberOfElements

int numberOfElements()
Returns number of the elements contained in this list.


isEmpty

boolean isEmpty()
Returns true if there are no elements in the list, false if there is at least one element in the list


contains

boolean contains(int elem)
Returns whether list contains element elem


toArray

int[] toArray()
Returns array representation of IntList elements


add

boolean add(int arg0)
Adds an element to the end of IIntList. New elements can always be added to IIntList


removeLast

int removeLast()
Removes last element from the IIntList. This operation can be successfully carried out only if the list is not empty.


clear

void clear()
Clears all elements from the list.


get

int get(int index)
Gets i-th element from the list. This operation can be successfully carried out only if the index of the object is smaller then the number of the elements in the list. Otherwise, the results are unpredictable.

Number of elements in the list can be obtained by invoking numberOfElements().


set

int set(int index,
        int elem)
Sets i-th element of the list to value elem. This operation can be successfully carried out only if the index of the object is smaller then the number of the elements in the list. Otherwise, the results are unpredictable.

Number of elements in the list can be obtained by invoking numberOfElements().