@Test public void testIsMetadataUnique() { final String metadataOne = "a_b"; final String metadataTwo = "c_d"; model.addMetadata(new RuleMetadata(metadataOne, "")); model.addMetadata(new RuleMetadata(metadataTwo, "")); assertThat(popup.isMetadataUnique("A_b")).isTrue(); assertThat(popup.isMetadataUnique("a_B")).isTrue(); assertThat(popup.isMetadataUnique("a_b_c")).isTrue(); assertThat(popup.isMetadataUnique("c_D")).isTrue(); assertThat(popup.isMetadataUnique("C_D")).isTrue(); assertThat(popup.isMetadataUnique("a_c_c")).isTrue(); assertThat(popup.isMetadataUnique(metadataOne)).isFalse(); assertThat(popup.isMetadataUnique(metadataTwo)).isFalse(); }
@Override protected boolean isMetadataUnique(final String metadataName) { return Stream.of(model.metadataList) .noneMatch(ruleMetadata -> Objects.equals(metadataName, ruleMetadata.getAttributeName())); }
GuidedRuleAttributeSelectorPopup extends AttributeSelectorPopup { @Override protected boolean isMetadataUnique(final String metadataName) { return Stream.of(model.metadataList) .noneMatch(ruleMetadata -> Objects.equals(metadataName, ruleMetadata.getAttributeName())); } }
GuidedRuleAttributeSelectorPopup extends AttributeSelectorPopup { @Override protected boolean isMetadataUnique(final String metadataName) { return Stream.of(model.metadataList) .noneMatch(ruleMetadata -> Objects.equals(metadataName, ruleMetadata.getAttributeName())); }  }
GuidedRuleAttributeSelectorPopup extends AttributeSelectorPopup { @Override protected boolean isMetadataUnique(final String metadataName) { return Stream.of(model.metadataList) .noneMatch(ruleMetadata -> Objects.equals(metadataName, ruleMetadata.getAttributeName())); }  void init(final RuleModel model,
                     final boolean lockLHS,
                     final boolean lockRHS,
                     final Command refresh); }
GuidedRuleAttributeSelectorPopup extends AttributeSelectorPopup { @Override protected boolean isMetadataUnique(final String metadataName) { return Stream.of(model.metadataList) .noneMatch(ruleMetadata -> Objects.equals(metadataName, ruleMetadata.getAttributeName())); }  void init(final RuleModel model,
                     final boolean lockLHS,
                     final boolean lockRHS,
                     final Command refresh);  }