Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.fudaa.ebli.commun
Class EbliListeSelection  view EbliListeSelection download EbliListeSelection.java

java.lang.Object
  extended byorg.fudaa.ebli.commun.EbliListeSelection
All Implemented Interfaces:
java.lang.Cloneable

public class EbliListeSelection
extends java.lang.Object
implements java.lang.Cloneable

Liste de selection encapsulant un BitSet. Des methodes sont rajoutees pour gerer les operations avec d'autres listes d'index ou des inversions de selection dans un intervalle donne.

Version:
$Id: EbliListeSelection.java,v 1.2 2003/01/06 14:13:36 deniger Exp $

Field Summary
private  java.util.BitSet index_
          liste stockant les indexs
private  java.util.Set listeners_
          les listeners de cette liste de selection
 
Constructor Summary
EbliListeSelection()
          initialise la liste de selection avec comme taille 32.
EbliListeSelection(java.util.BitSet _b)
          initialise la liste avec _b.
EbliListeSelection(int _taille)
          Initialise la liste de selection avec la taille _taille.
 
Method Summary
 void add(EbliListeSelection _l)
          Operation add ( soit une operation or ) avec la liste _l.
 void add(int _i)
          Ajoute l'index _i a la selection.
private  boolean add(int _i, boolean _event)
           
 void addInterval(int _deb, int _fin)
          Ajoute tous les indexs de [_deb,_fin];
private  boolean addInterval(int _deb, int _fin, boolean _event)
           
 void addListeSelectionListener(EbliListeSelectionListener _l)
           
 void and(EbliListeSelection _l)
          Operation and avec la liste _l
 void clear()
          Enleve tous les indexs de la selection et envoie un evt.
private  boolean clear(boolean _event)
           
 void clearListeSelectionListener()
           
 java.lang.Object clone()
          Clone cet objet: creation d'une nouvelle instance avec le clone du BitSet.
 boolean contains(EbliListeSelection _l)
          Renvoie true si cette selection contient totalement la selection _l.
 boolean equals(java.lang.Object _o)
          Fait appel a la methode equals de BitSet.
