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 dump to invoke this dumper.
outputFileName - The name of the file where all valid expressions will be written to if requested by the user.
data - A Supplier for a Stream of 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 Details

    • DumperData

      public DumperData(String subCommandName, Supplier<Stream<String>> data)
      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 dump to invoke this dumper.
      data - A Supplier for a Stream of 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

      public DumperData(String subCommandName, String outputFileName, Supplier<Stream<String>> data)
      Creates an instance of a DumperData record class.
      Parameters:
      subCommandName - the value for the subCommandName record component
      outputFileName - the value for the outputFileName record component
      data - the value for the data record component
  • Method Details

    • 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 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.
    • subCommandName

      public String subCommandName()
      Returns the value of the subCommandName record component.
      Returns:
      the value of the subCommandName record component
    • outputFileName

      public String outputFileName()
      Returns the value of the outputFileName record component.
      Returns:
      the value of the outputFileName record component
    • data

      public Supplier<Stream<String>> data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component