public abstract class TypedStructureAdapter extends java.lang.Object implements TypedStructure, java.lang.Comparable<TypedStructureAdapter>
Modifier and Type | Field and Description |
---|---|
private java.util.List<Sort> |
arguments
This list constrains the possible arguments of this structure
to the given sorts.
|
private int |
arity
the number of arguments for a complete structure
|
private java.lang.String |
name
The name of this structure
|
Constructor and Description |
---|
TypedStructureAdapter()
Default-Ctor: Creating empty typed structure
|
TypedStructureAdapter(java.lang.String name)
Initializes a structure of arity zero with the given name;
|
TypedStructureAdapter(java.lang.String name,
int arity)
Initializes a structure with the given name and of the given arity.
|
TypedStructureAdapter(java.lang.String name,
java.util.List<Sort> arguments)
Initializes a structure with the given name and the given list
of argument sorts.
|
Modifier and Type | Method and Description |
---|---|
void |
addArgumentType(Sort argType)
Adds the given Sort as argument type to the typed Structure
|
abstract TypedStructure |
clone()
Creates a deep copy of this object
|
int |
compareTo(TypedStructureAdapter o) |
protected java.util.List<Sort> |
copyArgumentTypes() |
boolean |
equals(java.lang.Object obj) |
java.util.List<Sort> |
getArgumentTypes() |
int |
getArity() |
java.lang.String |
getName() |
int |
hashCode() |
boolean |
isComplete() |
boolean |
isTyped() |
Sort |
removeArgumentType(int index)
Removes the argument type at the specified index
|
boolean |
removeArgumentType(Sort argType)
Removes the given Sort from the list of argument types
|
void |
setArity(int arity)
Sets the arity of this structure
|
void |
setName(java.lang.String name)
Changes the name of the Structure
|
java.lang.String |
toString() |
private java.lang.String name
private java.util.List<Sort> arguments
private int arity
public TypedStructureAdapter()
public TypedStructureAdapter(java.lang.String name)
name
- the name of the structurepublic TypedStructureAdapter(java.lang.String name, int arity)
name
- the name of the structurepublic TypedStructureAdapter(java.lang.String name, java.util.List<Sort> arguments)
name
- the name of the structurearguments
- the sorts of the argumentspublic java.lang.String getName()
getName
in interface TypedStructure
public void setName(java.lang.String name)
TypedStructure
setName
in interface TypedStructure
name
- The new name of the structurepublic int getArity()
getArity
in interface TypedStructure
public void setArity(int arity)
TypedStructure
setArity
in interface TypedStructure
arity
- the new aritypublic java.util.List<Sort> getArgumentTypes()
getArgumentTypes
in interface TypedStructure
public void addArgumentType(Sort argType)
TypedStructure
addArgumentType
in interface TypedStructure
argType
- The Sort descibing the argument typepublic Sort removeArgumentType(int index)
TypedStructure
removeArgumentType
in interface TypedStructure
index
- The indexpublic boolean removeArgumentType(Sort argType)
TypedStructure
removeArgumentType
in interface TypedStructure
argType
- The Sort which is removedpublic boolean isTyped()
isTyped
in interface TypedStructure
public boolean isComplete()
isComplete
in interface TypedStructure
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
protected java.util.List<Sort> copyArgumentTypes()
public abstract TypedStructure clone()
TypedStructure
clone
in interface TypedStructure
clone
in class java.lang.Object
public int compareTo(TypedStructureAdapter o)
compareTo
in interface java.lang.Comparable<TypedStructureAdapter>