edu.wpi.first.wpilibj
Class Preferences.ImproperPreferenceKeyException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by edu.wpi.first.wpilibj.Preferences.ImproperPreferenceKeyException
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
Preferences

public static class Preferences.ImproperPreferenceKeyException
extends java.lang.RuntimeException

Should be thrown if a string can not be used as a key in the preferences file. This happens if the string contains a new line, a space, a tab, or an equals sign.

See Also:
Serialized Form

Constructor Summary
Preferences.ImproperPreferenceKeyException(java.lang.String value, char letter)
          Instantiates an exception with a descriptive message based on the input.
 
Method Summary
static void confirmString(java.lang.String value)
          Tests if the given string is ok to use as a key in the preference table.
static boolean isAcceptable(java.lang.String value)
          Returns whether or not the given string is ok to use in the preference table.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Preferences.ImproperPreferenceKeyException

public Preferences.ImproperPreferenceKeyException(java.lang.String value,
                                                  char letter)
Instantiates an exception with a descriptive message based on the input.

Parameters:
value - the illegal key
letter - the specific character that made it illegal
Method Detail

confirmString

public static void confirmString(java.lang.String value)
Tests if the given string is ok to use as a key in the preference table. If not, then a Preferences.ImproperPreferenceKeyException will be thrown.

Parameters:
value - the value to test

isAcceptable

public static boolean isAcceptable(java.lang.String value)
Returns whether or not the given string is ok to use in the preference table.

Parameters:
value -
Returns: