com.github.napp.util.mass.LazyInitializers Maven / Gradle / Ivy
/**
*
*/
package com.github.napp.util.mass;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
import com.github.napp.util.mass.MapUtil.LazyInit;
/**
* @author Alexandru Bledea
* @since Oct 19, 2013
*/
public class LazyInitializers {
public static final LazyInit COLLECTION_ARRAYLIST = new LazyInit() {
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public Collection call() throws Exception {
return new ArrayList();
}
};
public static final LazyInit COLLECTION_HASHSET = new LazyInit() {
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public Collection call() throws Exception {
return new HashSet();
}
};
public static final LazyInit SET_HASHSET = new LazyInit() {
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public Set call() throws Exception {
return new HashSet();
}
};
public static final LazyInit SET_TREESET = new LazyInit() {
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public Set call() throws Exception {
return new TreeSet();
}
};
public static final LazyInit LIST_ARRAYLIST = new LazyInit() {
/* (non-Javadoc)
* @see java.util.concurrent.Callable#call()
*/
@Override
public List call() throws Exception {
return new ArrayList();
}
};
public static final LazyInit