Documentation of 'kcl.waterloo.graphics.data.GJXYSeries' Java class
GJXYSeries
kcl.waterloo.graphics.data

Class GJXYSeries



  • public class GJXYSeries
    extends java.lang.Object
    Class for representing paired x,y data as ArrayList lists of equal length. The x, y data are immutable - getX() and getY() methods return copies. There is no public null constructor. To serialize this class to XML with the beans encoder, define a custom persistence delegate, e.g.: <@code xmlencoder.setPersistenceDelegate(GJXYSeries.class, new DefaultPersistenceDelegate(new String[]{"x", "y"}));>
    • Constructor Summary

      Constructors 
      Constructor and Description
      GJXYSeries(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> xy) 
      GJXYSeries(java.util.ArrayList<java.lang.Double> x, java.util.ArrayList<java.lang.Double> y)
      Set x and y.
      GJXYSeries(double[] x, double[] y)
      Creates an instance by forming ArrayLists from the inputs.
      GJXYSeries(java.lang.Double[] x, java.lang.Double[] y)
      Creates an instance by forming ArrayLists from the inputs.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static void assertSameLength(java.util.ArrayList<java.lang.Double> x, java.util.ArrayList<java.lang.Double> y) 
      double getCenterX() 
      double getCenterY() 
      double getMaxX() 
      double getMaxY() 
      double getMinX() 
      double getMinY() 
      java.util.ArrayList<java.lang.Double> getX()
      Returns a copy of the x-data
      java.util.ArrayList<java.lang.Double> getY()
      Returns a copy of the y data
      int size()
      Size of the x & y vectors.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GJXYSeries

        public GJXYSeries(java.util.ArrayList<java.lang.Double> x,
                          java.util.ArrayList<java.lang.Double> y)
        Set x and y. These are copied by reference so the capacity to maintain an external reference to the ArrayLists is preserved if that is needed. To avoid that, provide a temporary copy of the ArrayLists as input. Asserts ArrayIndexOutOfBoundsException if x and y are not the same size.
        Parameters:
        x - ArrayList copied by reference from the input
        y - ArrayList copied by reference from the input
      • GJXYSeries

        public GJXYSeries(java.util.ArrayList<java.util.ArrayList<java.lang.Double>> xy)
      • GJXYSeries

        public GJXYSeries(java.lang.Double[] x,
                          java.lang.Double[] y)
        Creates an instance by forming ArrayLists from the inputs.
        Parameters:
        x - Double[]
        y - Double[]
      • GJXYSeries

        public GJXYSeries(double[] x,
                          double[] y)
        Creates an instance by forming ArrayLists from the inputs.
        Parameters:
        x - double[]
        y - double[]
    • Method Detail

      • size

        public int size()
        Size of the x & y vectors.
        Returns:
        the size
      • getX

        public java.util.ArrayList<java.lang.Double> getX()
        Returns a copy of the x-data
        Returns:
        the x
      • getY

        public java.util.ArrayList<java.lang.Double> getY()
        Returns a copy of the y data
        Returns:
        the y
      • getMinX

        public double getMinX()
      • getMaxX

        public double getMaxX()
      • getMinY

        public double getMinY()
      • getMaxY

        public double getMaxY()
      • getCenterX

        public double getCenterX()
      • getCenterY

        public double getCenterY()
      • assertSameLength

        public static void assertSameLength(java.util.ArrayList<java.lang.Double> x,
                                            java.util.ArrayList<java.lang.Double> y)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.