Package net.sourceforge.jarduino.message
Interface ArduinoAttrConstraints
- All Known Implementing Classes:
ArduinoAttrConstraints.ArduinoAttrEnumConstraints,ArduinoAttrConstraints.ArduinoAttrValueConstraints
public interface ArduinoAttrConstraints
Attribute constraints.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classArduinoAttrConstraints.ArduinoAttrEnumConstraintsEnum Constraints.static classArduinoAttrConstraints.ArduinoAttrValueConstraintsValue Constraints. -
Method Summary
Modifier and Type Method Description ObjectcheckValue(Object pValue)Check valid value.static ArduinoAttrConstraintsparseConstraints(ArduinoAttribute pAttr, String pConstDef)parse the constraints.
-
Method Details
-
checkValue
Object checkValue(Object pValue) throws net.sourceforge.jarduino.message.ArduinoParser.ArduinoParserExceptionCheck valid value.- Parameters:
pValue- the value.- Returns:
- corrected value
- Throws:
net.sourceforge.jarduino.message.ArduinoParser.ArduinoParserException- on error
-
parseConstraints
static ArduinoAttrConstraints parseConstraints(ArduinoAttribute pAttr, String pConstDef) throws net.sourceforge.jarduino.message.ArduinoParser.ArduinoParserExceptionparse the constraints.- Parameters:
pAttr- the attributepConstDef- the constraints definition- Returns:
- the parsed constraints (null if unbounded)
- Throws:
net.sourceforge.jarduino.message.ArduinoParser.ArduinoParserException- on error
-