|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkorat.finitization.impl.FieldDomain
korat.finitization.impl.ArraySet
public class ArraySet
Field Summary | |
---|---|
private ClassDomain |
arrays
|
protected IntSet |
lengthsSet
|
protected FieldDomain |
valuesSet
|
Fields inherited from class korat.finitization.impl.FieldDomain |
---|
classOfField |
Constructor Summary | |
---|---|
ArraySet(ClassDomain arrays,
IntSet lengthsSet,
FieldDomain valuesSet)
|
Method Summary | |
---|---|
Object |
getArray(int index)
Returns the array at position index in this field domain. |
IIntSet |
getArraySizes()
Gets the domain for the size of the array. |
ClassDomain |
getClassDomain(int classDomainIndex)
Returns the class domain for the given index primitive types should return null . |
ClassDomain |
getClassDomainFor(int objectIndex)
Finds the class domain for given object index by calling getClassDomainFor(objectIndex) and returns the following
class domain. |
int |
getClassDomainIndexFor(int objectIndex)
Given the index of object in this field domain, returns index of that object in its class domain. |
IFieldDomain |
getComponentsSet()
Gets the class domain of array components in this IArraySet . |
int |
getIndexOfFirstObjectInNextClassDomain(int objectIndex)
|
int |
getMaxLength()
Returns maximal length of array objects in this IArraySet . |
ClassDomain |
getNextClassDomainFor(int objectIndex)
Finds the class domain for given object index by calling getClassDomainFor(objectIndex) and returns the following
class domain. |
int |
getNumberOfElements()
Number of all elements in this field domain. |
int |
getNumOfClassDomains()
Number of class domains contained in this field domain. |
int |
getSizeOfClassDomain(int classDomainIndex)
Number of object in the class domain which is at a classDomainIndex position in the list of all class domains
within this field domain. |
boolean |
isArrayType()
Does this field domain represent array type. |
boolean |
isPrimitiveType()
Does this field domain represent primitive type. |
void |
setArraySizes(IIntSet sizes)
Sets domain for the size of the array. |
void |
setComponentsSet(IFieldDomain componentsSet)
Sets the field domain for the components of the array. |
Methods inherited from class korat.finitization.impl.FieldDomain |
---|
checkClassDomainIndex, checkObjectIndex, getClassOfField |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface korat.finitization.IFieldDomain |
---|
getClassOfField |
Field Detail |
---|
protected IntSet lengthsSet
protected FieldDomain valuesSet
private ClassDomain arrays
Constructor Detail |
---|
public ArraySet(ClassDomain arrays, IntSet lengthsSet, FieldDomain valuesSet)
Method Detail |
---|
public Object getArray(int index)
index
in this field domain.
index
- -
index of array in field domain's list
index
in this field domainpublic ClassDomain getClassDomain(int classDomainIndex)
FieldDomain
null
.
getClassDomain
in class FieldDomain
classDomainIndex
- -
the index of the class domain
public ClassDomain getClassDomainFor(int objectIndex)
FieldDomain
getClassDomainFor(objectIndex)
and returns the following
class domain.
Primitive types should return null
.
getClassDomainFor
in class FieldDomain
objectIndex
- -
the index of the given object
public int getClassDomainIndexFor(int objectIndex)
FieldDomain
objectIndex
because primitive type field domains
conceptually contain exactly one class domain.
getClassDomainIndexFor
in class FieldDomain
objectIndex
- -
index of object in the field domain
public int getIndexOfFirstObjectInNextClassDomain(int objectIndex)
getIndexOfFirstObjectInNextClassDomain
in class FieldDomain
public ClassDomain getNextClassDomainFor(int objectIndex)
FieldDomain
getClassDomainFor(objectIndex)
and returns the following
class domain.
Primitive typess should return null
.
getNextClassDomainFor
in class FieldDomain
objectIndex
- -
the index of the given object
public int getNumOfClassDomains()
FieldDomain
1
.
getNumOfClassDomains
in interface IFieldDomain
getNumOfClassDomains
in class FieldDomain
IPrimitiveTypeSet
public int getNumberOfElements()
FieldDomain
getNumberOfElements
in interface IFieldDomain
getNumberOfElements
in class FieldDomain
public int getSizeOfClassDomain(int classDomainIndex)
FieldDomain
classDomainIndex
position in the list of all class domains
within this field domain.
Primitive types should return -1 if
classDomainIndex
is different than 0, or
getNumberOfElements()
else.
getSizeOfClassDomain
in class FieldDomain
classDomainIndex
- -
class domain index
classDomainIndex
public IIntSet getArraySizes()
IArraySet
getArraySizes
in interface IArraySet
int
s - all possible sizes
of the array.public IFieldDomain getComponentsSet()
IArraySet
IArraySet
.
getComponentsSet
in interface IArraySet
IClassDomain
that has been assigned for the
components of the arrays in this IArraySet
.public void setArraySizes(IIntSet sizes)
IArraySet
IArraySet
only to arrays of the given sizes.
setArraySizes
in interface IArraySet
sizes
- all possible values for the size of the arraypublic void setComponentsSet(IFieldDomain componentsSet)
IArraySet
IArraySet
is bounded by elements of
the given componentSet
.
setComponentsSet
in interface IArraySet
componentsSet
- set of values that array components within this
IArraySet
can take, either ObjSet
in case the type array components is reference type, or field
domain of corresponding primitive type.public int getMaxLength()
IArraySet
.
public boolean isArrayType()
IFieldDomain
isArrayType
in interface IFieldDomain
true
if class of this FieldDomain is array,
false
otherwisepublic boolean isPrimitiveType()
IFieldDomain
isPrimitiveType
in interface IFieldDomain
true
for primitive data types and strings,
false
otherwise
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |