Record Class StructField
java.lang.Object
java.lang.Record
smile.data.type.StructField
- Record Components:
name- the field name.dtype- the field data type.measure- the level of measurement.
- All Implemented Interfaces:
Serializable
public record StructField(String name, DataType dtype, Measure measure)
extends Record
implements Serializable
A field in a Struct data type.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionStructField(String name, DataType dtype) Constructor.StructField(String name, DataType dtype, Measure measure) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondtype()Returns the value of thedtyperecord component.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns true if the field is of integer or floating but not nominal scale.measure()Returns the value of themeasurerecord component.name()Returns the value of thenamerecord component.static StructFieldof(PropertyDescriptor prop) Returns the struct field of a class property.static StructFieldof(RecordComponent comp) Returns the struct field of a record component.toString()Returns a string representation of this record class.Returns the string representation of the field object.Returns the object value of string.Returns the StructField with the new name.
-
Constructor Details
-
StructField
-
StructField
-
-
Method Details
-
toString
-
toString
-
valueOf
-
withName
Returns the StructField with the new name.- Parameters:
name- the new name.- Returns:
- the StructField with the new name.
-
isNumeric
public boolean isNumeric()Returns true if the field is of integer or floating but not nominal scale.- Returns:
- true if the field is of integer or floating but not nominal scale.
-
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). -
of
Returns the struct field of a class property.- Parameters:
prop- the property descriptor.- Returns:
- the struct field.
-
of
Returns the struct field of a record component.- Parameters:
comp- the record component.- Returns:
- the struct field.
-
hashCode
-
name
-
dtype
-
measure
-