MCPcopy Create free account
hub / github.com/apache/solr / getFloat

Method getFloat

solr/core/src/java/org/apache/solr/search/StrParser.java:81–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 }
80
81 public float getFloat() {
82 eatws();
83 char[] arr = new char[end - pos];
84 int i;
85 for (i = 0; i < arr.length; i++) {
86 char ch = val.charAt(pos);
87 if ((ch >= '0' && ch <= '9')
88 || ch == '+'
89 || ch == '-'
90 || ch == '.'
91 || ch == 'e'
92 || ch == 'E') {
93 pos++;
94 arr[i] = ch;
95 } else {
96 break;
97 }
98 }
99
100 return Float.parseFloat(new String(arr, 0, i));
101 }
102
103 public Number getNumber() {
104 eatws();

Callers 15

parseVectorMethod · 0.45
MemAllowedLimitMethod · 0.45
hasMemLimitMethod · 0.45
createQueryMethod · 0.45
addMainQueryMethod · 0.45
parseMethod · 0.45
parseMethod · 0.45
initMethod · 0.45
initMethod · 0.45

Calls 3

eatwsMethod · 0.95
parseFloatMethod · 0.80
charAtMethod · 0.45

Tested by 1