modele
Class ObjectListe

java.lang.Object
  extended by modele.ObjectListe
Direct Known Subclasses:
BooleanListe, ConvertedAlignementListe, IntegerListe, NoeudArbreExecListe, PalindromeListe, PalindromeListeListe, SequenceListe

public abstract class ObjectListe
extends java.lang.Object

Generic Liste made for example, liability and make this programm readable (and modeling). Please do NOT use it !, to discourage anyone to use it, this is an abstract class and deprecated functions.
Useness of this class is to transmit a model like Vector but althought more specific : this permit to avoid cast, if you do not like operations like the following one (because this is not very read-friendly) : <ObjectType> something = (<ObjectType>)vector.getObjetAt(42)
[...]
Methods here are for examples of what you can find in descendants. Copy, Paste and change it to new specific Liste's. Think you can add (and you already have to do so) sorting procedure, average calculator methods...
Of course since Java 1.5, you can do Vector<ObjectType>... Not so easy to use this Vector<ObjectType> !
Use case of this class (and inheritant classes :

Author:
Gabriel Chandesris (2008)
See Also:
modele, modele, modele

Field Summary
private  java.lang.Object[] liste
          The list of Object's.
 
Constructor Summary
ObjectListe()
          Default constructor with a list of 0 elements.
ObjectListe(java.lang.Object[] liste)
          Constructor with a pre-made table of Object's.
 
Method Summary
 void addObjet(java.lang.Object elt)
          Deprecated. Please do NOT use this function !
 boolean equals(ObjectListe toCompare)
          Deprecated. Please do NOT use this function !
 java.lang.Object[] getListeObjects()
          Deprecated. Please do NOT use this function !
 java.lang.Object getObject(int i)
          Deprecated. Please do NOT use this function !
 boolean has(java.lang.Object elt)
          Deprecated. Please do NOT use this function !
abstract  int length()
          To get the length of the current list of Object's
 void removeObject(int nbElt)
          Deprecated. Please do NOT use this function !
 void removeObject(java.lang.Object elt)
          Deprecated. Please do NOT use this function !
 void setListe(java.lang.Object[] liste)
          Deprecated. Please do NOT use this function !
 void setObject(java.lang.Object elt, int i)
          Deprecated. Please do NOT use this function !
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

liste

private java.lang.Object[] liste
The list of Object's.

Constructor Detail

ObjectListe

public ObjectListe()
Default constructor with a list of 0 elements.


ObjectListe

public ObjectListe(java.lang.Object[] liste)
Constructor with a pre-made table of Object's.

Parameters:
liste -
Method Detail

length

public abstract int length()
To get the length of the current list of Object's

Returns:
int

getListeObjects

public java.lang.Object[] getListeObjects()
Deprecated. Please do NOT use this function !

To get the current liste of Object's.

Returns:
Object[]

getObject

public java.lang.Object getObject(int i)
Deprecated. Please do NOT use this function !

To get a specific Object of the list.

Parameters:
i - int (position of the Object in the list).
Returns:
Object

setListe

public void setListe(java.lang.Object[] liste)
Deprecated. Please do NOT use this function !

To set a new liste in the instance of ObjectListe.

Parameters:
liste -

setObject

public void setObject(java.lang.Object elt,
                      int i)
Deprecated. Please do NOT use this function !

To set an Object at a specific place in the liste, replace the old one.

Parameters:
elt - Object to set.
i - int (greater or equal to 0, and lower to liste.length).

addObjet

public void addObjet(java.lang.Object elt)
Deprecated. Please do NOT use this function !

To add an Object to the end of the liste.

Parameters:
elt - Object to add.

has

public boolean has(java.lang.Object elt)
Deprecated. Please do NOT use this function !

To know if an Object is present is the liste.

Parameters:
elt - Object
Returns:
boolean

removeObject

public void removeObject(java.lang.Object elt)
Deprecated. Please do NOT use this function !

To remove a specific Object (nothing append if not present).

Parameters:
elt - Object to remove.

removeObject

public void removeObject(int nbElt)
Deprecated. Please do NOT use this function !

To remove an Object at a specific place in the liste.

Parameters:
nbElt - position of the Object

equals

public boolean equals(ObjectListe toCompare)
Deprecated. Please do NOT use this function !

To know if two ObjectListe are equals (local instance and an other).

Parameters:
toCompare - Other ObjectListe.
Returns:
boolean