sdr 0.3

net.cscott.sdr.calls.ast
Class Warped

java.lang.Object
  extended by net.cscott.sdr.calls.ast.AstNode
      extended by net.cscott.sdr.calls.ast.Comp
          extended by net.cscott.sdr.calls.ast.Warped

public class Warped
extends Comp

Warped transforms the coordinate space of its child. For example, a warped "right pull by" might become a "left pull by".

Version:
$Id: Warped.java,v 1.5 2006-10-18 01:55:00 cananian Exp $
Author:
C. Scott Ananian

Field Summary
 Comp child
           
 Warp warp
           
 
Fields inherited from class net.cscott.sdr.calls.ast.AstNode
type
 
Constructor Summary
Warped(Warp warp, Comp child)
           
 
Method Summary
<T> Comp
accept(TransformVisitor<T> v, T t)
          Visitor pattern implementation for transformations.
<RESULT,CLOSURE>
RESULT
accept(ValueVisitor<RESULT,CLOSURE> v, CLOSURE cl)
          Visitor pattern implementation for computations.
 String argsToString()
           
 Warped build(Warp warp, Comp child)
          Factory: creates new If only if it would differ from this.
 
Methods inherited from class net.cscott.sdr.calls.ast.AstNode
toString, valueOf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

warp

public final Warp warp

child

public final Comp child
Constructor Detail

Warped

public Warped(Warp warp,
              Comp child)
Method Detail

accept

public <T> Comp accept(TransformVisitor<T> v,
                       T t)
Description copied from class: AstNode
Visitor pattern implementation for transformations. Each AstNode accepts a TransformVisitor and a value, and returns an instance of its own type (ie, Seq.accept(tv, "A") returns a Seq). The 't' parameter is a closure.

Specified by:
accept in class Comp

accept

public <RESULT,CLOSURE> RESULT accept(ValueVisitor<RESULT,CLOSURE> v,
                                      CLOSURE cl)
Description copied from class: AstNode
Visitor pattern implementation for computations. Each AstNode accepts a ValueVisitor and a closure, and returns an object of the appropriate result type.

Specified by:
accept in class AstNode

build

public Warped build(Warp warp,
                    Comp child)
Factory: creates new If only if it would differ from this.


argsToString

public String argsToString()
Overrides:
argsToString in class AstNode

sdr 0.3

Copyright © 2006-2009 C. Scott Ananian