Record Class AngerManagement.Sorter
java.lang.Object
java.lang.Record
net.minecraft.world.entity.monster.warden.AngerManagement.Sorter
- All Implemented Interfaces:
Comparator<Entity>
- Enclosing class:
AngerManagement
protected static record AngerManagement.Sorter(AngerManagement angerManagement)
extends Record
implements Comparator<Entity>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final AngerManagement
The field for theangerManagement
record component. -
Constructor Summary
ModifierConstructorDescriptionprotected
Sorter
(AngerManagement angerManagement) Creates an instance of aSorter
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theangerManagement
record component.int
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
angerManagement
The field for theangerManagement
record component.
-
-
Constructor Details
-
Sorter
Creates an instance of aSorter
record class.- Parameters:
angerManagement
- the value for theangerManagement
record component
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<Entity>
-
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)
.- Specified by:
equals
in interfaceComparator<Entity>
- Specified by:
equals
in classRecord
- Parameters:
o
- the object with which to compare- Returns:
true
if this object is the same as theo
argument;false
otherwise.
-
angerManagement
Returns the value of theangerManagement
record component.- Returns:
- the value of the
angerManagement
record component
-