rafa.math.gen
Enum SerialStrategy.Output

java.lang.Object
  extended by java.lang.Enum<SerialStrategy.Output>
      extended by rafa.math.gen.SerialStrategy.Output
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SerialStrategy.Output>
Enclosing class:
SerialStrategy

public static enum SerialStrategy.Output
extends java.lang.Enum<SerialStrategy.Output>

Mechanism for choosing values from the series.


Enum Constant Summary
DIRECT
          Start with the first value in the series, end with the last one.
RANDOM
          Produce one of the values in the series randomly.
RANDOM_NO_REPEATS
          Produce a random value from the series, but without repeating any of them until all of them have been produced.
REVERSE
          Start with the last value in the series, end with the first one.
 
Method Summary
static SerialStrategy.Output valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SerialStrategy.Output[] 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

DIRECT

public static final SerialStrategy.Output DIRECT
Start with the first value in the series, end with the last one.


REVERSE

public static final SerialStrategy.Output REVERSE
Start with the last value in the series, end with the first one.


RANDOM

public static final SerialStrategy.Output RANDOM
Produce one of the values in the series randomly.


RANDOM_NO_REPEATS

public static final SerialStrategy.Output RANDOM_NO_REPEATS
Produce a random value from the series, but without repeating any of them until all of them have been produced.

Method Detail

values

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

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

valueOf

public static SerialStrategy.Output 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


Copyright © 2008-2009. All Rights Reserved.