edu.nrao.sss.model.resource.vla
Enum ProcessingType

java.lang.Object
  extended by java.lang.Enum<ProcessingType>
      extended by edu.nrao.sss.model.resource.vla.ProcessingType
All Implemented Interfaces:
Serializable, Comparable<ProcessingType>

public enum ProcessingType
extends Enum<ProcessingType>

Data processing that can be done by the correlator.

Version Info:

$Revision: 1218 $
$Date: 2008-04-14 14:56:14 -0600 (Mon, 14 Apr 2008) $
$Author: btruitt $ (last person to modify)

Since:
2008-03-19
Author:
David M. Harland

Enum Constant Summary
HANNING
           
LAG
           
TRUE_CHANNEL_ZERO
           
 
Method Summary
 char getCode()
          Returns a character code for this element.
static String getCombinationCode(Set<ProcessingType> combination)
          Returns a code that represents the given combination of processing types.
static Set<ProcessingType> getTypesFromComboCode(String comboCode)
          Returns the collection of processing types represented by the collection of characters in comboCode.
static boolean isValidSelection(Set<ProcessingType> combination)
          Returns true if the given set of processing types may be used simultaneously.
 String toString()
          Returns text for this element that is suitable for user displays.
static ProcessingType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ProcessingType[] 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

TRUE_CHANNEL_ZERO

public static final ProcessingType TRUE_CHANNEL_ZERO

HANNING

public static final ProcessingType HANNING

LAG

public static final ProcessingType LAG
Method Detail

values

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

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

valueOf

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

getCode

public char getCode()
Returns a character code for this element. This code can be turned into a code that is used in execution scripts, either on its own or in combination with codes from other types, by using method getCombinationCode(Set).

Returns:
a character code for this element.

toString

public String toString()
Returns text for this element that is suitable for user displays.

Overrides:
toString in class Enum<ProcessingType>
Returns:
text for this element that is suitable for user displays.

isValidSelection

public static boolean isValidSelection(Set<ProcessingType> combination)
Returns true if the given set of processing types may be used simultaneously.

Parameters:
combination - a collection of processing types to be tested for validity of simultaneous use. If the list is null, empty, or contains one element, the return value will always be true.
Returns:
true if the given set of processing types may be used simultaneously.

getCombinationCode

public static String getCombinationCode(Set<ProcessingType> combination)
Returns a code that represents the given combination of processing types. If the combination is null, empty, or invalid, a blank code will be returned.

Parameters:
combination - a collection of processing types for which a combined code is needed.
Returns:
a code that represents the given combination of processing types.

getTypesFromComboCode

public static Set<ProcessingType> getTypesFromComboCode(String comboCode)
Returns the collection of processing types represented by the collection of characters in comboCode. This method does not test the collection for validity (see isValidSelection(Set).

Parameters:
comboCode - text representation of zero or more processing types. This value may be null or the empty string, in which case an empty set will be returned.
Returns:
the collection of processing types represented by the collection of characters in comboCode. The returned collection will never be null, but could be empty.
Throws:
IllegalArgumentException - if comboCode contains any unknown character codes.


Copyright © 2009. All Rights Reserved.