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 java.lang.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, java.util.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)
java.util.Set<RadixTreeNode<T>>
getChildren()
T
getContent()
void
setChildren(java.util.Set<RadixTreeNode<T>> newChildren)
void
setContent(T newContent)
int
size()
java.lang.String
toString()
java.lang.String
toStringWithPrefix(java.lang.String prefix)
-
-
-
Constructor Detail
-
RadixTreeNodeImpl
public RadixTreeNodeImpl(T content, java.util.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 java.util.Set<RadixTreeNode<T>> getChildren()
- Specified by:
getChildren
in interfaceRadixTreeNode<T>
-
setChildren
public void setChildren(java.util.Set<RadixTreeNode<T>> newChildren)
- Specified by:
setChildren
in interfaceRadixTreeNode<T>
-
size
public int size()
- Specified by:
size
in interfaceRadixTreeNode<T>
-
toStringWithPrefix
public java.lang.String toStringWithPrefix(java.lang.String prefix)
- Specified by:
toStringWithPrefix
in interfaceRadixTreeNode<T>
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-