From eef1bf33de6aebab2c60d8412aaf0d25a6710db4 Mon Sep 17 00:00:00 2001 From: Carl Hauser Date: Sun, 29 Dec 2024 16:41:29 -0800 Subject: [PATCH] [wpilib] Fix SmartDashboard.setDefault* docs (NFC) (#6490) Fix incorrect comments related to NT SetDefault* methods across multiple components --- .../include/networktables/GenericEntry.h | 22 ++++---- .../include/networktables/NetworkTable.h | 32 +++++------ .../include/networktables/NetworkTableEntry.h | 24 ++++----- ntcore/src/main/native/include/ntcore_c.h | 4 +- ntcore/src/main/native/include/ntcore_cpp.h | 4 +- .../frc/smartdashboard/SmartDashboard.h | 54 +++++++++---------- .../smartdashboard/SmartDashboard.java | 54 +++++++++---------- 7 files changed, 97 insertions(+), 97 deletions(-) diff --git a/ntcore/src/main/native/include/networktables/GenericEntry.h b/ntcore/src/main/native/include/networktables/GenericEntry.h index e71a25afad7..449daab2f52 100644 --- a/ntcore/src/main/native/include/networktables/GenericEntry.h +++ b/ntcore/src/main/native/include/networktables/GenericEntry.h @@ -387,7 +387,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultBoolean(bool defaultValue) { return nt::SetDefaultBoolean(m_pubHandle, defaultValue); @@ -397,7 +397,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultInteger(int64_t defaultValue) { return nt::SetDefaultInteger(m_pubHandle, defaultValue); @@ -407,7 +407,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultFloat(float defaultValue) { return nt::SetDefaultFloat(m_pubHandle, defaultValue); @@ -417,7 +417,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultDouble(double defaultValue) { return nt::SetDefaultDouble(m_pubHandle, defaultValue); @@ -427,7 +427,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultString(std::string_view defaultValue) { return nt::SetDefaultString(m_pubHandle, defaultValue); @@ -437,7 +437,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultRaw(std::span defaultValue) { return nt::SetDefaultRaw(m_pubHandle, defaultValue); @@ -447,7 +447,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultBooleanArray(std::span defaultValue) { return nt::SetDefaultBooleanArray(m_pubHandle, defaultValue); @@ -457,7 +457,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultIntegerArray(std::span defaultValue) { return nt::SetDefaultIntegerArray(m_pubHandle, defaultValue); @@ -467,7 +467,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultFloatArray(std::span defaultValue) { return nt::SetDefaultFloatArray(m_pubHandle, defaultValue); @@ -477,7 +477,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultDoubleArray(std::span defaultValue) { return nt::SetDefaultDoubleArray(m_pubHandle, defaultValue); @@ -487,7 +487,7 @@ class GenericPublisher : public Publisher { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultStringArray(std::span defaultValue) { return nt::SetDefaultStringArray(m_pubHandle, defaultValue); diff --git a/ntcore/src/main/native/include/networktables/NetworkTable.h b/ntcore/src/main/native/include/networktables/NetworkTable.h index 10088591715..b887337267b 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTable.h +++ b/ntcore/src/main/native/include/networktables/NetworkTable.h @@ -361,11 +361,11 @@ class NetworkTable final { bool PutNumber(std::string_view key, double value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @returns True if the table key did not already exist, otherwise False */ bool SetDefaultNumber(std::string_view key, double defaultValue); @@ -389,11 +389,11 @@ class NetworkTable final { bool PutString(std::string_view key, std::string_view value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @returns True if the table key did not already exist, otherwise False */ bool SetDefaultString(std::string_view key, std::string_view defaultValue); @@ -419,11 +419,11 @@ class NetworkTable final { bool PutBoolean(std::string_view key, bool value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @returns True if the table key did not already exist, otherwise False */ bool SetDefaultBoolean(std::string_view key, bool defaultValue); @@ -452,11 +452,11 @@ class NetworkTable final { bool PutBooleanArray(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @return False if the table key exists with a different type + * @return True if the table key did not already exist, otherwise False */ bool SetDefaultBooleanArray(std::string_view key, std::span defaultValue); @@ -490,11 +490,11 @@ class NetworkTable final { bool PutNumberArray(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @returns True if the table key did not already exist, otherwise False */ bool SetDefaultNumberArray(std::string_view key, std::span defaultValue); @@ -524,11 +524,11 @@ class NetworkTable final { bool PutStringArray(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @returns True if the table key did not already exist, otherwise False */ bool SetDefaultStringArray(std::string_view key, std::span defaultValue); @@ -558,11 +558,11 @@ class NetworkTable final { bool PutRaw(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @return False if the table key exists with a different type + * @return True if the table key did not already exist, otherwise False */ bool SetDefaultRaw(std::string_view key, std::span defaultValue); @@ -592,11 +592,11 @@ class NetworkTable final { bool PutValue(std::string_view key, const Value& value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set Default Entry Value. * * @param key the key * @param defaultValue the default value to set if key doesn't exist. - * @return False if the table key exists with a different type + * @return True if the table key did not already exist, otherwise False */ bool SetDefaultValue(std::string_view key, const Value& defaultValue); diff --git a/ntcore/src/main/native/include/networktables/NetworkTableEntry.h b/ntcore/src/main/native/include/networktables/NetworkTableEntry.h index 6b4cd11a85c..789d4361bcc 100644 --- a/ntcore/src/main/native/include/networktables/NetworkTableEntry.h +++ b/ntcore/src/main/native/include/networktables/NetworkTableEntry.h @@ -260,7 +260,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultValue(const Value& defaultValue) { return SetDefaultEntryValue(m_handle, defaultValue); @@ -270,7 +270,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultBoolean(bool defaultValue) { return nt::SetDefaultBoolean(m_handle, defaultValue); @@ -280,7 +280,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultInteger(int64_t defaultValue) { return nt::SetDefaultInteger(m_handle, defaultValue); @@ -290,7 +290,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultFloat(float defaultValue) { return nt::SetDefaultFloat(m_handle, defaultValue); @@ -300,7 +300,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultDouble(double defaultValue) { return nt::SetDefaultDouble(m_handle, defaultValue); @@ -310,7 +310,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultString(std::string_view defaultValue) { return nt::SetDefaultString(m_handle, defaultValue); @@ -320,7 +320,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultRaw(std::span defaultValue) { return nt::SetDefaultRaw(m_handle, defaultValue); @@ -330,7 +330,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultBooleanArray(std::span defaultValue) { return nt::SetDefaultBooleanArray(m_handle, defaultValue); @@ -340,7 +340,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultIntegerArray(std::span defaultValue) { return nt::SetDefaultIntegerArray(m_handle, defaultValue); @@ -350,7 +350,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultFloatArray(std::span defaultValue) { return nt::SetDefaultFloatArray(m_handle, defaultValue); @@ -360,7 +360,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultDoubleArray(std::span defaultValue) { return nt::SetDefaultDoubleArray(m_handle, defaultValue); @@ -370,7 +370,7 @@ class NetworkTableEntry final { * Sets the entry's value if it does not exist. * * @param defaultValue the default value to set - * @return False if the entry exists with a different type + * @return True if the entry did not already have a value, otherwise False */ bool SetDefaultStringArray(std::span defaultValue) { return nt::SetDefaultStringArray(m_handle, defaultValue); diff --git a/ntcore/src/main/native/include/ntcore_c.h b/ntcore/src/main/native/include/ntcore_c.h index e918aaafa05..4489b4f3824 100644 --- a/ntcore/src/main/native/include/ntcore_c.h +++ b/ntcore/src/main/native/include/ntcore_c.h @@ -476,8 +476,8 @@ void NT_GetEntryValueType(NT_Entry entry, unsigned int types, /** * Set Default Entry Value. * - * Returns copy of current entry value if it exists. - * Otherwise, sets passed in value, and returns set value. + * Returns 0 if name exists. + * Otherwise, sets passed in value, and returns 1. * Note that one of the type options is "unassigned". * * @param entry entry handle diff --git a/ntcore/src/main/native/include/ntcore_cpp.h b/ntcore/src/main/native/include/ntcore_cpp.h index 226669927c0..b64106ecff7 100644 --- a/ntcore/src/main/native/include/ntcore_cpp.h +++ b/ntcore/src/main/native/include/ntcore_cpp.h @@ -488,8 +488,8 @@ Value GetEntryValue(NT_Handle subentry); /** * Set Default Entry Value * - * Returns copy of current entry value if it exists. - * Otherwise, sets passed in value, and returns set value. + * Returns False if name exists. + * Otherwise, sets passed in value, and returns True. * Note that one of the type options is "unassigned". * * @param entry entry handle diff --git a/wpilibc/src/main/native/include/frc/smartdashboard/SmartDashboard.h b/wpilibc/src/main/native/include/frc/smartdashboard/SmartDashboard.h index 04435f0252c..af76205ab39 100644 --- a/wpilibc/src/main/native/include/frc/smartdashboard/SmartDashboard.h +++ b/wpilibc/src/main/native/include/frc/smartdashboard/SmartDashboard.h @@ -122,10 +122,10 @@ class SmartDashboard { static bool PutBoolean(std::string_view keyName, bool value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist * @param key the key - * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue the value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultBoolean(std::string_view key, bool defaultValue); @@ -135,7 +135,7 @@ class SmartDashboard { * If the key is not found, returns the default value. * * @param keyName the key - * @param defaultValue the default value to set if key doesn't exist + * @param defaultValue the default value to return if key doesn't exist * @return the value */ static bool GetBoolean(std::string_view keyName, bool defaultValue); @@ -153,11 +153,11 @@ class SmartDashboard { static bool PutNumber(std::string_view keyName, double value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key The key. - * @param defaultValue The default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue The value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultNumber(std::string_view key, double defaultValue); @@ -167,7 +167,7 @@ class SmartDashboard { * If the key is not found, returns the default value. * * @param keyName the key - * @param defaultValue the default value to set if the key doesn't exist + * @param defaultValue the default value to return if the key doesn't exist * @return the value */ static double GetNumber(std::string_view keyName, double defaultValue); @@ -185,11 +185,11 @@ class SmartDashboard { static bool PutString(std::string_view keyName, std::string_view value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue the value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultString(std::string_view key, std::string_view defaultValue); @@ -200,7 +200,7 @@ class SmartDashboard { * If the key is not found, returns the default value. * * @param keyName the key - * @param defaultValue the default value to set if the key doesn't exist + * @param defaultValue the default value to return if the key doesn't exist * @return the value */ static std::string GetString(std::string_view keyName, @@ -220,11 +220,11 @@ class SmartDashboard { static bool PutBooleanArray(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue the value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultBooleanArray(std::string_view key, std::span defaultValue); @@ -261,11 +261,11 @@ class SmartDashboard { std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key The key. - * @param defaultValue The default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue The value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultNumberArray(std::string_view key, std::span defaultValue); @@ -298,11 +298,11 @@ class SmartDashboard { std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key The key. - * @param defaultValue The default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue The value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultStringArray(std::string_view key, std::span defaultValue); @@ -334,11 +334,11 @@ class SmartDashboard { static bool PutRaw(std::string_view key, std::span value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key The key. - * @param defaultValue The default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue The value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultRaw(std::string_view key, std::span defaultValue); @@ -374,11 +374,11 @@ class SmartDashboard { static bool PutValue(std::string_view keyName, const nt::Value& value); /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue The default value to set if key doesn't exist. - * @returns False if the table key exists with a different type + * @param defaultValue The value to set if key doesn't exist. + * @returns True if the table key did not already exist, otherwise False */ static bool SetDefaultValue(std::string_view key, const nt::Value& defaultValue); diff --git a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java index 7da170b84ea..81fbaa6c197 100644 --- a/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java +++ b/wpilibj/src/main/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java @@ -196,11 +196,11 @@ public static boolean putBoolean(String key, boolean value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultBoolean(String key, boolean defaultValue) { return getEntry(key).setDefaultBoolean(defaultValue); @@ -231,11 +231,11 @@ public static boolean putNumber(String key, double value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultNumber(String key, double defaultValue) { return getEntry(key).setDefaultDouble(defaultValue); @@ -266,11 +266,11 @@ public static boolean putString(String key, String value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultString(String key, String defaultValue) { return getEntry(key).setDefaultString(defaultValue); @@ -312,22 +312,22 @@ public static boolean putBooleanArray(String key, Boolean[] value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultBooleanArray(String key, boolean[] defaultValue) { return getEntry(key).setDefaultBooleanArray(defaultValue); } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultBooleanArray(String key, Boolean[] defaultValue) { return getEntry(key).setDefaultBooleanArray(defaultValue); @@ -382,22 +382,22 @@ public static boolean putNumberArray(String key, Double[] value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultNumberArray(String key, double[] defaultValue) { return getEntry(key).setDefaultDoubleArray(defaultValue); } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultNumberArray(String key, Double[] defaultValue) { return getEntry(key).setDefaultNumberArray(defaultValue); @@ -441,11 +441,11 @@ public static boolean putStringArray(String key, String[] value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultStringArray(String key, String[] defaultValue) { return getEntry(key).setDefaultStringArray(defaultValue); @@ -476,11 +476,11 @@ public static boolean putRaw(String key, byte[] value) { } /** - * Gets the current value in the table, setting it if it does not exist. + * Set the value in the table if key does not exist. * * @param key the key - * @param defaultValue the default value to set if key does not exist. - * @return False if the table key exists with a different type + * @param defaultValue the value to set if key does not exist + * @return True if the key did not already exist, otherwise False */ public static boolean setDefaultRaw(String key, byte[] defaultValue) { return getEntry(key).setDefaultRaw(defaultValue);