net.sf.jack4j
Enum JackPortFlag

java.lang.Object
  extended by java.lang.Enum<JackPortFlag>
      extended by net.sf.jack4j.JackPortFlag
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<JackPortFlag>

public enum JackPortFlag
extends java.lang.Enum<JackPortFlag>

Java version of Jack enum JackPortFlag.

Author:
repa

Enum Constant Summary
CAN_MONITOR
           
IS_INPUT
           
IS_OUTPUT
           
IS_PHYSICAL
           
IS_TERMINAL
           
 
Method Summary
static java.util.EnumSet<JackPortFlag> decode(int value)
          Decodes int value as set of enum values.
static int encode(java.util.Set<JackPortFlag> flags)
          Encodes set of enum constants as int, by ORing their values together.
 int intValue()
          Returns integer value of native constant corresponding to this enum value.
protected abstract  int nativeIntValue()
           
static JackPortFlag valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static JackPortFlag[] 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

IS_INPUT

public static final JackPortFlag IS_INPUT

IS_OUTPUT

public static final JackPortFlag IS_OUTPUT

IS_PHYSICAL

public static final JackPortFlag IS_PHYSICAL

CAN_MONITOR

public static final JackPortFlag CAN_MONITOR

IS_TERMINAL

public static final JackPortFlag IS_TERMINAL
Method Detail

values

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

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

valueOf

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

nativeIntValue

protected abstract int nativeIntValue()

intValue

public int intValue()
Returns integer value of native constant corresponding to this enum value.


encode

public static int encode(java.util.Set<JackPortFlag> flags)
Encodes set of enum constants as int, by ORing their values together.


decode

public static java.util.EnumSet<JackPortFlag> decode(int value)
Decodes int value as set of enum values.

The value must be a result of ORing values of native enum constants.

Throws:
java.lang.IllegalArgumentException - if the value contains unrecognized bits


Copyright © 2008 Ondrej Par. All Rights Reserved.