"

2013 FRC Java API

"

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
Enclosing class:
Preferences

public static class Preferences.ImproperPreferenceKeyException
extends 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.


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

Constructor Detail

Preferences.ImproperPreferenceKeyException

public Preferences.ImproperPreferenceKeyException(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(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(String value)
Returns whether or not the given string is ok to use in the preference table.

Parameters:
value -
Returns:

"

2013 FRC Java API

"

"
For updated information see the Java FRC site
"