diff options
Diffstat (limited to 'src/main/java/com/jsyn/unitgen')
-rw-r--r-- | src/main/java/com/jsyn/unitgen/Circuit.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/jsyn/unitgen/Circuit.java b/src/main/java/com/jsyn/unitgen/Circuit.java index 01cb860..db516a7 100644 --- a/src/main/java/com/jsyn/unitgen/Circuit.java +++ b/src/main/java/com/jsyn/unitgen/Circuit.java @@ -119,4 +119,13 @@ public class Circuit extends UnitGenerator { return port; } + /** + * The units are guaranteed to be in the same order + * as they were added. + * + * @return an array of units that have been added to this circuit. + */ + UnitGenerator[] getUnits() { + return units.toArray(new UnitGenerator[0]); + } } |