Class OrderedTree
- Namespace
- System.util.collections
- Assembly
- iTextSharp.LGPLv2.Core.dll
public class OrderedTree
- Inheritance
-
OrderedTree
- Inherited Members
Constructors
OrderedTree()
public OrderedTree()
Properties
Count
public virtual int Count { get; }
Property Value
this[IComparable]
public object this[IComparable key] { get; set; }
Parameters
key
IComparable
Property Value
Keys
Keys if(ascending is true, the keys will be returned in ascending order, else the keys will be returned in descending order.
public virtual OrderedTreeEnumerator Keys { get; }
Property Value
Values
Values Provided for .NET compatibility.
public virtual OrderedTreeEnumerator Values { get; }
Property Value
Methods
Add(IComparable, object)
Add args: ByVal key As IComparable, ByVal data As Object key is object that implements IComparable interface performance tip: change to use int type (such as the hashcode)
public virtual void Add(IComparable key, object data)
Parameters
key
IComparabledata
object
Clear()
Clear Empties or clears the tree
public virtual void Clear()
ContainsKey(IComparable)
public virtual bool ContainsKey(IComparable key)
Parameters
key
IComparable
Returns
Elements()
Elements Returns an enumeration of the data objects. if(ascending is true, the objects will be returned in ascending order, else the objects will be returned in descending order.
public virtual OrderedTreeEnumerator Elements()
Returns
Elements(bool)
public virtual OrderedTreeEnumerator Elements(bool ascending)
Parameters
ascending
bool
Returns
GetData(IComparable)
GetData Gets the data object associated with the specified key
public virtual object GetData(IComparable key)
Parameters
key
IComparable
Returns
GetEnumerator()
GetEnumerator return an enumerator that returns the tree nodes in order
public virtual OrderedTreeEnumerator GetEnumerator()
Returns
GetMaxKey()
GetMaxKey Returns the maximum key value
public virtual IComparable GetMaxKey()
Returns
GetMaxValue()
GetMaxValue Returns the object having the maximum key
public virtual object GetMaxValue()
Returns
GetMinKey()
GetMinKey Returns the minimum key value
public virtual IComparable GetMinKey()
Returns
GetMinValue()
GetMinValue Returns the object having the minimum key value
public virtual object GetMinValue()
Returns
IsEmpty()
IsEmpty Is the tree empty?
public virtual bool IsEmpty()
Returns
KeyElements(bool)
public virtual OrderedTreeEnumerator KeyElements(bool ascending)
Parameters
ascending
bool
Returns
Remove(IComparable)
Remove removes the key and data object (delete)
public virtual void Remove(IComparable key)
Parameters
key
IComparable
RemoveMax()
RemoveMax removes the node with the maximum key
public virtual void RemoveMax()
RemoveMin()
RemoveMin removes the node with the minimum key
public virtual void RemoveMin()
RotateLeft(OrderedTreeNode)
RotateLeft Rebalance the tree by rotating the nodes to the left
public virtual void RotateLeft(OrderedTreeNode x)
Parameters
RotateRight(OrderedTreeNode)
RotateRight Rebalance the tree by rotating the nodes to the right
public virtual void RotateRight(OrderedTreeNode x)