Class OptimizedStaticContainsFunction

  • All Implemented Interfaces:
    Callable, Function

    public class OptimizedStaticContainsFunction
    extends AbstractFunction
    An optimized version of contains(a, b) which is used when b is an array literal with a large number of values, so that a linear search becomes a performance drag.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Set<com.fasterxml.jackson.databind.JsonNode> values  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.JsonNode call​(com.fasterxml.jackson.databind.JsonNode input, com.fasterxml.jackson.databind.JsonNode[] arguments)
      Perform the function on the given JSON input with the given arguments.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • values

        private java.util.Set<com.fasterxml.jackson.databind.JsonNode> values
    • Constructor Detail

      • OptimizedStaticContainsFunction

        public OptimizedStaticContainsFunction​(com.fasterxml.jackson.databind.JsonNode array)
    • Method Detail

      • call

        public com.fasterxml.jackson.databind.JsonNode call​(com.fasterxml.jackson.databind.JsonNode input,
                                                            com.fasterxml.jackson.databind.JsonNode[] arguments)
        Description copied from interface: Function
        Perform the function on the given JSON input with the given arguments.