List of usage examples for org.joda.time ReadableDuration toDuration
Duration toDuration();
Duration
object. From source file:org.cook_e.data.Step.java
License:Open Source License
/** * Creates a Step//from w w w . j ava 2 s. c om * @param ingredients the ingredients required for this step * @param description a human-readable description of this step * @param duration an estimate of the time required to complete this step * @param isSimultaneous if this step can be done simultaneously * @throws NullPointerException if any parameter is null */ public Step(@NonNull List<String> ingredients, @NonNull String description, @NonNull ReadableDuration duration, boolean isSimultaneous, int index) { Objects.requireNonNull(ingredients, "ingredients must not be null"); Objects.requireNonNull(description, "description must not be null"); Objects.requireNonNull(duration, "duration must not be null"); mDescription = description; mTime = duration.toDuration(); mIngredients = new ArrayList<>(ingredients); this.mSimultaneous = isSimultaneous; mIndex = index; }