package model;

import com.jme3.math.Vector3f;

import static ui.Environment.SCALE;

/**
 *
 * @author      Danil Platonov <slemonide@gmail.com>
 * @version     0.1
 * @since       0.1
 *
 * A three-dimensional position
 */
public final class Position {
    /**
     * x component
     */
    public final int x;
    /**
     * y component
     */
    public final int y;
    /**
     * z component
     */
    public final int z;

    /**
     * Creates a vector with the given coordinates
     * @param x x coordinate
     * @param y y coordinate
     * @param z z coordinate
     */
    public Position(int x, int y, int z) {
        this.x = x;
        this.y = y;
        this.z = z;
    }

    /**
     * Create a vector by adding given components to the components of this vector
     * @param x change in the x coordinate
     * @param y change in the y coordinate
     * @param z change in the z coordinate
     * @return the sum of this vector and given vector
     */
    public Position add(int x, int y, int z) {
        return new Position(this.x + x, this.y + y, this.z + z);
    }

    public Position add(Position anotherVector) {
        return new Position(this.x + anotherVector.x, this.y + anotherVector.y, this.z + anotherVector.z);
    }

    /**
     * @return a vector representation of position in VisualGUI coordinates
     */
    public Vector3f getUIVector() {
        return this.multiply(SCALE);
    }

    private Vector3f multiply(float scale) {
        return new Vector3f(scale * x, scale * y, scale * z);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Position vector3 = (Position) o;

        return x == vector3.x && y == vector3.y && z == vector3.z;
    }

    @Override
    public int hashCode() {
        int result = x;
        result = 31 * result + y;
        result = 31 * result + z;
        return result;
    }

    public Position subtract(Position position) {
        return this.add(position.inverse());
    }

    private Position inverse() {
        return new Position(-x, -y, -z);
    }
}

@@ -39,16 +39,101 @@
 ector3f;
+%0Aimport org.jetbrains.annotations.Contract;%0Aimport org.jetbrains.annotations.NotNull;
 %0A%0Aimport
@@ -1049,32 +1049,72 @@
  vector%0A     */%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     public Posit
@@ -1208,32 +1208,72 @@
 .z + z);%0A    %7D%0A%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     public Posit
@@ -1504,32 +1504,72 @@
 dinates%0A     */%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     public Vecto
@@ -1624,32 +1624,72 @@
 (SCALE);%0A    %7D%0A%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     private Vect
@@ -2050,32 +2050,59 @@
 ctor3.z;%0A    %7D%0A%0A
+    @Contract(pure = true)%0A
     @Override%0A  
@@ -2245,24 +2245,64 @@
 ult;%0A    %7D%0A%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     public P
@@ -2387,24 +2387,64 @@
 ());%0A    %7D%0A%0A
+    @NotNull%0A    @Contract(pure = true)%0A
     private 

Annotate Positions class as well.