Class PositionLengthAttribute
Default implementation of IPositionLengthAttribute.
Inherited Members
Namespace: Lucene.Net.Analysis.TokenAttributes
Assembly: Lucene.Net.dll
Syntax
public class PositionLengthAttribute : Attribute, IPositionLengthAttribute, IAttribute
Constructors
PositionLengthAttribute()
Initializes this attribute with position length of 1.
Declaration
public PositionLengthAttribute()
Properties
PositionLength
Gets or Sets the position length of this Token (how many positions this token spans).
The default value is one.Declaration
public virtual int PositionLength { get; set; }
Property Value
Type | Description |
---|---|
int |
Exceptions
Type | Condition |
---|---|
ArgumentException | if value is set to zero or negative. |
Methods
Clear()
Clears the values in this Attribute and resets it to its default value. If this implementation implements more than one Attribute interface it clears all.
Declaration
public override void Clear()
Overrides
CopyTo(IAttribute)
Copies the values from this Attribute into the passed-in
target
attribute. The target
implementation must support all the
IAttributes this implementation supports.
Declaration
public override void CopyTo(IAttribute target)
Parameters
Type | Name | Description |
---|---|---|
IAttribute | target |
Overrides
Equals(object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object other)
Parameters
Type | Name | Description |
---|---|---|
object | other |
Returns
Type | Description |
---|---|
bool | true if the specified object is equal to the current object; otherwise, false. |
Overrides
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for the current object. |