Class ImmutablePoint2D

    • Constructor Detail

      • ImmutablePoint2D

        public ImmutablePoint2D​(double x,
                                double y)
        Constructor.
        Parameters:
        x - x coordinate.
        y - y coordinate.
      • ImmutablePoint2D

        public ImmutablePoint2D​(int x,
                                int y)
        Constructor.
        Parameters:
        x - x coordinate.
        y - y coordinate.
    • Method Detail

      • equals

        @Pure
        public boolean equals​(Object object)
        Description copied from interface: Tuple2D
        Returns true if the Object t1 is of type Tuple2D and all of the data members of t1 are equal to the corresponding data members in this Tuple2D.
        Specified by:
        equals in interface Tuple2D<ImmutablePoint2D>
        Overrides:
        equals in class Object
        Parameters:
        object - the object with which the comparison is made
        Returns:
        true or false
      • hashCode

        @Pure
        public int hashCode()
        Description copied from interface: Tuple2D
        Returns a hash code value based on the data values in this object. Two different Tuple2D objects with identical data values (i.e., Tuple2D.equals(Object) returns true) will return the same hash code value. Two objects with different data members may return the same hash value, although this is not likely.
        Specified by:
        hashCode in interface Tuple2D<ImmutablePoint2D>
        Overrides:
        hashCode in class Object
        Returns:
        the integer hash code value
      • toJson

        public void toJson​(JsonBuffer buffer)
        Description copied from interface: JsonableObject
        Replies the Json representation of this node.
        Specified by:
        toJson in interface JsonableObject
        Parameters:
        buffer - the Json buffer.
      • getX

        @Pure
        public double getX()
        Description copied from interface: Tuple2D
        Get the x coordinate.
        Specified by:
        getX in interface Tuple2D<ImmutablePoint2D>
        Returns:
        the x coordinate.
      • ix

        @Pure
        public int ix()
        Description copied from interface: Tuple2D
        Get the x coordinate.
        Specified by:
        ix in interface Tuple2D<ImmutablePoint2D>
        Returns:
        the x coordinate.
      • getY

        @Pure
        public double getY()
        Description copied from interface: Tuple2D
        Get the y coordinate.
        Specified by:
        getY in interface Tuple2D<ImmutablePoint2D>
        Returns:
        the y coordinate.
      • iy

        @Pure
        public int iy()
        Description copied from interface: Tuple2D
        Get the y coordinate.
        Specified by:
        iy in interface Tuple2D<ImmutablePoint2D>
        Returns:
        the y coordinate.