Class CalendarParsedResult
java.lang.Object
com.google.zxing.client.result.ParsedResult
com.google.zxing.client.result.CalendarParsedResult
Represents a parsed result that encodes a calendar event at a certain time, optionally
with attendees and a location.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String[]private static final Patternprivate final Stringprivate final longprivate final booleanprivate final doubleprivate final Stringprivate final doubleprivate final Stringprivate static final Patternprivate static final long[]private final longprivate final booleanprivate final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Stringformat(boolean allDay, long date) String[]getEnd()Deprecated.longdoubledoublegetStart()Deprecated.longbooleanbooleanprivate static longParses a string as a date.private static longparseDateTimeString(String dateTimeString) private static longparseDurationMS(CharSequence durationString) Methods inherited from class ParsedResult
getType, maybeAppend, maybeAppend, toString
-
Field Details
-
RFC2445_DURATION
-
RFC2445_DURATION_FIELD_UNITS
private static final long[] RFC2445_DURATION_FIELD_UNITS -
DATE_TIME
-
summary
-
start
private final long start -
startAllDay
private final boolean startAllDay -
end
private final long end -
endAllDay
private final boolean endAllDay -
location
-
organizer
-
attendees
-
description
-
latitude
private final double latitude -
longitude
private final double longitude
-
-
Constructor Details
-
CalendarParsedResult
-
-
Method Details
-
getSummary
-
getStart
-
getStartTimestamp
public long getStartTimestamp()- Returns:
- start time
- See Also:
-
isStartAllDay
public boolean isStartAllDay()- Returns:
- true if start time was specified as a whole day
-
getEnd
Deprecated.- Returns:
- event end
Date, ornullif event has no duration
-
getEndTimestamp
public long getEndTimestamp()- Returns:
- event end
Date, or -1 if event has no duration - See Also:
-
isEndAllDay
public boolean isEndAllDay()- Returns:
- true if end time was specified as a whole day
-
getLocation
-
getOrganizer
-
getAttendees
-
getDescription
-
getLatitude
public double getLatitude() -
getLongitude
public double getLongitude() -
getDisplayResult
- Specified by:
getDisplayResultin classParsedResult
-
parseDate
Parses a string as a date. RFC 2445 allows the start and end fields to be of type DATE (e.g. 20081021) or DATE-TIME (e.g. 20081021T123000 for local time, or 20081021T123000Z for UTC).- Parameters:
when- The string to parse- Throws:
ParseException- if not able to parse as a date
-
format
-
parseDurationMS
-
parseDateTimeString
- Throws:
ParseException
-
getEndTimestamp()