}
public void setValue(int index, MJsonValue x) {
- if ((index < 0) || (index > (this.countValues() - 1))) {
+ if ((index < 0) || (index > (this.getValueCount() - 1))) {
throw new IllegalArgumentException(String.format("Invalid 'index': %s: out of range.", index));
}
if (null == x) {
}
public MJsonValue getValue(int index) {
- if ((index < 0) || (index > (this.countValues() - 1))) {
+ if ((index < 0) || (index > (this.getValueCount() - 1))) {
throw new IllegalArgumentException(String.format("Invalid 'index': %s: out of range.", index));
}
//
return this.getValuesReference().get(index).clone();
}
- public int countValues() {
+ public int getValueCount() {
return this.getValuesReference().size();
}
public void removeValue(int index) {
- if ((index < 0) || (index > (this.countValues() - 1))) {
+ if ((index < 0) || (index > (this.getValueCount() - 1))) {
throw new IllegalArgumentException(String.format("Invalid 'index': %s: out of range.", index));
}
//
public String getJsonValue() {
StringBuilder s = new StringBuilder("");
s.append("[");
- for (int i = 0; i < this.countValues(); i++) {
+ for (int i = 0; i < this.getValueCount(); i++) {
if (i > 0) {
s.append(", ");
}