void addValue(V value, boolean highPrecedence, @Nullable Comparator<V> comparator) {
            final List<V> values;
            if (highPrecedence) {
                if (valuesWithHighPrecedence == null) {
                    valuesWithHighPrecedence = new ArrayList<>(4);
                }
                values = valuesWithHighPrecedence;
            } else {
                if (valuesWithLowPrecedence == null) {
                    valuesWithLowPrecedence = new ArrayList<>(4);
                }
                values = valuesWithLowPrecedence;
            }

            values.add(value);

            // Sort the values using the given comparator.
            if (comparator != null && values.size() > 1) {
                values.sort(comparator);
            }
        }
Attaches a given {@code value} to the value list. If the list is not empty
the {@code value} is added, and sorted by the given {@link Comparator}.
core/src/main/java/com/linecorp/armeria/server/RoutingTrieBuilder.java