Tools: context=
Download 1.5 Mb.
|
apk
- Bu sahifa navigatsiya:
- @param
- @return name */ public String getName() { return this.name; } /** Gets the current Element count for the ToDay * @return
/**
* Created by Tortuvshin Byambaa on 2/15/2017. */ public class ToDay implements Parcelable { private String name; private int completionTokens; private LinkedList // Keeps track of the current ToDayElements which belong to this ToDay private int totalTime=0; // Time is stored in Millis private int lifeTimeInToDay=0; private String uuid;
/*~~~~~~~~~ Getters & Setters ~~~~~~~~~*/ public int getLifeTimeInToDay() {
public void setLifeTimeInToDay(int lifeTimeInToDay) { this.lifeTimeInToDay = lifeTimeInToDay; } public String getUuid() { return uuid; } public LinkedList return childToDayElements; } public void setChildElements(LinkedList this.childToDayElements = newDataSet; } /** Sets the name for the ToDay * @param name desired name of the ToDay object */ public void setName(String name) { this.name = name; } /** Gets the name of the ToDay * @return name */ public String getName() { return this.name; } /** Gets the current Element count for the ToDay * @return childToDayElements.size() */ public Integer getChildCount() { return childToDayElements.size(); } /** Gets the total estimated time for the ToDay * @return totalTime */ public double getTime() { return totalTime; } public int getHours() { return AppUtils.calcHours(totalTime); } public int getMinutes() { return AppUtils.calcRemainderMins(totalTime); } /** * Returns H and M formatted time for the total ToDay Time * @return String, time */ public String getFormattedTime() { // Total time includes hrs and minutes, int truncates the double return AppUtils.buildCardViewStyleTime(this.totalTime); } /** * Returns number of completion tokens in this ToDay * @return completionTokens, int */ public int getCompletionTokens() { return completionTokens; } /*~~~~~~~~ Action Methods ~~~~~~~~~~*/ @Override
childToDayElements.add(newElement); totalTime = totalTime + newElement.getTimeEstimate();
public void reorderChildAt(int originalLocation, int newLocation) { ToDayElement target = this.childToDayElements.remove(originalLocation); this.childToDayElements.add(newLocation, target); this.reassignChildLocations();
for (ToDayElement removed: deletedChildElements) { totalTime = totalTime - removed.getTimeEstimate(); } }
Download 1.5 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling