Code example for Collection

Methods: contains, isEmpty

0
   } 
 
   @Override 
   protected Collection<ArtifactType> checkInput(Collection<ArtifactType> input) throws OseeCoreException {
      Collection<ArtifactType> toReturn = Collections.emptyList();
      if (input == null || input.isEmpty()) {
         if (!baseType.equals(CoreArtifactTypes.Artifact)) {
            throw new OseeInvalidInheritanceException( 
               "All artifacts must inherit from [Artifact] - attempted make [%s] have null inheritance", baseType);
         } 
      } else { 
         if (input.contains(baseType)) {
            throw new OseeInvalidInheritanceException("Circular inheritance detected for artifact type [%s]", baseType);
         } 
         toReturn = input;
      } 
      return toReturn;
   } 
}