Interface Point<T extends Point>

Type Parameters:
T - The concrete instantiation of the point type.
All Superinterfaces:
Comparable<T>
All Known Implementing Classes:
Point2D

public interface Point<T extends Point> extends Comparable<T>
Point (vector) type for representing note events.

The points are generic and the operations on them are only defined for the same type of points (e.g., it is not possible to add points of different types together).

Classes implementing this interface are required to be immutable.

  • Method Summary

    Modifier and Type
    Method
    Description
    add(T point)
    Returns the sum of this point with the given point.
    int
    Returns the dimensionality of this point.
    subtract(T point)
    Returns the difference of this point with the given point.

    Methods inherited from interface java.lang.Comparable

    compareTo
  • Method Details

    • getDimensionality

      int getDimensionality()
      Returns the dimensionality of this point.
      Returns:
      the dimensionality of this point
    • add

      T add(T point)
      Returns the sum of this point with the given point.
      Parameters:
      point - the point that is added to this point to compute the sum
      Returns:
      the sum of this point with the given point
    • subtract

      T subtract(T point)
      Returns the difference of this point with the given point.
      Parameters:
      point - the point that is subtracted from this point to compute the difference
      Returns:
      the difference of this point with the given point