org.nuiton.util
Class MatrixMap.SemanticList<T>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<T>
org.nuiton.util.MatrixMap.SemanticList<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, List<T>, RandomAccess
- Enclosing interface:
- MatrixMap<E>
public static class MatrixMap.SemanticList<T>
- extends AbstractList<T>
- implements RandomAccess
Collection particuliere utilisee pour la stockage des semantiques.
Sert a optimiser la recherche de la position d'une donnee dans la liste.
Permet aussi de verifier qu'on ajoute pas de doublon dans la liste
| Methods inherited from class java.util.AbstractList |
add, addAll, clear, equals, hashCode, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList |
datas
protected ArrayList<T> datas
index
protected Map<T,Integer> index
MatrixMap.SemanticList
public MatrixMap.SemanticList()
MatrixMap.SemanticList
public MatrixMap.SemanticList(Collection<T> c)
get
public T get(int index)
- Specified by:
get in interface List<T>- Specified by:
get in class AbstractList<T>
add
public void add(int index,
T element)
- Specified by:
add in interface List<T>- Overrides:
add in class AbstractList<T>
set
public T set(int index,
T element)
- Specified by:
set in interface List<T>- Overrides:
set in class AbstractList<T>
remove
public T remove(int index)
- Specified by:
remove in interface List<T>- Overrides:
remove in class AbstractList<T>
size
public int size()
- Specified by:
size in interface Collection<T>- Specified by:
size in interface List<T>- Specified by:
size in class AbstractCollection<T>
indexOf
public int indexOf(Object o)
- Specified by:
indexOf in interface List<T>- Overrides:
indexOf in class AbstractList<T>
getIndex
protected Map<T,Integer> getIndex()
Copyright © 2004-2011 CodeLutin. All Rights Reserved.