001///////////////////////////////////////////////////////////////////////////////////////////////
002// checkstyle: Checks Java source code and other text files for adherence to a set of rules.
003// Copyright (C) 2001-2024 the original author or authors.
004//
005// This library is free software; you can redistribute it and/or
006// modify it under the terms of the GNU Lesser General Public
007// License as published by the Free Software Foundation; either
008// version 2.1 of the License, or (at your option) any later version.
009//
010// This library is distributed in the hope that it will be useful,
011// but WITHOUT ANY WARRANTY; without even the implied warranty of
012// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
013// Lesser General Public License for more details.
014//
015// You should have received a copy of the GNU Lesser General Public
016// License along with this library; if not, write to the Free Software
017// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
018///////////////////////////////////////////////////////////////////////////////////////////////
019
020package com.puppycrawl.tools.checkstyle.checks.javadoc;
021
022import java.util.Collection;
023import java.util.List;
024
025/**
026 * Value object for combining the list of valid validTags with information
027 * about invalid validTags encountered in a certain Javadoc comment.
028 */
029public final class JavadocTags {
030
031    /** Valid validTags. */
032    private final List<JavadocTag> validTags;
033    /** Invalid validTags. */
034    private final List<InvalidJavadocTag> invalidTags;
035
036    /**
037     * Creates an instance.
038     *
039     * @param tags valid tags
040     * @param invalidTags invalid tags
041     */
042    public JavadocTags(Collection<JavadocTag> tags, Collection<InvalidJavadocTag> invalidTags) {
043        validTags = List.copyOf(tags);
044        this.invalidTags = List.copyOf(invalidTags);
045    }
046
047    /**
048     *  Getter for validTags field.
049     *
050     *  @return validTags field
051     */
052    public List<JavadocTag> getValidTags() {
053        return validTags;
054    }
055
056    /**
057     *  Getter for invalidTags field.
058     *
059     *  @return invalidTags field
060     */
061    public List<InvalidJavadocTag> getInvalidTags() {
062        return invalidTags;
063    }
064
065}