korat.finitization
Interface IFieldDomain

All Known Subinterfaces:
IArraySet, IBooleanSet, IByteSet, IDoubleSet, IFloatSet, IIntSet, ILongSet, IObjSet, IPrimitiveTypeSet, IShortSet
All Known Implementing Classes:
ArraySet, BooleanSet, ByteSet, DoubleSet, FieldDomain, FloatSet, IntSet, LongSet, ObjSet, PrimitiveTypeSet, ShortSet

public interface IFieldDomain

Interface that represents Field domains.

Field domain is an ordered list of elements assignable to the given field.

Field Domain can be either IPrimitiveTypeSet or IObjSet.

IPrimitiveTypeSet cannot contain any class domains, because values of these fields are not objects. Actually, primitive type field domain implicitly contain exactly one class domain of the same primitive type.

IObjSet consists of several class domains (IClassDomain). Ordering of objects within a class domain must be preserved in each IObjSet.

Conceptually every field domain should consist of class domains. Therefore, and because of the Korat search algorithm, some of the methods that retrieve informations about contained class domains are placed here, not in IObjSet. IPrimitiveTypeSet should handle methods that return IClassDomain by returning null, and methods that retrieve some kind of indices in the manner as if IPrimitiveTypeSet consists of exactly one class domain. Other operations provide various ways to manipulate the structure and retrieve valuable informations about class domains and elements of this IFieldDomain.

Author:
korat.team
See Also:
IClassDomain, IPrimitiveTypeSet, IObjSet

Method Summary
 Class getClassOfField()
           
 int getNumberOfElements()
          Number of all elements in this field domain.
 int getNumOfClassDomains()
          Number of class domains contained in this field domain.
 boolean isArrayType()
          Does this field domain represent array type.
 boolean isPrimitiveType()
          Does this field domain represent primitive type.
 

Method Detail

getClassOfField

Class getClassOfField()
Returns:
type of the field that this domain can accept

isPrimitiveType

boolean isPrimitiveType()
Does this field domain represent primitive type.

Returns:
true for primitive data types and strings, false otherwise

getNumberOfElements

int getNumberOfElements()
Number of all elements in this field domain. These are all elements that can be assigned to a field associated with this field domain in the process of generating test cases.

Returns:
overall number of elements in field domain

isArrayType

boolean isArrayType()
Does this field domain represent array type.

Returns:
true if class of this FieldDomain is array, false otherwise

getNumOfClassDomains

int getNumOfClassDomains()
Number of class domains contained in this field domain.

IPrimitiveTypeSets should return 1.

Returns:
number of class domains in this field domain
See Also:
IPrimitiveTypeSet