001/*
002 * SPDX-FileCopyrightText: none
003 * SPDX-License-Identifier: CC0-1.0
004 */
005
006package dev.metaschema.oscal.lib.model.control.catalog;
007
008import java.util.List;
009
010import dev.metaschema.oscal.lib.model.CatalogGroup;
011import edu.umd.cs.findbugs.annotations.NonNull;
012
013public interface IGroupContainer extends IControlContainer {
014
015  List<CatalogGroup> getGroups();
016
017  /**
018   * Add a new {@link CatalogGroup} item to the end of the underlying collection.
019   *
020   * @param item
021   *          the item to add
022   * @return {@code true}
023   */
024  boolean addGroup(@NonNull CatalogGroup item);
025
026  /**
027   * Remove the first matching {@link CatalogGroup} item from the underlying
028   * collection.
029   *
030   * @param item
031   *          the item to remove
032   * @return {@code true} if the item was removed or {@code false} otherwise
033   */
034  boolean removeGroup(@NonNull CatalogGroup item);
035}