Example #1
0
  public LoadTimeLine(
      String conceptName, List<LoadPeriod> loadPeriods, String type, TimeLineRole<?> role) {
    Validate.notEmpty(conceptName);
    Validate.notNull(loadPeriods);

    this.loadPeriods = LoadPeriod.sort(loadPeriods);
    this.conceptName = conceptName;
    this.timeLineRole = role;
    this.type = type;
    this.children = Collections.unmodifiableList(new ArrayList<LoadTimeLine>());
  }
Example #2
0
  public LoadTimeLine(LoadTimeLine main, List<LoadTimeLine> children) {
    Validate.notEmpty(main.getConceptName());
    Validate.notNull(main.getLoadPeriods());

    this.loadPeriods = LoadPeriod.sort(main.getLoadPeriods());
    this.conceptName = main.getConceptName();
    this.timeLineRole = main.getRole();
    this.type = main.getType();

    Validate.notNull(children);

    this.children = Collections.unmodifiableList(new ArrayList<>(children));
  }