cds.simbad
Class Oid

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

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

Object identifier class. Every astronomical object has an unique identifier over the time. An object identifier will never be reused if the astronomical object is deleted.

Version:
1.0 May 2003 Creation
, 1.1 Sep 2003 define NOT_DEFINED value, 1.2 Jan 2004 ajout d'une methode equals.
Author:
Marc Wenger/CDS, Benoit Baranne (Stagiaire UTBM)
See Also:
Serialized Form

Field Summary
private static long NOT_DEFINED
           
private  long oid
           
 
Constructor Summary
Oid()
          Create an empty oid object.
Oid(long val)
          Create an oid object with the given value
Oid(Oid o)
          Copy constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
          MOD-BB 21-01-04 ajout de cette methode.
 boolean exists()
          Checks if the Oid has a value
 long get()
          Get the Oid value
 void reset()
          Resets an Oid object to novalue
 void set(long val)
          Sets an oid from a value
 void set(Oid o)
          Sets an oid object from another one
 java.lang.String toString()
          Display the Oid value as a string
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NOT_DEFINED

private static final long NOT_DEFINED
See Also:
Constant Field Values

oid

private long oid
Constructor Detail

Oid

public Oid()
Create an empty oid object.


Oid

public Oid(long val)
Create an oid object with the given value

Parameters:
val - numeric value to give to the oid

Oid

public Oid(Oid o)
Copy constructor. Creates an oid from another one

Parameters:
o - Oid to copy in the created one
Method Detail

set

public final void set(long val)
Sets an oid from a value

Parameters:
val - oid value

set

public void set(Oid o)
Sets an oid object from another one

Parameters:
o - Oid to copy

reset

public final void reset()
Resets an Oid object to novalue


get

public final long get()
Get the Oid value

Returns:
the value of the Oid

exists

public final boolean exists()
Checks if the Oid has a value

Returns:
true if the Oid has a value, false otherwise

toString

public java.lang.String toString()
Display the Oid value as a string

Returns:
the oid value string

equals

public boolean equals(java.lang.Object o)
MOD-BB 21-01-04 ajout de cette methode. Comparaison d'Oid.

Parameters:
o - Object a comparer.
Returns:
Vrai si l'objet passe en parametre est identique a this.