org.formulacompiler.runtime
Class New

java.lang.Object
  extended by org.formulacompiler.runtime.New

public final class New
extends java.lang.Object

Provides static generic collection constructors which make use of Java 5 type inference as suggested by Josh Bloch in his Google slides on "Effective Java Reloaded".

Author:
peo

Constructor Summary
New()
           
 
Method Summary
static
<T> T[]
array(T... e)
           
static
<T> java.util.List<T>
arrayList()
           
static
<T> java.util.List<T>
arrayList(int _initialSize)
           
static
<V> java.util.Map<java.lang.String,V>
caseInsensitiveMap()
           
static
<T> java.util.Collection<T>
collection()
           
static
<T> java.util.Collection<T>
collection(int _initialSize)
           
static
<K,V> java.util.Map<K,V>
hashMap()
           
static
<T> java.util.List<T>
list()
           
static
<T> java.util.List<T>
list(int _initialSize)
           
static
<K,V> java.util.Map<K,V>
map()
           
static
<T> java.util.Set<T>
set()
           
static
<K,V> java.util.SortedMap<K,V>
sortedMap()
           
static
<T> java.util.SortedSet<T>
sortedSet()
           
static
<T> java.util.Stack<T>
stack()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

New

public New()
Method Detail

array

public static <T> T[] array(T... e)

arrayList

public static <T> java.util.List<T> arrayList()

arrayList

public static <T> java.util.List<T> arrayList(int _initialSize)

list

public static <T> java.util.List<T> list()

list

public static <T> java.util.List<T> list(int _initialSize)

collection

public static <T> java.util.Collection<T> collection()

collection

public static <T> java.util.Collection<T> collection(int _initialSize)

hashMap

public static <K,V> java.util.Map<K,V> hashMap()

map

public static <K,V> java.util.Map<K,V> map()

caseInsensitiveMap

public static <V> java.util.Map<java.lang.String,V> caseInsensitiveMap()

sortedSet

public static <T> java.util.SortedSet<T> sortedSet()

sortedMap

public static <K,V> java.util.SortedMap<K,V> sortedMap()

set

public static <T> java.util.Set<T> set()

stack

public static <T> java.util.Stack<T> stack()