Java 类org.apache.lucene.search.FieldCache.FloatParser 实例源码

项目:search    文件:SimpleBindings.java   
@Override
public ValueSource getValueSource(String name) {
  Object o = map.get(name);
  if (o == null) {
    throw new IllegalArgumentException("Invalid reference '" + name + "'");
  } else if (o instanceof Expression) {
    return ((Expression)o).getValueSource(this);
  } else if (o instanceof ValueSource) {
    return ((ValueSource)o);
  }
  SortField field = (SortField) o;
  switch(field.getType()) {
    case INT:
      return new IntFieldSource(field.getField(), (IntParser) field.getParser());
    case LONG:
      return new LongFieldSource(field.getField(), (LongParser) field.getParser());
    case FLOAT:
      return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
    case DOUBLE:
      return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
    case SCORE:
      return getScoreValueSource();
    default:
      throw new UnsupportedOperationException(); 
  }
}
项目:read-open-source-code    文件:SimpleBindings.java   
@Override
public ValueSource getValueSource(String name) {
  Object o = map.get(name);
  if (o == null) {
    throw new IllegalArgumentException("Invalid reference '" + name + "'");
  } else if (o instanceof Expression) {
    return ((Expression)o).getValueSource(this);
  }
  SortField field = (SortField) o;
  switch(field.getType()) {
    case INT:
      return new IntFieldSource(field.getField(), (IntParser) field.getParser());
    case LONG:
      return new LongFieldSource(field.getField(), (LongParser) field.getParser());
    case FLOAT:
      return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
    case DOUBLE:
      return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
    case SCORE:
      return getScoreValueSource();
    default:
      throw new UnsupportedOperationException(); 
  }
}
项目:read-open-source-code    文件:SimpleBindings.java   
@Override
public ValueSource getValueSource(String name) {
  Object o = map.get(name);
  if (o == null) {
    throw new IllegalArgumentException("Invalid reference '" + name + "'");
  } else if (o instanceof Expression) {
    return ((Expression)o).getValueSource(this);
  }
  SortField field = (SortField) o;
  switch(field.getType()) {
    case INT:
      return new IntFieldSource(field.getField(), (IntParser) field.getParser());
    case LONG:
      return new LongFieldSource(field.getField(), (LongParser) field.getParser());
    case FLOAT:
      return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
    case DOUBLE:
      return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
    case SCORE:
      return getScoreValueSource();
    default:
      throw new UnsupportedOperationException(); 
  }
}
项目:read-open-source-code    文件:SimpleBindings.java   
@Override
public ValueSource getValueSource(String name) {
  Object o = map.get(name);
  if (o == null) {
    throw new IllegalArgumentException("Invalid reference '" + name + "'");
  } else if (o instanceof Expression) {
    return ((Expression)o).getValueSource(this);
  } else if (o instanceof ValueSource) {
    return ((ValueSource)o);
  }
  SortField field = (SortField) o;
  switch(field.getType()) {
    case INT:
      return new IntFieldSource(field.getField(), (IntParser) field.getParser());
    case LONG:
      return new LongFieldSource(field.getField(), (LongParser) field.getParser());
    case FLOAT:
      return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
    case DOUBLE:
      return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
    case SCORE:
      return getScoreValueSource();
    default:
      throw new UnsupportedOperationException(); 
  }
}
项目:Maskana-Gestor-de-Conocimiento    文件:SimpleBindings.java   
@Override
public ValueSource getValueSource(String name) {
  Object o = map.get(name);
  if (o == null) {
    throw new IllegalArgumentException("Invalid reference '" + name + "'");
  } else if (o instanceof Expression) {
    return ((Expression)o).getValueSource(this);
  }
  SortField field = (SortField) o;
  switch(field.getType()) {
    case INT:
      return new IntFieldSource(field.getField(), (IntParser) field.getParser());
    case LONG:
      return new LongFieldSource(field.getField(), (LongParser) field.getParser());
    case FLOAT:
      return new FloatFieldSource(field.getField(), (FloatParser) field.getParser());
    case DOUBLE:
      return new DoubleFieldSource(field.getField(), (DoubleParser) field.getParser());
    case SCORE:
      return getScoreValueSource();
    default:
      throw new UnsupportedOperationException(); 
  }
}
项目:lams    文件:FieldComparator.java   
public FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:search    文件:FieldComparator.java   
public FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:NYBC    文件:FieldComparator.java   
FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:read-open-source-code    文件:FieldComparator.java   
FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:read-open-source-code    文件:FieldComparator.java   
FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:read-open-source-code    文件:FieldComparator.java   
public FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}
项目:Maskana-Gestor-de-Conocimiento    文件:FieldComparator.java   
FloatComparator(int numHits, String field, FieldCache.Parser parser, Float missingValue) {
  super(field, missingValue);
  values = new float[numHits];
  this.parser = (FloatParser) parser;
}