org.dishevelled.codegen
Class CollectionDescription

java.lang.Object
  extended by org.dishevelled.codegen.CollectionDescription

public final class CollectionDescription
extends Object

A description of a collection interface and implementation.

Version:
$Revision: 1059 $ $Date: 2012-01-03 14:03:02 -0600 (Tue, 03 Jan 2012) $
Author:
Michael Heuer

Field Summary
static CollectionDescription ARRAY_LIST
          ArrayList description.
static CollectionDescription COLLECTION
          Collection description.
static CollectionDescription HASH_SET
          HashSet description.
static CollectionDescription LINKED_HASH_SET
          LinkedHashSet description.
static CollectionDescription LINKED_LIST
          LinkedList description.
static CollectionDescription TREE_SET
          TreeSet description.
 
Constructor Summary
CollectionDescription(String interfaceName, String interfaceDescription, String interfacePackageName, String implementationName, String implementationPackageName)
          Create a new collection description from the specified parameters.
 
Method Summary
static CollectionDescription choose(boolean indexed, boolean unique, boolean ordered, boolean sorted)
          Choose a collection description that satisfies the specified parameters.
 String getImplementationName()
          Return the implementation name for this collection description.
 String getImplementationPackageName()
          Return the implementation package name for this collection description.
 String getInterfaceDescription()
          Return the interface description for this collection description.
 String getInterfaceName()
          Return the interface name for this collection description.
 String getInterfacePackageName()
          Return the interface package name for this collection description.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COLLECTION

public static final CollectionDescription COLLECTION
Collection description.


LINKED_LIST

public static final CollectionDescription LINKED_LIST
LinkedList description.


ARRAY_LIST

public static final CollectionDescription ARRAY_LIST
ArrayList description.


HASH_SET

public static final CollectionDescription HASH_SET
HashSet description.


LINKED_HASH_SET

public static final CollectionDescription LINKED_HASH_SET
LinkedHashSet description.


TREE_SET

public static final CollectionDescription TREE_SET
TreeSet description.

Constructor Detail

CollectionDescription

public CollectionDescription(String interfaceName,
                             String interfaceDescription,
                             String interfacePackageName,
                             String implementationName,
                             String implementationPackageName)
Create a new collection description from the specified parameters.

Parameters:
interfaceName - interface name for this collection description
interfaceDescription - interface description for this collection description
interfacePackageName - interface package name for this collection description
implementationName - implementation name for this collection description
implementationPackageName - implementation package name for this collection description
Method Detail

getInterfaceName

public String getInterfaceName()
Return the interface name for this collection description.

Returns:
the interface name for this collection description

getInterfaceDescription

public String getInterfaceDescription()
Return the interface description for this collection description.

Returns:
the interface description for this collection description

getInterfacePackageName

public String getInterfacePackageName()
Return the interface package name for this collection description.

Returns:
the interface package name for this collection description

getImplementationName

public String getImplementationName()
Return the implementation name for this collection description.

Returns:
the implementation name for this collection description

getImplementationPackageName

public String getImplementationPackageName()
Return the implementation package name for this collection description.

Returns:
the implementation package name for this collection description

choose

public static CollectionDescription choose(boolean indexed,
                                           boolean unique,
                                           boolean ordered,
                                           boolean sorted)
Choose a collection description that satisfies the specified parameters.

Parameters:
indexed - true if the collection should be indexed
unique - true if the collection should not allow duplicate elements
ordered - true if the collection should iterate over elements in insertion-order
sorted - true if the collection should iterate over elements in ascending element order, sorted according to the natural ordering of its elements (see Comparable), or by a Comparator provided at creation time
Returns:
a collection description that satisfies the specified parameters


Copyright (c) 2004-2012 held jointly by the individual authors. Licensed under the GNU Lesser General Public License (LGPL).