package jp.ac.osaka_u.sanken; import java.text.ParseException; import java.util.Date; import com.ibm.icu.text.SimpleDateFormat; public abstract class Version { public abstract String getVersion(); public final Date getDate(){ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); try { return sdf.parse(getDateString()); } catch (ParseException e) { e.printStackTrace(); } return null; } protected abstract String getDateString(); }