Class TernaryTree.Enumerator
Enumerator for TernaryTree
LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to .NET IEnumerator semantics. In Java, when the TernaryTree.Enumerator is instantiated, it is already positioned at the first element. However, to act like a .NET IEnumerator, the initial state is undefined and considered to be before the first element until MoveNext() is called, and if a move took place it will returntrue
;
Inherited Members
Namespace: Lucene.Net.Analysis.Compound.Hyphenation
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public class TernaryTree.Enumerator : IEnumerator<string>, IEnumerator, IDisposable
Constructors
Enumerator(TernaryTree)
Enumerator for TernaryTree
LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to .NET IEnumerator semantics. In Java, when the TernaryTree.Enumerator is instantiated, it is already positioned at the first element. However, to act like a .NET IEnumerator, the initial state is undefined and considered to be before the first element until MoveNext() is called, and if a move took place it will returntrue
;
Declaration
public Enumerator(TernaryTree ternaryTree)
Parameters
Type | Name | Description |
---|---|---|
TernaryTree | ternaryTree |
Properties
Current
Gets the element in the collection at the current position of the enumerator.
Declaration
public string Current { get; }
Property Value
Type | Description |
---|---|
string | The element in the collection at the current position of the enumerator. |
Value
Enumerator for TernaryTree
LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to .NET IEnumerator semantics. In Java, when the TernaryTree.Enumerator is instantiated, it is already positioned at the first element. However, to act like a .NET IEnumerator, the initial state is undefined and considered to be before the first element until MoveNext() is called, and if a move took place it will returntrue
;
Declaration
public virtual char Value { get; }
Property Value
Type | Description |
---|---|
char |
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Dispose(bool)
Enumerator for TernaryTree
LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to .NET IEnumerator semantics. In Java, when the TernaryTree.Enumerator is instantiated, it is already positioned at the first element. However, to act like a .NET IEnumerator, the initial state is undefined and considered to be before the first element until MoveNext() is called, and if a move took place it will returntrue
;
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
MoveNext()
Advances the enumerator to the next element of the collection.
Declaration
public bool MoveNext()
Returns
Type | Description |
---|---|
bool | true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. |
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The collection was modified after the enumerator was created. |
Reset()
Sets the enumerator to its initial position, which is before the first element in the collection.
Declaration
public void Reset()
Exceptions
Type | Condition |
---|---|
InvalidOperationException | The collection was modified after the enumerator was created. |
NotSupportedException | The enumerator does not support being reset. |
Rewind()
Enumerator for TernaryTree
LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to .NET IEnumerator semantics. In Java, when the TernaryTree.Enumerator is instantiated, it is already positioned at the first element. However, to act like a .NET IEnumerator, the initial state is undefined and considered to be before the first element until MoveNext() is called, and if a move took place it will returntrue
;
Declaration
public virtual void Rewind()