cds.simbad
Class MagnitudeList

java.lang.Object
  extended bycds.simbad.MagnitudeList
All Implemented Interfaces:
java.io.Serializable

public class MagnitudeList
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
private static CompareByFilter cbf
           
private  java.util.ArrayList maglist
           
private  MagnitudePecul magpecul
           
private  boolean sorted
           
 
Constructor Summary
MagnitudeList()
          Empty constructor
 
Method Summary
 void addMagnitude(Magnitude mag)
          Add a Magnitude to the list
 void clear()
          Clears the magnitude list and reset other internal data.
 boolean equals(java.lang.Object o)
          MOD-BB 21-01-04 Ajout de cette methode.
 Magnitude getMagnitude(int n)
          Get the nth magnitude object in the list
 Magnitude getMagnitude(java.lang.String filtername)
          Returns the Magnitude object corresponding to a filter name
 MagnitudePecul getPeculiarities()
          Returns the peculiarities object
 int getSize()
          Get the size of the list (number of magnitudes defined)
 boolean isEmpty()
          Checks if the magnitude list is empty
 java.util.Iterator iterator()
          Returns an iterator on the magnitudes object contaned in the list.
 void setPeculiarities(MagnitudePecul mpec)
          Sets the pecularities for the group of magnitudes.
 void setPeculiarities(java.lang.String strpecul)
          Sets the pecularities for the group of magnitudes.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cbf

private static final CompareByFilter cbf

maglist

private java.util.ArrayList maglist

sorted

private boolean sorted

magpecul

private MagnitudePecul magpecul
Constructor Detail

MagnitudeList

public MagnitudeList()
Empty constructor

Method Detail

clear

public void clear()
Clears the magnitude list and reset other internal data. This is useful to allow object reuse instead of recreation


isEmpty

public boolean isEmpty()
Checks if the magnitude list is empty

Returns:
true if the magnitude list is empty. false otherwise

addMagnitude

public void addMagnitude(Magnitude mag)
Add a Magnitude to the list

Parameters:
mag - Magnitude object to add

setPeculiarities

public void setPeculiarities(MagnitudePecul mpec)
Sets the pecularities for the group of magnitudes. TODO: les partic de magnitudes devront etre attachees aux magnitudes

Parameters:
mpec - peculiarities object

setPeculiarities

public void setPeculiarities(java.lang.String strpecul)
Sets the pecularities for the group of magnitudes.

Parameters:
strpecul - peculiarities string (V[01234?]D)

getPeculiarities

public MagnitudePecul getPeculiarities()
Returns the peculiarities object

Returns:
the peculiarities

getMagnitude

public Magnitude getMagnitude(int n)
Get the nth magnitude object in the list

Parameters:
n - index of the magnitude to return
Returns:
the Magnitude object

getMagnitude

public Magnitude getMagnitude(java.lang.String filtername)
Returns the Magnitude object corresponding to a filter name

Parameters:
filtername - name of the filter
Returns:
the Magnitude object found or null

getSize

public int getSize()
Get the size of the list (number of magnitudes defined)

Returns:
the number of magnitudes in the list

iterator

public java.util.Iterator iterator()
Returns an iterator on the magnitudes object contaned in the list. These objects are sorted by increasing wavelength

Returns:
the iterator on the magnitude collection

equals

public boolean equals(java.lang.Object o)
MOD-BB 21-01-04 Ajout de cette methode. Comparaison de MagnitudeList.

Parameters:
o - Objet a comparer.
Returns:
Vrai si o est identique a this, faux sinon.