util.wavelet
Enum BoundaryCondition
java.lang.Object
java.lang.Enum<BoundaryCondition>
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
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. |
Continuity
public static final BoundaryCondition Continuity
Mirror
public static final BoundaryCondition Mirror
Periodic
public static final BoundaryCondition Periodic
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 boundaryupperBoundary
- upper boundary
- Returns:
- the index value if it is within the upper boundary, periodic otherwise