blob: f467bad79dca17879d266232854ee9ba326a54a8 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Lucene.Net: Lucene.Net.Util.Attribute Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="lucene-net-icon-128x128.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Lucene.Net
&#160;<span id="projectnumber">3.0.3</span>
</div>
<div id="projectbrief">Lucene.Net is a .NET port of the Java Lucene Indexing Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="Index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Packages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Properties</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_lucene.html">Lucene</a></li><li class="navelem"><a class="el" href="namespace_lucene_1_1_net.html">Net</a></li><li class="navelem"><a class="el" href="namespace_lucene_1_1_net_1_1_util.html">Util</a></li><li class="navelem"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html">Attribute</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="class_lucene_1_1_net_1_1_util_1_1_attribute-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">Lucene.Net.Util.Attribute Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Base class for Attributes that can be added to a <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute_source.html" title="An AttributeSource contains a list of different Attributes, and methods to add and get them...">Lucene.Net.Util.AttributeSource</a>. Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, e. g. a <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html" title="A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text...">Lucene.Net.Analysis.TokenStream</a>.
<a href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#details">More...</a></p>
<p>Inherits ICloneable, and <a class="el" href="interface_lucene_1_1_net_1_1_util_1_1_i_attribute.html">Lucene.Net.Util.IAttribute</a>.</p>
<p>Inherited by <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token.html">Lucene.Net.Analysis.Token</a>, and <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ad9e96b3c91feb9bc6014150c8027884b"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#ad9e96b3c91feb9bc6014150c8027884b">Clear</a> ()</td></tr>
<tr class="memdesc:ad9e96b3c91feb9bc6014150c8027884b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html" title="Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource. Attributes are used...">Attribute</a> interface it clears all. <a href="#ad9e96b3c91feb9bc6014150c8027884b"></a><br/></td></tr>
<tr class="separator:ad9e96b3c91feb9bc6014150c8027884b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a945d56552a3fecd714f46f5fa1fc71c6"><td class="memItemLeft" align="right" valign="top">override System.String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#a945d56552a3fecd714f46f5fa1fc71c6">ToString</a> ()</td></tr>
<tr class="memdesc:a945d56552a3fecd714f46f5fa1fc71c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">The default implementation of this method accesses all declared fields of this object and prints the values in the following syntax: <a href="#a945d56552a3fecd714f46f5fa1fc71c6"></a><br/></td></tr>
<tr class="separator:a945d56552a3fecd714f46f5fa1fc71c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec895bd12ca53ffb41a1309c7a4d9d0f"><td class="memItemLeft" align="right" valign="top">abstract override int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#aec895bd12ca53ffb41a1309c7a4d9d0f">GetHashCode</a> ()</td></tr>
<tr class="memdesc:aec895bd12ca53ffb41a1309c7a4d9d0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subclasses must implement this method and should compute a hashCode similar to this: <a href="#aec895bd12ca53ffb41a1309c7a4d9d0f"></a><br/></td></tr>
<tr class="separator:aec895bd12ca53ffb41a1309c7a4d9d0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4dbb5aff62b5fa74917d15fcd84a005e"><td class="memItemLeft" align="right" valign="top">abstract override bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#a4dbb5aff62b5fa74917d15fcd84a005e">Equals</a> (System.Object other)</td></tr>
<tr class="memdesc:a4dbb5aff62b5fa74917d15fcd84a005e"><td class="mdescLeft">&#160;</td><td class="mdescRight">All values used for computation of <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#aec895bd12ca53ffb41a1309c7a4d9d0f" title="Subclasses must implement this method and should compute a hashCode similar to this:">GetHashCode()</a> should be checked here for equality. <a href="#a4dbb5aff62b5fa74917d15fcd84a005e"></a><br/></td></tr>
<tr class="separator:a4dbb5aff62b5fa74917d15fcd84a005e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5198030f297eb5758833c1252a78d6a"><td class="memItemLeft" align="right" valign="top">abstract void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#ae5198030f297eb5758833c1252a78d6a">CopyTo</a> (<a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html">Attribute</a> target)</td></tr>
<tr class="memdesc:ae5198030f297eb5758833c1252a78d6a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copies the values from this <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html" title="Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource. Attributes are used...">Attribute</a> into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports. <a href="#ae5198030f297eb5758833c1252a78d6a"></a><br/></td></tr>
<tr class="separator:ae5198030f297eb5758833c1252a78d6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c989dd217d27f60ea59e53ce5709f13"><td class="memItemLeft" align="right" valign="top">virtual System.Object&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#a5c989dd217d27f60ea59e53ce5709f13">Clone</a> ()</td></tr>
<tr class="memdesc:a5c989dd217d27f60ea59e53ce5709f13"><td class="mdescLeft">&#160;</td><td class="mdescRight">Shallow clone. Subclasses must override this if they need to clone any members deeply, <a href="#a5c989dd217d27f60ea59e53ce5709f13"></a><br/></td></tr>
<tr class="separator:a5c989dd217d27f60ea59e53ce5709f13"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Base class for Attributes that can be added to a <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute_source.html" title="An AttributeSource contains a list of different Attributes, and methods to add and get them...">Lucene.Net.Util.AttributeSource</a>. </p>
<p>Attributes are used to add data in a dynamic, yet type-safe way to a source of usually streamed objects, e. g. a <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token_stream.html" title="A TokenStream enumerates the sequence of tokens, either from Fields of a Document or from query text...">Lucene.Net.Analysis.TokenStream</a>. </p>
<p>Definition at line <a class="el" href="_attribute_8cs_source.html#l00030">30</a> of file <a class="el" href="_attribute_8cs_source.html">Attribute.cs</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ad9e96b3c91feb9bc6014150c8027884b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract void Lucene.Net.Util.Attribute.Clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Clears the values in this AttributeImpl and resets it to its default value. If this implementation implements more than one <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html" title="Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource. Attributes are used...">Attribute</a> interface it clears all. </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token.html#a39b0ae963e4058899f89b4a46869a62c">Lucene.Net.Analysis.Token</a>, and <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html#a5a3dbfceb1671ede9a9bf170ab28f635">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
</div>
</div>
<a class="anchor" id="a5c989dd217d27f60ea59e53ce5709f13"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual System.Object Lucene.Net.Util.Attribute.Clone </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Shallow clone. Subclasses must override this if they need to clone any members deeply, </p>
<p>Reimplemented in <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token.html#aed1714059d4be96d62a674e7be53c573">Lucene.Net.Analysis.Token</a>, and <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html#a20b54098feb33f2f1a590fae26550efb">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
<p>Definition at line <a class="el" href="_attribute_8cs_source.html#l00117">117</a> of file <a class="el" href="_attribute_8cs_source.html">Attribute.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ae5198030f297eb5758833c1252a78d6a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract void Lucene.Net.Util.Attribute.CopyTo </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html">Attribute</a>&#160;</td>
<td class="paramname"><em>target</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Copies the values from this <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html" title="Base class for Attributes that can be added to a Lucene.Net.Util.AttributeSource. Attributes are used...">Attribute</a> into the passed-in target attribute. The target implementation must support all the Attributes this implementation supports. </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token.html#a66085630b83bc20c0a6917cc981ff9d5">Lucene.Net.Analysis.Token</a>, and <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html#a458ab279f0b493d223b74ec478c962d4">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
</div>
</div>
<a class="anchor" id="a4dbb5aff62b5fa74917d15fcd84a005e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract override bool Lucene.Net.Util.Attribute.Equals </td>
<td>(</td>
<td class="paramtype">System.Object&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>All values used for computation of <a class="el" href="class_lucene_1_1_net_1_1_util_1_1_attribute.html#aec895bd12ca53ffb41a1309c7a4d9d0f" title="Subclasses must implement this method and should compute a hashCode similar to this:">GetHashCode()</a> should be checked here for equality. </p>
<p>see also Object.Equals(Object) </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html#a74eb592469c20f72f031b4f900891767">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
</div>
</div>
<a class="anchor" id="aec895bd12ca53ffb41a1309c7a4d9d0f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">abstract override int Lucene.Net.Util.Attribute.GetHashCode </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Subclasses must implement this method and should compute a hashCode similar to this: </p>
<p><code> public int hashCode() { int code = startOffset; code = code * 31 + endOffset; return code; } </code></p>
<p>see also Equals(Object) </p>
<p>Implemented in <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_token.html#a08f244d5502657d6b9d446c16fabe3c1">Lucene.Net.Analysis.Token</a>, and <a class="el" href="class_lucene_1_1_net_1_1_analysis_1_1_tokenattributes_1_1_flags_attribute.html#aec74f98b52a03aa36bbef487c4479f1f">Lucene.Net.Analysis.Tokenattributes.FlagsAttribute</a>.</p>
</div>
</div>
<a class="anchor" id="a945d56552a3fecd714f46f5fa1fc71c6"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">override System.String Lucene.Net.Util.Attribute.ToString </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>The default implementation of this method accesses all declared fields of this object and prints the values in the following syntax: </p>
<p><code> public String toString() { return "start=" + startOffset + ",end=" + endOffset; } </code></p>
<p>This method may be overridden by subclasses. </p>
<p>Definition at line <a class="el" href="_attribute_8cs_source.html#l00049">49</a> of file <a class="el" href="_attribute_8cs_source.html">Attribute.cs</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>core/Util/<a class="el" href="_attribute_8cs_source.html">Attribute.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 3 2013 02:12:59 for Lucene.Net by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>