de.erichseifert.vectorgraphics2d
Class DataUtils

java.lang.Object
  extended by de.erichseifert.vectorgraphics2d.DataUtils

public abstract class DataUtils
extends java.lang.Object

Abstract class that contains utility functions for working with data collections like maps or lists.


Constructor Summary
DataUtils()
           
 
Method Summary
static java.lang.String join(java.lang.String separator, double... elements)
          Returns a string with all float values divided by a specified separator.
static java.lang.String join(java.lang.String separator, float... elements)
          Returns a string with all float values divided by a specified separator.
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
 

Constructor Detail

DataUtils

public DataUtils()
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.

join

public static java.lang.String join(java.lang.String separator,
                                    float... elements)
Returns a string with all float values divided by a specified separator.

Parameters:
separator - Separator string.
elements - Float array.
Returns:
Joined string.

join

public static java.lang.String join(java.lang.String separator,
                                    double... elements)
Returns a string with all float values divided by a specified separator.

Parameters:
separator - Separator string.
elements - Double array.
Returns:
Joined string.


Copyright © 2010. All Rights Reserved.