edu.nrao.sss.math
Enum NumberInterval.IntervalType

java.lang.Object
  extended by java.lang.Enum<NumberInterval.IntervalType>
      extended by edu.nrao.sss.math.NumberInterval.IntervalType
All Implemented Interfaces:
Serializable, Comparable<NumberInterval.IntervalType>
Enclosing class:
NumberInterval

public static enum NumberInterval.IntervalType
extends Enum<NumberInterval.IntervalType>

Indicates whether or not the endpoints are inside or outside an interval.


Enum Constant Summary
CLOSED
          Both endpoints are contained in the interval.
LOW_CLOSED_HIGH_OPEN
          The low endpoint is in the interval; the high endpoint is not.
LOW_OPEN_HIGH_CLOSED
          The low endpoint is not in the interval; the high endpoint is.
OPEN
          Neither endpoint is contained in the interval.
 
Method Summary
static NumberInterval.IntervalType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static NumberInterval.IntervalType[] 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

OPEN

public static final NumberInterval.IntervalType OPEN
Neither endpoint is contained in the interval.


CLOSED

public static final NumberInterval.IntervalType CLOSED
Both endpoints are contained in the interval.


LOW_CLOSED_HIGH_OPEN

public static final NumberInterval.IntervalType LOW_CLOSED_HIGH_OPEN
The low endpoint is in the interval; the high endpoint is not. This is the usual definition of a half-open interval.


LOW_OPEN_HIGH_CLOSED

public static final NumberInterval.IntervalType LOW_OPEN_HIGH_CLOSED
The low endpoint is not in the interval; the high endpoint is.

Method Detail

values

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

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

valueOf

public static NumberInterval.IntervalType 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


Copyright © 2009. All Rights Reserved.