mirror of
https://github.com/processing/processing4.git
synced 2026-02-03 21:59:20 +01:00
Removing advanced constructors from new Data reference
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -26,19 +26,25 @@ public class FloatList implements Iterable<Float> {
|
||||
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<Float> iter) {
|
||||
this(10);
|
||||
for (float v : iter) {
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -31,19 +31,25 @@ public class IntList implements Iterable<Integer> {
|
||||
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<Integer> iter) {
|
||||
this(10);
|
||||
for (int v : iter) {
|
||||
|
||||
@@ -108,7 +108,6 @@ public class JSONArray {
|
||||
|
||||
/**
|
||||
* Construct an empty JSONArray.
|
||||
* @nowebref
|
||||
*/
|
||||
public JSONArray() {
|
||||
this.myArrayList = new ArrayList<Object>();
|
||||
@@ -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();
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -25,12 +25,16 @@ public class StringList implements Iterable<String> {
|
||||
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<String> {
|
||||
}
|
||||
|
||||
|
||||
// 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<String> iter) {
|
||||
this(10);
|
||||
for (String s : iter) {
|
||||
|
||||
@@ -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 {
|
||||
* <li>newlines - this CSV file contains newlines inside individual cells
|
||||
* <li>header - this table has a header (title) row
|
||||
* </ul>
|
||||
*
|
||||
* @nowebref
|
||||
* @param input
|
||||
* @param options
|
||||
* @throws IOException
|
||||
@@ -135,7 +145,9 @@ public class Table {
|
||||
parse(input, options);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @nowebref
|
||||
*/
|
||||
public Table(ResultSet rs) {
|
||||
init();
|
||||
try {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user