p3j.misc
Enum MatrixDimension

java.lang.Object
  extended by java.lang.Enum<MatrixDimension>
      extended by p3j.misc.MatrixDimension
All Implemented Interfaces:
Serializable, Comparable<MatrixDimension>

public enum MatrixDimension
extends Enum<MatrixDimension>

Enumeration for all kinds of matrix dimensions used in the PPPM. Created: August 17, 2008

Author:
Christina Bohk, Roland Ewald

Enum Constant Summary
AGES
          As many lines/rows as ages to be considered.
SINGLE
          One line/row.
YEARS
          As many lines/rows as years to be predicted.
 
Method Summary
 int getDimension()
          Defines current numeric equivalent of the dimension.
 String getLabel()
          Return name of the dimension.
static MatrixDimension valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MatrixDimension[] 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

SINGLE

public static final MatrixDimension SINGLE
One line/row.


YEARS

public static final MatrixDimension YEARS
As many lines/rows as years to be predicted.


AGES

public static final MatrixDimension AGES
As many lines/rows as ages to be considered.

Method Detail

values

public static MatrixDimension[] 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 (MatrixDimension c : MatrixDimension.values())
    System.out.println(c);

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

valueOf

public static MatrixDimension valueOf(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:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getLabel

public String getLabel()
Return name of the dimension. This is used for the matrix editor. Single lines/rows do not have a specific name.

Returns:
proper label for dimension

getDimension

public int getDimension()
Defines current numeric equivalent of the dimension.

Returns:
a mount of entries in this dimension


Copyright © 2012. All Rights Reserved.