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 aIntStats
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
avg()
Returns the value of theavg
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
max()
Returns the value of themax
record component.int
min()
Returns the value of themin
record component.double
std()
Returns the value of thestd
record component.int
sum()
Returns the value of thesum
record component.final String
toString()
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 aIntStats
record class.- Parameters:
min
- the value for themin
record componentmax
- the value for themax
record componentsum
- the value for thesum
record componentavg
- the value for theavg
record componentstd
- the value for thestd
record 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 themin
record component.- Returns:
- the value of the
min
record component
-
max
public int max()Returns the value of themax
record component.- Returns:
- the value of the
max
record component
-
sum
public int sum()Returns the value of thesum
record component.- Returns:
- the value of the
sum
record component
-
avg
public double avg()Returns the value of theavg
record component.- Returns:
- the value of the
avg
record component
-
std
public double std()Returns the value of thestd
record component.- Returns:
- the value of the
std
record component
-