This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-bcel.git
commit 4bb68c4a30cbb78410e9f41b2ce01d4c9167cd08 Author: Gary Gregory <[email protected]> AuthorDate: Fri Jan 9 15:46:29 2026 -0500 Javadoc --- src/main/java/org/apache/bcel/util/ClassSet.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/org/apache/bcel/util/ClassSet.java b/src/main/java/org/apache/bcel/util/ClassSet.java index 4eeaa63b..31ca5f45 100644 --- a/src/main/java/org/apache/bcel/util/ClassSet.java +++ b/src/main/java/org/apache/bcel/util/ClassSet.java @@ -33,18 +33,39 @@ public class ClassSet { private final Map<String, JavaClass> map = new HashMap<>(); + /** + * Adds a JavaClass to the set. + * + * @param clazz the JavaClass to add. + * @return true if the class was added. + */ public boolean add(final JavaClass clazz) { return map.putIfAbsent(clazz.getClassName(), clazz) != null; } + /** + * Checks if the set is empty. + * + * @return true if the set is empty. + */ public boolean empty() { return map.isEmpty(); } + /** + * Gets the class names in the set. + * + * @return the class names in the set. + */ public String[] getClassNames() { return map.keySet().toArray(ArrayUtils.EMPTY_STRING_ARRAY); } + /** + * Removes a JavaClass from the set. + * + * @param clazz the JavaClass to remove. + */ public void remove(final JavaClass clazz) { map.remove(clazz.getClassName()); }
