public boolean evaluate(final LoggingEvent event, Map matches) {
    long first = 0;
      try {
          first = new Long(RESOLVER.getValue(field, event).toString()).longValue();
    } catch (NumberFormatException nfe) {
      return false;
    }

    long second = 0;

    try {
      second = new Long(value).longValue();
    } catch (NumberFormatException nfe) {
      return false;
    }

    boolean result = false;

    if ("<".equals(inequalitySymbol)) {
      result = first < second;
    } else if (">".equals(inequalitySymbol)) {
      result = first > second;
    } else if ("<=".equals(inequalitySymbol)) {
      result = first <= second;
    } else if (">=".equals(inequalitySymbol)) {
      result = first >= second;
    }
    if (result && matches != null) {
        Set entries = (Set) matches.get(field.toUpperCase());
        if (entries == null) {
            entries = new HashSet();
            matches.put(field.toUpperCase(), entries);
        }
        entries.add(String.valueOf(first));
    }
    return result;
  }
public boolean evaluate ( final LoggingEvent event , Map matches ) { long first = 0 ; try { first = new Long ( RESOLVER . getValue ( field , event ) . toString ( ) ) . longValue ( ) ; } catch ( NumberFormatException nfe ) { return false ; } long second = 0 ; try { second = new Long ( value ) . longValue ( ) ; } catch ( NumberFormatException nfe ) { return false ; } boolean result = false ; if ( "<" . equals ( inequalitySymbol ) ) { result = first < second ; } else if ( ">" . equals ( inequalitySymbol ) ) { result = first > second ; } else if ( "<=" . equals ( inequalitySymbol ) ) { result = first <= second ; } else if ( ">=" . equals ( inequalitySymbol ) ) { result = first >= second ; } if ( result && matches != null ) { Set entries = ( Set ) matches . get ( field . toUpperCase ( ) ) ; if ( entries == null ) { entries = new HashSet ( ) ; matches . put ( field . toUpperCase ( ) , entries ) ; } entries . add ( String . valueOf ( first ) ) ; } return result ; }
{@inheritDoc}