Package org.opennms.core.collections
Class RadixTreeNodeImpl<T>
- java.lang.Object
-
- org.opennms.core.collections.RadixTreeNodeImpl<T>
-
- Type Parameters:
T
- The content type of each node
- All Implemented Interfaces:
RadixTreeNode<T>
- Direct Known Subclasses:
RadixTreeImpl
public class RadixTreeNodeImpl<T> extends Object implements RadixTreeNode<T>
This class implements theRadixTreeNode
interface by storing an instance of the content and aCollection
of child nodes.- Author:
- Seth
-
-
Constructor Summary
Constructors Constructor Description RadixTreeNodeImpl(T[] chain)
RadixTreeNodeImpl(T content, Collection<RadixTreeNode<T>> children)
TODO: Is this going to be used?
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildren(T[] chain)
Set<RadixTreeNode<T>>
getChildren()
T
getContent()
void
setChildren(Set<RadixTreeNode<T>> newChildren)
void
setContent(T newContent)
int
size()
String
toString()
String
toStringWithPrefix(String prefix)
-
-
-
Constructor Detail
-
RadixTreeNodeImpl
public RadixTreeNodeImpl(T content, Collection<RadixTreeNode<T>> children)
TODO: Is this going to be used?
-
RadixTreeNodeImpl
public RadixTreeNodeImpl(T[] chain)
-
-
Method Detail
-
getContent
public T getContent()
- Specified by:
getContent
in interfaceRadixTreeNode<T>
-
setContent
public void setContent(T newContent)
- Specified by:
setContent
in interfaceRadixTreeNode<T>
-
addChildren
public void addChildren(T[] chain)
- Specified by:
addChildren
in interfaceRadixTreeNode<T>
-
getChildren
public Set<RadixTreeNode<T>> getChildren()
- Specified by:
getChildren
in interfaceRadixTreeNode<T>
-
setChildren
public void setChildren(Set<RadixTreeNode<T>> newChildren)
- Specified by:
setChildren
in interfaceRadixTreeNode<T>
-
size
public int size()
- Specified by:
size
in interfaceRadixTreeNode<T>
-
toStringWithPrefix
public String toStringWithPrefix(String prefix)
- Specified by:
toStringWithPrefix
in interfaceRadixTreeNode<T>
-
-