util.wavelet
Enum BoundaryCondition

java.lang.Object
  extended by java.lang.Enum<BoundaryCondition>
      extended by util.wavelet.BoundaryCondition
All Implemented Interfaces:
Serializable, Comparable<BoundaryCondition>

public enum BoundaryCondition
extends Enum<BoundaryCondition>

An enumeration of boundary conditions. When an array index exceeds the bounds of its array it must be converted back into the legal range.

Author:
John Talbot

Enum Constant Summary
Continuity
           
Mirror
           
Periodic
           
 
Method Summary
 int test(int index, int upperBoundary)
          Test the boundary conditions.
static BoundaryCondition valueOf(String name)
          Returns the enum constant of this type with the specified name.
static BoundaryCondition[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

Continuity

public static final BoundaryCondition Continuity

Mirror

public static final BoundaryCondition Mirror

Periodic

public static final BoundaryCondition Periodic
Method Detail

values

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

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

valueOf

public static BoundaryCondition 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

test

public int test(int index,
                int upperBoundary)
Test the boundary conditions. Default returns perdiodic boundary. The lower boundary is 0 by default.

Parameters:
index - value to test against upper boundary
upperBoundary - upper boundary
Returns:
the index value if it is within the upper boundary, periodic otherwise