23 namespace Lucene.Net.Search.Function
50 private class AnonymousClassDocValues:
DocValues
52 public AnonymousClassDocValues(sbyte[] arr,
ByteFieldSource enclosingInstance)
54 InitBlock(arr, enclosingInstance);
59 this.enclosingInstance = enclosingInstance;
67 return enclosingInstance;
72 public override float FloatVal(
int doc)
74 return (
float) arr[doc];
77 public override int IntVal(
int doc)
82 public override System.String ToString(
int doc)
84 return Enclosing_Instance.
Description() +
'=' + IntVal(doc);
88 protected internal override object InnerArray
93 private Lucene.Net.Search.ByteParser parser;
101 public ByteFieldSource(System.String field, Lucene.Net.Search.ByteParser parser):base(field)
103 this.parser = parser;
107 public override System.String Description()
109 return "byte(" + base.Description() +
')';
115 sbyte[] arr = cache.
GetBytes(reader, field, parser);
116 return new AnonymousClassDocValues(arr,
this);
127 return this.parser == null?other.parser == null:this.parser.GetType() == other.parser.GetType();
131 public override int CachedFieldSourceHashCode()
133 return parser == null?typeof(System.SByte).GetHashCode():parser.GetType().GetHashCode();