Skip to content
Reference > Classes

Point

Definition

Point var = .... ;

Extends

Extended By

None

Method Summary

Owner Name Return Type Description
Point constructor(x, y) Point creates a new web point at the specified coordinate space
Object getClassName() String Returns the string name of this object's class type.
Point getX() Integer Get the x position
Point getY() Integer Get the y position
Object toJson() String Returns a string of a json representation of this object.

Method Definitions


constructor(x,y)

Point point = new Point(Integer x, Integer y)

Description

creates a new web point at the specified coordinate space

Parameter Definition

Name Type Description
x Integer  x position
y Integer  y position

Example 1

1
2
3
Point p = new Point(3,4);

// p = WebPoint [3, 4]

getClassName()

String Object::getClassName()

Description

Returns the string name of this object's class type.

Example 13

1
2
3
4
Point p = new Point(3,4);
p.getClassName();

// p.getClassName() = Point

getX()

Integer Point::getX()

Description

Get the x position

Example 1

1
2
3
4
Point p = new Point(3,4);
p.getX();

// p.getX() = 3

getY()

Integer Point::getY()

Description

Get the y position

Example 1

1
2
3
4
Point p = new Point(3,4);
p.getY();

// p.getY() = 4

toJson()

String Object::toJson()

Description

Returns a string of a json representation of this object.

Example 13

1
2
3
4
Point p = new Point(3,4);
p.toJson();

// p.toJson() = "WebPoint [3, 4]"