|
Building Parsers with Java | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--sjm.examples.sling.SlingFunction
|
+--sjm.examples.sling.Point
Objects of this class store two numbers that effectively determine a point in two-dimensional space.
| Field Summary | |
double |
x
|
double |
y
|
| Fields inherited from class sjm.examples.sling.SlingFunction |
source |
| Constructor Summary | |
Point(double x,
double y)
Create a point with the given coordinates. |
|
| Method Summary | |
Point |
f(double t)
Points are not really functions at all, but the
Point class subclasses SlingFunction so
that they may serve in compositions of other functions. |
java.lang.String |
toString()
Returns a string representation of this point. |
| Methods inherited from class sjm.examples.sling.SlingFunction |
eval,
extrema,
fresh |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public double x
public double y
| Constructor Detail |
public Point(double x,
double y)
| Method Detail |
public Point f(double t)
Point class subclasses SlingFunction so
that they may serve in compositions of other functions.
Points have nothing to compute, so the receiver always
returns itself.t - ignoredpublic java.lang.String toString()
|
by Steve Metsker | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||