Package net.minecraft.commands.functions
Record Class StringTemplate
java.lang.Object
java.lang.Record
net.minecraft.commands.functions.StringTemplate
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionStringTemplate(List<String> segments, List<String> variables) Creates an instance of aStringTemplaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static StringTemplatefromString(String p_306229_, int p_305937_) final inthashCode()Returns a hash code value for this object.private static booleanisValidVariableName(String p_306141_) segments()Returns the value of thesegmentsrecord component.substitute(List<String> p_306329_) final StringtoString()Returns a string representation of this record class.Returns the value of thevariablesrecord component.
- 
Field Details- 
segmentsThe field for thesegmentsrecord component.
- 
variablesThe field for thevariablesrecord component.
 
- 
- 
Constructor Details- 
StringTemplateCreates an instance of aStringTemplaterecord class.- Parameters:
- segments- the value for the- segmentsrecord component
- variables- the value for the- variablesrecord component
 
 
- 
- 
Method Details- 
fromString
- 
isValidVariableName
- 
substitute
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
segmentsReturns the value of thesegmentsrecord component.- Returns:
- the value of the segmentsrecord component
 
- 
variablesReturns the value of thevariablesrecord component.- Returns:
- the value of the variablesrecord component
 
 
-