blob: 3d3a53280e059e837456174717080317c4d3f785 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class AttributeSource
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class AttributeSource
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="core/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Lucene.Net.Util.AttributeSource">
<h1 id="Lucene_Net_Util_AttributeSource" data-uid="Lucene.Net.Util.AttributeSource" class="text-break">Class AttributeSource
</h1>
<div class="markdown level0 summary"><p>An <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> contains a list of different <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>s,
and methods to add and get them. There can only be a single instance
of an attribute in the same <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> instance. This is ensured
by passing in the actual type of the <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> to
the <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_AddAttribute__1">AddAttribute&lt;T&gt;()</a>, which then checks if an instance of
that type is already present. If yes, it returns the instance, otherwise
it creates a new instance and returns it.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><span class="xref">System.Object</span></div>
<div class="level1"><span class="xref">AttributeSource</span></div>
<div class="level2"><a class="xref" href="Lucene.Net.Analysis.TokenStream.html">TokenStream</a></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<span class="xref">System.Object.Equals(System.Object, System.Object)</span>
</div>
<div>
<span class="xref">System.Object.GetType()</span>
</div>
<div>
<span class="xref">System.Object.MemberwiseClone()</span>
</div>
<div>
<span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Lucene.Net.Util.html">Lucene.Net.Util</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.dll</h6>
<h5 id="Lucene_Net_Util_AttributeSource_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class AttributeSource</code></pre>
</div>
<h3 id="constructors">Constructors
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource__ctor.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.%23ctor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L212">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource__ctor_" data-uid="Lucene.Net.Util.AttributeSource.#ctor*"></a>
<h4 id="Lucene_Net_Util_AttributeSource__ctor" data-uid="Lucene.Net.Util.AttributeSource.#ctor">AttributeSource()</h4>
<div class="markdown level1 summary"><p>An <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> using the default attribute factory <a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html#Lucene_Net_Util_AttributeSource_AttributeFactory_DEFAULT_ATTRIBUTE_FACTORY">DEFAULT_ATTRIBUTE_FACTORY</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AttributeSource()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource__ctor_Lucene_Net_Util_AttributeSource_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.%23ctor(Lucene.Net.Util.AttributeSource)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L220">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource__ctor_" data-uid="Lucene.Net.Util.AttributeSource.#ctor*"></a>
<h4 id="Lucene_Net_Util_AttributeSource__ctor_Lucene_Net_Util_AttributeSource_" data-uid="Lucene.Net.Util.AttributeSource.#ctor(Lucene.Net.Util.AttributeSource)">AttributeSource(AttributeSource)</h4>
<div class="markdown level1 summary"><p>An <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> that uses the same attributes as the supplied one.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AttributeSource(AttributeSource input)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a></td>
<td><span class="parametername">input</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource__ctor_Lucene_Net_Util_AttributeSource_AttributeFactory_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.%23ctor(Lucene.Net.Util.AttributeSource.AttributeFactory)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L235">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource__ctor_" data-uid="Lucene.Net.Util.AttributeSource.#ctor*"></a>
<h4 id="Lucene_Net_Util_AttributeSource__ctor_Lucene_Net_Util_AttributeSource_AttributeFactory_" data-uid="Lucene.Net.Util.AttributeSource.#ctor(Lucene.Net.Util.AttributeSource.AttributeFactory)">AttributeSource(AttributeSource.AttributeFactory)</h4>
<div class="markdown level1 summary"><p>An <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> using the supplied <a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a> for creating new <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> instances.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AttributeSource(AttributeSource.AttributeFactory factory)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a></td>
<td><span class="parametername">factory</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_HasAttributes.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.HasAttributes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L435">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_HasAttributes_" data-uid="Lucene.Net.Util.AttributeSource.HasAttributes*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_HasAttributes" data-uid="Lucene.Net.Util.AttributeSource.HasAttributes">HasAttributes</h4>
<div class="markdown level1 summary"><p>Returns <code>true</code>, if this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> has any attributes </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool HasAttributes { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_AddAttribute__1.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.AddAttribute%60%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L405">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_AddAttribute_" data-uid="Lucene.Net.Util.AttributeSource.AddAttribute*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_AddAttribute__1" data-uid="Lucene.Net.Util.AttributeSource.AddAttribute``1">AddAttribute&lt;T&gt;()</h4>
<div class="markdown level1 summary"><p>The caller must pass in an interface type that extends <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a>.
This method first checks if an instance of the corresponding class is
already in this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> and returns it. Otherwise a
new instance is created, added to this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> and returned. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public T AddAttribute&lt;T&gt;()
where T : IAttribute</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_AddAttributeImpl_Lucene_Net_Util_Attribute_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L370">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_AddAttributeImpl_" data-uid="Lucene.Net.Util.AttributeSource.AddAttributeImpl*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_AddAttributeImpl_Lucene_Net_Util_Attribute_" data-uid="Lucene.Net.Util.AttributeSource.AddAttributeImpl(Lucene.Net.Util.Attribute)">AddAttributeImpl(Attribute)</h4>
<div class="markdown level1 summary"><p><strong>Expert:</strong> Adds a custom <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a> instance with one or more <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> interfaces.
<p><font color="red"><strong>Please note:</strong> It is not guaranteed, that <code data-dev-comment-type="paramref" class="paramref">att</code> is added to
the <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a>, because the provided attributes may already exist.
You should always retrieve the wanted attributes using <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_GetAttribute__1">GetAttribute&lt;T&gt;()</a> after adding
with this method and cast to your <span class="xref">System.Type</span>.
The recommended way to use custom implementations is using an <a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a>.
</font></p></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void AddAttributeImpl(Attribute att)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a></td>
<td><span class="parametername">att</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_CaptureState.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.CaptureState%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L505">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_CaptureState_" data-uid="Lucene.Net.Util.AttributeSource.CaptureState*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_CaptureState" data-uid="Lucene.Net.Util.AttributeSource.CaptureState">CaptureState()</h4>
<div class="markdown level1 summary"><p>Captures the state of all <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>s. The return value can be passed to
<a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_RestoreState_Lucene_Net_Util_AttributeSource_State_">RestoreState(AttributeSource.State)</a> to restore the state of this or another <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual AttributeSource.State CaptureState()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.State.html">AttributeSource.State</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_ClearAttributes.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.ClearAttributes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L493">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_ClearAttributes_" data-uid="Lucene.Net.Util.AttributeSource.ClearAttributes*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_ClearAttributes" data-uid="Lucene.Net.Util.AttributeSource.ClearAttributes">ClearAttributes()</h4>
<div class="markdown level1 summary"><p>Resets all <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>s in this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> by calling
<a class="xref" href="Lucene.Net.Util.Attribute.html#Lucene_Net_Util_Attribute_Clear">Clear()</a> on each <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> implementation.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ClearAttributes()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_CloneAttributes.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.CloneAttributes%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L674">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_CloneAttributes_" data-uid="Lucene.Net.Util.AttributeSource.CloneAttributes*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_CloneAttributes" data-uid="Lucene.Net.Util.AttributeSource.CloneAttributes">CloneAttributes()</h4>
<div class="markdown level1 summary"><p>Performs a clone of all <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a> instances returned in a new
<a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> instance. This method can be used to e.g. create another <a class="xref" href="Lucene.Net.Analysis.TokenStream.html">TokenStream</a>
with exactly the same attributes (using <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource__ctor_Lucene_Net_Util_AttributeSource_">AttributeSource(AttributeSource)</a>).
You can also use it as a (non-performant) replacement for <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_CaptureState">CaptureState()</a>, if you need to look
into / modify the captured state.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AttributeSource CloneAttributes()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_CopyTo_Lucene_Net_Util_AttributeSource_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L710">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_CopyTo_" data-uid="Lucene.Net.Util.AttributeSource.CopyTo*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_CopyTo_Lucene_Net_Util_AttributeSource_" data-uid="Lucene.Net.Util.AttributeSource.CopyTo(Lucene.Net.Util.AttributeSource)">CopyTo(AttributeSource)</h4>
<div class="markdown level1 summary"><p>Copies the contents of this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> to the given target <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a>.
The given instance has to provide all <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a>s this instance contains.
The actual attribute implementations must be identical in both <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> instances;
ideally both <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> instances should use the same <a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a>.
You can use this method as a replacement for <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_RestoreState_Lucene_Net_Util_AttributeSource_State_">RestoreState(AttributeSource.State)</a>, if you use
<a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_CloneAttributes">CloneAttributes()</a> instead of <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_CaptureState">CaptureState()</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void CopyTo(AttributeSource target)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a></td>
<td><span class="parametername">target</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_Equals_System_Object_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.Equals(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L554">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_Equals_" data-uid="Lucene.Net.Util.AttributeSource.Equals*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_Equals_System_Object_" data-uid="Lucene.Net.Util.AttributeSource.Equals(System.Object)">Equals(Object)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override bool Equals(object obj)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Object</span></td>
<td><span class="parametername">obj</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.Equals(System.Object)</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_GetAttribute__1.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.GetAttribute%60%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L457">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_GetAttribute_" data-uid="Lucene.Net.Util.AttributeSource.GetAttribute*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_GetAttribute__1" data-uid="Lucene.Net.Util.AttributeSource.GetAttribute``1">GetAttribute&lt;T&gt;()</h4>
<div class="markdown level1 summary"><p>The caller must pass in an interface type that extends <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a>.
Returns the instance of the corresponding <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a> contained in this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public virtual T GetAttribute&lt;T&gt;()
where T : IAttribute</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.ArgumentException</span></td>
<td><p>if this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> does not contain the
<a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>. It is recommended to always use <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_AddAttribute__1">AddAttribute&lt;T&gt;()</a> even in consumers
of <a class="xref" href="Lucene.Net.Analysis.TokenStream.html">TokenStream</a>s, because you cannot know if a specific <a class="xref" href="Lucene.Net.Analysis.TokenStream.html">TokenStream</a> really uses
a specific <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>. <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_AddAttribute__1">AddAttribute&lt;T&gt;()</a> will automatically make the attribute
available. If you want to only use the attribute, if it is available (to optimize
consuming), use <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_HasAttribute__1">HasAttribute&lt;T&gt;()</a>. </p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_GetAttributeClassesEnumerator.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L255">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_GetAttributeClassesEnumerator_" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_GetAttributeClassesEnumerator" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeClassesEnumerator">GetAttributeClassesEnumerator()</h4>
<div class="markdown level1 summary"><p>Returns a new iterator that iterates the attribute classes
in the same order they were added in.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerator&lt;Type&gt; GetAttributeClassesEnumerator()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerator</span>&lt;<span class="xref">System.Type</span>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_GetAttributeFactory.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.GetAttributeFactory%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L246">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_GetAttributeFactory_" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeFactory*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_GetAttributeFactory" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeFactory">GetAttributeFactory()</h4>
<div class="markdown level1 summary"><p>Returns the used <a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public AttributeSource.AttributeFactory GetAttributeFactory()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.AttributeFactory.html">AttributeSource.AttributeFactory</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_GetAttributeImplsEnumerator.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L265">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_GetAttributeImplsEnumerator_" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_GetAttributeImplsEnumerator" data-uid="Lucene.Net.Util.AttributeSource.GetAttributeImplsEnumerator">GetAttributeImplsEnumerator()</h4>
<div class="markdown level1 summary"><p>Returns a new iterator that iterates all unique <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> implementations.
This iterator may contain less entries than <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_GetAttributeClassesEnumerator">GetAttributeClassesEnumerator()</a>,
if one instance implements more than one <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> interface.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public IEnumerator&lt;Attribute&gt; GetAttributeImplsEnumerator()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Collections.Generic.IEnumerator</span>&lt;<a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>&gt;</td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_GetHashCode.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.GetHashCode%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L544">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_GetHashCode_" data-uid="Lucene.Net.Util.AttributeSource.GetHashCode*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_GetHashCode" data-uid="Lucene.Net.Util.AttributeSource.GetHashCode">GetHashCode()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override int GetHashCode()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Int32</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.GetHashCode()</span></div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_HasAttribute__1.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.HasAttribute%60%601%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L441">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_HasAttribute_" data-uid="Lucene.Net.Util.AttributeSource.HasAttribute*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_HasAttribute__1" data-uid="Lucene.Net.Util.AttributeSource.HasAttribute``1">HasAttribute&lt;T&gt;()</h4>
<div class="markdown level1 summary"><p>The caller must pass in an interface type that extends <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a>.
Returns <code>true</code>, if this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> contains the corrsponding <a class="xref" href="Lucene.Net.Util.Attribute.html">Attribute</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public bool HasAttribute&lt;T&gt;()
where T : IAttribute</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_ReflectAsString_System_Boolean_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.ReflectAsString(System.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L610">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_ReflectAsString_" data-uid="Lucene.Net.Util.AttributeSource.ReflectAsString*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_ReflectAsString_System_Boolean_" data-uid="Lucene.Net.Util.AttributeSource.ReflectAsString(System.Boolean)">ReflectAsString(Boolean)</h4>
<div class="markdown level1 summary"><p>This method returns the current attribute values as a string in the following format
by calling the <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_ReflectWith_Lucene_Net_Util_IAttributeReflector_">ReflectWith(IAttributeReflector)</a> method:</p>
<ul><li>if <code data-dev-comment-type="paramref" class="paramref">prependAttClass</code>=true: <code>&quot;AttributeClass.Key=value,AttributeClass.Key=value&quot;</code> </li><li>if <code data-dev-comment-type="paramref" class="paramref">prependAttClass</code>=false: <code>&quot;key=value,key=value&quot;</code> </li></ul>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public string ReflectAsString(bool prependAttClass)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.Boolean</span></td>
<td><span class="parametername">prependAttClass</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Lucene_Net_Util_AttributeSource_ReflectAsString_System_Boolean__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_ReflectWith_Lucene_Net_Util_IAttributeReflector_">ReflectWith(IAttributeReflector)</a></div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_ReflectWith_Lucene_Net_Util_IAttributeReflector_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L659">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_ReflectWith_" data-uid="Lucene.Net.Util.AttributeSource.ReflectWith*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_ReflectWith_Lucene_Net_Util_IAttributeReflector_" data-uid="Lucene.Net.Util.AttributeSource.ReflectWith(Lucene.Net.Util.IAttributeReflector)">ReflectWith(IAttributeReflector)</h4>
<div class="markdown level1 summary"><p>This method is for introspection of attributes, it should simply
add the key/values this <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> holds to the given <a class="xref" href="Lucene.Net.Util.IAttributeReflector.html">IAttributeReflector</a>.</p>
<p>This method iterates over all <a class="xref" href="Lucene.Net.Util.IAttribute.html">IAttribute</a> implementations and calls the
corresponding <a class="xref" href="Lucene.Net.Util.Attribute.html#Lucene_Net_Util_Attribute_ReflectWith_Lucene_Net_Util_IAttributeReflector_">ReflectWith(IAttributeReflector)</a> method.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void ReflectWith(IAttributeReflector reflector)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.IAttributeReflector.html">IAttributeReflector</a></td>
<td><span class="parametername">reflector</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 id="Lucene_Net_Util_AttributeSource_ReflectWith_Lucene_Net_Util_IAttributeReflector__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Util.Attribute.html#Lucene_Net_Util_Attribute_ReflectWith_Lucene_Net_Util_IAttributeReflector_">ReflectWith</a>(<a class="xref" href="Lucene.Net.Util.IAttributeReflector.html">IAttributeReflector</a>)</div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_RestoreState_Lucene_Net_Util_AttributeSource_State_.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L526">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_RestoreState_" data-uid="Lucene.Net.Util.AttributeSource.RestoreState*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_RestoreState_Lucene_Net_Util_AttributeSource_State_" data-uid="Lucene.Net.Util.AttributeSource.RestoreState(Lucene.Net.Util.AttributeSource.State)">RestoreState(AttributeSource.State)</h4>
<div class="markdown level1 summary"><p>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 <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> containing a <a class="xref" href="Lucene.Net.Analysis.TokenAttributes.ICharTermAttribute.html">ICharTermAttribute</a> into a <a class="xref" href="Lucene.Net.Util.AttributeSource.html">AttributeSource</a> using
a <a class="xref" href="Lucene.Net.Analysis.Token.html">Token</a> instance as implementation).
<p>
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 <a class="xref" href="Lucene.Net.Analysis.TokenAttributes.IOffsetAttribute.html">IOffsetAttribute</a>, but this state doesn&apos;t, then
the value of the <a class="xref" href="Lucene.Net.Analysis.TokenAttributes.IOffsetAttribute.html">IOffsetAttribute</a> remains unchanged. It might be desirable to
reset its value to the default, in which case the caller should first
call <a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_ClearAttributes">ClearAttributes()</a> (<code>TokenStream.ClearAttributes()</code> on the targetStream.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public void RestoreState(AttributeSource.State state)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Lucene.Net.Util.AttributeSource.State.html">AttributeSource.State</a></td>
<td><span class="parametername">state</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource_ToString.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource.ToString%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L727">View Source</a>
</span>
<a id="Lucene_Net_Util_AttributeSource_ToString_" data-uid="Lucene.Net.Util.AttributeSource.ToString*"></a>
<h4 id="Lucene_Net_Util_AttributeSource_ToString" data-uid="Lucene.Net.Util.AttributeSource.ToString">ToString()</h4>
<div class="markdown level1 summary"><p>Returns a string consisting of the class&apos;s simple name, the hex representation of the identity hash code,
and the current reflection of all attributes. </p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public override string ToString()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><span class="xref">System.Object.ToString()</span></div>
<h5 id="Lucene_Net_Util_AttributeSource_ToString_seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Lucene.Net.Util.AttributeSource.html#Lucene_Net_Util_AttributeSource_ReflectAsString_System_Boolean_">ReflectAsString(Boolean)</a></div>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Lucene_Net_Util_AttributeSource.md&amp;value=---%0Auid%3A%20Lucene.Net.Util.AttributeSource%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net/Util/AttributeSource.cs/#L41" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>