From 0b373102f64fd7bfd25837a24ffb4ccb44b9d7e9 Mon Sep 17 00:00:00 2001 From: bjculkin Date: Thu, 1 Mar 2018 14:16:15 -0500 Subject: Finish most of CL formatting. There are a couple of unimplemented directives, but the only ones I'd consider anywhere near crucial would be the floating-point ones, which I'm not sure what I should do with them. --- base/src/main/java/bjc/utils/esodata/SingleTape.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'base/src/main/java/bjc/utils/esodata') diff --git a/base/src/main/java/bjc/utils/esodata/SingleTape.java b/base/src/main/java/bjc/utils/esodata/SingleTape.java index 5218269..287f22d 100644 --- a/base/src/main/java/bjc/utils/esodata/SingleTape.java +++ b/base/src/main/java/bjc/utils/esodata/SingleTape.java @@ -55,6 +55,20 @@ public class SingleTape implements Tape { this(false); } + /** + * Create a new tape with values taken from an iterable. + * + * @param itr + * The iterable to get values from. + */ + public SingleTape(Iterable itr) { + this(false); + + for(T itm : itr) { + backing.add(itm); + } + } + /** * Create a new empty tape that follows the specified auto-extension * policy. -- cgit v1.2.3