Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion extensions/fbc/src/org/sbml/jsbml/ext/fbc/GeneProduct.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,22 @@ public GeneProduct() {
}

/**
* Creates a new {@link GeneProduct} instance.
* Creates a new {@link GeneProduct} instance by copying all fields.
*
* @param nsb the instance to clone
*/
public GeneProduct(GeneProduct nsb) {
super(nsb);

// copy GeneProduct-specific fields
if (nsb.isSetLabel()) {
// use the setter to keep property-change semantics consistent
setLabel(nsb.getLabel());
}

if (nsb.isSetAssociatedSpecies()) {
setAssociatedSpecies(nsb.getAssociatedSpecies());
}
}

/**
Expand Down