private static Collection<String> categoriesFromNode(final DiffNode node) { return node.getCategories(); }
@SuppressWarnings({"TypeMayBeWeakened"}) private boolean isExcluded(final DiffNode node) { return Collections.containsAny(node.getCategories(), exclude); }
@SuppressWarnings({"TypeMayBeWeakened"}) private boolean isIncluded(final DiffNode node) { return Collections.containsAny(node.getCategories(), include); }
/** * Returns an unmodifiable {@link java.util.Set} of {@link java.lang.String} with the categories of this node. * * @return an unmodifiable {@link java.util.Set} of {@link java.lang.String} with the categories of this node */ public final Set<String> getCategories() { final Set<String> categories = new TreeSet<String>(); if (parentNode != null) { categories.addAll(parentNode.getCategories()); } if (accessor instanceof CategoryAware) { final Set<String> categoriesFromAccessor = ((CategoryAware) accessor).getCategoriesFromAnnotation(); if (categoriesFromAccessor != null) { categories.addAll(categoriesFromAccessor); } } categories.addAll(additionalCategories); return unmodifiableSet(categories); }
if (!getCategories().isEmpty()) sb.append(", categorized as ").append(getCategories());
private static Collection<String> categoriesFromNode(final DiffNode node) { return node.getCategories(); }
@SuppressWarnings({"TypeMayBeWeakened"}) private boolean isIncluded(final DiffNode node) { return Collections.containsAny(node.getCategories(), include); }
@SuppressWarnings({"TypeMayBeWeakened"}) private boolean isExcluded(final DiffNode node) { return Collections.containsAny(node.getCategories(), exclude); }
/** * Returns an unmodifiable {@link java.util.Set} of {@link java.lang.String} with the categories of this node. * * @return an unmodifiable {@link java.util.Set} of {@link java.lang.String} with the categories of this node */ public final Set<String> getCategories() { final Set<String> categories = new TreeSet<String>(); if (parentNode != null) { categories.addAll(parentNode.getCategories()); } if (accessor instanceof CategoryAware) { final Set<String> categoriesFromAccessor = ((CategoryAware) accessor).getCategoriesFromAnnotation(); if (categoriesFromAccessor != null) { categories.addAll(categoriesFromAccessor); } } categories.addAll(additionalCategories); return unmodifiableSet(categories); }
if (!getCategories().isEmpty()) sb.append(", categorized as ").append(getCategories());