Package randoop.test

Class ContractSet


  • public class ContractSet
    extends Object
    Manages the set of ObjectContract objects. Contracts are organized by arity.
    • 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.
    • Constructor Detail

      • ContractSet

        public ContractSet()
    • 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()