blob: 4686bba5d688a65656ac843d92bcb88936a51892 [file] [log] [blame]
<html xmlns:MSHelp="http://msdn.microsoft.com/mshelp" xmlns:mshelp="http://msdn.microsoft.com/mshelp" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:msxsl="urn:schemas-microsoft-com:xslt"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8" /><META NAME="save" CONTENT="history" /><title>TeeSinkTokenFilter.SinkTokenStream Members</title><meta name="Language" content="en-us" /><meta name="System.Keywords" content="TeeSinkTokenFilter.SinkTokenStream class" /><meta name="System.Keywords" content="TeeSinkTokenFilter.SinkTokenStream class, all members" /><meta name="System.Keywords" content="Lucene.Net.Analysis.TeeSinkTokenFilter.SinkTokenStream class" /><meta name="Microsoft.Help.Id" content="AllMembers.T:Lucene.Net.Analysis.TeeSinkTokenFilter.SinkTokenStream" /><meta name="Microsoft.Help.ContentType" content="Reference" /><link rel="stylesheet" type="text/css" href="../styles/Presentation.css" /><link rel="stylesheet" type="text/css" href="ms-help://Hx/HxRuntime/HxLink.css" /><script type="text/javascript" src="../scripts/EventUtilities.js"> </script><script type="text/javascript" src="../scripts/SplitScreen.js"> </script><script type="text/javascript" src="../scripts/Dropdown.js"> </script><script type="text/javascript" src="../scripts/script_manifold.js"> </script><script type="text/javascript" src="../scripts/script_feedBack.js"> </script><script type="text/javascript" src="../scripts/CheckboxMenu.js"> </script><script type="text/javascript" src="../scripts/CommonUtilities.js"> </script><meta name="container" content="Lucene.Net.Analysis" /><meta name="file" content="eeeeaa13-b824-db55-283a-abdac8641478" /><meta name="guid" content="eeeeaa13-b824-db55-283a-abdac8641478" /><xml><MSHelp:Attr Name="AssetID" Value="AllMembers.T:Lucene.Net.Analysis.TeeSinkTokenFilter.SinkTokenStream" /><MSHelp:TOCTitle Title="TeeSinkTokenFilter.SinkTokenStream Members" /><MSHelp:RLTitle Title="TeeSinkTokenFilter.SinkTokenStream Members (Lucene.Net.Analysis)" /><MSHelp:Keyword Index="A" Term="AllMembers.T:Lucene.Net.Analysis.TeeSinkTokenFilter.SinkTokenStream" /><MSHelp:Keyword Index="A" Term="frlrfLuceneNetAnalysisTeeSinkTokenFilterSinkTokenStreamMembersTopic" /><MSHelp:Keyword Index="K" Term="TeeSinkTokenFilter.SinkTokenStream class" /><MSHelp:Keyword Index="K" Term="TeeSinkTokenFilter.SinkTokenStream class, all members" /><MSHelp:Keyword Index="K" Term="Lucene.Net.Analysis.TeeSinkTokenFilter.SinkTokenStream class" /><MSHelp:Attr Name="HelpPriority" Value="1" /><MSHelp:Attr Name="DevLang" Value="CSharp" /><MSHelp:Attr Name="DevLang" Value="VB" /><MSHelp:Attr Name="Locale" Value="en-us" /><MSHelp:Attr Name="TopicType" Value="kbSyntax" /><MSHelp:Attr Name="TopicType" Value="apiref" /><MSHelp:Attr Name="AssemblyVersion" Value="2.9.4.1" /></xml><link type="text/css" rel="stylesheet" href="../styles/highlight.css" /><script type="text/javascript" src="../scripts/highlight.js"> </script></head><body><input type="hidden" id="userDataCache" class="userDataStyle" /><input type="hidden" id="hiddenScrollOffset" /><img id="collapseImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" alt="Collapse image" title="Collapse image" /><img id="expandImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" alt="Expand Image" title="Expand Image" /><img id="collapseAllImage" style="display:none; height:0; width:0;" src="../icons/collapse_all.gif" /><img id="expandAllImage" style="display:none; height:0; width:0;" src="../icons/expand_all.gif" /><img id="dropDownImage" style="display:none; height:0; width:0;" src="../icons/dropdown.gif" /><img id="dropDownHoverImage" style="display:none; height:0; width:0;" src="../icons/dropdownHover.gif" /><img id="copyImage" style="display:none; height:0; width:0;" src="../icons/copycode.gif" alt="Copy image" title="Copy image" /><img id="copyHoverImage" style="display:none; height:0; width:0;" src="../icons/copycodeHighlight.gif" alt="CopyHover image" title="CopyHover image" /><div id="header"><table id="topTable" cellspacing="0" cellpadding="0"><tr><td><span onclick="ExpandCollapseAll(toggleAllImage)" style="cursor:default;" onkeypress="ExpandCollapseAll_CheckKey(toggleAllImage, event)" tabindex="0"><img ID="toggleAllImage" class="toggleAll" src="../icons/collapse_all.gif" /> <label id="collapseAllLabel" for="toggleAllImage" style="display: none;">Collapse All</label><label id="expandAllLabel" for="toggleAllImage" style="display: none;">Expand All</label> </span><span>    </span><span id="devlangsDropdown" class="filter" tabindex="0"><img id="devlangsDropdownImage" src="../icons/dropdown.gif" /> <label id="devlangsMenuAllLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: All </nobr></label><label id="devlangsMenuMultipleLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Multiple </nobr></label><label id="devlangsMenuCSharpLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: C# </nobr></label><label id="devlangsMenuVisualBasicLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual Basic </nobr></label><label id="devlangsMenuManagedCPlusPlusLabel" for="devlangsDropdownImage" style="display: none;"><nobr>Code: Visual C++ </nobr></label></span><span>    </span><span id="memberOptionsDropdown" class="filter" tabindex="0"><img id="memberOptionsDropdownImage" src="../icons/dropdown.gif" /> <label id="memberOptionsMenuAllLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Show All </nobr></label><label id="memberOptionsMenuMultipleLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label><label id="memberOptionsMenuProtectedLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label><label id="memberOptionsMenuInheritedLabel" for="memberOptionsDropdownImage" style="display: none;"><nobr>Members: Filtered </nobr></label></span></td></tr></table><div id="devlangsMenu"><input id="CSharpCheckbox" type="checkbox" data="CSharp,cs,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="CSharpCheckbox">C#</label><br /><input id="VisualBasicCheckbox" type="checkbox" data="VisualBasic,vb,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="VisualBasicCheckbox">Visual Basic</label><br /><input id="ManagedCPlusPlusCheckbox" type="checkbox" data="ManagedCPlusPlus,cpp,'persist'" value="on" onClick="SetLanguage(this)" /><label class="checkboxLabel" for="ManagedCPlusPlusCheckbox">Visual C++</label><br /></div><div id="memberOptionsMenu"><input id="ProtectedCheckbox" type="checkbox" data="Protected" value="on" onClick="SetMemberOptions(this, 'vis')" /><label class="checkboxLabel" for="ProtectedCheckbox">Include Protected Members</label><br /><input id="InheritedCheckbox" type="checkbox" data="Inherited" value="on" onClick="SetMemberOptions(this, 'decl')" /><label class="checkboxLabel" for="InheritedCheckbox">Include Inherited Members</label><br /></div><table id="bottomTable" cellpadding="0" cellspacing="0"><tr id="headerTableRow1"><td align="left"><span id="runningHeaderText">Lucene.Net Class Libraries</span></td></tr><tr id="headerTableRow2"><td align="left"><span id="nsrTitle">TeeSinkTokenFilter<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>SinkTokenStream Members</span></td></tr><tr id="headerTableRow3"><td align="left"><a href="fd029150-f20f-4061-3c70-942757881056.htm">TeeSinkTokenFilter<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>SinkTokenStream Class</a> <a href="#methodTableToggle" onclick="OpenSection(methodTableToggle)">Methods</a> <a href="#seeAlsoToggle" onclick="OpenSection(seeAlsoToggle)">See Also</a> <span id="headfeedbackarea" class="feedbackhead"><a href="javascript:SubmitFeedback('','Lucene.Net Class Libraries','','','','%0\dYour%20feedback%20is%20used%20to%20improve%20the%20documentation%20and%20the%20product.%20Your%20e-mail%20address%20will%20not%20be%20used%20for%20any%20other%20purpose%20and%20is%20disposed%20of%20after%20the%20issue%20you%20report%20is%20resolved.%20%20While%20working%20to%20resolve%20the%20issue%20that%20you%20report,%20you%20may%20be%20contacted%20via%20e-mail%20to%20get%20further%20details%20or%20clarification%20on%20the%20feedback%20you%20sent.%20After%20the%20issue%20you%20report%20has%20been%20addressed,%20you%20may%20receive%20an%20e-mail%20to%20let%20you%20know%20that%20your%20feedback%20has%20been%20addressed.%0\A%0\d','Customer%20Feedback');">Send Feedback</a></span></td></tr></table><table id="gradientTable"><tr><td class="nsrBottom" background="../icons/gradient.gif" /></tr></table></div><div id="mainSection"><div id="mainBody"><div id="allHistory" class="saveHistory" onsave="saveAll()" onload="loadAll()" /><span style="color: DarkGray"></span><p><div class="summary"> This TokenFilter provides the ability to set aside attribute states
that have already been analyzed. This is useful in situations where multiple fields share
many common analysis steps and then go their separate ways.
<p />
It is also useful for doing things like entity extraction or proper noun analysis as
part of the analysis workflow and saving off those tokens for use in another field.
<pre>
TeeSinkTokenFilter source1 = new TeeSinkTokenFilter(new WhitespaceTokenizer(reader1));
TeeSinkTokenFilter.SinkTokenStream sink1 = source1.newSinkTokenStream();
TeeSinkTokenFilter.SinkTokenStream sink2 = source1.newSinkTokenStream();
TeeSinkTokenFilter source2 = new TeeSinkTokenFilter(new WhitespaceTokenizer(reader2));
source2.addSinkTokenStream(sink1);
source2.addSinkTokenStream(sink2);
TokenStream final1 = new LowerCaseFilter(source1);
TokenStream final2 = source2;
TokenStream final3 = new EntityDetect(sink1);
TokenStream final4 = new URLDetect(sink2);
d.add(new Field("f1", final1));
d.add(new Field("f2", final2));
d.add(new Field("f3", final3));
d.add(new Field("f4", final4));
</pre>
In this example, <span id="cbc_6" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">sink1</pre></div></span> and <span id="cbc_7" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">sink2</pre></div></span> will both get tokens from both
<span id="cbc_8" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">reader1</pre></div></span> and <span id="cbc_9" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve">reader2</pre></div></span> after whitespace tokenizer
and now we can further wrap any of these in extra analysis, and more "sources" can be inserted if desired.
It is important, that tees are consumed before sinks (in the above example, the field names must be
less the sink's field names). If you are not sure, which stream is consumed first, you can simply
add another sink and then pass all tokens to the sinks at once using {@link #consumeAllTokens}.
This TokenFilter is exhausted after this. In the above example, change
the example above to:
<pre>
...
TokenStream final1 = new LowerCaseFilter(source1.newSinkTokenStream());
TokenStream final2 = source2.newSinkTokenStream();
sink1.consumeAllTokens();
sink2.consumeAllTokens();
...
</pre>
In this case, the fields can be added in any order, because the sources are not used anymore and all sinks are ready.
<p />Note, the EntityDetect and URLDetect TokenStreams are for the example and do not currently exist in Lucene.
</div></p><p>The <a href="fd029150-f20f-4061-3c70-942757881056.htm">TeeSinkTokenFilter<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>SinkTokenStream</a> type exposes the following members.</p><h1 class="heading"><span onclick="ExpandCollapse(methodTableToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(methodTableToggle, event)" tabindex="0"><img id="methodTableToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />Methods</span></h1><div id="methodTableSection" class="section" name="collapseableSection" style=""><table id="memberList" class="members" frame="lhs" cellpadding="2"><col width="10%" /><tr><th class="iconColumn">
 
</th><th class="nameColumn">Name</th><th class="descriptionColumn">Description</th></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="f7f6b6d1-cee1-4cdd-e065-9e21150070f5.htm">AddAttribute</a></td><td><div class="summary"> The caller must pass in a Class&lt;? extends Attribute&gt; value.
This method first checks if an instance of that class is
already in this AttributeSource and returns it. Otherwise a
new instance is created, added to this AttributeSource and returned.
Signature for Java 1.5: <span id="cbc_1" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve"><span class="highlight-keyword">public</span> &lt;T extends Attribute&gt; T addAttribute(Class&lt;T&gt;)</pre></div></span></div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="3a518c9d-e819-c707-d454-f89a4b7ce83b.htm">AddAttributeImpl</a></td><td><div class="summary">Adds a custom AttributeImpl instance with one or more Attribute interfaces. </div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="ace239ee-287e-ee45-bda6-1c672c860136.htm">CaptureState</a></td><td><div class="summary"> Captures the state of all Attributes. The return value can be passed to
{@link #restoreState} to restore the state of this or another AttributeSource.
</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="1f1103ec-8ab0-1ac4-f7a8-b5a1add75218.htm">ClearAttributes</a></td><td><div class="summary"> Resets all Attributes in this AttributeSource by calling
{@link AttributeImpl#Clear()} on each Attribute implementation.
</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="60e746d3-0174-8c40-a4c6-70933a2cedd1.htm">CloneAttributes</a></td><td><div class="summary"> Performs a clone of all {@link AttributeImpl} instances returned in a new
AttributeSource instance. This method can be used to e.g. create another TokenStream
with exactly the same attributes (using {@link #AttributeSource(AttributeSource)})
</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="6bd1f8d6-d7f0-064d-4bac-07224eb7303a.htm">Close</a></td><td><div class="summary">Releases resources associated with this stream. </div> (Inherited from <a href="e288b6ba-8c6a-2dca-c6ed-9564c5e106f1.htm">TokenStream</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="9812bb55-c6c9-2c76-3555-e3f9d1ca4a38.htm">End</a></td><td> (Overrides <a href="af4b1bb7-2413-8465-ed45-3d0da7f2fad4.htm">TokenStream<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>End<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="fb47e263-9dd7-a193-afd2-fa357d868455.htm">Equals</a></td><td> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/4k87zsw7" target="_blank">Finalize</a></td><td><div class="summary">Allows an <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a> to attempt to free resources and perform other cleanup operations before the <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a> is reclaimed by garbage collection.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="4d718392-0df5-eff9-31fe-f65fbb7762b6.htm">GetAttribute</a></td><td><div class="summary"> The caller must pass in a Class&lt;? extends Attribute&gt; value.
Returns the instance of the passed in Attribute contained in this AttributeSource
Signature for Java 1.5: <span id="cbc_2" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve"><span class="highlight-keyword">public</span> &lt;T extends Attribute&gt; T getAttribute(Class&lt;T&gt;)</pre></div></span></div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="61475428-898d-e0f1-437c-ef6b89f6305f.htm">GetAttributeClassesIterator</a></td><td><div class="summary">Returns a new iterator that iterates the attribute classes
in the same order they were added in.
Signature for Java 1.5: <span id="cbc_3" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve"><span class="highlight-keyword">public</span> Iterator&lt;Class&lt;? extends Attribute&gt;&gt; getAttributeClassesIterator()</pre></div></span>
Note that this return value is different from Java in that it enumerates over the values
and not the keys
</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="bc2d2931-16e3-ae57-6933-55f157738ebd.htm">GetAttributeFactory</a></td><td><div class="summary"> returns the used AttributeFactory.</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="b8c8caa1-21ff-6944-494a-2a4b848468f4.htm">GetAttributeImplsIterator</a></td><td><div class="summary">Returns a new iterator that iterates all unique Attribute implementations.
This iterator may contain less entries that {@link #getAttributeClassesIterator},
if one instance implements more than one Attribute interface.
Signature for Java 1.5: <span id="cbc_4" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve"><span class="highlight-keyword">public</span> Iterator&lt;AttributeImpl&gt; getAttributeImplsIterator()</pre></div></span></div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="8e0fa104-46a9-6a4d-b044-64732c618464.htm">GetHashCode</a></td><td> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/dfwy45w9" target="_blank">GetType</a></td><td><div class="summary">Gets the <a href="http://msdn2.microsoft.com/en-us/library/42892f65" target="_blank">Type</a> of the current instance.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="730de0d4-9174-0d88-36cc-223042c87969.htm">HasAttribute</a></td><td><div class="summary"> The caller must pass in a Class&lt;? extends Attribute&gt; value.
Returns true, iff this AttributeSource contains the passed-in Attribute.
Signature for Java 1.5: <span id="cbc_5" x-lang="CSharp" codeLanguage="CSharp"><div class="highlight-title"><span class="highlight-copycode" onkeypress="javascript:CopyColorizedCodeCheckKey(this.parentNode, event);" tabindex="0" onmouseover="CopyCodeChangeIcon(this)" onmouseout="CopyCodeChangeIcon(this)" onclick="javascript:CopyColorizedCode(this.parentNode);"><img style="margin-right: 5px;" src="../icons/CopyCode.gif" />Copy</span>C#</div><div class="code"><pre xml:space="preserve"><span class="highlight-keyword">public</span> boolean hasAttribute(Class&lt;? extends Attribute&gt;)</pre></div></span></div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d2cb1af3-43a3-cb66-4b40-d6b30c012b23.htm">HasAttributes</a></td><td><div class="summary">Returns true, iff this AttributeSource has any attributes </div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="174ae292-0963-70a0-f45f-829cd714f502.htm">IncrementToken</a></td><td> (Overrides <a href="82689e22-5656-2eb3-5e31-65026bd6e2ce.htm">TokenStream<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>IncrementToken<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="protected;inherited;notNetfw;"><td><img src="../icons/protmethod.gif" alt="Protected method" title="Protected method" /></td><td><a href="http://msdn2.microsoft.com/en-us/library/57ctke0a" target="_blank">MemberwiseClone</a></td><td><div class="summary">Creates a shallow copy of the current <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.</div> (Inherited from <a href="http://msdn2.microsoft.com/en-us/library/e5kfa45b" target="_blank">Object</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="8e5cfe2f-ee3b-00d7-d55a-0df26f6411ac.htm">Next<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a></td><td> <font color="red"><b>Obsolete. </b></font><div class="summary"> Returns the next {@link Token} in the stream, or null at EOS.
</div> (Inherited from <a href="e288b6ba-8c6a-2dca-c6ed-9564c5e106f1.htm">TokenStream</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="72fde93c-1d1b-d9ad-5f93-90351fc5be00.htm">Next(Token)</a></td><td> <font color="red"><b>Obsolete. </b></font><div class="summary"> Returns the next token in the stream, or null at EOS. When possible, the
input Token should be used as the returned Token (this gives fastest
tokenization performance), but this is not required and a new Token may be
returned. Callers may re-use a single Token instance for successive calls
to this method.
This implicitly defines a "contract" between consumers (callers of this
method) and producers (implementations of this method that are the source
for tokens):
<ul><li>A consumer must fully consume the previously returned {@link Token}
before calling this method again.</li><li>A producer must call {@link Token#Clear()} before setting the fields in
it and returning it</li></ul>
Also, the producer must make no assumptions about a {@link Token} after it
has been returned: the caller may arbitrarily change it. If the producer
needs to hold onto the {@link Token} for subsequent calls, it must clone()
it before storing it. Note that a {@link TokenFilter} is considered a
consumer.
</div> (Inherited from <a href="e288b6ba-8c6a-2dca-c6ed-9564c5e106f1.htm">TokenStream</a>.)</td></tr><tr data="public;declared;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="c825eb9e-dfa7-67ac-d88a-ab08689961e8.htm">Reset</a></td><td> (Overrides <a href="d11d9307-00f3-f1b8-cc37-67b136047c6d.htm">TokenStream<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>Reset<span class="languageSpecificText"><span class="cs">()</span><span class="cpp">()</span><span class="nu">()</span><span class="fs">()</span></span></a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="ce908327-a7fb-6069-ca9e-574453f1b964.htm">RestoreState</a></td><td><div class="summary"> Restores this state by copying the values of all attribute implementations
that this state contains into the attributes implementations of the targetStream.
The targetStream must contain a corresponding instance for each argument
contained in this state (e.g. it is not possible to restore the state of
an AttributeSource containing a TermAttribute into a AttributeSource using
a Token instance as implementation).
Note that this method does not affect attributes of the targetStream
that are not contained in this state. In other words, if for example
the targetStream contains an OffsetAttribute, but this state doesn't, then
the value of the OffsetAttribute remains unchanged. It might be desirable to
reset its value to the default, in which case the caller should first
call {@link TokenStream#ClearAttributes()} on the targetStream.
</div> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr><tr data="public;inherited;notNetfw;"><td><img src="../icons/pubmethod.gif" alt="Public method" title="Public method" /></td><td><a href="d6867032-716f-6ce7-ebf4-4b544108caa2.htm">ToString</a></td><td> (Inherited from <a href="73348f88-e7e1-7f51-9263-e94c55c78581.htm">AttributeSource</a>.)</td></tr></table></div><h1 class="heading"><span onclick="ExpandCollapse(seeAlsoToggle)" style="cursor:default;" onkeypress="ExpandCollapse_CheckKey(seeAlsoToggle, event)" tabindex="0"><img id="seeAlsoToggle" class="toggle" name="toggleSwitch" src="../icons/collapse_all.gif" />See Also</span></h1><div id="seeAlsoSection" class="section" name="collapseableSection" style=""><div class="seeAlsoStyle"><a href="fd029150-f20f-4061-3c70-942757881056.htm">TeeSinkTokenFilter<span class="languageSpecificText"><span class="cs">.</span><span class="vb">.</span><span class="cpp">::</span><span class="nu">.</span><span class="fs">.</span></span>SinkTokenStream Class</a></div><div class="seeAlsoStyle"><a href="b449a860-f0af-3961-ccd7-4e000f2f2811.htm">Lucene.Net.Analysis Namespace</a></div></div></div><div id="footer"><div class="footerLine"><img width="100%" height="3px" src="../icons/footer.gif" alt="Footer image" title="Footer image" /></div><A NAME="feedback"></A><span id="fb" class="feedbackcss"></span></div></div></body></html>