Module com.wyu4.snowberryjam
Class ConditionalHolder
java.lang.Object
com.wyu4.snowberryjam.compiler.data.values.ValueHolder
com.wyu4.snowberryjam.compiler.data.values.InteractiveValueHolder
com.wyu4.snowberryjam.compiler.data.values.conditional.ConditionalHolder
- Direct Known Subclasses:
And,Equals,GreaterOrEqualTo,GreaterThan,LessOrEqualTo,LessThan,Not,NotEquals,Or,SameType
A default unset conditional holder. This handles conditional operations.
-
Constructor Summary
ConstructorsConstructorDescriptionConditionalHolder(com.fasterxml.jackson.databind.JsonNode node) Create a new Conditional Holder -
Method Summary
Modifier and TypeMethodDescriptionbooleanbothTypesAre(Class<?> type) Check if both types of value A and B are a certain type.getState()Get the state of the conditionClass<?> getType()Get the type being pointed togetValue()Get the value being pointed to casted as anObject.booleannotEmpty()Check if this holder doesn't point to nulltoString()Methods 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, getId, getPointer, getSize, getString, isType, superEquals
-
Constructor Details
-
ConditionalHolder
public ConditionalHolder(com.fasterxml.jackson.databind.JsonNode node) Create a new Conditional Holder- Parameters:
node- TheJsonNodeto refer
-
-
Method Details
-
getState
Get the state of the condition- Returns:
Booleanvalue. Differs depending on each type of condition.
-
bothTypesAre
Check if both types of value A and B are a certain type.- Parameters:
type- Type to check for- Returns:
trueorfalse
-
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 classValueHolder- Returns:
- A
Boolean, casted to anObject. - See Also:
-
getType
Description copied from class:ValueHolderGet the type being pointed to- Overrides:
getTypein classValueHolder- Returns:
- Always returns
Boolean - See Also:
-
notEmpty
public boolean notEmpty()Description copied from class:ValueHolderCheck if this holder doesn't point to null- Overrides:
notEmptyin classValueHolder- Returns:
trueif this points to a value,falseif it points tonull
-
toString
- Overrides:
toStringin classValueHolder
-