Class OneOrNull<T>

  • Type Parameters:
    T - The return Type
    All Implemented Interfaces:
    com.google.common.base.Function<List<T>,​T>, Function<List<T>,​T>

    public class OneOrNull<T>
    extends Object
    implements com.google.common.base.Function<List<T>,​T>
    A Function which returns one entry from a List or null
    Author:
    Jeremy Unruh
    • Constructor Detail

      • OneOrNull

        public OneOrNull()
    • Method Detail

      • create

        public static <T> OneOrNull<T> create()
      • apply

        public T apply​(List<T> input)
        Specified by:
        apply in interface com.google.common.base.Function<List<T>,​T>
        Specified by:
        apply in interface Function<List<T>,​T>