Package randoop.test
Class ContractSet
- java.lang.Object
-
- randoop.test.ContractSet
-
public class ContractSet extends Object
Manages the set ofObjectContract
objects. Contracts are organized by arity.
-
-
Field Summary
Fields Modifier and Type Field Description private List<List<ObjectContract>>
contractMap
Each element is a list of all contracts of that arity.
-
Constructor Summary
Constructors Constructor Description ContractSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ObjectContract contract)
Adds a contract to this set.List<ObjectContract>
getWithArity(int arity)
Returns the list of contracts with the given arity.boolean
isEmpty()
String
toString()
-
-
-
Field Detail
-
contractMap
private final List<List<ObjectContract>> contractMap
Each element is a list of all contracts of that arity. For example, the element at index 2 is a list of contracts of arity 2. Used only for containment check.
-
-
Method Detail
-
getWithArity
public List<ObjectContract> getWithArity(int arity)
Returns the list of contracts with the given arity.- Parameters:
arity
- the arity- Returns:
- the list of contracts with the given arity
-
add
public void add(ObjectContract contract)
Adds a contract to this set.- Parameters:
contract
- the contract
-
isEmpty
public boolean isEmpty()
-
-