Record Class Cardinality
java.lang.Object
java.lang.Record
io.trino.sql.planner.optimizations.Cardinality
-
Constructor Summary
ConstructorsConstructorDescriptionCardinality(com.google.common.collect.Range<Long> cardinalityRange) Creates an instance of aCardinalityrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.common.collect.Range<Long> Returns the value of thecardinalityRangerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisAtLeast(long minCardinality) booleanbooleanisAtMost(long maxCardinality) booleanbooleanisEmpty()booleanisScalar()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Cardinality
Creates an instance of aCardinalityrecord class.- Parameters:
cardinalityRange- the value for thecardinalityRangerecord component
-
-
Method Details
-
isEmpty
public boolean isEmpty() -
isScalar
public boolean isScalar() -
isAtLeastScalar
public boolean isAtLeastScalar() -
isAtMostScalar
public boolean isAtMostScalar() -
isAtLeast
public boolean isAtLeast(long minCardinality) -
isAtMost
public boolean isAtMost(long maxCardinality) -
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 withObjects::equals(Object,Object). -
cardinalityRange
Returns the value of thecardinalityRangerecord component.- Returns:
- the value of the
cardinalityRangerecord component
-