Documentation of 'org.spaceroots.mantissa.utilities.ArrayMapper' Java class
ArrayMapper
org.spaceroots.mantissa.utilities

Class ArrayMapper



  • public class ArrayMapper
    extends java.lang.Object
    This class dispatch data between an array and several domain objects. This class handles all the burden of mapping each domain object it handles to a slice of a single array.
    See Also:
    ArraySliceMappable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double[] getDataArray()
      Get the data array.
      void manageMappable(ArraySliceMappable object)
      Take a new domain object into account.
      void updateArray()
      Map data from the domain objects to the internal array.
      void updateArray(double[] data)
      Map data from the domain objects to the specified array.
      void updateObjects()
      Map data from the internal array to the domain objects.
      void updateObjects(double[] data)
      Map data from the specified array to the domain objects.
      • Methods inherited from class java.lang.Object

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

      • ArrayMapper

        public ArrayMapper()
        Simple constructor. Build an empty array mapper
      • ArrayMapper

        public ArrayMapper(ArraySliceMappable object)
        Simple constructor. Build an array mapper managing one object. Other objects can be added later using the manageMappable method. This call is equivalent to build the mapper with the default constructor and adding the object.
        Parameters:
        object - domain object to handle
    • Method Detail

      • manageMappable

        public void manageMappable(ArraySliceMappable object)
        Take a new domain object into account.
        Parameters:
        object - domain object to handle
      • getDataArray

        public double[] getDataArray()
        Get the data array.
        Returns:
        copy of the data array
      • updateObjects

        public void updateObjects()
        Map data from the internal array to the domain objects.
      • updateObjects

        public void updateObjects(double[] data)
        Map data from the specified array to the domain objects.
        Parameters:
        data - flat array holding the data to dispatch
      • updateArray

        public void updateArray()
        Map data from the domain objects to the internal array.
      • updateArray

        public void updateArray(double[] data)
        Map data from the domain objects to the specified array.
        Parameters:
        data - flat array where to put the data

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.