tp0
Class Index

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<Entry>
              extended by tp0.Index
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Entry>, java.util.Collection<Entry>, java.util.List<Entry>, java.util.RandomAccess

public class Index
extends java.util.Vector<Entry>

La classe pour l'index : un vecteur trie sur les mots.

Author:
jroyer 8/7/2008
See Also:
Serialized Form

Constructor Summary
Index()
          Constructeur par defaut.
 
Method Summary
 boolean add(Entry e)
          Ajoute une NOUVELLE entree dans l'index.
 Entry get(java.lang.String m)
          Retourne l'entree correspondant au mot dans l'index.
 boolean isIn(java.lang.String m)
          Determine si le mot est deja reference ou pas.
 java.lang.String toString()
          Representation sous forme de chaine.
 
Methods inherited from class java.util.Vector
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

Index

public Index()
Constructeur par defaut.

Method Detail

add

public boolean add(Entry e)
Ajoute une NOUVELLE entree dans l'index. REQUIRE: !this.isIn(e)

Specified by:
add in interface java.util.Collection<Entry>
Specified by:
add in interface java.util.List<Entry>
Overrides:
add in class java.util.Vector<Entry>
Parameters:
e - l'entree a ajouter
Returns:
DOIT retourner true

isIn

public boolean isIn(java.lang.String m)
Determine si le mot est deja reference ou pas.

Parameters:
m - le mot
Returns:
booleen

get

public Entry get(java.lang.String m)
Retourne l'entree correspondant au mot dans l'index. REQUIRE: this.isIn(mot)

Parameters:
m - le mot
Returns:
l'entree correspondante

toString

public java.lang.String toString()
Representation sous forme de chaine.

Overrides:
toString in class java.util.Vector<Entry>
Returns:
une string