public class TreeSetFactory extends AbstractSortedSetFactory
SortedSetFactory
interface that creates
instances of TreeSet
.Modifier and Type | Field and Description |
---|---|
static SortedSetFactory |
INSTANCE
The singleton instance.
|
Constructor and Description |
---|
TreeSetFactory() |
Modifier and Type | Method and Description |
---|---|
<E> SortedSet<E> |
create()
This method creates a new
Collection instance. |
<E> SortedSet<E> |
create(int capacity)
This method creates a new
Collection instance with the given initial capacity . |
Class<TreeSet> |
getCollectionImplementation()
This method gets the implementation of the
collection-interface used by this
factory. |
createGeneric, createGeneric, getCollectionInterface
public static final SortedSetFactory INSTANCE
public Class<TreeSet> getCollectionImplementation()
CollectionFactory
collection-interface
used by this
factory.Collection
implementation.public <E> SortedSet<E> create()
CollectionFactory
Collection
instance. Collection
can NOT be bound to the generic type <COLLECTION> because of limitations in Java's
generic type system. You need to work on the actual sub-interface (e.g. ListFactory
) to get the proper
result type.E
- the type of elements contained in the collection.CollectionFactory.createGeneric()
public <E> SortedSet<E> create(int capacity)
CollectionFactory
Collection
instance with the given initial capacity
. Collection
can NOT be bound to the generic type <COLLECTION> because of limitations in Java's
generic type system. You need to work on the actual sub-interface (e.g. ListFactory
) to get the proper
result type.E
- the type of elements contained in the collection.capacity
- is the initial capacity of the collection.CollectionFactory.createGeneric(int)
Copyright © 2001–2016 mmm-Team. All rights reserved.