Record Class SampleInstance<D,T>
java.lang.Object
java.lang.Record
smile.data.SampleInstance<D,T>
- Type Parameters:
D- the data type.T- the target type.- Record Components:
x- the sample data.y- the sample target.
-
Constructor Summary
ConstructorsConstructorDescriptionSampleInstance(D x) Constructor without target.SampleInstance(D x, T y) Creates an instance of aSampleInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.x()Returns the value of thexrecord component.y()Returns the value of theyrecord component.
-
Constructor Details
-
SampleInstance
-
SampleInstance
-
-
Method Details
-
toString
-
hashCode
-
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). -
x
-
y
-