com.partnersoft.io
Enum IterableInput.Status

java.lang.Object
  extended by java.lang.Enum<IterableInput.Status>
      extended by com.partnersoft.io.IterableInput.Status
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<IterableInput.Status>
Enclosing interface:
IterableInput<T>

public static enum IterableInput.Status
extends java.lang.Enum<IterableInput.Status>

Representation of the internal status of an IterableInput, as returned by getStatus().


Enum Constant Summary
CLOSED
          This status indicates that the IterableInput has been closed or has never been opened.
END_OF_INPUT
          This status indicates that the IterableInput has reached the end of the available data, or run into an error during fetches.
FETCHING
          This status indicates that the IterableInput is in the midst of a fetch pass.
OPENED
          This status indicates that the IterableInput has been opened, but is not actually engaged in a fetch pass.
 
Method Summary
 java.lang.String toString()
           
static IterableInput.Status valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static IterableInput.Status[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLOSED

public static final IterableInput.Status CLOSED
This status indicates that the IterableInput has been closed or has never been opened. No external resources are locked, no files opened, etc. so any of the fetch methods (isFetchValid(), fetch(), getFetched(), etc.) will throw IllegalStateException.


OPENED

public static final IterableInput.Status OPENED
This status indicates that the IterableInput has been opened, but is not actually engaged in a fetch pass. Thus, isFetchValid() and getFetched() will throw IllegalStateException.


FETCHING

public static final IterableInput.Status FETCHING
This status indicates that the IterableInput is in the midst of a fetch pass. isFetchValid() will return true and you can use getFetched().


END_OF_INPUT

public static final IterableInput.Status END_OF_INPUT
This status indicates that the IterableInput has reached the end of the available data, or run into an error during fetches. It still needs to be closed.

Method Detail

values

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

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

valueOf

public static IterableInput.Status 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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<IterableInput.Status>