anl.aida.data
Class DefaultStringCoordAxis

java.lang.Object
  extended by anl.aida.data.AbstractCoordAxis
      extended by anl.aida.data.DefaultStringCoordAxis
All Implemented Interfaces:
CoordAxis, StringCoordAxis

public class DefaultStringCoordAxis
extends AbstractCoordAxis
implements StringCoordAxis


Field Summary
private  java.lang.String[] vals
           
 
Fields inherited from class anl.aida.data.AbstractCoordAxis
attributes, data
 
Fields inherited from interface anl.aida.data.StringCoordAxis
INDEX_NOT_FOUND
 
Constructor Summary
DefaultStringCoordAxis(java.lang.String[] vals, AxisData data)
           
 
Method Summary
 int getIndex(java.lang.String value)
          Gets the index of the specified value.
 java.lang.String getString(int index)
          Gets the String value at the specified index.
 double getValue(int index)
          Gets the value at the specified index.
 java.lang.String getValueAsString(int index)
          Gets the value as String at the specified index.
 boolean isCompatible(CoordAxis axis)
          Gets whether or not the this axis is compatible with the specified axis.
 
Methods inherited from class anl.aida.data.AbstractCoordAxis
getAttribute, getAxisType, getDescription, getName, getRange, getUnits, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface anl.aida.data.CoordAxis
getAttribute, getAxisType, getDescription, getName, getRange, getUnits
 

Field Detail

vals

private java.lang.String[] vals
Constructor Detail

DefaultStringCoordAxis

public DefaultStringCoordAxis(java.lang.String[] vals,
                              AxisData data)
Method Detail

getString

public java.lang.String getString(int index)
Description copied from interface: StringCoordAxis
Gets the String value at the specified index.

Specified by:
getString in interface StringCoordAxis
Parameters:
index - the index of the String value
Returns:
the String value at the specified index.

getValue

public double getValue(int index)
Description copied from interface: CoordAxis
Gets the value at the specified index.

Specified by:
getValue in interface CoordAxis
Parameters:
index - the index
Returns:
the value at the specified index.

getValueAsString

public java.lang.String getValueAsString(int index)
Gets the value as String at the specified index.

Specified by:
getValueAsString in interface CoordAxis
Parameters:
index - the index of the value to get
Returns:
the value as String at the specified index.

getIndex

public int getIndex(java.lang.String value)
Description copied from interface: StringCoordAxis
Gets the index of the specified value.

Specified by:
getIndex in interface StringCoordAxis
Parameters:
value - the value whose index we want
Returns:
the index of the specified value or INDEX_NOT_FOUND if the value is not found

isCompatible

public boolean isCompatible(CoordAxis axis)
Gets whether or not the this axis is compatible with the specified axis. Two axes are compatible if they can be used together in the same formula.

Specified by:
isCompatible in interface CoordAxis
Overrides:
isCompatible in class AbstractCoordAxis
Parameters:
axis - the axis to check for compatibility
Returns:
true if this axis is compatibilty with the other axis, otherise false.