net.talvi.puffinplot.data
Enum MeasType

java.lang.Object
  extended by java.lang.Enum<MeasType>
      extended by net.talvi.puffinplot.data.MeasType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<MeasType>

public enum MeasType
extends java.lang.Enum<MeasType>

The type of measurement which was performed on a sample or set of samples.


Enum Constant Summary
CONTINUOUS
          measurement was on a continuous long core or u-channel
DISCRETE
          measurement was on a discrete sample
NONE
          a measurement run was recorded, but no measurement was actually made
UNKNOWN
          the measurement type data could not be interpreted
UNSET
          this value has not yet been set
 
Method Summary
static MeasType fromString(java.lang.String string)
          Creates a measurement type from a string representation.
 java.lang.String getColumnHeader()
          Returns a suitable column header for sample identifiers.
 boolean isActualMeasurement()
          Returns true if this field corresponds to an actual measurement.
 boolean isContinuous()
          Returns true if this field is CONTINUOUS.
 boolean isDiscrete()
          Returns true if this field is DISCRETE.
static MeasType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static MeasType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DISCRETE

public static final MeasType DISCRETE
measurement was on a discrete sample


CONTINUOUS

public static final MeasType CONTINUOUS
measurement was on a continuous long core or u-channel


NONE

public static final MeasType NONE
a measurement run was recorded, but no measurement was actually made


UNSET

public static final MeasType UNSET
this value has not yet been set


UNKNOWN

public static final MeasType UNKNOWN
the measurement type data could not be interpreted

Method Detail

values

public static MeasType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (MeasType c : MeasType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static MeasType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

fromString

public static MeasType fromString(java.lang.String string)
Creates a measurement type from a string representation.

Parameters:
string - a string representation of a measurement type
Returns:
the corresponding measurement type

getColumnHeader

public java.lang.String getColumnHeader()
Returns a suitable column header for sample identifiers. This will be something like sample name for discrete measurements and depth for continuous measurements.

Returns:
a suitable column header for sample identifiers

isActualMeasurement

public boolean isActualMeasurement()
Returns true if this field corresponds to an actual measurement. This is the case if the field is DISCRETE or CONTINUOUS rather than one of the fields indicating a non-existent or unknown measurement type.

Returns:
true if this field corresponds to an actual measurement

isDiscrete

public boolean isDiscrete()
Returns true if this field is DISCRETE. Convenience method.

Returns:
true if this field is DISCRETE

isContinuous

public boolean isContinuous()
Returns true if this field is CONTINUOUS. Convenience method.

Returns:
true if this field is CONTINUOUS