Package gov.nasa.pds.tools.validate
Class SpecialConstantChecker
- java.lang.Object
-
- gov.nasa.pds.tools.validate.SpecialConstantChecker
-
public class SpecialConstantChecker extends Object
-
-
Constructor Summary
Constructors Constructor Description SpecialConstantChecker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isConformantSpecialConstant(Number value, gov.nasa.arc.pds.xml.generated.SpecialConstants constants, ProblemReporter reporter)
Checks if the given value is a Special Constant defined in the label.static boolean
isInf(String value)
static boolean
isInfOrNan(String value)
static boolean
isNonConformantSpecialConstant(String value, gov.nasa.arc.pds.xml.generated.SpecialConstants constants)
Use this when the special constant may not conform to the type constraints meaning only string comparisons can be done.static boolean
sameContent(Number number, String constant_repr)
-
-
-
Method Detail
-
isInf
public static boolean isInf(String value)
-
isInfOrNan
public static boolean isInfOrNan(String value)
-
isNonConformantSpecialConstant
public static boolean isNonConformantSpecialConstant(String value, gov.nasa.arc.pds.xml.generated.SpecialConstants constants)
Use this when the special constant may not conform to the type constraints meaning only string comparisons can be done.- Parameters:
value
-constants
-- Returns:
-
isConformantSpecialConstant
public static boolean isConformantSpecialConstant(Number value, gov.nasa.arc.pds.xml.generated.SpecialConstants constants, ProblemReporter reporter)
Checks if the given value is a Special Constant defined in the label. Use this when check string values first then values and bit patterns meaning the special constant must conform to the data type constraints.- Parameters:
value
- The value to check.constants
- An object representation of the Special_Constants area in a label.- Returns:
- true if the given value is a Special Constant.
-
-