Building Parsers with Java

Uses of Class
sjm.examples.sling.SlingFunction

Packages that use SlingFunction
sjm.examples.sling   
 

Uses of SlingFunction in sjm.examples.sling
 

Subclasses of SlingFunction in sjm.examples.sling
 class Abs
          This class wraps an absolute value function around another source function.
 class Arithmetic
          This class wraps an arithmetic function around two source functions.
 class Cartesian
          This class combines the y component of each of two source functions to form a new two-dimensional function.
 class Ceil
          This class wraps a ceil function around another source function.
 class Cos
          This class wraps a cos function around another source function.
 class Floor
          This class wraps a floor function around another source function.
 class Point
          Objects of this class store two numbers that effectively determine a point in two-dimensional space.
 class Polar
          This class represents the location of a sling stone in terms of the length of a sling's strap, and the angle (in radians) around the slinger's head.
 class Random
          Objects of this class return a random number between 0 and 1 when asked for their value.
 class Scale
          A scale represents the relationship of two temporal variables that vary linearly with each other.
 class Sin
          This class wraps a sin function around another source function.
 class Slider
          This class holds a JSlider component, and returns the the slider's value in its f(t) call.
 class Sling
          This class represents the location of a sling stone in terms of the length of a sling's strap, and the speed of the stone's rotation around the slinger's head.
 class T
          This class represents time, which the Sling environment defines to vary from 0 to 1 as a plot unfolds.
 class Tan
          This class wraps a tan function around another source function.
 class Variable
          A variable is a named place that can store another function.
 

Fields in sjm.examples.sling declared as SlingFunction
protected  SlingFunction[] SlingFunction.source
           
protected  SlingFunction AddFunctionCommand.f
           
protected  SlingFunction FunctionAssembler.function
           
protected  SlingFunction AssignFunctionCommand.f
           
protected  SlingFunction Renderable.function
           
protected  SlingFunction Renderable.nLine
           
protected  SlingFunction FunctionComparison.f0
           
protected  SlingFunction FunctionComparison.f1
           
 

Methods in sjm.examples.sling that return SlingFunction
 SlingFunction SlingFunction.eval()
          Creates a new version of an object, evaluating any variables in the object's subfunctions to non-variable values.
 SlingFunction SlingFunction.fresh()
          Creates a copy of the object and initializes the source array to an array of the right length, but leaves the elements of the array empty.
 SlingFunction Variable.eval()
          Return the value of the contents of this variable.
 

Methods in sjm.examples.sling with parameters of type SlingFunction
protected  Parser SlingParser.noArgs(java.lang.String name, SlingFunction f)
           
protected  Parser SlingParser.oneArg(java.lang.String name, SlingFunction f)
           
protected  Parser SlingParser.twoArg(java.lang.String name, SlingFunction f)
           
 void Variable.setValue(SlingFunction f)
          Sets the value of the variable to the given function.
 

Constructors in sjm.examples.sling with parameters of type SlingFunction
SlingFunction.SlingFunction(SlingFunction[] source)
          Construct a function that wraps the provided functions.
SlingFunction.SlingFunction(SlingFunction source)
          Construct a function that wraps the provided function.
SlingFunction.SlingFunction(SlingFunction source0, SlingFunction source1)
          Construct a function that wraps the provided functions.
AddFunctionCommand.AddFunctionCommand(RenderableCollection renderables, SlingFunction f, Variable nLine)
          Construct a command to add the supplied function to the supplied function collection.
Sin.Sin(SlingFunction source)
          Constructs a function object that wraps a sin function around the given source function.
Arithmetic.Arithmetic(char operator, SlingFunction a, SlingFunction b)
          Constructs a function object that is the sum, difference, quotient, product or remainder (depending on the operator) of the supplied functions.
FunctionAssembler.FunctionAssembler(SlingFunction function)
          Construct a new function assembler, using the provided function as a prototype.
Cartesian.Cartesian(SlingFunction sX, SlingFunction sY)
          Constructs a function object that combines the y components of the two sources into the x and y values of a new function.
Scale.Scale(SlingFunction bFrom, SlingFunction bTo)
          Constructs scale((0, 0), t, (1, 1), bFrom, bTo) .
Scale.Scale(SlingFunction aFrom, SlingFunction a, SlingFunction aTo, SlingFunction bFrom, SlingFunction bTo)
          Constructs scale(aFrom, a, aTo, bFrom, bTo).
Polar.Polar(SlingFunction radius, SlingFunction theta)
          Constructs a polar function object from the given sources,using the y component of the first function as a sling's strap length, and the y component of the second function as the sling's angle.
Sling.Sling(SlingFunction radius, SlingFunction speed)
          Constructs a sling from the given sources, using the y component of the first function as a sling's strap length, and the y component of the second function as the sling's speed.
AssignFunctionCommand.AssignFunctionCommand(Variable v, SlingFunction f)
          Construct a command to assign the supplied function to the supplied variable.
Abs.Abs(SlingFunction source)
          Constructs a function object that wraps an abs function around the given source function.
Renderable.Renderable(SlingFunction function, SlingFunction nLine)
          Create a function that will be rendered with the given number of lines.
Floor.Floor(SlingFunction source)
          Constructs a function object that wraps a floor function around the given source function.
Ceil.Ceil(SlingFunction source)
          Constructs a function object that wraps a ceil function around the given source function.
Tan.Tan(SlingFunction source)
          Constructs a function object that wraps a tan function around the given source function.
FunctionComparison.FunctionComparison(java.lang.String operator, SlingFunction f0, SlingFunction f1)
          Create a comparison with the specified operator and comparison functions.
Cos.Cos(SlingFunction source)
          Constructs a function object that wraps a cos function around the given source function.
 


by Steve Metsker