GlobPattern implements RestrictionPattern { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof GlobPattern) { GlobPattern other = (GlobPattern) obj; return path.equals(other.path) && restriction.equals(other.restriction); } return false; } private  GlobPattern(@NotNull String path, @NotNull String restriction); @Override boolean matches(@NotNull Tree tree, @Nullable PropertyState property); @Override boolean matches(@NotNull String path); @Override boolean matches(); @Override int hashCode(); @Override String toString(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { GlobPattern pattern = GlobPattern.create("/a/b/c/d", "/*"); assertEquals(pattern, pattern); assertEquals(pattern, GlobPattern.create("/a/b/c/d", "/*")); }