Class AbstractPoint2Wrapper<P>

  • Type Parameters:
    P - The type of the point
    All Implemented Interfaces:
    Point2Wrapper<P>
    Direct Known Subclasses:
    AbstractPoint3Wrapper, OpenCVPoint2Wrapper

    public abstract class AbstractPoint2Wrapper<P>
    extends Object
    implements Point2Wrapper<P>

    Abstract generic implementation of the Point2Wrapper interface. Getter and Setter for coordinate-values (not for the wrapped point) have to be overwritten in inherited class!

    Since:
    1.0
    Author:
    Christoph Praschl
    • Field Detail

      • point

        protected P point
    • Constructor Detail

      • AbstractPoint2Wrapper

        public AbstractPoint2Wrapper​(P point)
        Constructor for a new AbstractPoint2Wrapper
        Parameters:
        point - The point which should be wrapped
    • Method Detail

      • getPoint

        public P getPoint()
        Getter for the wrapped point object.
        Specified by:
        getPoint in interface Point2Wrapper<P>
        Returns:
        Returns the wrapped point object.
      • setPoint

        public void setPoint​(P point)
        Setter for the wrapped point object
        Specified by:
        setPoint in interface Point2Wrapper<P>
        Parameters:
        point - AbstractPoint2Wrapper which should be wrapped.
      • equals

        public boolean equals​(Object o)
        Generated Code
        Overrides:
        equals in class Object
        Parameters:
        o - value to compare
        Returns:
        true if values are equals else false
      • hashCode

        public int hashCode()
        Generated Code
        Overrides:
        hashCode in class Object
        Returns:
        hashCode for the object