if ((contract.getBeginDate().after(begin) || contract.getBeginDate().equals(begin)) && (contract.getEndDate() == null || (contract.getEndDate().before(end) || contract .getEndDate().equals(end)))) {
if (contract.belongsToPeriod(begin, end)) {
    public List<IContract> getWorkingContracts(Date begin, Date end) {        List<IContract> contracts = new ArrayList<IContract>();        for (IContract contract : this.getWorkingContracts()) {            if ((contract.getBeginDate().after(begin) || contract.getBeginDate().equals(begin))                    && (contract.getEndDate() == null || (contract.getEndDate().before(end) || contract                            .getEndDate().equals(end)))) {                contracts.add(contract);            }        }        return contracts;    }