protected boolean matches(KeyIn key) { if (partitionKeys == null && predicate == null) { return true; } if (partitionKeys != null && partitionKeys.length > 0) { for (Object matcher : partitionKeys) { if (key == matcher || key.equals(matcher)) { return true; } } } return predicate != null && predicate.evaluate(key); }
protected boolean matches(KeyIn key) { if (partitionKeys == null && predicate == null) { return true; } if (partitionKeys != null && partitionKeys.length > 0) { for (Object matcher : partitionKeys) { if (key == matcher || key.equals(matcher)) { return true; } } } return predicate != null && predicate.evaluate(key); }
@Override public ValueOut apply(Map.Entry<KeyIn, ValueIn> entry) { if (keyPredicate.evaluate(entry.getKey())) { ValueIn value = entry.getValue(); return chainedSupplier != null ? chainedSupplier.apply(entry) : (ValueOut) value; } return null; }
@Override public ValueOut apply(Map.Entry<KeyIn, ValueIn> entry) { if (keyPredicate.evaluate(entry.getKey())) { ValueIn value = entry.getValue(); return chainedSupplier != null ? chainedSupplier.apply(entry) : (ValueOut) value; } return null; }
protected void prepareKeyPredicate() { if (predicate == null) { return; } if (keyValueSource.isAllKeysSupported()) { Collection<KeyIn> allKeys = keyValueSource.getAllKeys(); for (KeyIn key : allKeys) { if (predicate.evaluate(key)) { if (this.keys == null) { this.keys = new HashSet<KeyIn>(); } this.keys.add(key); } } } }
protected void prepareKeyPredicate() { if (predicate == null) { return; } if (keyValueSource.isAllKeysSupported()) { Collection<KeyIn> allKeys = keyValueSource.getAllKeys(); for (KeyIn key : allKeys) { if (predicate.evaluate(key)) { if (this.keys == null) { this.keys = new HashSet<KeyIn>(); } this.keys.add(key); } } } }