diff --git a/src/main/java/edu/wpi/first/wpilibj/networktables/NetworkTable.java b/src/main/java/edu/wpi/first/wpilibj/networktables/NetworkTable.java index 1f813c8..12de1cb 100644 --- a/src/main/java/edu/wpi/first/wpilibj/networktables/NetworkTable.java +++ b/src/main/java/edu/wpi/first/wpilibj/networktables/NetworkTable.java @@ -1,7 +1,6 @@ package edu.wpi.first.wpilibj.networktables; import edu.wpi.first.wpilibj.tables.*; -import edu.wpi.first.wpilibj.networktables2.type.*; import java.io.*; import java.nio.ByteBuffer; import java.util.*; @@ -797,12 +796,6 @@ else if (value instanceof Number[]) return NetworkTablesJNI.putDoubleArray(pathWithSep + key, toNative((Number[])value)); else if (value instanceof String[]) return NetworkTablesJNI.putStringArray(pathWithSep + key, (String[])value); - else if (value instanceof BooleanArray) - return NetworkTablesJNI.putBooleanArray(pathWithSep + key, toNative((Boolean[])((ArrayData)value).getDataArray())); - else if (value instanceof NumberArray) - return NetworkTablesJNI.putDoubleArray(pathWithSep + key, toNative((Double[])((ArrayData)value).getDataArray())); - else if (value instanceof StringArray) - return NetworkTablesJNI.putStringArray(pathWithSep + key, (String[])((ArrayData)value).getDataArray()); else throw new IllegalArgumentException("Value of type " + value.getClass().getName() + " cannot be put into a table"); } diff --git a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/ArrayData.java b/src/main/java/edu/wpi/first/wpilibj/networktables2/type/ArrayData.java deleted file mode 100644 index f312532..0000000 --- a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/ArrayData.java +++ /dev/null @@ -1,50 +0,0 @@ -package edu.wpi.first.wpilibj.networktables2.type; - -/** - * @deprecated Use ArrayList instead. - */ -@Deprecated -public class ArrayData { - private Object[] data = new Object[0]; - - protected Object getAsObject(int index) { - return data[index]; - } - protected void _set(int index, Object value) { - data[index] = value; - } - protected void _add(Object value) { - setSize(size() + 1); - data[size() - 1] = value; - } - public void remove(int index) { - if (index < 0 || index >= size()) - throw new IndexOutOfBoundsException(); - if (index < size() - 1) - System.arraycopy(data, index + 1, data, index, size() - index - 1); - setSize(size() - 1); - } - public void setSize(int size) { - if (size == data.length) - return; - Object[] newArray = new Object[size]; - if (size < data.length) - System.arraycopy(data, 0, newArray, 0, size); - else { - System.arraycopy(data, 0, newArray, 0, data.length); - for (int i = data.length; i < newArray.length; ++i) - newArray[i] = null; - } - data = newArray; - } - public int size() { - return data.length; - } - - public Object[] getDataArray() { - return data; - } - public void setDataArray(Object[] value) { - data = value; - } -} diff --git a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/BooleanArray.java b/src/main/java/edu/wpi/first/wpilibj/networktables2/type/BooleanArray.java deleted file mode 100644 index 6fda0ed..0000000 --- a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/BooleanArray.java +++ /dev/null @@ -1,17 +0,0 @@ -package edu.wpi.first.wpilibj.networktables2.type; - -/** - * @deprecated Use {@literal ArrayList} instead. - */ -@Deprecated -public class BooleanArray extends ArrayData { - public boolean get(int index) { - return ((Boolean)getAsObject(index)).booleanValue(); - } - public void set(int index, boolean value) { - _set(index, value?Boolean.TRUE:Boolean.FALSE); - } - public void add(boolean value) { - _add(value?Boolean.TRUE:Boolean.FALSE); - } -} diff --git a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/NumberArray.java b/src/main/java/edu/wpi/first/wpilibj/networktables2/type/NumberArray.java deleted file mode 100644 index 17394ab..0000000 --- a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/NumberArray.java +++ /dev/null @@ -1,17 +0,0 @@ -package edu.wpi.first.wpilibj.networktables2.type; - -/** - * @deprecated Use {@literal ArrayList} instead. - */ -@Deprecated -public class NumberArray extends ArrayData { - public double get(int index) { - return ((Double)getAsObject(index)).doubleValue(); - } - public void set(int index, double value) { - _set(index, new Double(value)); - } - public void add(double value) { - _add(new Double(value)); - } -} diff --git a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/StringArray.java b/src/main/java/edu/wpi/first/wpilibj/networktables2/type/StringArray.java deleted file mode 100644 index b5a41f3..0000000 --- a/src/main/java/edu/wpi/first/wpilibj/networktables2/type/StringArray.java +++ /dev/null @@ -1,17 +0,0 @@ -package edu.wpi.first.wpilibj.networktables2.type; - -/** - * @deprecated Use {@literal ArrayList} instead. - */ -@Deprecated -public class StringArray extends ArrayData { - public String get(int index) { - return ((String)getAsObject(index)); - } - public void set(int index, String value) { - _set(index, value); - } - public void add(String value) { - _add(value); - } -}