Modified code to comply with the guidelines.
authorMarco Zanon <info@marcozanon.com>
Sun, 5 Feb 2012 13:46:14 +0000 (13:46 +0000)
committerMarco Zanon <info@marcozanon.com>
Sun, 5 Feb 2012 13:46:14 +0000 (13:46 +0000)
src/java/com/marcozanon/macaco/json/MJsonArray.java
src/java/com/marcozanon/macaco/json/MJsonObject.java
src/java/com/marcozanon/macaco/web/ui/MWebView.java

index 63e7bad0c06e12397d1f0d0f782946fa5ba691e2..c5bc2f16fc5fe81abfc1e98394f8b3f76df5a0ab 100644 (file)
@@ -52,7 +52,7 @@ public class MJsonArray extends MJsonValue {
     }
 
     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) {
@@ -67,19 +67,19 @@ public class MJsonArray extends MJsonValue {
     }
 
     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));
         }
         //
@@ -194,7 +194,7 @@ public class MJsonArray extends MJsonValue {
     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(", ");
             }
index 3c96038d96515f8ebf8483962409628f09bf6122..75bfb0bdd5eff7f122d0f0ad787fca25338911cc 100644 (file)
@@ -72,7 +72,7 @@ public class MJsonObject extends MJsonValue {
         return this.getValuesReference().get(key).clone();
     }
 
-    public int countValues() {
+    public int getValueCount() {
         return this.getValuesReference().size();
     }
 
index 6b07106af2bd119cc37ecc1545a761ed19f3ac3a..9b90f4effb43ccdf52e8165e2a69e3e2ca70c053 100644 (file)
@@ -217,7 +217,7 @@ public class MWebView extends MObject implements Runnable {
         throw new MDownloaderNotFoundWebException(String.format("Invalid 'id': %s.", id));
     }
 
-    public int countDownloaders() {
+    public int getDownloaderCount() {
         return this.getDownloadersReference().size();
     }