water.api
Class RequestArguments.Record<T>

java.lang.Object
  extended by water.api.RequestArguments.Record<T>
Enclosing class:
RequestArguments

protected static class RequestArguments.Record<T>
extends java.lang.Object

Argument state record. Contains all state required for the argument and a few functions to operate on the state.


Field Summary
 java.lang.String _disabledReason
          Reason why the argument is disabled, or null if it is enabled.
 java.lang.String _originalValue
          Determines the original input value of the argument.
 boolean _valid
          True if the argument's value stored in _value is valid, that is either correctly parsed, or not present and default value used.
 T _value
          Parsed value.
 
Constructor Summary
protected RequestArguments.Record()
           
 
Method Summary
 boolean disabled()
          Returns true if the argument is disabled.
 boolean specified()
          Returns if the argument is specified by user.
 boolean valid()
          Returns true if the argument is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_originalValue

public java.lang.String _originalValue
Determines the original input value of the argument. null if the value was not supplied, or was empty. Retains the original value even if the argument value is wrong.


_value

public T _value
Parsed value. If the parse was successful, or default value if the checking failed, or the argument is not required and was missing. Note that default value may very well be null and thus you cannot check this for null of determine validity.


_disabledReason

public java.lang.String _disabledReason
Reason why the argument is disabled, or null if it is enabled. A disabled argument cannot be edited by the user yet.


_valid

public boolean _valid
True if the argument's value stored in _value is valid, that is either correctly parsed, or not present and default value used. Note that if checking fails, the defaultValue is stored in _value, but _valid is false.

Constructor Detail

RequestArguments.Record

protected RequestArguments.Record()
Method Detail

disabled

public boolean disabled()
Returns true if the argument is disabled.


valid

public boolean valid()
Returns true if the argument is valid.


specified

public boolean specified()
Returns if the argument is specified by user. returns true only if it is valid and parsing the argument was successful.

Returns: