Record Class AlwaysTrueResultSet
java.lang.Object
java.lang.Record
tools.refinery.store.query.resultset.AlwaysTrueResultSet
- Record Components:
adapter- The ModelQueryAdapter for this ResultSet.query- The query that this ResultSet should always return true for. Must be a query of arity 0.
- All Implemented Interfaces:
AnyResultSet,ResultSet<Boolean>
public record AlwaysTrueResultSet(ModelQueryAdapter adapter, RelationalQuery query)
extends Record
implements ResultSet<Boolean>
A ResultSet that always returns true for the empty tuple.
-
Constructor Summary
ConstructorsConstructorDescriptionAlwaysTrueResultSet(ModelQueryAdapter adapter, RelationalQuery query) Creates an instance of aAlwaysTrueResultSetrecord class. -
Method Summary
Modifier and TypeMethodDescriptionadapter()Returns the value of theadapterrecord component.voidaddListener(ResultSetListener<Boolean> listener) final booleanIndicates whether some other object is "equal to" this one.getAll()final inthashCode()Returns a hash code value for this object.query()Returns the value of thequeryrecord component.voidremoveListener(ResultSetListener<Boolean> listener) intsize()final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
getAdapter
- Specified by:
getAdapterin interfaceAnyResultSet
-
getCanonicalQuery
- Specified by:
getCanonicalQueryin interfaceAnyResultSet- Specified by:
getCanonicalQueryin interfaceResultSet<Boolean>
-
size
public int size()- Specified by:
sizein interfaceAnyResultSet
-
get
-
getAll
-
addListener
- Specified by:
addListenerin interfaceResultSet<Boolean>
-
removeListener
- Specified by:
removeListenerin interfaceResultSet<Boolean>
-
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). -
adapter
Returns the value of theadapterrecord component.- Returns:
- the value of the
adapterrecord component
-
query
Returns the value of thequeryrecord component.- Returns:
- the value of the
queryrecord component
-