Package net.hydromatic.morel.util
Class Unifier.Sequence
- java.lang.Object
-
- net.hydromatic.morel.util.Unifier.Sequence
-
- All Implemented Interfaces:
Unifier.Term
- Enclosing class:
- Unifier
public static final class Unifier.Sequence extends java.lang.Object implements Unifier.Term
A sequence of terms.A sequence [a b c] is often printed "a(b, c)", as if "a" is the type of node and "b" and "c" are its children.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
operator
java.util.List<Unifier.Term>
terms
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> R
accept(Unifier.TermVisitor<R> visitor)
Unifier.Term
apply(java.util.Map<Unifier.Variable,Unifier.Term> substitutions)
void
checkCycle(java.util.Map<Unifier.Variable,Unifier.Term> map, java.util.Map<Unifier.Variable,Unifier.Variable> active)
Throws CycleException if expanding this term leads to a cycle.boolean
contains(Unifier.Variable variable)
boolean
equals(java.lang.Object obj)
int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
operator
public final java.lang.String operator
-
terms
public final java.util.List<Unifier.Term> terms
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
apply
public Unifier.Term apply(java.util.Map<Unifier.Variable,Unifier.Term> substitutions)
- Specified by:
apply
in interfaceUnifier.Term
-
checkCycle
public void checkCycle(java.util.Map<Unifier.Variable,Unifier.Term> map, java.util.Map<Unifier.Variable,Unifier.Variable> active) throws net.hydromatic.morel.util.Unifier.CycleException
Description copied from interface:Unifier.Term
Throws CycleException if expanding this term leads to a cycle.- Specified by:
checkCycle
in interfaceUnifier.Term
- Throws:
net.hydromatic.morel.util.Unifier.CycleException
-
contains
public boolean contains(Unifier.Variable variable)
- Specified by:
contains
in interfaceUnifier.Term
-
accept
public <R> R accept(Unifier.TermVisitor<R> visitor)
- Specified by:
accept
in interfaceUnifier.Term
-
-