Record Class PackOverlay

java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackOverlay
Record Components:
packName - name
range - range
tester - tester
All Implemented Interfaces:
Comparable<PackOverlay>

public record PackOverlay(@NotNull String packName, @NotNull Optional<PackMeta.VersionRange> range, @NotNull BooleanSupplier tester) extends Record implements Comparable<PackOverlay>
Pack overlay
  • Field Details

    • DEFAULT

      public static final PackOverlay DEFAULT
      Default
    • LEGACY

      public static final PackOverlay LEGACY
      Legacy
    • MODERN

      public static final PackOverlay MODERN
      Modern
  • Constructor Details

    • PackOverlay

      public PackOverlay(@NotNull @NotNull String packName, @NotNull @NotNull Optional<PackMeta.VersionRange> range, @NotNull @NotNull BooleanSupplier tester)
      Creates an instance of a PackOverlay record class.
      Parameters:
      packName - the value for the packName record component
      range - the value for the range record component
      tester - the value for the tester record component
  • Method Details

    • path

      @NotNull public @NotNull PackPath path(@NotNull @NotNull String namespace)
      Gets path
      Parameters:
      namespace - namespace
      Returns:
      path
    • test

      public boolean test()
      Tests this overlay
      Returns:
      test value
    • equals

      public 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 Objects::equals(Object,Object).
      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.
    • hashCode

      public 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
    • compareTo

      public int compareTo(@NotNull @NotNull PackOverlay o)
      Specified by:
      compareTo in interface Comparable<PackOverlay>
    • 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
    • packName

      @NotNull public @NotNull String packName()
      Returns the value of the packName record component.
      Returns:
      the value of the packName record component
    • range

      @NotNull public @NotNull Optional<PackMeta.VersionRange> range()
      Returns the value of the range record component.
      Returns:
      the value of the range record component
    • tester

      @NotNull public @NotNull BooleanSupplier tester()
      Returns the value of the tester record component.
      Returns:
      the value of the tester record component