Package pal.misc
Class Identifier
java.lang.Object
pal.misc.Identifier
- All Implemented Interfaces:
Serializable
,Nameable
,Comparable
An identifier for some sampled data. This will most often be
for example, the accession number of a DNA sequence, or the
taxonomic name that the sequence represents, et cetera.
- Version:
- $Id: Identifier.java,v 1.9 2002/11/25 05:40:54 matt Exp $
- Author:
- Alexei Drummond
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns a number representing the ordering relationship that the object has with the given object.boolean
Returns true if this object is equal to the given object.static final Identifier[]
getIdentifiers
(String[] names) Translates an an array of strings into an array of identifiersstatic final Identifier[]
getIdentifiers
(IdGroup idGroup) Translates an IdGroup into an array of identifiersgetName()
get the name of this object.static final String[]
getNames
(Identifier[] ids) Translates an array of identifiers into an array of stringsstatic final String[]
getNames
(Identifier[] ids, int toIgnore) Translates an array of identifiers into an array of strings, with optional removal of particular identifierstatic final String[]
Translates an IdGroup into an array of stringsstatic final String[]
Translates an IDgroup into an array of strings, with optional removal of particular identifierstatic final String[]
Translates an IDgroup into an array of strings, with optional removal of particular identifiervoid
set the name of this object.toString()
-
Field Details
-
ANONYMOUS
-
-
Constructor Details
-
Identifier
public Identifier() -
Identifier
-
-
Method Details
-
toString
-
compareTo
Description copied from interface:Comparable
Returns a number representing the ordering relationship that the object has with the given object. A negative number indicates that the object is "smaller" than the parameter, a positive number means it is "larger" and zero indicates that the objects are equal.- Specified by:
compareTo
in interfaceComparable
-
equals
Description copied from interface:Comparable
Returns true if this object is equal to the given object.- Specified by:
equals
in interfaceComparable
- Overrides:
equals
in classObject
-
getName
Description copied from interface:Nameable
get the name of this object. -
setName
Description copied from interface:Nameable
set the name of this object. -
getNames
Translates an array of identifiers into an array of strings -
getNames
Translates an array of identifiers into an array of strings, with optional removal of particular identifier- Parameters:
toIgnoreIndex
- the index of an idetifier to ignore, if invalid input: '<'0 no element is ignored
-
getIdentifiers
Translates an an array of strings into an array of identifiers -
getIdentifiers
Translates an IdGroup into an array of identifiers -
getNames
Translates an IdGroup into an array of strings -
getNames
Translates an IDgroup into an array of strings, with optional removal of particular identifier- Parameters:
toIgnoreIndex
- the index of an idetifier to ignore, if invalid input: '<'0 no element is ignored
-
getNames
Translates an IDgroup into an array of strings, with optional removal of particular identifier- Parameters:
toIgnoreIndex
- the indexes of an idetifier to ignore, does not need to be sorted
-