public final class Parameters extends Static
Defined in the sis-referencing
module
Modifier and Type | Method and Description |
---|---|
static <T> ParameterDescriptor<T> |
cast(ParameterDescriptor<?> descriptor,
Class<T> type)
Casts the given parameter descriptor to the given type.
|
static <T> ParameterValue<T> |
cast(ParameterValue<?> value,
Class<T> type)
Casts the given parameter value to the given type.
|
static Range<?> |
getValueDomain(ParameterDescriptor<?> descriptor)
Returns the domain of valid values defined by the given descriptor, or
null if none. |
public static <T> ParameterDescriptor<T> cast(ParameterDescriptor<?> descriptor, Class<T> type) throws ClassCastException
T
- The expected value class.descriptor
- The descriptor to cast, or null
.type
- The expected value class.null
if the given descriptor was null.ClassCastException
- if the given descriptor doesn't have the expected value class.public static <T> ParameterValue<T> cast(ParameterValue<?> value, Class<T> type) throws ClassCastException
T
- The expected value class.value
- The value to cast, or null
.type
- The expected value class.null
if the given value was null.ClassCastException
- if the given value doesn't have the expected value class.public static Range<?> getValueDomain(ParameterDescriptor<?> descriptor)
null
if none.
This method builds the range from the minimum value,
maximum value and, if the values are numeric, from
the unit.descriptor
- The parameter descriptor, or null
.null
if none.DefaultParameterDescriptor.getValueDomain()
Copyright © 2010–2014 The Apache Software Foundation. All rights reserved.