class Timepoint implements Parcelable, Comparable<Timepoint> {

    public void add(TYPE type, int value) {
        if (type == MINUTE) value *= 60;
        if (type == HOUR) value *= 3600;
        value += toSeconds();

        switch (type) {
            case SECOND:
                int secondVal = (value % 3600) % 60;
                if(secondVal<0){
                    second = 60+secondVal;
                    add(MINUTE, -1);
                }else {
                    second = secondVal;
                }
            case MINUTE:
                int minuteVal = (value % 3600) / 60;
                if(minuteVal<0){
                    minute = 60+minuteVal;
                    add(HOUR, -1);
                }else {
                    minute = minuteVal;
                }
            case HOUR:
                int hourVal = (value / 3600) % 24;
                if(hourVal<0){
                    hour = 24+hourVal;
                }else{
                    hour=hourVal;
                }
        }
    }

    public  Timepoint(Timepoint time);
    public  Timepoint(@IntRange(from=0, to=23) int hour,
                     @IntRange(from=0, to=59) int minute,
                     @IntRange(from=0, to=59) int second);
    public  Timepoint(@IntRange(from=0, to=23) int hour,
                     @IntRange(from=0, to=59) int minute);
    public  Timepoint(@IntRange(from=0, to=23) int hour);
    public  Timepoint(Parcel in);

}