private  void fireSelectionEvent()
           
 EbliListeSelection getInverse()
          Renvoie l'inverse de cette selection dans l'intervalle [0;length()[.
 EbliListeSelection getInverse(int _taille)
          Renvoie l'inverse de cette selection dans l'intervalle [0;_taille[.
 int getMaxIndex()
           
 int[] getSelectedIndex()
           
 int[] getSelectedIndex(int _taille)
          Renvoie la liste des indexs selectionnes dans l'intervalle [0;_taille[.
 int hashcode()
           
 void intersection(EbliListeSelection _l)
          Operation intersection ( soit une operation and) avec la liste _l.
 boolean intersects(EbliListeSelection _l)
          Renvoie true si l'intersection avec _l non vide.
 void inverse()
          Inverse la selection dans l'intervalle [0, length()[.
 void inverse(int _taille)
          Inverse la selection dans l'intervalle [0, _taille[.
private  void inverse(int _taille, boolean _event)
          Inverse la selection dans l'intervalle [0, _taille[.
 boolean isEmpty()
           
 boolean isSelected(int _i)
           
 int length()
           
static void main(java.lang.String[] args)
           
 void or(EbliListeSelection _l)
          Operation or avec la liste _l
private  boolean or(EbliListeSelection _l, boolean _event)
          Operation or avec la liste _l
 void remove(EbliListeSelection _l)
          Enleve tous les indexs selectionnes de _l.
 void remove(int _i)
          Enleve l'index _i a la selection.
private  boolean remove(int _i, boolean _event)
           
 void removeInterval(int _deb, int _fin)
           
private  boolean removeInterval(int _deb, int _fin, boolean _event)
          Enleve tous les indexs de [_deb,_fin];
 void removeListeSelectionListener(EbliListeSelectionListener _l)
           
 void setSelection(EbliListeSelection _l)
           
 void setSelectionInterval(int _deb, int _fin)
           
private  boolean setSelectionInterval(int _deb, int _fin, boolean _event)
           
 void xor(EbliListeSelection _l)
          Operation xor avec la liste _l
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index_

private java.util.BitSet index_
liste stockant les indexs


listeners_

private java.util.Set listeners_
les listeners de cette liste de selection

Constructor Detail

EbliListeSelection

public EbliListeSelection()
initialise la liste de selection avec comme taille 32.


EbliListeSelection

public EbliListeSelection(int _taille)
Initialise la liste de selection avec la taille _taille.


EbliListeSelection

public EbliListeSelection(java.util.BitSet _b)
initialise la liste avec _b. Envoie une exception si _b est nul.

Method Detail

addListeSelectionListener

public void addListeSelectionListener(EbliListeSelectionListener _l)

removeListeSelectionListener

public void removeListeSelectionListener(EbliListeSelectionListener _l)

clearListeSelectionListener

public void clearListeSelectionListener()

fireSelectionEvent

private void fireSelectionEvent()

main

public static void main(java.lang.String[] args)

setSelectionInterval

public void setSelectionInterval(int _deb,
                                 int _fin)

setSelectionInterval

private boolean setSelectionInterval(int _deb,
                                     int _fin,
                                     boolean _event)

setSelection

public void setSelection(EbliListeSelection _l)

isSelected

public boolean isSelected(int _i)

isEmpty

public boolean isEmpty()

getInverse

public EbliListeSelection getInverse()
Renvoie l'inverse de cette selection dans l'intervalle [0;length()[.


getInverse

public EbliListeSelection getInverse(int _taille)
Renvoie l'inverse de cette selection dans l'intervalle [0;_taille[.


getMaxIndex

public int getMaxIndex()

add

public void add(int _i)
Ajoute l'index _i a la selection.


add

private boolean add(int _i,
                    boolean _event)

remove

public void remove(int _i)
Enleve l'index _i a la selection.


remove

private boolean remove(int _i,
                       boolean _event)

addInterval

public void addInterval(int _deb,
                        int _fin)
Ajoute tous les indexs de [_deb,_fin];


addInterval

private boolean addInterval(int _deb,
                            int _fin,
                            boolean _event)

removeInterval

private boolean removeInterval(int _deb,
                               int _fin,
                               boolean _event)
Enleve tous les indexs de [_deb,_fin];


removeInterval

public void removeInterval(int _deb,
                           int _fin)

equals

public boolean equals(java.lang.Object _o)
Fait appel a la methode equals de BitSet.


hashcode

public int hashcode()

clear

private boolean clear(boolean _event)

clear

public void clear()
Enleve tous les indexs de la selection et envoie un evt.


length

public int length()

inverse

public void inverse()
Inverse la selection dans l'intervalle [0, length()[. Envoie un evt si modification.


inverse

public void inverse(int _taille)
Inverse la selection dans l'intervalle [0, _taille[. Envoie un evt si modification.


inverse

private void inverse(int _taille,
                     boolean _event)
Inverse la selection dans l'intervalle [0, _taille[.


getSelectedIndex

public int[] getSelectedIndex()

clone

public java.lang.Object clone()
Clone cet objet: creation d'une nouvelle instance avec le clone du BitSet.


getSelectedIndex

public int[] getSelectedIndex(int _taille)
Renvoie la liste des indexs selectionnes dans l'intervalle [0;_taille[.


or

private boolean or(EbliListeSelection _l,
                   boolean _event)
Operation or avec la liste _l


or

public void or(EbliListeSelection _l)
Operation or avec la liste _l


xor

public void xor(EbliListeSelection _l)
Operation xor avec la liste _l


and

public void and(EbliListeSelection _l)
Operation and avec la liste _l


intersection

public void intersection(EbliListeSelection _l)
Operation intersection ( soit une operation and) avec la liste _l.


add

public void add(EbliListeSelection _l)
Operation add ( soit une operation or ) avec la liste _l. Envoie un evt seulement si des changements sont effectues.


remove

public void remove(EbliListeSelection _l)
Enleve tous les indexs selectionnes de _l.


contains

public boolean contains(EbliListeSelection _l)
Renvoie true si cette selection contient totalement la selection _l.


intersects

public boolean intersects(EbliListeSelection _l)
Renvoie true si l'intersection avec _l non vide.