當前位置: 首頁>>代碼示例>>Java>>正文


Java ParseException.toString方法代碼示例

本文整理匯總了Java中java.text.ParseException.toString方法的典型用法代碼示例。如果您正苦於以下問題:Java ParseException.toString方法的具體用法?Java ParseException.toString怎麽用?Java ParseException.toString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.text.ParseException的用法示例。


在下文中一共展示了ParseException.toString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: CalendarParsedResult

import java.text.ParseException; //導入方法依賴的package包/類
public CalendarParsedResult(String summary, String startString, String endString, String
        durationString, String location, String organizer, String[] attendees, String
        description, double latitude, double longitude) {
    super(ParsedResultType.CALENDAR);
    this.summary = summary;
    try {
        this.start = parseDate(startString);
        if (endString == null) {
            long durationMS = parseDurationMS(durationString);
            this.end = durationMS < 0 ? null : new Date(this.start.getTime() + durationMS);
        } else {
            try {
                this.end = parseDate(endString);
            } catch (ParseException pe) {
                throw new IllegalArgumentException(pe.toString());
            }
        }
        this.startAllDay = startString.length() == 8;
        boolean z = endString != null && endString.length() == 8;
        this.endAllDay = z;
        this.location = location;
        this.organizer = organizer;
        this.attendees = attendees;
        this.description = description;
        this.latitude = latitude;
        this.longitude = longitude;
    } catch (ParseException pe2) {
        throw new IllegalArgumentException(pe2.toString());
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:31,代碼來源:CalendarParsedResult.java

示例2: saveSchedule

import java.text.ParseException; //導入方法依賴的package包/類
private void saveSchedule() {
    schedule.setName(textFieldPlaneName.getText());
    schedule.setType(radioButtonWeek.isSelected() ? 0 : 1);
    try {
        schedule
            .setTime_begin_1(c1.isSelected() ? Uses.FORMAT_HH_MM.parse(s1.getText()) : null);
        schedule.setTime_end_1(c1.isSelected() ? Uses.FORMAT_HH_MM.parse(e1.getText()) : null);
        schedule
            .setTime_begin_2(c2.isSelected() ? Uses.FORMAT_HH_MM.parse(s2.getText()) : null);
        schedule.setTime_end_2(c2.isSelected() ? Uses.FORMAT_HH_MM.parse(e2.getText()) : null);
        schedule
            .setTime_begin_3(c3.isSelected() ? Uses.FORMAT_HH_MM.parse(s3.getText()) : null);
        schedule.setTime_end_3(c3.isSelected() ? Uses.FORMAT_HH_MM.parse(e3.getText()) : null);
        schedule
            .setTime_begin_4(c4.isSelected() ? Uses.FORMAT_HH_MM.parse(s4.getText()) : null);
        schedule.setTime_end_4(c4.isSelected() ? Uses.FORMAT_HH_MM.parse(e4.getText()) : null);
        schedule
            .setTime_begin_5(c5.isSelected() ? Uses.FORMAT_HH_MM.parse(s5.getText()) : null);
        schedule.setTime_end_5(c5.isSelected() ? Uses.FORMAT_HH_MM.parse(e5.getText()) : null);
        schedule
            .setTime_begin_6(c6.isSelected() ? Uses.FORMAT_HH_MM.parse(s6.getText()) : null);
        schedule.setTime_end_6(c6.isSelected() ? Uses.FORMAT_HH_MM.parse(e6.getText()) : null);
        schedule
            .setTime_begin_7(c7.isSelected() ? Uses.FORMAT_HH_MM.parse(s7.getText()) : null);
        schedule.setTime_end_7(c7.isSelected() ? Uses.FORMAT_HH_MM.parse(e7.getText()) : null);

        schedule.setBreaks_1((QBreaks) cb1.getSelectedItem());
        schedule.setBreaks_2((QBreaks) cb2.getSelectedItem());
        schedule.setBreaks_3((QBreaks) cb3.getSelectedItem());
        schedule.setBreaks_4((QBreaks) cb4.getSelectedItem());
        schedule.setBreaks_5((QBreaks) cb5.getSelectedItem());
        schedule.setBreaks_6((QBreaks) cb6.getSelectedItem());
        schedule.setBreaks_7((QBreaks) cb7.getSelectedItem());
    } catch (ParseException ex) {
        throw new ServerException(ex.toString());
    }
}
 
開發者ID:bcgov,項目名稱:sbc-qsystem,代碼行數:38,代碼來源:FScheduleChangeDialod.java


注:本文中的java.text.ParseException.toString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。