edu.mit.jverbnet.data.syntax
Enum SyntaxArgType.VALUE_RULE

java.lang.Object
  extended by java.lang.Enum<SyntaxArgType.VALUE_RULE>
      extended by edu.mit.jverbnet.data.syntax.SyntaxArgType.VALUE_RULE
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SyntaxArgType.VALUE_RULE>
Enclosing class:
SyntaxArgType

public static enum SyntaxArgType.VALUE_RULE
extends java.lang.Enum<SyntaxArgType.VALUE_RULE>

Checks that the value meets the expectations of the type.

Since:
JVerbnet 1.0.0
Version:
1.0.0
Author:
Mark A. Finlayson

Enum Constant Summary
OPTIONAL
          The value may be anything.
PROHIBITED
          The value must be null.
REQUIRED
          The value must not be null, empty, or blank.
 
Method Summary
abstract  java.lang.String checkValue(java.lang.String value)
          Checks that the string value meets the condition.
static SyntaxArgType.VALUE_RULE valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SyntaxArgType.VALUE_RULE[] 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

PROHIBITED

public static final SyntaxArgType.VALUE_RULE PROHIBITED
The value must be null.

Since:
JVerbnet 1.0.0

OPTIONAL

public static final SyntaxArgType.VALUE_RULE OPTIONAL
The value may be anything.

Since:
JVerbnet 1.0.0

REQUIRED

public static final SyntaxArgType.VALUE_RULE REQUIRED
The value must not be null, empty, or blank.

Since:
JVerbnet 1.0.0
Method Detail

values

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

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

valueOf

public static SyntaxArgType.VALUE_RULE 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

checkValue

public abstract java.lang.String checkValue(java.lang.String value)
Checks that the string value meets the condition.

Parameters:
value - the value to be checked
Returns:
the original value, if null, or the trimmed value
Throws:
java.lang.Exception - if the value does not meet the condition
Since:
JVerbnet 1.0.0


Copyright © 2012 ${project.organization.name}. All Rights Reserved.