Interface OptionalMultiValues<V>

  • Type Parameters:
    V - The generic value
    All Superinterfaces:
    java.lang.Iterable<java.lang.CharSequence>, OptionalValues<java.util.List<V>>

    public interface OptionalMultiValues<V>
    extends OptionalValues<java.util.List<V>>
    An OptionalValues that for each key features an Optional List of values.
    Since:
    1.0
    • Method Detail

      • getFirst

        default java.util.Optional<V> getFirst​(java.lang.CharSequence name)
        Retrieve a value if it is present.
        Parameters:
        name - The name of the value
        Returns:
        An Optional of the value
      • of

        static <T> OptionalMultiValues<T> of​(java.util.Map<java.lang.CharSequence,​java.util.List<T>> values)
        Creates a new OptionalValues for the given type and values.
        Type Parameters:
        T - The target generic type
        Parameters:
        values - A map of values
        Returns:
        The values