|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFinitization
The IFinitization
interface is used to set up the bounds
for the search. The Finitization
class uses these bounds
to build the state space for search.
Method Summary | |
---|---|
void |
addAll(Class cls,
String fieldName,
IObjSet objSet)
Adds all objects from the given objSet to the given field
which has to be of type Collection . |
void |
addAll(String fullFieldName,
IObjSet objSet)
Adds all objects from the given objSet to the given field
which has to be of type Collection . |
void |
addAll(String className,
String fieldName,
IObjSet objSet)
Adds all objects from the given objSet to the given field
which has to be of type Collection . |
boolean |
areArraysHandledAsObjects()
|
IArraySet |
createArraySet(Class clz,
IIntSet array$length,
IFieldDomain array$values,
int count)
Creates an instance of the IArraySet. |
IBooleanSet |
createBooleanSet()
Creates new IBooleanSet |
IByteSet |
createByteSet(byte singleValue)
Creates IByteSet with the single value that is given as
the method parameter. |
IByteSet |
createByteSet(byte min,
byte max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
IByteSet |
createByteSet(byte min,
byte diff,
byte max)
|
IClassDomain |
createClassDomain(Class cls)
Creates new empty class domain Equivalent to createClassDomain(cls, 0); |
IClassDomain |
createClassDomain(Class cls,
int numOfInstances)
Creates new ClassDomain if the ClassDomain
with the given Class hasn't already been created or
returns existing ClassDomain , no matter if it's size is
different from the given parameter numOfInstances |
IClassDomain |
createClassDomain(String className)
Equivalent to createClassDomain(className) |
IClassDomain |
createClassDomain(String className,
int numOfInstances)
Helper. |
IDoubleSet |
createDoubleSet(double singleValue)
Creates IDoubleSet with the single value that is given as
the method parameter. |
IDoubleSet |
createDoubleSet(double min,
double max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
IDoubleSet |
createDoubleSet(double min,
double diff,
double max)
|
IFloatSet |
createFloatSet(float singleValue)
Creates IFloatSet with the single value that is given as
the method parameter. |
IFloatSet |
createFloatSet(float min,
float max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
IFloatSet |
createFloatSet(float min,
float diff,
float max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
IIntSet |
createIntSet(int singleValue)
Creates IIntSet with the single value that is given as the
method parameter. |
IIntSet |
createIntSet(int min,
int max)
Creates IIntSet with the given min and
max parameters. |
IIntSet |
createIntSet(int min,
int diff,
int max)
Creates IIntSet according to the given parameters. |
ILongSet |
createLongSet(long singleValue)
Creates ILongSet with the single value that is given as
the method parameter. |
ILongSet |
createLongSet(long min,
long max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
ILongSet |
createLongSet(long min,
long diff,
long max)
|
IObjSet |
createObjSet(Class fieldBaseClass)
Helper. |
IObjSet |
createObjSet(Class fieldBaseClass,
boolean includeNull)
Creates IObjSet according to the given parameters. |
IObjSet |
createObjSet(Class fieldBaseClass,
int numOfInstances)
Helper. |
IObjSet |
createObjSet(Class fieldBaseClass,
int numOfInstances,
boolean includeNull)
Creates IObjSet and automatically creates given number of
instances of the same class
Equivalent to IClassDomain c = f.createClassDomain(fieldBaseClass, numOfInstances); IObjSet toReturn = f.createObjSet(fieldBaseClass, includeNull); toReturn.addClassDomain(c); return toReturn; |
IFieldDomain |
createObjSet(IClassDomain classDomain)
Helper. |
IFieldDomain |
createObjSet(IClassDomain classDomain,
boolean includeNull)
Similar to createObjSet(IClassDomain classDomain)
but also can include null value |
IObjSet |
createObjSet(String fieldBaseClassName)
Helper. |
IObjSet |
createObjSet(String fieldBaseClassName,
boolean includeNull)
Helper. |
IObjSet |
createObjSet(String fieldBaseClassName,
int numOfInstances)
Helper. |
IObjSet |
createObjSet(String fieldBaseClassName,
int numOfInstances,
boolean includeNull)
Helper. |
IShortSet |
createShortSet(short singleValue)
Creates IShortSet with the single value that is given as
the method parameter. |
IShortSet |
createShortSet(short min,
short max)
Here the step (differecte) between two consecutive values in the set defaults to 1. |
IShortSet |
createShortSet(short min,
short diff,
short max)
|
IClassDomain |
getClassDomain(Class cls)
Searches for the ObjSet of the given Class
object. |
IClassDomain |
getClassDomain(String name)
Helper. |
IFieldDomain |
getFieldDomain(Class cls,
String fieldName)
|
IFieldDomain |
getFieldDomain(String fullFieldName)
|
IFieldDomain |
getFieldDomain(String className,
String fieldName)
|
Class |
getFinClass()
Returns Class object of the finitized class |
IFinitization |
getIncludedFinitization(Class clazz)
Returns the included finitization, if there is such, for type given by clazz parameter |
void |
handleArraysAsObjects(boolean handleAsObjects)
If selected, arrays will be handled like other objects during Korat search. |
boolean |
includeFinitization(IFinitization fin)
Includes information from finitization fin into current
finitization. |
void |
set(Class cls,
String fieldName,
IFieldDomain fieldDomain)
Assigns fieldDomain to the given field (fieldName )
of the given class (cls ). |
void |
set(String fullFieldName,
IFieldDomain fieldDomain)
Helper. |
void |
set(String className,
String fieldName,
IFieldDomain fieldDomain)
Helper. |
Method Detail |
---|
Class getFinClass()
Class
object of the finitized class
Class
object for root class that is being finitizedIClassDomain createClassDomain(String className, int numOfInstances)
Class
object for the given
className
and then calls
createClassDomain(Class, int)
.
className
- fully qualified name of the class or relative to the package
name of the finitized class.numOfInstances
- number of elements to be created
IClassDomain
createClassDomain(Class, int)
IClassDomain createClassDomain(String className)
createClassDomain(className)
className
-
IClassDomain
createClassDomain(String, int)
IClassDomain createClassDomain(Class cls, int numOfInstances)
ClassDomain
if the ClassDomain
with the given Class
hasn't already been created or
returns existing ClassDomain
, no matter if it's size is
different from the given parameter numOfInstances
cls
- Class
of the objectsnumOfInstances
- number of instances to be created
IClassDomain
createClassDomain(String, int)
IClassDomain createClassDomain(Class cls)
Equivalent to createClassDomain(cls, 0);
cls
- Class of the object
createClassDomain(Class, int)
IIntSet createIntSet(int min, int diff, int max)
IIntSet
according to the given parameters.
min
- minimal element of this set of integers (included)diff
- step, the difference between to elementsmax
- maximal element of this set of integers (included)
IIntSet
createIntSet(int)
,
createIntSet(int, int)
IIntSet createIntSet(int min, int max)
IIntSet
with the given min
and
max
parameters. The difference between two elements is by
default 1. Equivalent of createIntSet(min, 1, max)
.
min
- minimal element of this set of integers (included)max
- maximal element of this set of integers (included)
IIntSet
createIntSet(int)
,
createIntSet(int, int, int)
IIntSet createIntSet(int singleValue)
IIntSet
with the single value that is given as the
method parameter. Equivalent of
createIntSet(value, 1, value)
.
singleValue
- single value that will be added to IIntSet
IIntSet
createIntSet(int, int)
,
createIntSet(int, int, int)
IBooleanSet createBooleanSet()
IBooleanSet
IBooleanSet
IByteSet createByteSet(byte min, byte diff, byte max)
min
- - minimum value to be included in the setdiff
- - difference (step) between two consecutive values in the setmax
- - maximum value to be included in the set
IByteSet
IByteSet createByteSet(byte min, byte max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
IByteSet
IByteSet createByteSet(byte singleValue)
IByteSet
with the single value that is given as
the method parameter. Equivalent of
createByteSet(value, 1, value)
.
singleValue
- single value that will be added to IByteSet
IByteSet
createByteSet(byte, byte)
,
createByteSet(byte, byte, byte)
IShortSet createShortSet(short min, short diff, short max)
min
- - minimum value to be included in the setdiff
- - difference (step) between two consecutive values in the setmax
- - maximum value to be included in the set
IShortSet
IShortSet createShortSet(short min, short max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
IShortSet
IShortSet createShortSet(short singleValue)
IShortSet
with the single value that is given as
the method parameter. Equivalent of
createShortSet(value, 1, value)
.
singleValue
- single value that will be added to IShortSet
IShortSet
createShortSet(short, short)
,
createShortSet(short, short, short)
ILongSet createLongSet(long min, long diff, long max)
min
- - minimum value to be included in the setdiff
- - difference (step) between two consecutive values in the setmax
- - maximum value to be included in the set
ILongSet
ILongSet createLongSet(long min, long max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
ILongSet
ILongSet createLongSet(long singleValue)
ILongSet
with the single value that is given as
the method parameter. Equivalent of
createLongSet(value, 1, value)
.
singleValue
- single value that will be added to ILongSet
ILongSet
createLongSet(long, long)
,
createLongSet(long, long, long)
IDoubleSet createDoubleSet(double min, double diff, double max)
min
- - minimum value to be included in the setdiff
- - difference (step) between two consecutive values in the setmax
- - maximum value to be included in the set
IDoubleSet
IDoubleSet createDoubleSet(double min, double max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
IDoubleSet
IDoubleSet createDoubleSet(double singleValue)
IDoubleSet
with the single value that is given as
the method parameter. Equivalent of
createDoubleSet(value, 1, value)
.
singleValue
- single value that will be added to IDoubleSet
IDoubletSet
createDoubleSet(double, double)
,
createDoubleSet(double, double, double)
IFloatSet createFloatSet(float min, float diff, float max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
IFloatSet
IFloatSet createFloatSet(float min, float max)
min
- - minimum value to be included in the setmax
- - maximum value to be included in the set
IFloatSet
IFloatSet createFloatSet(float singleValue)
IFloatSet
with the single value that is given as
the method parameter. Equivalent of
createFloatSet(value, 1, value)
.
singleValue
- single value that will be added to IFloatSet
IFloatSet
createFloatSet(float, float)
,
createFloatSet(float, float, float)
IObjSet createObjSet(Class fieldBaseClass, boolean includeNull)
IObjSet
according to the given parameters.
fieldBaseClass
- Base type of the field that is used in type checking. If
fieldBaseClass
is a Class
object
of a reference type, new IObjSet
will be
returned, else an exception will be thrown.includeNull
- whether to include null in the IObjSet
.
IObjSet
createObjSet(Class)
,
createObjSet(String)
,
createObjSet(String, boolean)
IObjSet createObjSet(Class fieldBaseClass, int numOfInstances, boolean includeNull)
IObjSet
and automatically creates given number of
instances of the same class
Equivalent to
IClassDomain c = f.createClassDomain(fieldBaseClass, numOfInstances); IObjSet toReturn = f.createObjSet(fieldBaseClass, includeNull); toReturn.addClassDomain(c); return toReturn;
fieldBaseClass
- -
class of the fieldnumOfInstances
- -
instances of the fieldBaseClass
that are to be
created in the class domain of fieldBaseClass
includeNull
- -
whether to include null in the IObjSet
IObjSet
IObjSet createObjSet(Class fieldBaseClass)
createObjSet(fieldBaseClass, false);
fieldBaseClass
- Base type of the field
IObjSet
createObjSet(Class, boolean)
,
createObjSet(String)
,
createObjSet(String, boolean)
IObjSet createObjSet(Class fieldBaseClass, int numOfInstances)
Class
object for the given
fieldBaseClassName
and then calls
createObjSet(Class, int, boolean)
.
fieldBaseClass
- numOfInstances
-
IObjSet
IObjSet createObjSet(String fieldBaseClassName, boolean includeNull)
Class
object for the given
fieldBaseClassName
and then calls
createObjSet(Class, boolean)
.
fieldBaseClassName
- name of the base type of the fieldincludeNull
- weather to include null in the IObjSet
.
IObjSet
createObjSet(Class, boolean)
,
createObjSet(Class)
,
createObjSet(String)
IObjSet createObjSet(String fieldBaseClassName, int numOfInstances, boolean includeNull)
Class
object for the given
fieldBaseClassName
and then calls
createObjSet(Class, int, boolean)
.
fieldBaseClassName
- numOfInstances
- includeNull
-
IObjSet
IObjSet createObjSet(String fieldBaseClassName)
createFieldDomain(fieldBaseClassName, false);
- Parameters:
fieldBaseClassName
- name of the base type of the field
- Returns:
- created
IObjSet
- See Also:
createObjSet(Class, boolean)
,
createObjSet(Class)
,
createObjSet(String, boolean)
IObjSet createObjSet(String fieldBaseClassName, int numOfInstances)
createObjSet(fieldBaseClassName, numOfInstances, false);
- Parameters:
fieldBaseClassName
- numOfInstances
-
- Returns:
- newly created
IObjSet
IFieldDomain createObjSet(IClassDomain classDomain)
classDomain
and adds classDomain
. Null value is not allowed
classDomain
-
IFieldDomain
IFieldDomain createObjSet(IClassDomain classDomain, boolean includeNull)
createObjSet(IClassDomain classDomain)
but also can include null value
IFieldDomain
createObjSet(IClassDomain)
IArraySet createArraySet(Class clz, IIntSet array$length, IFieldDomain array$values, int count)
Creates an instance of the IArraySet.
Use this method to create a field domain for the field of an array type.
If the given parameter doesn't stand clz.isArray()
an
IllegalArgumentException
will be thrown. The other two
parameters are used to set bounds on array length and array components.
An array will take any int value from the given
IIntSet array$length
parameter and any of the array
components will take any value from the given
IFieldDomain array$values
clz
- class of the array fieldarray$length
- possible values for the array lengtharray$values
- possible values for the array componentscount
- number of arrays to create
void set(String fullFieldName, IFieldDomain fieldDomain)
fullFieldName
into
className
and fieldName
according to
following format:fullFieldName
does not contains "." it is
considered as a fieldName
of the class which this
finitization is for;fullFieldName
contains "." then the substring
after the last "." in the fullFieldName
is considered as a
fieldName
and the substring before the last "." is taken
as className
. className
should be a fully
qualified name of the class or a relative name in the package of the
finitized field;set(className, fieldName, fieldDomain)
fullFieldName
- -
name of the field ( format: ClassName.FieldName )fieldDomain
- -
field domainset(Class, String, IFieldDomain)
,
set(String, String, IFieldDomain)
void set(String className, String fieldName, IFieldDomain fieldDomain)
set(Class, String, IFieldDomain)
className
- -
fully qualified name of the class or name relative to package
name of the finitized classfieldName
- -
name of the fieldfieldDomain
- -
domain of the fieldset(String, IFieldDomain)
,
set(Class, String, IFieldDomain)
void set(Class cls, String fieldName, IFieldDomain fieldDomain)
fieldDomain
to the given field (fieldName
)
of the given class (cls
).createObjSet(cls, numOfInstances)
)
cls
- -
Class
object of the classfieldName
- -
field name of the given classfieldDomain
- -
domain of the fieldset(String, IFieldDomain)
,
set(String, String, IFieldDomain)
IClassDomain getClassDomain(String name)
Class
object of the class
with the given name and then calls getObjSet(Class)
name
- -
name of the class of which the ObjSet
is
requested.
ObjSet for the given class name or null
if is
not been created yet.- See Also:
getClassDomain(Class)
IClassDomain getClassDomain(Class cls)
ObjSet
of the given Class
object.
cls
- -
Class
object of the class
ObjSet for the given class name or null if is
not been created yet.- See Also:
getClassDomain(String)
IFieldDomain getFieldDomain(Class cls, String fieldName)
cls
- fieldName
-
IFieldDomain
getFieldDomain(String)
,
getFieldDomain(String, String)
IFieldDomain getFieldDomain(String className, String fieldName)
className
- fieldName
-
IFieldDomain
getFieldDomain(Class, String)
,
getFieldDomain(String)
IFieldDomain getFieldDomain(String fullFieldName)
fullFieldName
-
IFieldDomain
getFieldDomain(Class, String)
,
getFieldDomain(String, String)
void addAll(String fullFieldName, IObjSet objSet)
objSet
to the given field
which has to be of type Collection
.
fullFieldName
- - full name of the field: <className>.<fieldName>objSet
- - set of objects to be added to the given field (collection)addAll(Class, String, IObjSet)
,
addAll(String, String, IObjSet)
void addAll(String className, String fieldName, IObjSet objSet)
objSet
to the given field
which has to be of type Collection
.
className
- - name of the field's declaring class (class which contains the field)fieldName
- - name of the fieldobjSet
- - set of objects to be added to the given field (collection)addAll(String, IObjSet)
,
addAll(Class, String, IObjSet)
void addAll(Class cls, String fieldName, IObjSet objSet)
objSet
to the given field
which has to be of type Collection
.
cls
- - field's declaring class (class which contains the field)fieldName
- - name of the fieldobjSet
- - set of objects to be added to the given field (collection)addAll(String, IObjSet)
,
addAll(String, String, IObjSet)
boolean includeFinitization(IFinitization fin)
fin
into current
finitization. Only one finitization of the same type can be included.
fin
- - finitization which will be included in current finitization
getIncludedFinitization(Class)
IFinitization getIncludedFinitization(Class clazz)
clazz
parameter
clazz
- - class for which the finitization has been done
includeFinitization(IFinitization)
void handleArraysAsObjects(boolean handleAsObjects)
If selected, arrays will be handled like other objects during Korat search. This implies that one array object might be shared among many objects.
Another option is to treat array objects as special "field containers", that may belong to only one object.
handleAsObjects
- - should arrays be treated like objects during search.areArraysHandledAsObjects()
boolean areArraysHandledAsObjects()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |