Documentation of 'de.erichseifert.gral.util.DataUtils' Java class
DataUtils
de.erichseifert.gral.util

Class DataUtils



  • public abstract class DataUtils
    extends java.lang.Object
    Abstract class that contains utility functions for creating data structures and for working with data sources and values.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double getValueOrDefault(java.lang.Number n, double defaultValue)
      Returns the double value of the Number object or the specified default value if the object is null.
      static <K,V> java.util.Map<K,V> map(K[] keys, V[] values)
      Creates a mapping from two arrays, one with keys, one with values.
      • Methods inherited from class java.lang.Object

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

      • map

        public static <K,V> java.util.Map<K,V> map(K[] keys,
                                                   V[] values)
        Creates a mapping from two arrays, one with keys, one with values.
        Type Parameters:
        K - Data type of the keys.
        V - Data type of the values.
        Parameters:
        keys - Array containing the keys.
        values - Array containing the values.
        Returns:
        Map with keys and values from the specified arrays.
      • getValueOrDefault

        public static double getValueOrDefault(java.lang.Number n,
                                               double defaultValue)
        Returns the double value of the Number object or the specified default value if the object is null.
        Parameters:
        n - Number object.
        defaultValue - Default value.
        Returns:
        Double value of the Number object or the default value if the object is null

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.