001 // Copyright 2009 Waterken Inc. under the terms of the MIT X license
002 // found at http://www.opensource.org/licenses/mit-license.html
003 package org.waterken.serial;
004
005 import java.io.Serializable;
006
007 import org.joe_e.Struct;
008 import org.ref_send.promise.Eventual;
009
010 /**
011 * A {@link Series} factory.
012 */
013 public final class
014 SeriesFactory extends Struct implements Serializable {
015 static private final long serialVersionUID = 1L;
016
017 private final Eventual _;
018
019 private
020 SeriesFactory(final Eventual _) {
021 this._ = _;
022 }
023
024 /**
025 * Constructs an instance.
026 * @param _ eventual operator
027 */
028 static public SeriesFactory
029 make(final Eventual _) { return new SeriesFactory(_); }
030
031 /**
032 * Constructs a series.
033 * @param <T> value type
034 */
035 public <T> Series<T>
036 makeSeries() { return Serial.make(_); }
037 }