Class EitherTypeAdapter.ListChecker

  • All Implemented Interfaces:
    java.util.function.Predicate<com.google.gson.JsonElement>
    Enclosing class:
    EitherTypeAdapter<L,​R>

    public static class EitherTypeAdapter.ListChecker
    extends java.lang.Object
    implements java.util.function.Predicate<com.google.gson.JsonElement>
    A predicate for the case that a type alternative is a list.
    • Constructor Summary

      Constructors 
      Constructor Description
      ListChecker​(java.util.function.Predicate<com.google.gson.JsonElement> elementChecker)  
      ListChecker​(java.util.function.Predicate<com.google.gson.JsonElement> elementChecker, boolean resultIfEmpty)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean test​(com.google.gson.JsonElement t)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or
    • Constructor Detail

      • ListChecker

        public ListChecker​(java.util.function.Predicate<com.google.gson.JsonElement> elementChecker)
      • ListChecker

        public ListChecker​(java.util.function.Predicate<com.google.gson.JsonElement> elementChecker,
                           boolean resultIfEmpty)
    • Method Detail

      • test

        public boolean test​(com.google.gson.JsonElement t)
        Specified by:
        test in interface java.util.function.Predicate<com.google.gson.JsonElement>