Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.uci.ics.jung.utils
Class CollectionFactory

    java.lang.Object
      edu.uci.ics.jung.utils.CollectionFactory

public class CollectionFactory
extends Object

Generates `Collection`s based on input `Collection` instances, optionally filtered and sorted according to specified parameters.

Author:
  Joshua O'Madadhain

Nested Class Summary
`protected static class` | `CollectionFactory.CollectionData`

Field Summary
`protected static Map` | `collection_data`

Constructor Summary
`CollectionFactory()`

Method Summary
`static void` | `addCollection(Collection c, Comparator comp)`
`static void` | `addCollection(Collection c, Comparator comp, Predicate p)`
`static void` | `addCollection(Collection c, Comparator comp, Predicate p, boolean dynamic)`
`static void` | `addCollection(Collection c, Predicate p)`
`static void` | `clear()`
`static Collection` | `getCollection(Collection c)`
`static Collection` | `getCollection(Collection c, Comparator comp)`
`static Collection` | `getCollection(Collection c, Comparator comp, Predicate p)`
`static Collection` | `getCollection(Collection c, Predicate p)`
`static void` | `removeCollection(Collection c)`
`static void` | `setComparator(Collection c, Comparator comp)`
`static void` | `setDynamic(Collection c, boolean dynamic)` If `dynamic` is true, the collection `c` backing the `Iterator` is automatically rebuilt-sorted and/or re-filtered each time `getIterator(c)` is called.
`static void` | `setPredicate(Collection c, Predicate p)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### collection_data

    protected static Map collection_data

Constructor Detail

### CollectionFactory

    public CollectionFactory()

Method Detail

### getCollection

    public static Collection getCollection(Collection c)

### getCollection

    public static Collection getCollection(Collection c,
                                           Comparator comp,
                                           Predicate p)

### getCollection

    public static Collection getCollection(Collection c,
                                           Comparator comp)

### getCollection

    public static Collection getCollection(Collection c,
                                           Predicate p)

### addCollection

    public static void addCollection(Collection c,
                                     Comparator comp,
                                     Predicate p,
                                     boolean dynamic)

### addCollection

    public static void addCollection(Collection c,
                                     Comparator comp)

### addCollection

    public static void addCollection(Collection c,
                                     Predicate p)

### addCollection

    public static void addCollection(Collection c,
                                     Comparator comp,
                                     Predicate p)

### setDynamic

    public static void setDynamic(Collection c,
                                  boolean dynamic)

  If `dynamic` is true, the collection `c` backing the `Iterator` is automatically rebuilt-sorted and/or re-filtered each time `getIterator(c)` is called. (This is done in case either the collection, the comparator, or the predicate has changed.) Otherwise, the collection is (re)built only when `buildIterator` is called.

### setComparator

    public static void setComparator(Collection c,
                                     Comparator comp)

### setPredicate

    public static void setPredicate(Collection c,
                                    Predicate p)

### clear

    public static void clear()

### removeCollection

    public static void removeCollection(Collection c)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD