Record Class IBracketParserRegistrationHandler.DumperData
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.plugin.IBracketParserRegistrationHandler.DumperData
- Record Components:
subCommandName- The name of the sub command that will be used in/ct dumpto invoke this dumper.outputFileName- The name of the file where all valid expressions will be written to if requested by the user.data- ASupplierfor aStreamof strings representing all valid expressions. Note that the returned stream should be newly created every time inside the supplier, since the supplier might be called multiple times.
- Enclosing interface:
- IBracketParserRegistrationHandler
public static record IBracketParserRegistrationHandler.DumperData(String subCommandName, String outputFileName, Supplier<Stream<String>> data)
extends Record
Holds information relative to a dumper for a specific bracket expression.
A dumper for a bracket expression, usually known as a bracket dumper, is defined as something that can provide a list of all valid expressions for a specific bracket expression. An example could be a list of all valid items for an "item" bracket expression. If compiling a complete list is not possible, then a partial list containing a representative subset of valid expressions can also be provided.
- Since:
- 9.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aDumperDatarecord class.DumperData(String subCommandName, Supplier<Stream<String>> data) Constructs a new bracket dumper using the sub command name for the name of the dump file. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theoutputFileNamerecord component.Returns the value of thesubCommandNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DumperData
Constructs a new bracket dumper using the sub command name for the name of the dump file.- Parameters:
subCommandName- The name of the sub command that will be used in/ct dumpto invoke this dumper.data- ASupplierfor aStreamof strings representing all valid expressions. Note that the returned stream should be newly created every time inside the supplier, since the supplier might be called multiple times.- Since:
- 9.1.0
-
DumperData
Creates an instance of aDumperDatarecord class.- Parameters:
subCommandName- the value for thesubCommandNamerecord componentoutputFileName- the value for theoutputFileNamerecord componentdata- the value for thedatarecord component
-
-
Method Details
-
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). -
subCommandName
Returns the value of thesubCommandNamerecord component.- Returns:
- the value of the
subCommandNamerecord component
-
outputFileName
Returns the value of theoutputFileNamerecord component.- Returns:
- the value of the
outputFileNamerecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-