Package utility
Record Class Clustering.Entry
java.lang.Object
java.lang.Record
utility.Clustering.Entry
- Record Components:
name
- The label of the sample.label
- The cluster ID assigned to the sample.idx
- The index of the sample within its cluster.outlierScore
- The outlier score of the sample.
- Enclosing class:
Clustering
public static record Clustering.Entry(String name, int label, int idx, double outlierScore)
extends Record
A record to represent a clustering result entry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
idx()
Returns the value of theidx
record component.int
label()
Returns the value of thelabel
record component.name()
Returns the value of thename
record component.double
Returns the value of theoutlierScore
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
name
- the value for thename
record componentlabel
- the value for thelabel
record componentidx
- the value for theidx
record componentoutlierScore
- the value for theoutlierScore
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
label
public int label()Returns the value of thelabel
record component.- Returns:
- the value of the
label
record component
-
idx
public int idx()Returns the value of theidx
record component.- Returns:
- the value of the
idx
record component
-
outlierScore
public double outlierScore()Returns the value of theoutlierScore
record component.- Returns:
- the value of the
outlierScore
record component
-