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
ConstructorsConstructorDescriptionPartialRelation(String name, int arity) Creates an instance of aPartialRelationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintarity()Returns the value of thearityrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.@NotNull StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface tools.refinery.store.reasoning.representation.AnyPartialSymbol
asPartialRelationMethods inherited from interface tools.refinery.logic.Constraint
aggregateBy, aggregateBy, call, call, call, callTransitive, count, count, equals, getReduction, invalidIndex, leftJoinBy, leftJoinByMethods inherited from interface tools.refinery.store.reasoning.representation.PartialSymbol
asPartialFunction
-
Constructor Details
-
PartialRelation
Creates an instance of aPartialRelationrecord class.- Parameters:
name- the value for thenamerecord componentarity- the value for thearityrecord component
-
-
Method Details
-
abstractDomain
- Specified by:
abstractDomainin interfaceAnyPartialSymbol- Specified by:
abstractDomainin interfacePartialSymbol<TruthValue,Boolean>
-
defaultValue
- Specified by:
defaultValuein interfacePartialSymbol<TruthValue,Boolean>
-
getParameters
- Specified by:
getParametersin interfaceConstraint
-
toReferenceString
- Specified by:
toReferenceStringin 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 thenamerecord component.- Specified by:
namein interfaceAnyPartialSymbol- Specified by:
namein interfaceConstraint- Returns:
- the value of the
namerecord component
-
arity
public int arity()Returns the value of thearityrecord component.- Specified by:
arityin interfaceAnyPartialSymbol- Specified by:
arityin interfaceConstraint- Returns:
- the value of the
arityrecord component
-