Code example for Predicate

Methods: apply

0
  public ErraiPropertyScanner(final Predicate<String> predicate) {
    this.predicate = predicate;
  } 
 
  public boolean acceptsInput(final String file) {
    return predicate.apply(file);
  } 
 
  public void scan(final Vfs.File file) {
    try { 
      final Properties properties = new Properties();
      properties.load(file.openInputStream());
 
      final Multimap<String, String> store = getStore();
      for (final Map.Entry<Object, Object> entry : properties.entrySet()) {
        store.put((String) entry.getKey(), (String) entry.getValue());
      } 
    } 
    catch (IOException e) {
      throw new RuntimeException("Failed to load properties: " + file.getFullPath(), e);
Experience pair programming with AI  Get Codota for Java