Package kr.toxicity.model.api.pack
Record Class PackOverlay
java.lang.Object
java.lang.Record
kr.toxicity.model.api.pack.PackOverlay
- Record Components:
packName- namerange- rangetester- 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 Summary
FieldsModifier and TypeFieldDescriptionstatic final PackOverlayDefaultstatic final PackOverlayLegacystatic final PackOverlayModern -
Constructor Summary
ConstructorsConstructorDescriptionPackOverlay(@NotNull String packName, @NotNull Optional<PackMeta.VersionRange> range, @NotNull BooleanSupplier tester) Creates an instance of aPackOverlayrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(@NotNull PackOverlay o) booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.@NotNull StringpackName()Returns the value of thepackNamerecord component.@NotNull PackPathGets path@NotNull Optional<PackMeta.VersionRange> range()Returns the value of therangerecord component.booleantest()Tests this overlay@NotNull BooleanSuppliertester()Returns the value of thetesterrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Default -
LEGACY
Legacy -
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 aPackOverlayrecord class.
-
-
Method Details
-
path
Gets path- Parameters:
namespace- namespace- Returns:
- path
-
test
public boolean test()Tests this overlay- Returns:
- test value
-
equals
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 withObjects::equals(Object,Object). -
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. -
compareTo
- Specified by:
compareToin interfaceComparable<PackOverlay>
-
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. -
packName
Returns the value of thepackNamerecord component.- Returns:
- the value of the
packNamerecord component
-
range
Returns the value of therangerecord component.- Returns:
- the value of the
rangerecord component
-
tester
Returns the value of thetesterrecord component.- Returns:
- the value of the
testerrecord component
-