Skip to content

Commit

Permalink
Add deprecated get___ methods to LogTable
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Oct 23, 2023
1 parent 9dabb8c commit 6f6e9a0
Showing 1 changed file with 123 additions and 1 deletion.
124 changes: 123 additions & 1 deletion junction/core/src/org/littletonrobotics/junction/LogTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public boolean[] get(String key, boolean[] defaultValue) {
}
}

/** Reads a IntegerArray value from the table. */
/** Reads an IntegerArray value from the table. */
public long[] get(String key, long[] defaultValue) {
if (data.containsKey(prefix + key)) {
return get(key).getIntegerArray(defaultValue);
Expand Down Expand Up @@ -522,6 +522,128 @@ public String[] get(String key, String[] defaultValue) {
}
}

/**
* Reads a Raw value from the table.
*
* @deprecated Use {@link LogTable#get(String, byte[]) get(String, byte[])}
* instead
*/
@Deprecated
public byte[] getRaw(String key, byte[] defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a Boolean value from the table.
*
* @deprecated Use {@link LogTable#get(String, boolean) get(String, boolean)}
* instead
*/
@Deprecated
public boolean getBoolean(String key, boolean defaultValue) {
return get(key, defaultValue);
}

/**
* Reads an Integer value from the table.
*
* @deprecated Use {@link LogTable#get(String, long) get(String, long)}
* instead
*/
@Deprecated
public long getInteger(String key, long defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a Float value from the table.
*
* @deprecated Use {@link LogTable#get(String, float) get(String, float)}
* instead
*/
@Deprecated
public float getFloat(String key, float defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a Double value from the table.
*
* @deprecated Use {@link LogTable#get(String, double) get(String, double)}
* instead
*/
@Deprecated
public double getDouble(String key, double defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a String value from the table.
*
* @deprecated Use {@link LogTable#get(String, String) get(String, String)}
* instead
*/
@Deprecated
public String getString(String key, String defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a BooleanArray value from the table.
*
* @deprecated Use {@link LogTable#get(String, boolean[]) get(String,
* boolean[])}
* instead
*/
@Deprecated
public boolean[] getBooleanArray(String key, boolean[] defaultValue) {
return get(key, defaultValue);
}

/**
* Reads an IntegerArray value from the table.
*
* @deprecated Use {@link LogTable#get(String, long[]) get(String, long[])}
* instead
*/
@Deprecated
public long[] getIntegerArray(String key, long[] defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a FloatArray value from the table.
*
* @deprecated Use {@link LogTable#get(String, float[]) get(String, float[])}
* instead
*/
@Deprecated
public float[] getFloatArray(String key, float[] defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a DoubleArray value from the table.
*
* @deprecated Use {@link LogTable#get(String, double[]) get(String, double[])}
* instead
*/
@Deprecated
public double[] getDoubleArray(String key, double[] defaultValue) {
return get(key, defaultValue);
}

/**
* Reads a StringArray value from the table.
*
* @deprecated Use {@link LogTable#get(String, String[]) get(String, String[])}
* instead
*/
@Deprecated
public String[] getStringArray(String key, String[] defaultValue) {
return get(key, defaultValue);
}

/** Reads a struct value from the table. */
@SuppressWarnings("unchecked")
public <T> T get(String key, Struct<T> struct, T defaultValue) {
Expand Down

0 comments on commit 6f6e9a0

Please sign in to comment.