ua.gradsoft.termware
Enum SymbolAdoptionPolicy

java.lang.Object
  extended by java.lang.Enum<SymbolAdoptionPolicy>
      extended by ua.gradsoft.termware.SymbolAdoptionPolicy
All Implemented Interfaces:
Serializable, Comparable<SymbolAdoptionPolicy>

public enum SymbolAdoptionPolicy
extends Enum<SymbolAdoptionPolicy>

SymbolAdoptionPolicy define constant wich determinate relations of symbols (i. e. names of terms) and global termware symbol table. This adoption policy is used for creation of terms.


Enum Constant Summary
ADD
          add symbol to table, if it yet not here.
CHECK
          check that symbol is here and throw unknown symbol exception.
CONSTANT
          symbol is one of preefined constants or digit or so-on.
LAZY
          not add symbol to table, but periodically check: are we have such symbol in our global index table.
 
Method Summary
 int getIntCode()
           
static SymbolAdoptionPolicy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static SymbolAdoptionPolicy[] 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

ADD

public static final SymbolAdoptionPolicy ADD
add symbol to table, if it yet not here.


CHECK

public static final SymbolAdoptionPolicy CHECK
check that symbol is here and throw unknown symbol exception.


LAZY

public static final SymbolAdoptionPolicy LAZY
not add symbol to table, but periodically check: are we have such symbol in our global index table.


CONSTANT

public static final SymbolAdoptionPolicy CONSTANT
symbol is one of preefined constants or digit or so-on.

Method Detail

values

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

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

valueOf

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

getIntCode

public int getIntCode()