## org.eclipse.emf.ocl.utilities.impl
Class CollectionFactory

    java.lang.Object
      org.eclipse.emf.ocl.utilities.impl.CollectionFactory

    public class CollectionFactory

extends Object

A factory for creating java collection types from their OCL equivalents.

Constructor Summary
`CollectionFactory()`

Method Summary
`Collection` `createCollection(int kind)` Creates a java collection from a supplied collection kind.
`Collection` `createCollection(int kind, Collection c)` Creates a java collection from a supplied collection kind, initialized to the supplied collection.
`static CollectionFactory` `getInstance()`

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

Constructor Detail

### CollectionFactory

    public CollectionFactory()

Method Detail

### getInstance

    public static CollectionFactory getInstance()

### createCollection

    public Collection createCollection(int kind)

  Creates a java collection from a supplied collection kind.

  Parameters:
    `kind` - the OCL collection kind to use in constructing a java equivalent
  Returns:
    the java collection

### createCollection

    public Collection createCollection(int kind,
                                       Collection c)

  Creates a java collection from a supplied collection kind, initialized to the supplied collection.

  Parameters:
    `kind` - the OCL collection kind to use in constructing a java equivalent
    `c` - a collection with which to initialize the constructed collection
  Returns:
    the java collection

Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved.