net.fortytwo.ripple.libs.math
Class Div
java.lang.Object
net.fortytwo.ripple.model.PrimitiveStackMapping
net.fortytwo.ripple.libs.math.Div
- All Implemented Interfaces:
- Mapping<StackContext,StackContext,RippleException>, RippleValue, StackMapping
public class Div
- extends PrimitiveStackMapping
A primitive which consumes a numerator and divisor and produces their
quotient. If the divisor is 0, no value is produced.
|
Constructor Summary |
Div()
|
Div
public Div()
throws RippleException
- Throws:
RippleException
getIdentifiers
public String[] getIdentifiers()
- Specified by:
getIdentifiers in class PrimitiveStackMapping
getParameters
public PrimitiveStackMapping.Parameter[] getParameters()
- Specified by:
getParameters in class PrimitiveStackMapping
getComment
public String getComment()
- Specified by:
getComment in class PrimitiveStackMapping
- Returns:
- a comment about the primitive. May be null.
apply
public void apply(StackContext arg,
Sink<StackContext,RippleException> solutions)
throws RippleException
- Throws:
RippleException
getInverse
public StackMapping getInverse()
throws RippleException
- Specified by:
getInverse in interface StackMapping- Overrides:
getInverse in class PrimitiveStackMapping
- Returns:
- the
StackMapping exactly inverse to this mapping,
or a NullMapping if no such mapping can be defined.
- Throws:
RippleException - if the inverse cannot be determined
Copyright © 2007-2011 fortytwo.net. All Rights Reserved.