Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Samples {
- private double mStartTime;
- private double mEndTime;
- private String mStatus;
- private int mFirstWordIndex;
- private int mLastWordIndex;
- Samples(String entry) {
- Scanner sc = new Scanner(entry);
- mStartTime = Double.parseDouble(sc.next());
- mEndTime = Double.parseDouble(sc.next());
- mStatus = sc.next();
- mFirstWordIndex = Integer.parseInt(sc.next());
- mLastWordIndex = Integer.parseInt(sc.next());
- }
- @Override
- public String toString() {
- return mStartTime + " " + mEndTime + " " + mStatus + " " + mFirstWordIndex + " " + mLastWordIndex;
- }
- public double getStartTime() { return mStartTime; }
- public double getEndTime() { return mEndTime; }
- public String getStatus() { return mStatus; }
- public int getFirstWordIndex() { return mFirstWordIndex; }
- public int getLastWordIndex() { return mLastWordIndex; }
- public void setStatus(String status) { mStatus = status; }
- public void setStartTime(Double starttime) { mStartTime = starttime; }
- public void setEndTime(Double endtime) {mEndTime = endtime; }
- public void setFirstWordIndex(int firstindex) { mFirstWordIndex = firstindex; }
- public void setLastWordIndex(int lastindex) { mLastWordIndex = lastindex; }
- }
Add Comment
Please, Sign In to add comment