/** * Returns the branch state for a given branch id * (the appropriate ancestor branch state is returned if * there is no branch state associated with the given branch id) * If add is true, then adds a new branch state for this branch id * (ensuring that the returned branch state is for the specified branch id) * @param bid branch id * @param add whether a new branched state should be added * @return BranchState associated with the given branch id */ protected BranchState getBranchState(int bid, boolean add) { BranchState bs = getBranchState(bid); if (add) { if (bs == null) { bs = new BranchState(bid); } else if (bs.bid != bid) { bs = new BranchState(bid, bs); } branchStates.put(bid, bs); } return bs; }
/** * Returns the branch state for a given branch id * (the appropriate ancestor branch state is returned if * there is no branch state associated with the given branch id) * If add is true, then adds a new branch state for this branch id * (ensuring that the returned branch state is for the specified branch id) * @param bid branch id * @param add whether a new branched state should be added * @return BranchState associated with the given branch id */ protected BranchState getBranchState(int bid, boolean add) { BranchState bs = getBranchState(bid); if (add) { if (bs == null) { bs = new BranchState(bid); } else if (bs.bid != bid) { bs = new BranchState(bid, bs); } branchStates.put(bid, bs); } return bs; }
/** * Returns the branch state for a given branch id * (the appropriate ancestor branch state is returned if * there is no branch state associated with the given branch id) * If add is true, then adds a new branch state for this branch id * (ensuring that the returned branch state is for the specified branch id) * @param bid branch id * @param add whether a new branched state should be added * @return BranchState associated with the given branch id */ protected BranchState getBranchState(int bid, boolean add) { BranchState bs = getBranchState(bid); if (add) { if (bs == null) { bs = new BranchState(bid); } else if (bs.bid != bid) { bs = new BranchState(bid, bs); } branchStates.put(bid, bs); } return bs; }
/** * Returns the branch state for a given branch id * (the appropriate ancestor branch state is returned if * there is no branch state associated with the given branch id) * If add is true, then adds a new branch state for this branch id * (ensuring that the returned branch state is for the specified branch id) * @param bid branch id * @param add whether a new branched state should be added * @return BranchState associated with the given branch id */ protected BranchState getBranchState(int bid, boolean add) { BranchState bs = getBranchState(bid); if (add) { if (bs == null) { bs = new BranchState(bid); } else if (bs.bid != bid) { bs = new BranchState(bid, bs); } branchStates.put(bid, bs); } return bs; }
protected BranchState getBranchState(int bid, boolean add) { BranchState bs = getBranchState(bid); if (add) { if (bs == null) { bs = new BranchState(bid); } else if (bs.bid != bid) { bs = new BranchState(bid, bs); } branchStates.put(bid, bs); } return bs; }