com.hextremelabs.ussd.ui.model.Validation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lib-ussd Show documentation
Show all versions of lib-ussd Show documentation
A lightweight USSD application framework
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// See http://java.sun.com/xml/jaxb
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2016.08.08 at 04:31:39 AM WAT
//
package com.hextremelabs.ussd.ui.model;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
*
* Java class for validation.
*
*
* The following schema fragment specifies the expected content contained within this class.
*
* <
* pre>
* <simpleType name="validation"> <restriction base="{http://www.w3.org/2001/XMLSchema}string"> <enumeration
* value="numeric"/> <enumeration value="alphanumeric"/> <enumeration value="regex"/> <enumeration
* value="free"/> </restriction> </simpleType>
*
*
*/
@XmlType(name = "validation")
@XmlEnum
public enum Validation {
/**
*
* Only numeric input is permitted. The input can be of any length but it must only contain characters 0 to 9.
*
*
*/
@XmlEnumValue("numeric")
NUMERIC("numeric"),
/**
*
* Any number of alphanumeric characters (a-z, A-Z and 0-9) are permitted.
*
*
*/
@XmlEnumValue("alphanumeric")
ALPHANUMERIC("alphanumeric"),
/**
*
* Input must conform to the regular expression specified as attribute "regex". If the "regex" attribute is not
* specified, the validation is ignored.
*
*
*/
@XmlEnumValue("regex")
REGEX("regex"),
/**
*
* No validation is performed.
*
*
*/
@XmlEnumValue("free")
FREE("free");
private final String value;
Validation(String v) {
value = v;
}
public String value() {
return value;
}
public static Validation fromValue(String v) {
for (Validation c : Validation.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}