public final class SortingTreeBuilderImpl<E,N extends OpenNode<E,N>> extends Object implements SortingTreeBuilder<E,N>
Constructor and Description |
---|
SortingTreeBuilderImpl(EmptySortedTreeConstructorSupplier emptyTreeConstructorSupplier,
Comparator<E> comparator) |
Modifier and Type | Method and Description |
---|---|
SortingTreeBuilder<E,N> |
addElement(E element) |
<T extends SortingTree<E,N>> |
build(Class<T> klass)
Create a new tree of the type provided.
|
<T extends SortingTree<E,N>> |
build(TypeKey<T> type)
Create a new tree of the type provided.
|
public SortingTreeBuilderImpl(EmptySortedTreeConstructorSupplier emptyTreeConstructorSupplier, Comparator<E> comparator)
public SortingTreeBuilder<E,N> addElement(E element)
addElement
in interface OrganisedTreeBuilder<E,N extends OpenNode<E,N>,SortingTree<E,N extends OpenNode<E,N>>>
element
- an element to include in the treepublic <T extends SortingTree<E,N>> T build(Class<T> klass) throws OperationNotSupportedForType
BaseTreeBuilder
build
in interface BaseTreeBuilder<E,N extends OpenNode<E,N>,SortingTree<E,N extends OpenNode<E,N>>>
T
- The type of the tree to createklass
- The class of the tree to createOperationNotSupportedForType
- if the type of the tree to be built is not supportedpublic <T extends SortingTree<E,N>> T build(TypeKey<T> type) throws OperationNotSupportedForType
BaseTreeBuilder
build
in interface BaseTreeBuilder<E,N extends OpenNode<E,N>,SortingTree<E,N extends OpenNode<E,N>>>
T
- The type of the tree to createtype
- The type key of the tree to createOperationNotSupportedForType
- if the type of the tree to be built is not supportedCopyright © 2014–2016. All rights reserved.