/** * Returns a deep copy of this Phylogeny. * <p> * (The resulting Phylogeny has its references in the external nodes * corrected, if they are lacking/obsolete in this.) */ public Phylogeny copy( final PhylogenyNode source ) { final Phylogeny tree = new Phylogeny(); if ( isEmpty() ) { tree.init(); return tree; } tree._rooted = _rooted; tree._name = new String( _name ); tree._description = new String( _description ); tree._type = new String( _type ); tree._rerootable = _rerootable; tree._distance_unit = new String( _distance_unit ); if ( _confidence != null ) { tree._confidence = ( Confidence ) _confidence.copy(); } if ( _identifier != null ) { tree._identifier = ( Identifier ) _identifier.copy(); } tree.setAllowMultipleParents( isAllowMultipleParents() ); tree._root = PhylogenyMethods.copySubTree( source ); return tree; }
@Override public PhylogenyData copy() { final BranchData new_bd = new BranchData(); if ( isHasBranchColor() ) { new_bd.setBranchColor( ( BranchColor ) getBranchColor().copy() ); } if ( isHasBranchWidth() ) { new_bd.setBranchWidth( ( BranchWidth ) getBranchWidth().copy() ); } if ( isHasConfidences() ) { for( final Confidence confidence : getConfidences() ) { new_bd.addConfidence( ( Confidence ) confidence.copy() ); } } return new_bd; }
@Override public PhylogenyData copy() { final Annotation ann = new Annotation( getRefSource(), getRefValue() ); if ( getConfidence() != null ) { ann.setConfidence( ( Confidence ) getConfidence().copy() ); } else { ann.setConfidence( null ); } ann.setType( getType() ); ann.setDesc( getDesc() ); ann.setEvidence( getEvidence() ); ann.setSource( new String( getSource() ) ); if ( getProperties() != null ) { ann.setProperties( ( PropertiesMap ) getProperties().copy() ); } else { ann.setProperties( null ); } if ( getUris() != null ) { ann.setUris( new ArrayList<Uri>() ); for( final Uri uri : getUris() ) { if ( uri != null ) { ann.getUris().add( uri ); } } } return ann; }
return false; final Confidence s4 = ( Confidence ) s3.copy(); if ( !s4.isEqual( s3 ) ) { return false;