Record Class WPClassGroup<T,U>
java.lang.Object
java.lang.Record
net.ygbstudio.powerwp4j.models.entities.WPClassGroup<T,U>
- Type Parameters:
T- the type of the keyU- the type of the values- Record Components:
groupByKey- the key used to group the valuesgroupedValues- the values grouped under the key
A record that represents a group of values grouped by a key.
-
Constructor Summary
ConstructorsConstructorDescriptionWPClassGroup(T groupByKey, @NotNull Set<U> groupedValues) Creates an instance of aWPClassGrouprecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegroupByKeyrecord component.Returns the value of thegroupedValuesrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
WPClassGroup
Creates an instance of aWPClassGrouprecord class.- Parameters:
groupByKey- the value for thegroupByKeyrecord componentgroupedValues- the value for thegroupedValuesrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
groupByKey
Returns the value of thegroupByKeyrecord component.- Returns:
- the value of the
groupByKeyrecord component
-
groupedValues
Returns the value of thegroupedValuesrecord component.- Returns:
- the value of the
groupedValuesrecord component
-