private CustomOpEnvironment( final Context context, final OpEnvironment parent, final Collection<? extends OpInfo> infos) { setContext(context); this.parent = parent; index = new OpIndex(); // NB: If this is not performant and/or dynamic enough, we could create/use // a concatenating collection (see e.g. Guava's Iterables.concat method) // that does not copy all the elements. if (parent != null) index.addOps(parent.infos()); index.addOps(infos); }