# Class ProblemGroup

java.lang.Object
org.gradle.api.problems.ProblemGroup

@Incubating @Immutable public abstract class ProblemGroup extends Object
Represents a group of problems.

Groups are organized in hierarchy where the parent group should represent the more broad problem group.

Two problem groups are considered equal if their `getName()` and their parents are equal.

Since:
  8.8
See Also:
  - `ProblemId`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `ProblemGroup()`
  Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ProblemGroup`
  `create(String name, String displayName)`
  Creates a new root problem group i.e.
  `static ProblemGroup`
  `create(String name, String displayName, @Nullable ProblemGroup parent)`
  Creates a new problem group.
  `abstract String`
  `getDisplayName()`
  Returns a human-readable label describing the group.
  `abstract String`
  `getName()`
  The name of the problem group.
  `abstract @Nullable ProblemGroup`
  `getParent()`
  Returns the parent group or `null` for root groups.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ProblemGroup

    protected ProblemGroup()
    Constructor.
    Since:
      8.13

- ## Method Details

  - ### getName

    public abstract String getName()
    The name of the problem group.
    Since:
      8.8

  - ### getDisplayName

    public abstract String getDisplayName()
    Returns a human-readable label describing the group.
    Since:
      8.8

  - ### getParent

    public abstract @Nullable ProblemGroup getParent()
    Returns the parent group or `null` for root groups.
    Since:
      8.8

  - ### create

    public static ProblemGroup create(String name, String displayName)
    Creates a new root problem group i.e. a group with no parent.
    Parameters:
      `name` - the name of the group. The convention is to use kebab-case (i.e., lower case with hyphens). Cannot be blank (i.e., `null`, empty string, or only whitespaces).
      `displayName` - the user-friendly display name of the group. Cannot be blank (i.e., `null`, empty string, or only whitespaces).
    Returns:
      the new group
    Since:
      8.13

  - ### create

    public static ProblemGroup create(String name, String displayName, @Nullable ProblemGroup parent)
    Creates a new problem group.
    Parameters:
      `name` - the name of the group. The convention is to use kebab-case (ie lower case with hyphens). Cannot be blank (i.e., `null`, empty string, or only whitespaces).
      `displayName` - the user-friendly display name of the group. Cannot be blank (i.e., `null`, empty string, or only whitespaces).
      `parent` - the parent group. May be `null` for root groups.
    Returns:
      the new group
    Since:
      8.13