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.Minus
Arithmetic Holder that handles subtraction between value A and value B.
-
Constructor Summary
ConstructorsConstructorDescriptionMinus(com.fasterxml.jackson.databind.JsonNode node) Create a new subtraction operationMinus(ValueHolder a, ValueHolder b) Create a new subtraction 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
-
Minus
public Minus(com.fasterxml.jackson.databind.JsonNode node) Create a new subtraction operation- Parameters:
node- TheJsonNodeto refer
-
Minus
Create a new subtraction operation- Parameters:
a- Value Ab- Value B, subtracts from value A
-
-
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:
IllegalArgumentException- Either A or B are not numerical.
-
getId
Description copied from class:ValueHolderGet the ID of the value holder- Overrides:
getIdin classValueHolder- Returns:
SourceId.MINUS
-
toString
- Overrides:
toStringin classArithmeticHolder
-