Package com.cleanroommc.gradle.api.names
Record Class CsvNames
java.lang.Object
java.lang.Record
com.cleanroommc.gradle.api.names.CsvNames
public record CsvNames(Map<String,String> fields, Map<String,String> methods, Map<String,String> params, Map<String,String> docs)
extends Record
The SRG -> name lookups from a legacy MCP names zip (
fields.csv, methods.csv, params.csv).
Columns are searge, name, side, desc. The desc of methods/fields becomes the member's javadoc.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondocs()Returns the value of thedocsrecord component.final booleanIndicates whether some other object is "equal to" this one.fields()Returns the value of thefieldsrecord component.static CsvNamesReads the three CSVs out of an MCP names zip.final inthashCode()Returns a hash code value for this object.methods()Returns the value of themethodsrecord component.params()Returns the value of theparamsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CsvNames
public CsvNames(Map<String, String> fields, Map<String, String> methods, Map<String, String> params, Map<String, String> docs) Creates an instance of aCsvNamesrecord class.- Parameters:
fields- the value for thefieldsrecord componentmethods- the value for themethodsrecord componentparams- the value for theparamsrecord componentdocs- the value for thedocsrecord component
-
-
Method Details
-
fromZip
Reads the three CSVs out of an MCP names zip. -
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). -
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-
methods
Returns the value of themethodsrecord component.- Returns:
- the value of the
methodsrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-
docs
Returns the value of thedocsrecord component.- Returns:
- the value of the
docsrecord component
-