Example #1
0
 /// <summary>
 /// Initializes the token stream with the supplied <code>float</code> value. </summary>
 /// <param name="value"> the value, for which this TokenStream should enumerate tokens. </param>
 /// <returns> this instance, because of this you can use it the following way:
 /// <code>new Field(name, new NumericTokenStream(precisionStep).setFloatValue(value))</code> </returns>
 public NumericTokenStream SetFloatValue(float value)
 {
     NumericAtt.Init(NumericUtils.FloatToSortableInt(value), ValSize = 32, PrecisionStep_Renamed, -PrecisionStep_Renamed);
     return(this);
 }
Example #2
0
 /// <summary>
 /// Initializes the token stream with the supplied <code>int</code> value. </summary>
 /// <param name="value"> the value, for which this TokenStream should enumerate tokens. </param>
 /// <returns> this instance, because of this you can use it the following way:
 /// <code>new Field(name, new NumericTokenStream(precisionStep).setIntValue(value))</code> </returns>
 public NumericTokenStream SetIntValue(int value)
 {
     NumericAtt.Init(value, ValSize = 32, PrecisionStep_Renamed, -PrecisionStep_Renamed);
     return(this);
 }
Example #3
0
 /// <summary>
 /// Initializes the token stream with the supplied <code>double</code> value. </summary>
 /// <param name="value"> the value, for which this TokenStream should enumerate tokens. </param>
 /// <returns> this instance, because of this you can use it the following way:
 /// <code>new Field(name, new NumericTokenStream(precisionStep).setDoubleValue(value))</code> </returns>
 public NumericTokenStream SetDoubleValue(double value)
 {
     NumericAtt.Init(NumericUtils.DoubleToSortableLong(value), ValSize = 64, PrecisionStep_Renamed, -PrecisionStep_Renamed);
     return(this);
 }
Example #4
0
 /// <summary>
 /// Initializes the token stream with the supplied <code>long</code> value. </summary>
 /// <param name="value"> the value, for which this TokenStream should enumerate tokens. </param>
 /// <returns> this instance, because of this you can use it the following way:
 /// <code>new Field(name, new NumericTokenStream(precisionStep).setLongValue(value))</code> </returns>
 public NumericTokenStream SetLongValue(long value)
 {
     NumericAtt.Init(value, ValSize = 64, PrecisionStep_Renamed, -PrecisionStep_Renamed);
     return(this);
 }