Package es.urjc.etsii.grafo.util
Record Class ArrayUtil.IntStats
java.lang.Object
java.lang.Record
es.urjc.etsii.grafo.util.ArrayUtil.IntStats
- Enclosing class:
ArrayUtil
public static record ArrayUtil.IntStats(int min, int max, int sum, double avg, double std)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionIntStats(int min, int max, int sum, double avg, double std) Creates an instance of aIntStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleavg()Returns the value of theavgrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmax()Returns the value of themaxrecord component.intmin()Returns the value of theminrecord component.doublestd()Returns the value of thestdrecord component.intsum()Returns the value of thesumrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IntStats
public IntStats(int min, int max, int sum, double avg, double std) Creates an instance of aIntStatsrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentsum- the value for thesumrecord componentavg- the value for theavgrecord componentstd- the value for thestdrecord 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 with '=='. -
min
public int min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public int max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-
sum
public int sum()Returns the value of thesumrecord component.- Returns:
- the value of the
sumrecord component
-
avg
public double avg()Returns the value of theavgrecord component.- Returns:
- the value of the
avgrecord component
-
std
public double std()Returns the value of thestdrecord component.- Returns:
- the value of the
stdrecord component
-