test_class.declarator: preferences
test_class.modifier: private
test_class.original_string: private Preferences preferences;
test_class.type: Preferences
test_class.var_name: preferences
test_class.file: api/src/test/java/edu/wpi/first/shuffleboard/api/util/PreferencesUtilsTest.java
test_class.identifier: PreferencesUtilsTest
test_case.body: @Test
    public void testReadWhenSavedValueIsWrongType() {
      // given
      int initialValue = 10;
      IntegerProperty property = new SimpleIntegerProperty(null, "value", initialValue);
      preferences.putBoolean("value", false);
  
      // when
      PreferencesUtils.read(property, preferences);
  
      // then
      assertEquals(initialValue, property.getValue().intValue());
    }
test_case.class_method_signature: PreferencesUtilsTest.testReadWhenSavedValueIsWrongType()
test_case.full_signature: @Test public void testReadWhenSavedValueIsWrongType()
test_case.identifier: testReadWhenSavedValueIsWrongType
test_case.invocations: putBoolean read assertEquals intValue getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadWhenSavedValueIsWrongType()
focal_class.file: api/src/main/java/edu/wpi/first/shuffleboard/api/util/PreferencesUtils.java
focal_class.identifier: PreferencesUtils
focal_class.class_method_signature: PreferencesUtils.PreferencesUtils()
focal_class.full_signature: private  PreferencesUtils()
focal_class.identifier: PreferencesUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PreferencesUtils()
focal_class.class_method_signature: PreferencesUtils.save(Property<? extends T> property,
                                Preferences preferences,
                                Function<? super T, String> serializer)
focal_class.full_signature: public static void save(Property<? extends T> property,
                                Preferences preferences,
                                Function<? super T, String> serializer)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (Property<? extends T> property,
                                Preferences preferences,
                                Function<? super T, String> serializer)
focal_class.return: void
focal_class.signature: void save(Property<? extends T> property,
                                Preferences preferences,
                                Function<? super T, String> serializer)
focal_class.class_method_signature: PreferencesUtils.save(IntegerProperty property, Preferences preferences)
focal_class.full_signature: public static void save(IntegerProperty property, Preferences preferences)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (IntegerProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void save(IntegerProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.save(LongProperty property, Preferences preferences)
focal_class.full_signature: public static void save(LongProperty property, Preferences preferences)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (LongProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void save(LongProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.save(DoubleProperty property, Preferences preferences)
focal_class.full_signature: public static void save(DoubleProperty property, Preferences preferences)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (DoubleProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void save(DoubleProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.save(BooleanProperty property, Preferences preferences)
focal_class.full_signature: public static void save(BooleanProperty property, Preferences preferences)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (BooleanProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void save(BooleanProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.save(StringProperty property, Preferences preferences)
focal_class.full_signature: public static void save(StringProperty property, Preferences preferences)
focal_class.identifier: save
focal_class.modifiers: public static
focal_class.parameters: (StringProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void save(StringProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_class.full_signature: public static void read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_class.return: void
focal_class.signature: void read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_class.class_method_signature: PreferencesUtils.read(IntegerProperty property, Preferences preferences)
focal_class.full_signature: public static void read(IntegerProperty property, Preferences preferences)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (IntegerProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void read(IntegerProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.read(LongProperty property, Preferences preferences)
focal_class.full_signature: public static void read(LongProperty property, Preferences preferences)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (LongProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void read(LongProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.read(DoubleProperty property, Preferences preferences)
focal_class.full_signature: public static void read(DoubleProperty property, Preferences preferences)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (DoubleProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void read(DoubleProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.read(BooleanProperty property, Preferences preferences)
focal_class.full_signature: public static void read(BooleanProperty property, Preferences preferences)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (BooleanProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void read(BooleanProperty property, Preferences preferences)
focal_class.class_method_signature: PreferencesUtils.read(StringProperty property, Preferences preferences)
focal_class.full_signature: public static void read(StringProperty property, Preferences preferences)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (StringProperty property, Preferences preferences)
focal_class.return: void
focal_class.signature: void read(StringProperty property, Preferences preferences)
focal_method.body: public static <T> void read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser) {
      String name = property.getName();
  
      String saved = preferences.get(name, null);
      if (saved != null) {
        try {
          property.setValue(parser.apply(saved));
        } catch (Exception ignore) { // NOPMD empty catch block
          // The saved value probably wasn't the expected type
          // No need to bubble the exception up
        }
      }
    }
focal_method.class_method_signature: PreferencesUtils.read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_method.full_signature: public static void read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_method.identifier: read
focal_method.invocations: getName get setValue apply
focal_method.modifiers: public static
focal_method.parameters: (Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)
focal_method.return: void
focal_method.signature: void read(Property<? super T> property,
                                Preferences preferences,
                                Function<String, ? extends T> parser)