Record Class LoadRequirement.AvailableComplementRequirement
java.lang.Object
java.lang.Record
io.github.miniplaceholders.api.provider.LoadRequirement.AvailableComplementRequirement
- Record Components:
name
- the main complement nameplatformAliases
- the complement aliases
- All Implemented Interfaces:
LoadRequirement
- Enclosing interface:
LoadRequirement
@Internal
@NullMarked
public static record LoadRequirement.AvailableComplementRequirement(String name, String[] platformAliases)
extends Record
implements LoadRequirement
AvailableComplementRequirement
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.miniplaceholders.api.provider.LoadRequirement
LoadRequirement.AvailableComplementRequirement, LoadRequirement.MultiLoadRequirement, LoadRequirement.NoneLoadRequirement, LoadRequirement.PlatformRequirement
-
Constructor Summary
ConstructorsConstructorDescriptionAvailableComplementRequirement
(String name, String... platformAliases) Creates an instance of aAvailableComplementRequirement
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.String[]
Returns the value of theplatformAliases
record component.boolean
shouldLoad
(Predicate<String> platformComplementTester) Checks if a complement is loadedtoString()
Returns a string representation of this record class.
-
Constructor Details
-
AvailableComplementRequirement
Creates an instance of aAvailableComplementRequirement
record class.- Parameters:
name
- the value for thename
record componentplatformAliases
- the value for theplatformAliases
record component
-
-
Method Details
-
shouldLoad
Checks if a complement is loaded- Parameters:
platformComplementTester
- the checker predicate- Returns:
- is this expansion should load
-
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. -
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. -
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)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
platformAliases
Returns the value of theplatformAliases
record component.- Returns:
- the value of the
platformAliases
record component
-