@Deprecated public interface DataNode
DataNode
object is a node in a
LogicalPropositionTree
that represents a string or a
number. It can possibly evaluate to a number or a string if
given the context of a PropertiesMap
.
A string is a character string.Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
Modifier and Type | Method and Description |
---|---|
BigDecimal |
getNumber(PropertiesMap map)
Deprecated.
Retrieves this node's numerical value.
|
String |
getString(PropertiesMap map)
Deprecated.
Retrieves this node's string value.
|
boolean |
isANumber(PropertiesMap map)
Deprecated.
Determines whether this node can evaluate to a number with the given
context.
|
boolean |
isAString(PropertiesMap map)
Deprecated.
Determines whether this node can evaluate to a string with the given
context.
|
boolean isANumber(PropertiesMap map)
true
if a call to getNumber()
with the same context won't throw an exception; false
otherwise.map
- The context within which we are evaluating the truth value.
Defines the type and value of all properties in the tree during the
evaluation.true
if a call to getNumber()
with the
same context won't throw an exception; false
otherwise.boolean isAString(PropertiesMap map)
true
if a call to getString()
with the same context won't throw an exception; false
otherwise.map
- The context within which we are evaluating the truth value.
Defines the type and value of all properties in the tree during the
evaluation.true
if a call to getString()
with the
same context won't throw an exception; false
otherwise.BigDecimal getNumber(PropertiesMap map) throws LogicalPropositionTreeException
BigDecimal
containing the numerical value of this node with the given context.map
- The context within which we are evaluating the numerical value.
Defines the type and value of all properties in the tree during the
evaluation.BigDecimal
containing the numerical value of this
node with the given context.LogicalPropositionTreeException
- If there was a problem determining
whether this node represents a number. Usually this happens because a
property was referenced as the wrong type or did not exist.String getString(PropertiesMap map) throws LogicalPropositionTreeException
String
that is the string value of this node with the given context.map
- The context within which we are evaluating the string value.
Defines the type and value of all properties in the tree during the
evaluation.String
that is the string value of this node with
the given context.LogicalPropositionTreeException
- If there was a problem determining
whether this node represents a number. Usually this happens because a
property was referenced as the wrong type or did not exist.