Package org.eclipse.graphiti.internal.datatypes.impl

## Class LocationImpl

- java.lang.Object
- - org.eclipse.graphiti.internal.datatypes.impl.LocationImpl

All Implemented Interfaces:
  `IAdvancedLocation`, `ILocation`

    public class LocationImpl
    extends java.lang.Object
    implements IAdvancedLocation

The Class LocationImpl.

### Constructor Summary

Constructors
`LocationImpl​(int x, int y)`
`LocationImpl​(ILocation location)`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals​(java.lang.Object o)`
`ILocation` `getLocationCopy()`
`int` `getX()` Gets the x value.
`int` `getY()` Gets the y value.
`int` `hashCode()`
`void` `scale​(double amount)` Changes the current location.
`ILocation` `setLocation​(int x, int y)` Sets the location.
`ILocation` `setLocation​(ILocation location)` Sets the location.
`void` `setX​(int x)` Sets the x coordinate of this location.
`void` `setY​(int y)` Sets the y coordinate of this location.
`java.lang.String` `toString()`
`ILocation` `translate​(int dx, int dy)` Translates the current location.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### LocationImpl

    public LocationImpl​(int x,
                        int y)

#### LocationImpl

    public LocationImpl​(ILocation location)

### Method Detail

#### getX

    public int getX()

Description copied from interface: `ILocation`
Gets the x value.

Specified by:
  `getX` in interface `ILocation`
Returns:
  the x value of this location

#### getY

    public int getY()

Description copied from interface: `ILocation`
Gets the y value.

Specified by:
  `getY` in interface `ILocation`
Returns:
  the y value of this location

#### setX

    public void setX​(int x)

Description copied from interface: `ILocation`
Sets the x coordinate of this location.

Specified by:
  `setX` in interface `ILocation`
Parameters:
  `x` - the new x coordinate

#### setY

    public void setY​(int y)

Description copied from interface: `ILocation`
Sets the y coordinate of this location.

Specified by:
  `setY` in interface `ILocation`
Parameters:
  `y` - the new y coordinate

#### equals

    public boolean equals​(java.lang.Object o)

Overrides:
  `equals` in class `java.lang.Object`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `java.lang.Object`

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`

#### getLocationCopy

    public ILocation getLocationCopy()

Specified by:
  `getLocationCopy` in interface `IAdvancedLocation`
Returns:
  An exact copy of the current advanced location instance.

#### setLocation

    public ILocation setLocation​(int x,
                                 int y)

Description copied from interface: `IAdvancedLocation`
Sets the location.

Specified by:
  `setLocation` in interface `IAdvancedLocation`
Parameters:
  `x` - the new x coordinate of the location
  `y` - the new y coordinate of the location
Returns:
  the current instance

#### setLocation

    public ILocation setLocation​(ILocation location)

Description copied from interface: `IAdvancedLocation`
Sets the location.

Specified by:
  `setLocation` in interface `IAdvancedLocation`
Parameters:
  `location` - the location which contains the new x and y coordinates
Returns:
  the current instance

#### scale

    public void scale​(double amount)

Description copied from interface: `IAdvancedLocation`
Changes the current location.

Specified by:
  `scale` in interface `IAdvancedLocation`
Parameters:
  `amount` - x and y coordinate of the location will be multiplied with this amount

#### translate

    public ILocation translate​(int dx,
                               int dy)

Description copied from interface: `IAdvancedLocation`
Translates the current location.

Specified by:
  `translate` in interface `IAdvancedLocation`
Parameters:
  `dx` - this value will be added to the x coordinate
  `dy` - this value will be added to the y coordinate
Returns:
  the current instance