java.lang.Object
org.gvsig.expressionevaluator.spi.AbstractFunction
org.gvsig.expressionevaluator.impl.function.operator.AbstractBinaryOperator
org.gvsig.expressionevaluator.impl.function.predicate.LikeOperator
All Implemented Interfaces:
org.gvsig.expressionevaluator.Function, BinaryOperator, Operator

public class LikeOperator extends AbstractBinaryOperator
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final Integer
     
    protected static Map<String,Pattern>
     
    protected static final Integer
     

    Fields inherited from class org.gvsig.expressionevaluator.spi.AbstractFunction

    LOGGER, TYPE_BIGDECIMAL, TYPE_BOOLEAN, TYPE_DATE, TYPE_DOUBLE, TYPE_FLOAT, TYPE_INT, TYPE_LONG, TYPE_NULL, TYPE_STRING

    Fields inherited from interface org.gvsig.expressionevaluator.Function

    GROUP_AGGREGATE, GROUP_BOOLEAN, GROUP_CONVERSION, GROUP_DATETIME, GROUP_NUMERIC, GROUP_OGC, GROUP_OTHER, GROUP_PROGRAMMING, GROUP_STRING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    call(org.gvsig.expressionevaluator.Interpreter interpreter, Object op1, Object op2)
     
    protected static List<Object>
    compile(String pattern)
     
    static boolean
    like(String source, String match)
     
    static String
    toRegExp(List<Object> pattern)
     

    Methods inherited from class org.gvsig.expressionevaluator.impl.function.operator.AbstractBinaryOperator

    call, isOperator

    Methods inherited from class org.gvsig.expressionevaluator.spi.AbstractFunction

    addAlias, aliases, argc, call, checkDoubleValue, checkFloatValue, description, descriptionArgs, getBigDecimal, getBoolean, getBoolean, getBoolean, getBoolean, getBoolean, getComparable, getComparable, getDate, getDate, getDouble, getDouble, getFile, getFile, getFloat, getFloat, getFullDescription, getInt, getInt, getInt, getJsonArray, getJsonArray, getJsonObject, getJsonObject, getJsonStructure, getJsonStructure, getList, getLocalDateTime, getLocalDateTime, getLong, getLong, getObject, getObject, getStr, getStr, getType, getURL, group, isHidden, isNull, isSQLCompatible, name, returnType, setDescription, setDescriptionArgs, setReturnType, setTemplate, template, toBoolean, toString, toString, toValue, useArgumentsInsteadObjects

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gvsig.expressionevaluator.Function

    addAlias, aliases, argc, call, description, descriptionArgs, getFullDescription, group, isHidden, isSQLCompatible, name, returnType, template, toString, toValue, useArgumentsInsteadObjects
  • Field Details

    • ZERO_OR_MORE_CHARS

      protected static final Integer ZERO_OR_MORE_CHARS
    • ONE_CHAR

      protected static final Integer ONE_CHAR
    • patterns

      protected static Map<String,Pattern> patterns
  • Constructor Details

    • LikeOperator

      public LikeOperator()
  • Method Details

    • allowConstantFolding

      public boolean allowConstantFolding()
      Specified by:
      allowConstantFolding in interface org.gvsig.expressionevaluator.Function
      Overrides:
      allowConstantFolding in class org.gvsig.expressionevaluator.spi.AbstractFunction
    • call

      public Object call(org.gvsig.expressionevaluator.Interpreter interpreter, Object op1, Object op2)
    • like

      public static boolean like(String source, String match)
    • compile

      protected static List<Object> compile(String pattern)
    • toRegExp

      public static String toRegExp(List<Object> pattern)