Record Class IPreprocessor.Match
java.lang.Object
java.lang.Record
com.blamejared.crafttweaker.api.zencode.IPreprocessor.Match
- Record Components:
preprocessor- TheIPreprocessormentioned by the instruction.line- The line in the file at which the instruction was identified.content- The arguments given to the preprocessor in this specific match.
- Enclosing interface:
IPreprocessor
public static record IPreprocessor.Match(IPreprocessor preprocessor, int line, String content)
extends Record
Represents a preprocessor match.
A preprocessor match is found whenever a line with a pound sign mentioning a valid preprocessor is found when reading the file.
- Since:
- 9.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionMatch(IPreprocessor preprocessor, int line, String content) Creates an instance of aMatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intline()Returns the value of thelinerecord component.Returns the value of thepreprocessorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Match
Creates an instance of aMatchrecord class.- Parameters:
preprocessor- the value for thepreprocessorrecord componentline- the value for thelinerecord componentcontent- the value for thecontentrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
preprocessor
Returns the value of thepreprocessorrecord component.- Returns:
- the value of the
preprocessorrecord component
-
line
public int line()Returns the value of thelinerecord component.- Returns:
- the value of the
linerecord component
-
content
Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-