test_class.file: api/src/test/java/edu/wpi/first/shuffleboard/api/util/PropertyUtilsTest.java
test_class.identifier: PropertyUtilsTest
test_class.superclass: extends UtilityClassTest<PropertyUtils>
test_case.body: @Test
    @SuppressWarnings("LocalVariableName")
    public void testCombineLists() {
      ObservableList<String> a = FXCollections.observableArrayList("a");
      ObservableList<String> b = FXCollections.observableArrayList("b");
      ObservableList<String> combine = PropertyUtils.combineLists(a, b);
      assertEquals(2, combine.size());
      assertEquals(a.get(0), combine.get(0));
      assertEquals(b.get(0), combine.get(1));
    }
test_case.class_method_signature: PropertyUtilsTest.testCombineLists()
test_case.full_signature: @Test @SuppressWarnings("LocalVariableName") public void testCombineLists()
test_case.identifier: testCombineLists
test_case.invocations: observableArrayList observableArrayList combineLists assertEquals size assertEquals get get assertEquals get get
test_case.modifiers: @Test @SuppressWarnings("LocalVariableName") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCombineLists()
focal_class.declarator: bindings = new WeakHashMap<>()
focal_class.modifier: private static final
focal_class.original_string: private static final Map<Property, Binding> bindings = new WeakHashMap<>();
focal_class.type: Map<Property, Binding>
focal_class.var_name: bindings
focal_class.file: api/src/main/java/edu/wpi/first/shuffleboard/api/util/PropertyUtils.java
focal_class.identifier: PropertyUtils
focal_class.class_method_signature: PropertyUtils.PropertyUtils()
focal_class.full_signature: private  PropertyUtils()
focal_class.identifier: PropertyUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  PropertyUtils()
focal_class.class_method_signature: PropertyUtils.bindBidirectionalWithConverter(
        Property<T> sourceProperty,
        Property<U> bindingTarget,
        Function<? super T, ? extends U> t2uConverter,
        Function<? super U, ? extends T> u2tConverter)
focal_class.full_signature: public static void bindBidirectionalWithConverter(
        Property<T> sourceProperty,
        Property<U> bindingTarget,
        Function<? super T, ? extends U> t2uConverter,
        Function<? super U, ? extends T> u2tConverter)
focal_class.identifier: bindBidirectionalWithConverter
focal_class.modifiers: public static
focal_class.parameters: (
        Property<T> sourceProperty,
        Property<U> bindingTarget,
        Function<? super T, ? extends U> t2uConverter,
        Function<? super U, ? extends T> u2tConverter)
focal_class.return: void
focal_class.signature: void bindBidirectionalWithConverter(
        Property<T> sourceProperty,
        Property<U> bindingTarget,
        Function<? super T, ? extends U> t2uConverter,
        Function<? super U, ? extends T> u2tConverter)
focal_class.class_method_signature: PropertyUtils.bindWithConverter(
        Property<T> firstProperty,
        Property<U> secondProperty,
        Function<U, T> u2tConverter)
focal_class.full_signature: public static void bindWithConverter(
        Property<T> firstProperty,
        Property<U> secondProperty,
        Function<U, T> u2tConverter)
focal_class.identifier: bindWithConverter
focal_class.modifiers: public static
focal_class.parameters: (
        Property<T> firstProperty,
        Property<U> secondProperty,
        Function<U, T> u2tConverter)
focal_class.return: void
focal_class.signature: void bindWithConverter(
        Property<T> firstProperty,
        Property<U> secondProperty,
        Function<U, T> u2tConverter)
focal_class.class_method_signature: PropertyUtils.bindToMapBidirectionally(Property<T> property,
                                                                    ObservableMap<K, V> map,
                                                                    K key,
                                                                    Function<V, T> v2t)
focal_class.full_signature: public static void bindToMapBidirectionally(Property<T> property,
                                                                    ObservableMap<K, V> map,
                                                                    K key,
                                                                    Function<V, T> v2t)
focal_class.identifier: bindToMapBidirectionally
focal_class.modifiers: public static
focal_class.parameters: (Property<T> property,
                                                                    ObservableMap<K, V> map,
                                                                    K key,
                                                                    Function<V, T> v2t)
focal_class.return: void
focal_class.signature: void bindToMapBidirectionally(Property<T> property,
                                                                    ObservableMap<K, V> map,
                                                                    K key,
                                                                    Function<V, T> v2t)
focal_class.class_method_signature: PropertyUtils.combineLists(ObservableList<T> first, ObservableList<T> second)
focal_class.full_signature: public static ObservableList<T> combineLists(ObservableList<T> first, ObservableList<T> second)
focal_class.identifier: combineLists
focal_class.modifiers: public static
focal_class.parameters: (ObservableList<T> first, ObservableList<T> second)
focal_class.return: ObservableList<T>
focal_class.signature: ObservableList<T> combineLists(ObservableList<T> first, ObservableList<T> second)
focal_method.body: public static <T> ObservableList<T> combineLists(ObservableList<T> first, ObservableList<T> second) {
      ObservableList<T> combine = FXCollections.observableArrayList();
      ListChangeListener<? super T> listener = c -> {
        while (c.next()) {
          if (c.wasAdded()) {
            combine.addAll(c.getAddedSubList());
          } else if (c.wasRemoved()) {
            // Only remove the actual elements that were removed from the list
            // Otherwise all instances of an element would be removed, which is not the desired behavior
            c.getRemoved().forEach(e -> combine.removeIf(t -> e == t));
          }
        }
      };
      combine.addAll(first);
      combine.addAll(second);
      first.addListener(listener);
      second.addListener(listener);
      return combine;
    }
focal_method.class_method_signature: PropertyUtils.combineLists(ObservableList<T> first, ObservableList<T> second)
focal_method.full_signature: public static ObservableList<T> combineLists(ObservableList<T> first, ObservableList<T> second)
focal_method.identifier: combineLists
focal_method.invocations: observableArrayList next wasAdded addAll getAddedSubList wasRemoved forEach getRemoved removeIf addAll addAll addListener addListener
focal_method.modifiers: public static
focal_method.parameters: (ObservableList<T> first, ObservableList<T> second)
focal_method.return: ObservableList<T>
focal_method.signature: ObservableList<T> combineLists(ObservableList<T> first, ObservableList<T> second)