public boolean hasSuperType(String typeName) { return hasSuperType(superTypes, typeName); }
public boolean hasSuperType(String typeName) { return hasSuperType(superTypes, typeName); }
public void addSuperType(String typeName) { Set<String> s = this.superTypes; if (!hasSuperType(s, typeName)) { s = new HashSet<>(s); s.add(typeName); this.superTypes = s; } }
public void removeSuperType(String typeName) { Set<String> s = this.superTypes; if (hasSuperType(s, typeName)) { s = new HashSet<>(s); s.remove(typeName); this.superTypes = s; } }
public void addSuperType(String typeName) { Set<String> s = this.superTypes; if (!hasSuperType(s, typeName)) { s = new HashSet<>(s); s.add(typeName); this.superTypes = s; } }
public void removeSuperType(String typeName) { Set<String> s = this.superTypes; if (hasSuperType(s, typeName)) { s = new HashSet<>(s); s.remove(typeName); this.superTypes = s; } }
@Test public void testClassificationDefHasSuperTypeWithNoSuperType() { AtlasClassificationDef classificationDef = ModelTestUtil.getClassificationDef(); for (String superType : classificationDef.getSuperTypes()) { assertTrue(classificationDef.hasSuperType(superType)); } assertFalse(classificationDef.hasSuperType("01234-xyzabc-;''-)(")); }
@Test public void testClassificationDefHasSuperTypeWithSuperType() { AtlasClassificationDef classificationDef = ModelTestUtil.getClassificationDefWithSuperTypes(); for (String superType : classificationDef.getSuperTypes()) { assertTrue(classificationDef.hasSuperType(superType)); } assertFalse(classificationDef.hasSuperType("01234-xyzabc-;''-)(")); } }
@Test public void testClassificationDefHasSuperTypeWithNoSuperType() { AtlasClassificationDef classificationDef = ModelTestUtil.getClassificationDef(); for (String superType : classificationDef.getSuperTypes()) { assertTrue(classificationDef.hasSuperType(superType)); } assertFalse(classificationDef.hasSuperType("01234-xyzabc-;''-)(")); }
@Test public void testClassificationDefHasSuperTypeWithSuperType() { AtlasClassificationDef classificationDef = ModelTestUtil.getClassificationDefWithSuperTypes(); for (String superType : classificationDef.getSuperTypes()) { assertTrue(classificationDef.hasSuperType(superType)); } assertFalse(classificationDef.hasSuperType("01234-xyzabc-;''-)(")); } }