public class CogxelBooleanConverter extends AbstractCogxelConverter<Boolean>
CogxelConverter that encodes booleans as positive and
negative values (+1/-1).semanticIdentifierMap| Constructor and Description |
|---|
CogxelBooleanConverter()
Creates a new instance of CogxelBooleanConverter.
|
CogxelBooleanConverter(SemanticLabel label)
Creates a new instance of CogxelDoubleConverter.
|
CogxelBooleanConverter(SemanticLabel label,
SemanticIdentifierMap semanticIdentifierMap)
Creates a new instance of CogxelBooleanConverter.
|
CogxelBooleanConverter(SemanticLabel label,
SemanticIdentifierMap semanticIdentifierMap,
CogxelFactory cogxelFactory)
Creates a new instance of CogxelBooleanConverter.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildIdentifierCache()
Rebuilds the cache of SemanticIdentifier objects.
|
CogxelBooleanConverter |
clone() |
boolean |
equals(CogxelBooleanConverter other)
This converter equals another converter of the same type if their labels
are equal.
|
boolean |
equals(Object other) |
Boolean |
fromCogxels(CogxelState cogxels)
Converts from a CogxelState object to an object of type DataType.
|
CogxelFactory |
getCogxelFactory()
Gets the CogxelFactory used to create the cogxels used by the converter.
|
protected SemanticIdentifier |
getIdentifier()
Gets the semantic identifier of the cogxel to convert.
|
SemanticLabel |
getLabel()
Gets the label of the cogxel to convert.
|
int |
hashCode() |
void |
setCogxelFactory(CogxelFactory cogxelFactory)
Gets the CogxelFactory used to create the cogxels used by the converter.
|
protected void |
setIdentifier(SemanticIdentifier identifier)
Gets the semantic identifier of the cogxel to convert.
|
void |
setLabel(SemanticLabel label)
Sets the label of the cogxel to convert.
|
void |
toCogxels(Boolean data,
CogxelState cogxels)
Converts from an object of type DataType to an updated CogxelState.
|
getSemanticIdentifierMap, setSemanticIdentifierMappublic CogxelBooleanConverter()
public CogxelBooleanConverter(SemanticLabel label)
label - The label for the Cogxel to convert.public CogxelBooleanConverter(SemanticLabel label, SemanticIdentifierMap semanticIdentifierMap)
label - The label for the Cogxel to convert.semanticIdentifierMap - The SemanticIdentifierMap for the
converter.public CogxelBooleanConverter(SemanticLabel label, SemanticIdentifierMap semanticIdentifierMap, CogxelFactory cogxelFactory)
label - The label for the Cogxel to convert.semanticIdentifierMap - The SemanticIdentifierMap for the
converter.cogxelFactory - The CogxelFactory to use.public CogxelBooleanConverter clone()
CogxelConverterclone in interface CogxelConverter<Boolean>clone in interface gov.sandia.cognition.util.CloneableSerializableclone in class AbstractCogxelConverter<Boolean>public boolean equals(CogxelBooleanConverter other)
other - The other converter.protected void buildIdentifierCache()
AbstractCogxelConverterbuildIdentifierCache in class AbstractCogxelConverter<Boolean>public Boolean fromCogxels(CogxelState cogxels)
CogxelConvertercogxels - The CogxelState to convert to DataType.public void toCogxels(Boolean data, CogxelState cogxels)
CogxelConverterdata - The object to convert into the CogxelState.cogxels - The CogxelState to update with the converted data.public SemanticLabel getLabel()
public void setLabel(SemanticLabel label)
label - The label of the cogxel to convert.protected SemanticIdentifier getIdentifier()
protected void setIdentifier(SemanticIdentifier identifier)
identifier - The semantic identifier of the cogxel to convert.public CogxelFactory getCogxelFactory()
public void setCogxelFactory(CogxelFactory cogxelFactory)
cogxelFactory - The CogxelFactory used to create the cogxels used
by the converter.Copyright © 2006-2015 Sandia National Laboratories. All Rights Reserved.