net.fortytwo.ripple.model
Class Closure
java.lang.Object
net.fortytwo.ripple.model.Closure
- All Implemented Interfaces:
- Mapping<StackContext,StackContext,RippleException>, StackMapping
public class Closure
- extends Object
- implements StackMapping
Closure
public Closure(StackMapping innerMapping,
RippleValue argument)
- Parameters:
innerMapping - a mappingargument - an inactive value
arity
public int arity()
- Specified by:
arity in interface StackMapping
- Returns:
- the fixed number of arguments which this function consumes before computing a result.
apply
public void apply(StackContext arg,
Sink<StackContext,RippleException> solutions)
throws RippleException
- Specified by:
apply in interface Mapping<StackContext,StackContext,RippleException>
- Throws:
RippleException
isTransparent
public boolean isTransparent()
- Specified by:
isTransparent in interface Mapping<StackContext,StackContext,RippleException>
- Returns:
- whether this function is referentially transparent w.r.t. all of its
parameters.
toString
public String toString()
- Overrides:
toString in class Object
getInverse
public StackMapping getInverse()
throws RippleException
- Specified by:
getInverse in interface StackMapping
- 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.