Package randoop.test

Class ContractSet

java.lang.Object
randoop.test.ContractSet

public class ContractSet extends Object
Manages the set of ObjectContract objects. Contracts are organized by arity.
  • Field Details

    • 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.
  • Constructor Details

    • ContractSet

      public ContractSet()
  • Method Details

    • 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()
    • toString

      public String toString()
      Overrides:
      toString in class Object