public class ProgramSVInstantiation
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static ProgramSVInstantiation |
EMPTY_PROGRAMSVINSTANTIATION
the empty instantiation
|
private int |
hashcode
integer to cache the hashcode
|
private ImmutableList<ProgramSVEntry> |
list
the map with the instantiations
|
Modifier | Constructor and Description |
---|---|
private |
ProgramSVInstantiation()
creates a new ProgramSVInstantiation object with an empty list
|
private |
ProgramSVInstantiation(ImmutableList<ProgramSVEntry> list)
creates a new ProgramSVInstantiation object using the given list
|
Modifier and Type | Method and Description |
---|---|
ProgramSVInstantiation |
add(SchemaVariable sv,
JavaProgramElement prgElement)
adds the given pair to the instantiations.
|
boolean |
equals(java.lang.Object obj)
returns true if the given object and this one have the same
listpings
|
JavaProgramElement |
getInstantiation(SchemaVariable sv)
returns the instantiation of the given SchemaVariable
|
int |
hashCode() |
boolean |
isInstantiated(SchemaVariable sv)
returns true iff the sv has been instantiated already
|
java.util.Iterator<ProgramSVEntry> |
iterator()
returns iterator of the listped pair (SchemaVariables,
JavaProgramElement)
|
ProgramSVInstantiation |
replace(SchemaVariable sv,
JavaProgramElement prgElement)
replaces the given pair in the instantiations.
|
int |
size()
returns the number of SchemaVariables of which an
instantiation is known
|
java.lang.String |
toString()
toString
|
public static final ProgramSVInstantiation EMPTY_PROGRAMSVINSTANTIATION
private ImmutableList<ProgramSVEntry> list
private int hashcode
private ProgramSVInstantiation()
private ProgramSVInstantiation(ImmutableList<ProgramSVEntry> list)
list
- the ListFromSchemaVariableToJavaProgramElement with the
instantiationspublic ProgramSVInstantiation add(SchemaVariable sv, JavaProgramElement prgElement)
sv
- the SchemaVariable to be instantiatedprgElement
- the JavaProgramElement The SchemaVariable is
instantiated withpublic ProgramSVInstantiation replace(SchemaVariable sv, JavaProgramElement prgElement)
sv
- the SchemaVariable to be instantiatedprgElement
- the JavaProgramElement The SchemaVariable is
instantiated withpublic boolean isInstantiated(SchemaVariable sv)
public JavaProgramElement getInstantiation(SchemaVariable sv)
public java.util.Iterator<ProgramSVEntry> iterator()
public int size()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object