Package jadex.commons.collection
Class SCollection
- java.lang.Object
-
- jadex.commons.collection.SCollection
-
public class SCollection extends java.lang.Object
Static methods for collection creation and observation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SCollection.DebugPrinter
Create an info printer for the collections.
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
-
Constructor Summary
Constructors Constructor Description SCollection()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static void
addCollection(java.lang.Object o)
Add a map to the observer list.static java.util.List
concurrencyCheckingList(java.util.List list)
Wrap a list for concurrency checking.static <T> java.util.ArrayList<T>
createArrayList()
Return a fresh array list.static FastHashMap
createFastHashMap()
Return a fresh hash map.static <T,E>
java.util.HashMap<T,E>createHashMap()
Return a fresh hash map.static <T> java.util.HashSet<T>
createHashSet()
Return a hash set.static java.util.Hashtable
createHashtable()
Return a fresh hashtable.static IndexMap
createIndexMap()
Return a fresh index map.static <T,E>
java.util.HashMap<T,E>createLinkedHashMap()
Return a fresh linked hash map.static <T> java.util.LinkedHashSet<T>
createLinkedHashSet()
Return a linked hash set.static java.util.LinkedList
createLinkedList()
Return a fresh linked list.static <T,E>
LRU<T,E>createLRU(int max)
Return a fresh linked hash map.static MultiCollection
createMultiCollection()
Return a fresh multi collection.static NestedMap
createNestedMap(java.util.Map map)
Return a linked hash set.static NestedMap
createNestedMap(java.util.Map[] map)
Return a linked hash set.static java.util.Vector
createVector()
Return a fresh vector.static java.util.WeakHashMap
createWeakHashMap()
Return a fresh weak hash map.static WeakList
createWeakList()
Return a fresh weak list.static WeakSet
createWeakSet()
Return a fresh weak set.static void
main(java.lang.String[] args)
protected static void
printCollectionInfo(java.util.Iterator it, int boundary)
Print out all collections with more than boundary elements.
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
-
Method Detail
-
createIndexMap
public static IndexMap createIndexMap()
Return a fresh index map.
-
createHashtable
public static java.util.Hashtable createHashtable()
Return a fresh hashtable.
-
createHashMap
public static <T,E> java.util.HashMap<T,E> createHashMap()
Return a fresh hash map.
-
createLinkedHashMap
public static <T,E> java.util.HashMap<T,E> createLinkedHashMap()
Return a fresh linked hash map.
-
createLRU
public static <T,E> LRU<T,E> createLRU(int max)
Return a fresh linked hash map.
-
createFastHashMap
public static FastHashMap createFastHashMap()
Return a fresh hash map.
-
createMultiCollection
public static MultiCollection createMultiCollection()
Return a fresh multi collection.
-
createWeakHashMap
public static java.util.WeakHashMap createWeakHashMap()
Return a fresh weak hash map.
-
createWeakList
public static WeakList createWeakList()
Return a fresh weak list.
-
createWeakSet
public static WeakSet createWeakSet()
Return a fresh weak set.
-
createArrayList
public static <T> java.util.ArrayList<T> createArrayList()
Return a fresh array list.
-
createLinkedList
public static java.util.LinkedList createLinkedList()
Return a fresh linked list.
-
createVector
public static java.util.Vector createVector()
Return a fresh vector.
-
createHashSet
public static <T> java.util.HashSet<T> createHashSet()
Return a hash set.
-
createLinkedHashSet
public static <T> java.util.LinkedHashSet<T> createLinkedHashSet()
Return a linked hash set.
-
createNestedMap
public static NestedMap createNestedMap(java.util.Map map)
Return a linked hash set.
-
createNestedMap
public static NestedMap createNestedMap(java.util.Map[] map)
Return a linked hash set.
-
concurrencyCheckingList
public static java.util.List concurrencyCheckingList(java.util.List list)
Wrap a list for concurrency checking.
-
addCollection
protected static void addCollection(java.lang.Object o)
Add a map to the observer list.
-
printCollectionInfo
protected static void printCollectionInfo(java.util.Iterator it, int boundary)
Print out all collections with more than boundary elements.
-
main
public static void main(java.lang.String[] args) throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
-
-