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>()); }
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)); }