Crossfire JXClient, Trunk
Public Member Functions | Public Attributes | List of all members
Validator Enum Reference
Collaboration diagram for Validator:
Collaboration graph

Public Member Functions

abstract void validate (Supplier<?> string) throws ValidationException
 

Public Attributes

 validate
 

Detailed Description

Enum of Validator implementations.

Definition at line 45 of file Validator.java.

Member Function Documentation

◆ validate()

abstract void Validator.validate ( Supplier<?>  string) throws ValidationException
abstract

Checks that the supplier is valid.

Parameters
string- a string supplier
Exceptions
ValidationExceptionif validation check fails

Member Data Documentation

◆ validate

Validator.validate
Initial value:
=(Supplier<?> string) throws ValidationException {
try {
Integer.parseInt((String) string.get());
} catch (NumberFormatException ex) {
throw new ValidationException("Error while validating "
+ string.get());
}
}
},
POSITIVE_NUMBER {
@Override
void validate(Supplier<?> string) throws ValidationException {
try {
if (Double.compare(0.0, Double.parseDouble(
(String) string.get())) > 0) {
throw new Exception();
}
} catch (Exception ex) {
throw new ValidationException("Error while validating "
+ string.get());
}
}
}

This validator checks that the string represents an integer. Checks that the string represents an integer.

Parameters
string- a string supplier
Exceptions
ValidationExceptionif the validation check fails

Definition at line 58 of file Validator.java.


The documentation for this enum was generated from the following file:
Validator.validate
validate
Definition: Validator.java:58
CORBA::string
interface StringValue string
Definition: orb.idl:38