Record Class PartialRelation
java.lang.Object
java.lang.Record
tools.refinery.store.reasoning.representation.PartialRelation
- All Implemented Interfaces:
Constraint
,AnyPartialSymbol
,PartialSymbol<TruthValue,
Boolean>
public record PartialRelation(String name, int arity)
extends Record
implements PartialSymbol<TruthValue,Boolean>, Constraint
-
Constructor Summary
ConstructorDescriptionPartialRelation
(String name, int arity) Creates an instance of aPartialRelation
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
arity()
Returns the value of thearity
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface tools.refinery.logic.Constraint
aggregateBy, aggregateBy, call, call, call, callTransitive, count, count, equals, getReduction, invalidIndex, leftJoinBy, leftJoinBy
-
Constructor Details
-
PartialRelation
Creates an instance of aPartialRelation
record class.- Parameters:
name
- the value for thename
record componentarity
- the value for thearity
record component
-
-
Method Details
-
abstractDomain
- Specified by:
abstractDomain
in interfaceAnyPartialSymbol
- Specified by:
abstractDomain
in interfacePartialSymbol<TruthValue,
Boolean>
-
defaultValue
- Specified by:
defaultValue
in interfacePartialSymbol<TruthValue,
Boolean>
-
getParameters
- Specified by:
getParameters
in interfaceConstraint
-
toReferenceString
- Specified by:
toReferenceString
in interfaceConstraint
-
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
name
Returns the value of thename
record component.- Specified by:
name
in interfaceAnyPartialSymbol
- Specified by:
name
in interfaceConstraint
- Returns:
- the value of the
name
record component
-
arity
public int arity()Returns the value of thearity
record component.- Specified by:
arity
in interfaceAnyPartialSymbol
- Specified by:
arity
in interfaceConstraint
- Returns:
- the value of the
arity
record component
-