public static LogEntry constructLogEntry( int aId, int aType, int aLogGroup, String aMain, String aDateTime, String aExt1, String aExt2, String aExt3) { LogEntry ret = null; switch (aType) { case EMPTY_ENTRY: ret = new EmptyLogEntry(); break; case SPEED_ENTRY: try { ret = new SpeedLogEntry(aLogGroup, aMain, aDateTime); } catch (Exception e) { e.printStackTrace(); } break; case GROUP_INFO_ENTRY: ret = new GroupInfoEntry(aLogGroup, aMain); break; } ret.mId = aId; return ret; }