Record Class ScaffoldMojoSupport.Counts

java.lang.Object
java.lang.Record
network.ike.plugin.scaffold.ScaffoldMojoSupport.Counts
Record Components:
install - number of TierAction.Write with TierAction.Write.Kind.INSTALL
update - number of TierAction.Write with TierAction.Write.Kind.UPDATE
skip - number of TierAction.Skip
upToDate - number of TierAction.UpToDate
userManaged - number of TierAction.UserManaged
Enclosing class:
ScaffoldMojoSupport

public static record ScaffoldMojoSupport.Counts(int install, int update, int skip, int upToDate, int userManaged) extends Record
Aggregate counts of each action kind in a plan.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Counts(int install, int update, int skip, int upToDate, int userManaged)
    Creates an instance of a Counts record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Whether any write action is planned.
    int
    Returns the value of the install record component.
    int
    Returns the value of the skip record component.
    One-line summary like "2 install, 1 update, 0 skip, 0 ok, 1 user".
    final String
    Returns a string representation of this record class.
    int
    Total number of entries across every action kind.
    int
    Returns the value of the update record component.
    int
    Returns the value of the upToDate record component.
    int
    Returns the value of the userManaged record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Counts

      public Counts(int install, int update, int skip, int upToDate, int userManaged)
      Creates an instance of a Counts record class.
      Parameters:
      install - the value for the install record component
      update - the value for the update record component
      skip - the value for the skip record component
      upToDate - the value for the upToDate record component
      userManaged - the value for the userManaged record component
  • Method Details

    • total

      public int total()
      Total number of entries across every action kind.
      Returns:
      sum of install + update + skip + upToDate + userManaged
    • hasWrites

      public boolean hasWrites()
      Whether any write action is planned.
      Returns:
      true if install + update > 0
    • summary

      public String summary()
      One-line summary like "2 install, 1 update, 0 skip, 0 ok, 1 user".
      Returns:
      summary line suitable for draft-output display
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • install

      public int install()
      Returns the value of the install record component.
      Returns:
      the value of the install record component
    • update

      public int update()
      Returns the value of the update record component.
      Returns:
      the value of the update record component
    • skip

      public int skip()
      Returns the value of the skip record component.
      Returns:
      the value of the skip record component
    • upToDate

      public int upToDate()
      Returns the value of the upToDate record component.
      Returns:
      the value of the upToDate record component
    • userManaged

      public int userManaged()
      Returns the value of the userManaged record component.
      Returns:
      the value of the userManaged record component