choco.kernel.memory.structure
Class StoredBipartiteSet<E>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by choco.kernel.memory.structure.StoredBipartiteSet<E>
Type Parameters:
E -
All Implemented Interfaces:
Iterable<E>, Collection<E>, List<E>
Direct Known Subclasses:
StoredBipartiteVarSet

public class StoredBipartiteSet<E>
extends AbstractList<E>

Since:
10 févr. 2009 version 2.0.3
Version:
2.0.3
Author:
Arnaud Malapert

Field Summary
protected  E[] elementData
          The list of values
protected  IStateInt last
          The index of last element of the list
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
StoredBipartiteSet(IEnvironment env, Collection<E> coll)
           
StoredBipartiteSet(IEnvironment env, E[] elementData)
           
 
Method Summary
 E get(int index)
           
 E getQuick(int index)
           
 DisposableIterator<E> quickIterator()
           
 E remove(int index)
          removal performs a swap on a pair of elements.
 int size()
           
 void sort(Comparator<E> cmp)
           
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

elementData

protected E[] elementData
The list of values


last

protected IStateInt last
The index of last element of the list

Constructor Detail

StoredBipartiteSet

public StoredBipartiteSet(IEnvironment env,
                          Collection<E> coll)

StoredBipartiteSet

public StoredBipartiteSet(IEnvironment env,
                          E[] elementData)
Method Detail

get

public E get(int index)
Specified by:
get in interface List<E>
Specified by:
get in class AbstractList<E>

getQuick

public E getQuick(int index)

quickIterator

public DisposableIterator<E> quickIterator()

size

public int size()
Specified by:
size in interface Collection<E>
Specified by:
size in interface List<E>
Specified by:
size in class AbstractCollection<E>

remove

public E remove(int index)
removal performs a swap on a pair of elements. Do not remove while iterating if you want to preserve the current order.

Specified by:
remove in interface List<E>
Overrides:
remove in class AbstractList<E>
See Also:
AbstractList.remove(int)

sort

public void sort(Comparator<E> cmp)


Copyright © 2012. All Rights Reserved.