Package ch.agent.t2.time

Examples of ch.agent.t2.time.TimeDomain.time()


  }
 
  private Series<Double> makeSeriesWithGap(String date1, String date2) throws Exception {
    UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true);
    TimeDomain domain = s.getTimeDomain();
    s.setValue(domain.time(date1), 1d);
    s.setValue(domain.time(date2), 2d);
    s.applyUpdates();
    return s;
  }
 
View Full Code Here


 
  private Series<Double> makeSeriesWithGap(String date1, String date2) throws Exception {
    UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true);
    TimeDomain domain = s.getTimeDomain();
    s.setValue(domain.time(date1), 1d);
    s.setValue(domain.time(date2), 2d);
    s.applyUpdates();
    return s;
  }
 
View Full Code Here

  public void testCreateSeries() {
    try {
      TimeDomain dom = Day.DOMAIN;
      UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true).typeCheck(Double.class);
      TimeAddressable<Double> ts = TimeSeriesFactory.make(dom, Double.class);
      ts.put(dom.time("2011-05-01")201105.01);
      ts.put(dom.time("2011-05-02")201105.02);
      ts.put(dom.time("2011-06-01")201106.01);
      ts.put(dom.time("2011-06-30")201106.30);
      ts.put(dom.time("2011-07-01")201107.01);
      s.setValues(ts);
View Full Code Here

    try {
      TimeDomain dom = Day.DOMAIN;
      UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true).typeCheck(Double.class);
      TimeAddressable<Double> ts = TimeSeriesFactory.make(dom, Double.class);
      ts.put(dom.time("2011-05-01")201105.01);
      ts.put(dom.time("2011-05-02")201105.02);
      ts.put(dom.time("2011-06-01")201106.01);
      ts.put(dom.time("2011-06-30")201106.30);
      ts.put(dom.time("2011-07-01")201107.01);
      s.setValues(ts);
      s.applyUpdates();
View Full Code Here

      TimeDomain dom = Day.DOMAIN;
      UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true).typeCheck(Double.class);
      TimeAddressable<Double> ts = TimeSeriesFactory.make(dom, Double.class);
      ts.put(dom.time("2011-05-01")201105.01);
      ts.put(dom.time("2011-05-02")201105.02);
      ts.put(dom.time("2011-06-01")201106.01);
      ts.put(dom.time("2011-06-30")201106.30);
      ts.put(dom.time("2011-07-01")201107.01);
      s.setValues(ts);
      s.applyUpdates();
      assertEquals("[2011-05-01, 2011-07-01]", s.getRange().toString());
View Full Code Here

      UpdatableSeries<Double> s = db.getUpdatableSeries(SERIES, true).typeCheck(Double.class);
      TimeAddressable<Double> ts = TimeSeriesFactory.make(dom, Double.class);
      ts.put(dom.time("2011-05-01")201105.01);
      ts.put(dom.time("2011-05-02")201105.02);
      ts.put(dom.time("2011-06-01")201106.01);
      ts.put(dom.time("2011-06-30")201106.30);
      ts.put(dom.time("2011-07-01")201107.01);
      s.setValues(ts);
      s.applyUpdates();
      assertEquals("[2011-05-01, 2011-07-01]", s.getRange().toString());
    } catch (Exception e) {
View Full Code Here

      TimeAddressable<Double> ts = TimeSeriesFactory.make(dom, Double.class);
      ts.put(dom.time("2011-05-01")201105.01);
      ts.put(dom.time("2011-05-02")201105.02);
      ts.put(dom.time("2011-06-01")201106.01);
      ts.put(dom.time("2011-06-30")201106.30);
      ts.put(dom.time("2011-07-01")201107.01);
      s.setValues(ts);
      s.applyUpdates();
      assertEquals("[2011-05-01, 2011-07-01]", s.getRange().toString());
    } catch (Exception e) {
      fail(e.toString());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.