public final class Features extends Static
Defined in the sis-feature
module
Modifier and Type | Method and Description |
---|---|
static <V> AbstractAttribute<V> |
cast(AbstractAttribute<?> attribute,
Class<V> valueClass)
Casts the given attribute instance to the given parameterized type.
|
static <V> DefaultAttributeType<V> |
cast(DefaultAttributeType<?> type,
Class<V> valueClass)
Casts the given attribute type to the given parameterized type.
|
public static <V> DefaultAttributeType<V> cast(DefaultAttributeType<?> type, Class<V> valueClass) throws ClassCastException
V
- The expected value class.type
- The attribute type to cast, or null
.valueClass
- The expected value class.null
if the given type was null.ClassCastException
- if the given attribute type does not have the expected value class.public static <V> AbstractAttribute<V> cast(AbstractAttribute<?> attribute, Class<V> valueClass) throws ClassCastException
V
- The expected value class.attribute
- The attribute instance to cast, or null
.valueClass
- The expected value class.null
if the given instance was null.ClassCastException
- if the given attribute instance does not have the expected value class.Copyright © 2010–2015 The Apache Software Foundation. All rights reserved.