From a636728bb55424d4150ea4bade955172ba96e2da Mon Sep 17 00:00:00 2001 From: REAS Date: Mon, 3 Jun 2013 10:00:04 -0700 Subject: [PATCH] Removing advanced constructors from new Data reference --- core/src/processing/data/FloatDict.java | 8 +++++++- core/src/processing/data/FloatList.java | 12 +++++++++--- core/src/processing/data/IntDict.java | 8 +++++++- core/src/processing/data/IntList.java | 12 +++++++++--- core/src/processing/data/JSONArray.java | 3 ++- core/src/processing/data/StringDict.java | 8 +++++++- core/src/processing/data/StringList.java | 16 ++++++++++++---- core/src/processing/data/Table.java | 22 +++++++++++++++++----- core/src/processing/data/XML.java | 5 ++--- 9 files changed, 72 insertions(+), 22 deletions(-) diff --git a/core/src/processing/data/FloatDict.java b/core/src/processing/data/FloatDict.java index 58d006149..7207a179a 100644 --- a/core/src/processing/data/FloatDict.java +++ b/core/src/processing/data/FloatDict.java @@ -36,6 +36,8 @@ public class FloatDict { /** * Create a new lookup with a specific size. This is more efficient than not * specifying a size. Use it when you know the rough size of the thing you're creating. + * + * @nowebref */ public FloatDict(int length) { count = 0; @@ -47,6 +49,8 @@ public class FloatDict { /** * Read a set of entries from a Reader that has each key/value pair on * a single line, separated by a tab. + * + * @nowebref */ public FloatDict(BufferedReader reader) { // public FloatHash(PApplet parent, String filename) { @@ -66,7 +70,9 @@ public class FloatDict { } } - + /** + * @nowebref + */ public FloatDict(String[] keys, float[] values) { if (keys.length != values.length) { throw new IllegalArgumentException("key and value arrays must be the same length"); diff --git a/core/src/processing/data/FloatList.java b/core/src/processing/data/FloatList.java index 0c8e34500..e386c9303 100644 --- a/core/src/processing/data/FloatList.java +++ b/core/src/processing/data/FloatList.java @@ -26,19 +26,25 @@ public class FloatList implements Iterable { data = new float[10]; } - + /** + * @nowebref + */ public FloatList(int length) { data = new float[length]; } - + /** + * @nowebref + */ public FloatList(float[] list) { count = list.length; data = new float[count]; System.arraycopy(list, 0, data, 0, count); } - + /** + * @nowebref + */ public FloatList(Iterable iter) { this(10); for (float v : iter) { diff --git a/core/src/processing/data/IntDict.java b/core/src/processing/data/IntDict.java index ed22a27f7..23e4fc48f 100644 --- a/core/src/processing/data/IntDict.java +++ b/core/src/processing/data/IntDict.java @@ -59,6 +59,8 @@ public class IntDict { /** * Create a new lookup with a specific size. This is more efficient than not * specifying a size. Use it when you know the rough size of the thing you're creating. + * + * @nowebref */ public IntDict(int length) { count = 0; @@ -70,6 +72,8 @@ public class IntDict { /** * Read a set of entries from a Reader that has each key/value pair on * a single line, separated by a tab. + * + * @nowebref */ public IntDict(BufferedReader reader) { // public IntHash(PApplet parent, String filename) { @@ -89,7 +93,9 @@ public class IntDict { } } - + /** + * @nowebref + */ public IntDict(String[] keys, int[] values) { if (keys.length != values.length) { throw new IllegalArgumentException("key and value arrays must be the same length"); diff --git a/core/src/processing/data/IntList.java b/core/src/processing/data/IntList.java index 6f70b54e0..1c1e81569 100644 --- a/core/src/processing/data/IntList.java +++ b/core/src/processing/data/IntList.java @@ -31,19 +31,25 @@ public class IntList implements Iterable { data = new int[10]; } - + /** + * @nowebref + */ public IntList(int length) { data = new int[length]; } - + /** + * @nowebref + */ public IntList(int[] source) { count = source.length; data = new int[count]; System.arraycopy(source, 0, data, 0, count); } - + /** + * @nowebref + */ public IntList(Iterable iter) { this(10); for (int v : iter) { diff --git a/core/src/processing/data/JSONArray.java b/core/src/processing/data/JSONArray.java index d70c7dd22..75d39eba8 100644 --- a/core/src/processing/data/JSONArray.java +++ b/core/src/processing/data/JSONArray.java @@ -108,7 +108,6 @@ public class JSONArray { /** * Construct an empty JSONArray. - * @nowebref */ public JSONArray() { this.myArrayList = new ArrayList(); @@ -125,8 +124,10 @@ public class JSONArray { /** * Construct a JSONArray from a JSONTokener. + * * @param x A JSONTokener * @throws JSONException If there is a syntax error. + * @nowebref */ protected JSONArray(JSONTokener x) { this(); diff --git a/core/src/processing/data/StringDict.java b/core/src/processing/data/StringDict.java index afc7ea49a..5fb533616 100644 --- a/core/src/processing/data/StringDict.java +++ b/core/src/processing/data/StringDict.java @@ -37,6 +37,8 @@ public class StringDict { * Create a new lookup pre-allocated to a specific length. This will not * change the size(), but is more efficient than not specifying a length. * Use it when you know the rough size of the thing you're creating. + * + * @nowebref */ public StringDict(int length) { count = 0; @@ -48,6 +50,8 @@ public class StringDict { /** * Read a set of entries from a Reader that has each key/value pair on * a single line, separated by a tab. + * + * @nowebref */ public StringDict(BufferedReader reader) { String[] lines = PApplet.loadStrings(reader); @@ -64,7 +68,9 @@ public class StringDict { } } - + /** + * @nowebref + */ public StringDict(String[] keys, String[] values) { if (keys.length != values.length) { throw new IllegalArgumentException("key and value arrays must be the same length"); diff --git a/core/src/processing/data/StringList.java b/core/src/processing/data/StringList.java index 8bfd2a867..bd71a0867 100644 --- a/core/src/processing/data/StringList.java +++ b/core/src/processing/data/StringList.java @@ -25,12 +25,16 @@ public class StringList implements Iterable { this(10); } - + /** + * @nowebref + */ public StringList(int length) { data = new String[length]; } - + /** + * @nowebref + */ public StringList(String[] list) { count = list.length; data = new String[count]; @@ -38,8 +42,12 @@ public class StringList implements Iterable { } - // Create from something iterable, for instance: - // StringList list = new StringList(hashMap.keySet()); + /** + * Create from something iterable, for instance: + * StringList list = new StringList(hashMap.keySet()); + * + * @nowebref + */ public StringList(Iterable iter) { this(10); for (String s : iter) { diff --git a/core/src/processing/data/Table.java b/core/src/processing/data/Table.java index debac686a..61ae3e3cb 100644 --- a/core/src/processing/data/Table.java +++ b/core/src/processing/data/Table.java @@ -99,21 +99,29 @@ public class Table { init(); } - + /** + * @nowebref + */ public Table(File file) throws IOException { this(file, null); } - // version that uses a File object; future releases (or data types) - // may include additional optimizations here + /** + * version that uses a File object; future releases (or data types) + * may include additional optimizations here + * + * @nowebref + */ public Table(File file, String options) throws IOException { // uses createInput() to handle .gz (and eventually .bz2) files parse(PApplet.createInput(file), extensionOptions(true, file.getName(), options)); } - + /** + * @nowebref + */ public Table(InputStream input) throws IOException { this(input, null); } @@ -127,6 +135,8 @@ public class Table { *
  • newlines - this CSV file contains newlines inside individual cells *
  • header - this table has a header (title) row * + * + * @nowebref * @param input * @param options * @throws IOException @@ -135,7 +145,9 @@ public class Table { parse(input, options); } - + /** + * @nowebref + */ public Table(ResultSet rs) { init(); try { diff --git a/core/src/processing/data/XML.java b/core/src/processing/data/XML.java index 4b7da8e0b..6031885ec 100644 --- a/core/src/processing/data/XML.java +++ b/core/src/processing/data/XML.java @@ -63,7 +63,7 @@ public class XML implements Serializable { /** * @nowebref - */ + */ protected XML() { } @@ -179,9 +179,8 @@ public class XML implements Serializable { /** - * @param name description TBD + * @param name creates a node with this name * - * @nowebref */ public XML(String name) { try {