public boolean addBridge ( BetaBridge bridge ) { if ( bridge1 == null ) { bridge1 = bridge ; return true ; } else if ( bridge1 . equals ( bridge ) ) { return true ; } else if ( bridge2 == null ) { bridge2 = bridge ; return true ; } else if ( bridge2 . equals ( bridge ) ) { return true ; } else { //no space left, cannot add the bridge logger . info ( "Residue forms more than 2 beta Bridges, " + "DSSP output might differ in Bridges column." ) ; return false ; } }
Adds a Bridge to the residue . Each residue can only store two bridges . If the residue contains already two Bridges the Bridge will not be added and the method returns false .