Top Description Fields Constructors Methods
net.fortuna.ical4j.validate

public final Class ParameterValidator

extends Object
Class Inheritance
Annotations
@Deprecated
Imports
net.fortuna.ical4j.model.Parameter, java.util.List

Deprecated

default property validation moved to relevant property. See also PropertyRuleSet.

$Id$ [15-May-2004] Defines methods for validating parameters and parameter lists.
Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
private static final String

Constructor Summary

AccessConstructor and Description
private
ParameterValidator()

Constructor made private to enforce static nature.

Method Summary

Modifier and TypeMethod and Description
public static void
assertNone(final String
the name of a parameter
paramName
,
final List<Parameter>
a list of parameters
parameters
)

Ensure a parameter doesn't occur in the specified list.

public static void
assertNullOrEqual(final Parameter
a parameter instance
param
,
final List<Parameter>
a list of parameters
parameters
)

public static void
assertOne(final String
the parameter name
paramName
,
final List<Parameter>
a list of parameters to query
parameters
)

Ensure a parameter occurs once.

public static void
assertOneOrLess(final String
the parameter name
paramName
,
final List<Parameter>
a list of parameters to query
parameters
)

Ensure a parameter occurs no more than once.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ASSERT_NONE_MESSAGEback to summary
private static final String ASSERT_NONE_MESSAGE
ASSERT_NULL_OR_EQUAL_MESSAGEback to summary
private static final String ASSERT_NULL_OR_EQUAL_MESSAGE
ASSERT_ONE_MESSAGEback to summary
private static final String ASSERT_ONE_MESSAGE
ASSERT_ONE_OR_LESS_MESSAGEback to summary
private static final String ASSERT_ONE_OR_LESS_MESSAGE

Constructor Detail

ParameterValidatorback to summary
private ParameterValidator()

Constructor made private to enforce static nature.

Method Detail

assertNoneback to summary
public static void assertNone(final String paramName, final List<Parameter> parameters) throws ValidationException

Ensure a parameter doesn't occur in the specified list.

Parameters
paramName:String

the name of a parameter

parameters:List<Parameter>

a list of parameters

Exceptions
ValidationException:
thrown when the specified property is found in the list of properties
assertNullOrEqualback to summary
public static void assertNullOrEqual(final Parameter param, final List<Parameter> parameters) throws ValidationException
Parameters
param:Parameter

a parameter instance

parameters:List<Parameter>

a list of parameters

Exceptions
ValidationException:
where the assertion fails
assertOneback to summary
public static void assertOne(final String paramName, final List<Parameter> parameters) throws ValidationException

Ensure a parameter occurs once.

Parameters
paramName:String

the parameter name

parameters:List<Parameter>

a list of parameters to query

Exceptions
ValidationException:
when the specified parameter does not occur once
assertOneOrLessback to summary
public static void assertOneOrLess(final String paramName, final List<Parameter> parameters) throws ValidationException

Ensure a parameter occurs no more than once.

Parameters
paramName:String

the parameter name

parameters:List<Parameter>

a list of parameters to query

Exceptions
ValidationException:
when the specified parameter occurs more than once