@Test public void basics() throws IOException { ValueFilterGlob filter = Configs.decodeObject(ValueFilterGlob.class, "pattern = \"tr?an{g,z}l*\""); assertNotNull(filter.filter("triangles")); assertNotNull(filter.filter("tryanzl")); assertNull(filter.filter("rectangles")); assertNull(filter.filter((String) null)); }
@Override @Nullable public String filter(String sv) { if (sv == null) { return null; } if (compiled.matches(Paths.get(sv))) { return sv; } else { return null; } }
ValueFilterGlob extends StringFilter { @Override @Nullable public String filter(String sv) { if (sv == null) { return null; } if (compiled.matches(Paths.get(sv))) { return sv; } else { return null; } } }
ValueFilterGlob extends StringFilter { @Override @Nullable public String filter(String sv) { if (sv == null) { return null; } if (compiled.matches(Paths.get(sv))) { return sv; } else { return null; } } ValueFilterGlob(@JsonProperty(value = "pattern", required = true) String pattern); }
ValueFilterGlob extends StringFilter { @Override @Nullable public String filter(String sv) { if (sv == null) { return null; } if (compiled.matches(Paths.get(sv))) { return sv; } else { return null; } } ValueFilterGlob(@JsonProperty(value = "pattern", required = true) String pattern); @Override @Nullable String filter(String sv); }
ValueFilterGlob extends StringFilter { @Override @Nullable public String filter(String sv) { if (sv == null) { return null; } if (compiled.matches(Paths.get(sv))) { return sv; } else { return null; } } ValueFilterGlob(@JsonProperty(value = "pattern", required = true) String pattern); @Override @Nullable String filter(String sv);  }