Attributes attributes = new Attributes(); attributes.addAttribute(attribute); attributes.addAttribute(AttributeType.JUSTIFICATION); timePointList.add(new TimePoint(getDate().toTimeOfDay(), attributes)); timePointList.add(new TimePoint((getDate().plus(getDuration())).toTimeOfDay(), attributes));
EnumSet<AttributeType> attributesToAdd = EnumSet.of(attribute, AttributeType.JUSTIFICATION); timePointList.add(new TimePoint(getDate().toTimeOfDay(), new Attributes(attributesToAdd))); timePointList.add(new TimePoint((getDate().plus(getDuration())).toTimeOfDay(), new Attributes( attributesToAdd)));
    public List<TimePoint> toTimePoints(AttributeType attribute) {        List<TimePoint> timePointList = new ArrayList<TimePoint>();        Attributes attributes = new Attributes();        attributes.addAttribute(attribute);        attributes.addAttribute(AttributeType.JUSTIFICATION);        timePointList.add(new TimePoint(getDate().toTimeOfDay(), attributes));        timePointList.add(new TimePoint((getDate().plus(getDuration())).toTimeOfDay(), attributes));        return timePointList;    }