Package cdc.issues

Class Issue.Builder

    • Constructor Detail

      • Builder

        protected Builder()
    • Method Detail

      • timestamp

        public Issue.Builder timestamp​(Instant timestamp)
        Sets the issue timestamp.

        WARNING: this should only be used to reconstruct an issue -from a file, stream, ...).

        Parameters:
        timestamp - The timestamp.
        Returns:
        This builder.
      • ruleId

        public Issue.Builder ruleId​(RuleId ruleId)
        Sets the issue RuleId.

        This is equivalent to setting its domain and name.

        Parameters:
        ruleId - The rule id.
        Returns:
        This builder.
      • domain

        public Issue.Builder domain​(String domain)
        Sets the issue domain.
        Parameters:
        domain - The domain.
        Returns:
        This builder.
      • name

        public Issue.Builder name​(String name)
        Sets the issue name.
        Parameters:
        name - The name.
        Returns:
        This builder.
      • name

        public Issue.Builder name​(Enum<?> name)
        Sets the issue name and its severity if the name implements IssueSeverityItem and current severity is null.
        Parameters:
        name - The name.
        Returns:
        This builder.
      • params

        public Issue.Builder params​(Params params)
        Sets the effective parameters that have been used to configure the issue detection.
        Parameters:
        params - The parameters.
        Returns:
        This builder.
      • addLocation

        public Issue.Builder addLocation​(Location location)
        Adds an issue location.
        Parameters:
        location - The location.
        Returns:
        This builder.
      • locations

        public Issue.Builder locations​(Location... locations)
        Sets the issue locations.
        Parameters:
        locations - The locations
        Returns:
        This builder.
      • locations

        public Issue.Builder locations​(List<Location> locations)
        Sets the issue locations.
        Parameters:
        locations - The locations
        Returns:
        This builder.
      • severity

        public Issue.Builder severity​(IssueSeverity severity)
        Sets the issue severity.
        Parameters:
        severity - The severity.
        Returns:
        This builder.
      • description

        public Issue.Builder description​(String description)
        Sets the issue description.
        Parameters:
        description - The description.
        Returns:
        This builder.
      • build

        public Issue build()