package cn.sunner.sms2calendar;

import android.provider.CalendarContract.Events;

import java.util.Calendar;

/**
 * Created by Sunner on 6/28/16.
 */
public abstract class SMSParser {
    protected String text;
    protected String title;
    protected Calendar beginTime;
    protected Calendar endTime;
    protected String location = "";
    protected boolean valid = false;

    public SMSParser(String text) {
        this.text = text;
        this.valid = parse();
    }

    protected abstract boolean parse();

    public String getTitle() {
        return title;
    }

    public Calendar getBeginTime() {
        return beginTime;
    }

    public Calendar getEndTime() {
        return endTime;
    }

    public String getLocation() {
        return location;
    }

    public boolean isValid() {
        return valid;
    }

    /**
     * Return the event extracted from text
     *
     * @return return null when mismatch
     */
    public Events getEvent() {
        Events event = null;
        if (isValid()) {
            // TODO: Forge calendar event
        }
        return event;
    }

    public String getText() {
        return text;
    }
}

@@ -840,282 +840,8 @@
  %7D%0A%0A
-    /**%0A     * Return the event extracted from text%0A     *%0A     * @return return null when mismatch%0A     */%0A    public Events getEvent() %7B%0A        Events event = null;%0A        if (isValid()) %7B%0A            // TODO: Forge calendar event%0A        %7D%0A        return event;%0A    %7D%0A%0A
     

Remove useless method getEvent()