java.lang.Object
com.wyu4.snowberryjam.compiler.data.values.ValueHolder
com.wyu4.snowberryjam.compiler.data.values.InteractiveValueHolder
com.wyu4.snowberryjam.compiler.data.values.math.ArithmeticHolder
com.wyu4.snowberryjam.compiler.data.values.math.Modulus
Arithmetic Holder that handles modulus operations between value A and value B.
-
Constructor Summary
ConstructorsConstructorDescriptionModulus(com.fasterxml.jackson.databind.JsonNode node) Create a new modulus operation -
Method Summary
Methods inherited from class com.wyu4.snowberryjam.compiler.data.values.math.ArithmeticHolder
notEmptyMethods inherited from class com.wyu4.snowberryjam.compiler.data.values.InteractiveValueHolder
getA, getBMethods inherited from class com.wyu4.snowberryjam.compiler.data.values.ValueHolder
checkValueIsConditional, equals, fromNode, getArray, getPointer, getSize, getString, getType, isType, superEquals
-
Constructor Details
-
Modulus
public Modulus(com.fasterxml.jackson.databind.JsonNode node) Create a new modulus operation- Parameters:
node- TheJsonNodeto refer
-
-
Method Details
-
getValue
Description copied from class:ValueHolderGet the value being pointed to casted as anObject. The contents being returned by this method are mutable.- Overrides:
getValuein classArithmeticHolder- Returns:
- A % B
- Throws:
ArithmeticException- B is 0IllegalArgumentException- Either A or B are not numerical
-
getId
Description copied from class:ValueHolderGet the ID of the value holder- Overrides:
getIdin classValueHolder- Returns:
SourceId.MODULUS
-
toString
- Overrides:
toStringin classArithmeticHolder
-