Interface Drawable<P extends Point<P>>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      int getDimensions()
      Return the number of dimensions.
      Iterator<? extends P> getPoints()
      Retrieve, or generate all points that make up the object.
      int size()
      Retrieve the number of points that make up the object.
      String toString()
      Produce a string describing the Drawable using default conversion for the (double) coordinate values.
      default String toString​(boolean doNotIncludeClassName)
      Produce a String describing the Drawable.
      default String toString​(String doubleFormat)
      Produce a String describing the Drawable.
      String toString​(String doubleFormat, boolean doNotIncludeClassName)
      Produce a String describing the Drawable.
    • Method Detail

      • getPoints

        Iterator<? extends P> getPoints()
        Retrieve, or generate all points that make up the object.
        Returns:
        Iterable<Point2d>; an iterator that generates all points that make up the object
      • size

        int size()
        Retrieve the number of points that make up the object.
        Returns:
        int; the number of points that make up the object
      • getDimensions

        int getDimensions()
        Return the number of dimensions.
        Returns:
        int; the number of dimensions
      • toString

        String toString()
        Produce a string describing the Drawable using default conversion for the (double) coordinate values. Regrettably, it is not allowed to provide a default implementation here.
        Overrides:
        toString in class Object
        Returns:
        String; a string describing the Drawable
      • toString

        String toString​(String doubleFormat,
                        boolean doNotIncludeClassName)
        Produce a String describing the Drawable.
        Parameters:
        doubleFormat - String; a format string (something like "%6.3f") which will be used to render every coordinate value)
        doNotIncludeClassName - boolean; if true; the output of toString is not prefixed by the class name. This is useful for concatenating the textual representation of lots of Drawables (e.g. an array, or a List).
        Returns:
        String; textual representation of the Drawable
      • toString

        default String toString​(String doubleFormat)
        Produce a String describing the Drawable.
        Parameters:
        doubleFormat - String; a format string (something like "%6.3f") which will be used to render every coordinate value)
        Returns:
        String; textual representation of the Drawable
      • toString

        default String toString​(boolean doNotIncludeClassName)
        Produce a String describing the Drawable.
        Parameters:
        doNotIncludeClassName - boolean; if true; the output of toString is not prefixed by the class name. This is useful for concatenating the textual representation of lots of Drawables (e.g. an array, or a List).
        Returns:
        String; textual representation of the Drawable