Packagecom.yworks.canvas.geom
Classpublic class ImmutablePoint
InheritanceImmutablePoint Inheritance Object
Implements IPoint

An implementation of an IPoint whose state cannot be changed.



Public Properties
 PropertyDefined By
  x : Number
[read-only] Returns the x coordinate of this instance.
ImmutablePoint
  y : Number
[read-only] Returns the y coordinate of this instance.
ImmutablePoint
Public Methods
 MethodDefined By
  
ImmutablePoint(x:Number, y:Number)
Creates an instance using the given coordinate pair.
ImmutablePoint
  
create(x:Number, y:Number):IPoint
[static] Creates an immutable IPoint instance using the given coordinates.
ImmutablePoint
Public Constants
 ConstantDefined By
  ORIGIN : IPoint
[static] An instance of an immutable point whose coordinates are (0,0) always.
ImmutablePoint
Property Detail
xproperty
x:Number  [read-only]

Returns the x coordinate of this instance.

An instance of this type will always return the same value.


Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]

Returns the y coordinate of this instance.

An instance of this type will always return the same value.


Implementation
    public function get y():Number
Constructor Detail
ImmutablePoint()Constructor
public function ImmutablePoint(x:Number, y:Number)

Creates an instance using the given coordinate pair.

Parameters
x:Number — The x coordinate
 
y:Number — The y coordinate
Method Detail
create()method
public static function create(x:Number, y:Number):IPoint

Creates an immutable IPoint instance using the given coordinates.

Parameters

x:Number — The x coordinate
 
y:Number — The y coordinate

Returns
IPoint — The newly created point.
Constant Detail
ORIGINConstant
public static const ORIGIN:IPoint

An instance of an immutable point whose coordinates are (0,0) always.