Package com.google.zxing.client.result
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 Pattern
private final String
private final long
private final boolean
private final double
private final String
private final double
private final String
private static final Pattern
private static final long[]
private final long
private final boolean
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
format
(boolean allDay, long date) String[]
getEnd()
Deprecated.long
double
double
getStart()
Deprecated.long
boolean
boolean
private static long
Parses a string as a date.private static long
parseDateTimeString
(String dateTimeString) private static long
parseDurationMS
(CharSequence durationString) Methods inherited from class com.google.zxing.client.result.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
Deprecated.- Returns:
- start time
-
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
, ornull
if 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:
getDisplayResult
in 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()