Package net.minecraft.server.network
Record Class FilteredText
java.lang.Object
java.lang.Record
net.minecraft.server.network.FilteredText
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FilteredTextprivate final FilterMaskThe field for themaskrecord component.private final StringThe field for therawrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFilteredText(String raw, FilterMask mask) Creates an instance of aFilteredTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.filtered()static FilteredTextfullyFiltered(String pRaw) final inthashCode()Returns a hash code value for this object.booleanmask()Returns the value of themaskrecord component.static FilteredTextpassThrough(String pRaw) raw()Returns the value of therawrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
raw
The field for therawrecord component. -
mask
The field for themaskrecord component. -
EMPTY
-
-
Constructor Details
-
FilteredText
Creates an instance of aFilteredTextrecord class.- Parameters:
raw- the value for therawrecord componentmask- the value for themaskrecord component
-
-
Method Details
-
passThrough
-
fullyFiltered
-
filtered
-
filteredOrEmpty
-
isFiltered
public boolean isFiltered() -
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). -
raw
Returns the value of therawrecord component.- Returns:
- the value of the
rawrecord component
-
mask
Returns the value of themaskrecord component.- Returns:
- the value of the
maskrecord component
-