Class MultiValueAttributeType
- java.lang.Object
-
- ai.libs.jaicore.ml.core.dataset.attribute.multivalue.MultiValueAttributeType
-
- All Implemented Interfaces:
IAttributeType<java.util.Collection<java.lang.String>>,IMultiValueAttributeType,java.io.Serializable
public class MultiValueAttributeType extends java.lang.Object implements IMultiValueAttributeType
The multi-value attribute type describes the domain a value of a respective multi-value attribute value stems from.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiValueAttributeType(java.util.Set<java.lang.String> domain)Constructor setting the domain of the multi-value attribute values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAttributeValue<java.util.Collection<java.lang.String>>buildAttributeValue(java.lang.Object value)Casts the value to the respective type and returns an attribute value with the creating attribute type as the referenced type.IAttributeValue<java.util.Collection<java.lang.String>>buildAttributeValue(java.lang.String stringDescription)Builds an attribute value object from a string description.java.util.Set<java.lang.String>getDomain()java.lang.StringgetStringDescriptionOfDomain()booleanisValidValue(java.util.Collection<java.lang.String> value)Validates whether a value conforms to this type.
-
-
-
Method Detail
-
getDomain
public java.util.Set<java.lang.String> getDomain()
- Specified by:
getDomainin interfaceIMultiValueAttributeType- Returns:
- The domain of this multi-value attribute.
-
isValidValue
public boolean isValidValue(java.util.Collection<java.lang.String> value)
Description copied from interface:IAttributeTypeValidates whether a value conforms to this type.- Specified by:
isValidValuein interfaceIAttributeType<java.util.Collection<java.lang.String>>- Parameters:
value- The value to validated.- Returns:
- Returns true if the given value conforms
-
buildAttributeValue
public IAttributeValue<java.util.Collection<java.lang.String>> buildAttributeValue(java.lang.Object value)
Description copied from interface:IAttributeTypeCasts the value to the respective type and returns an attribute value with the creating attribute type as the referenced type.- Specified by:
buildAttributeValuein interfaceIAttributeType<java.util.Collection<java.lang.String>>- Parameters:
value- The value of the attribute.- Returns:
- An attribute value object holding the value of the attribute and referring to this attribute type.
-
buildAttributeValue
public IAttributeValue<java.util.Collection<java.lang.String>> buildAttributeValue(java.lang.String stringDescription)
Description copied from interface:IAttributeTypeBuilds an attribute value object from a string description. The attribute value references this attribute type.- Specified by:
buildAttributeValuein interfaceIAttributeType<java.util.Collection<java.lang.String>>- Parameters:
stringDescription- A String-format description of the attribute's value.- Returns:
- The attribute value object holding an attribute value interpreting the string description and referring to this attribute type.
-
getStringDescriptionOfDomain
public java.lang.String getStringDescriptionOfDomain()
- Specified by:
getStringDescriptionOfDomainin interfaceIAttributeType<java.util.Collection<java.lang.String>>
-
-