diff --git a/scouter.common/src/scouter/lang/value/ListValue.java b/scouter.common/src/scouter/lang/value/ListValue.java index e58613b02..2f4fb6517 100644 --- a/scouter.common/src/scouter/lang/value/ListValue.java +++ b/scouter.common/src/scouter/lang/value/ListValue.java @@ -1,30 +1,30 @@ -/* - * Copyright 2015 the original author or authors. - * @https://github.com/scouter-project/scouter - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - +/* + * Copyright 2015 the original author or authors. + * @https://github.com/scouter-project/scouter + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package scouter.lang.value; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; -import java.util.Set; - -import scouter.io.DataInputX; -import scouter.io.DataOutputX; +import scouter.io.DataInputX; +import scouter.io.DataOutputX; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Set; public class ListValue implements Value { @@ -62,6 +62,14 @@ public double getDouble(int i) { return 0; } + public double getFloat(int i) { + Value v = valueList.get(i); + if (v instanceof Number) { + return ((Number) v).floatValue(); + } + return 0; + } + public long getLong(int i) { Value v = valueList.get(i); if (v instanceof Number) { @@ -69,12 +77,12 @@ public long getLong(int i) { } return 0; } - public int getInt(int i) { - Value v = valueList.get(i); - if (v instanceof Number) { - return ((Number) v).intValue(); - } - return 0; + public int getInt(int i) { + Value v = valueList.get(i); + if (v instanceof Number) { + return ((Number) v).intValue(); + } + return 0; } public String getString(int i) { Value v = valueList.get(i); @@ -191,10 +199,10 @@ public ListValue add(String[] str) { this.add(s); } return this; - } - - public Iterator iterator() { - return this.valueList.iterator(); + } + + public Iterator iterator() { + return this.valueList.iterator(); } public String[] toStringArray() {