GNU Prolog for Java

gnu.prolog.io
Enum Operator.SPECIFIER

java.lang.Object
  extended by java.lang.Enum<Operator.SPECIFIER>
      extended by gnu.prolog.io.Operator.SPECIFIER
All Implemented Interfaces:
HasAtom, Serializable, Comparable<Operator.SPECIFIER>
Enclosing class:
Operator

public static enum Operator.SPECIFIER
extends Enum<Operator.SPECIFIER>
implements HasAtom

Specifier Class Associativity

Author:
Daniel Thomas

Enum Constant Summary
FX
          prefix non-associative
FY
          prefix right-associative
NONE
          non operator
XF
          postfix non-associative
XFX
          infix non-associative
XFY
          infix right-associative
YF
          postfix left-associative
YFX
          infix left-associative
 
Method Summary
static Operator.SPECIFIER fromAtom(AtomTerm specifier)
          Return the SPECIFIER represented by the AtomTerm specifier or NONE if it does not match one.
abstract  AtomTerm getAtom()
          Get the AtomTerm for this class.
static Operator.SPECIFIER valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Operator.SPECIFIER[] 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

FX

public static final Operator.SPECIFIER FX
prefix non-associative


FY

public static final Operator.SPECIFIER FY
prefix right-associative


XFX

public static final Operator.SPECIFIER XFX
infix non-associative


XFY

public static final Operator.SPECIFIER XFY
infix right-associative


YFX

public static final Operator.SPECIFIER YFX
infix left-associative


XF

public static final Operator.SPECIFIER XF
postfix non-associative


YF

public static final Operator.SPECIFIER YF
postfix left-associative


NONE

public static final Operator.SPECIFIER NONE
non operator

Method Detail

values

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

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

valueOf

public static Operator.SPECIFIER 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

getAtom

public abstract AtomTerm getAtom()
Description copied from interface: HasAtom
Get the AtomTerm for this class.

Specified by:
getAtom in interface HasAtom
Returns:
the AtomTerm representation for this value for the specifier.

fromAtom

public static Operator.SPECIFIER fromAtom(AtomTerm specifier)
Return the SPECIFIER represented by the AtomTerm specifier or NONE if it does not match one.

Parameters:
specifier - the AtomTerm specifier to convert
Returns:
the SPECIFIER represented by the AtomTerm specifier or NONE if it does not match one.

GNU Prolog for Java