IcedTea-Web
NetX

net.sourceforge.jnlp.config
Class BasicValueValidators

java.lang.Object
  extended by net.sourceforge.jnlp.config.BasicValueValidators

public class BasicValueValidators
extends java.lang.Object

Provides ValueValidator implementations for some common value types

See Also:
getBooleanValidator(), getFilePathValidator(), getRangedIntegerValidator(int, int), getStringValidator(String[]), getUrlValidator()

Constructor Summary
BasicValueValidators()
           
 
Method Summary
static ValueValidator getBooleanValidator()
           
static ValueValidator getFilePathValidator()
           
static ValueValidator getRangedIntegerValidator(int low, int high)
          Returns a ValueValidator that checks if an object represents a valid integer (it is a Integer or Long or a String representation of one), within the given range.
static ValueValidator getStringValidator(java.lang.String[] validValues)
          Returns a ValueValidator that checks if an object is a string from one of the provided Strings.
static ValueValidator getUrlValidator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicValueValidators

public BasicValueValidators()
Method Detail

getBooleanValidator

public static ValueValidator getBooleanValidator()
Returns:
a ValueValidator that can be used to check if an object is a valid Boolean

getFilePathValidator

public static ValueValidator getFilePathValidator()
Returns:
a ValueValidator that can be used to check if an object is a String containing a valid file path or not

getRangedIntegerValidator

public static ValueValidator getRangedIntegerValidator(int low,
                                                       int high)
Returns a ValueValidator that checks if an object represents a valid integer (it is a Integer or Long or a String representation of one), within the given range. The values are inclusive.

Parameters:
low - the lowest valid value
high - the highest valid value

getStringValidator

public static ValueValidator getStringValidator(java.lang.String[] validValues)
Returns a ValueValidator that checks if an object is a string from one of the provided Strings.

Parameters:
validValues - an array of Strings which are considered valid

getUrlValidator

public static ValueValidator getUrlValidator()
Returns:
a ValueValidator that checks if an object represents a valid url

IcedTea-Web
NetX

Submit a bug or feature