/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getObservances()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getObservances()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getObservances()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getObservances()).toHashCode(); }
/** * {@inheritDoc} */ public int hashCode() { return new HashCodeBuilder().append(getName()).append(getProperties()) .append(getObservances()).toHashCode(); }
/** * {@inheritDoc} */ public final String toString() { final StringBuffer b = new StringBuffer(); b.append(BEGIN); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); b.append(getProperties()); b.append(observances); b.append(END); b.append(':'); b.append(getName()); b.append(Strings.LINE_SEPARATOR); return b.toString(); }
/** * {@inheritDoc} */ public final String toString() { return BEGIN + ':' + getName() + Strings.LINE_SEPARATOR + getProperties() + observances + END + ':' + getName() + Strings.LINE_SEPARATOR; }
/** * {@inheritDoc} */ public final String toString() { return BEGIN + ':' + getName() + Strings.LINE_SEPARATOR + getProperties() + observances + END + ':' + getName() + Strings.LINE_SEPARATOR; }
/** * {@inheritDoc} */ public final String toString() { return BEGIN + ':' + getName() + Strings.LINE_SEPARATOR + getProperties() + observances + END + ':' + getName() + Strings.LINE_SEPARATOR; }
/** * {@inheritDoc} */ public final String toString() { String b = BEGIN + ':' + getName() + Strings.LINE_SEPARATOR + getProperties() + observances + END + ':' + getName() + Strings.LINE_SEPARATOR; return b; }
private static VTimeZone generateTimezoneForId(String timezoneId) throws ParseException { if (!TIMEZONE_DEFINITIONS.contains(timezoneId)) { return null; } TimeZone javaTz = TimeZone.getTimeZone(timezoneId); ZoneId zoneId = ZoneId.of(javaTz.getID(), ZoneId.SHORT_IDS); int rawTimeZoneOffsetInSeconds = javaTz.getRawOffset() / 1000; VTimeZone timezone = new VTimeZone(); timezone.getProperties().add(new TzId(timezoneId)); addTransitions(zoneId, timezone, rawTimeZoneOffsetInSeconds); addTransitionRules(zoneId, rawTimeZoneOffsetInSeconds, timezone); if (timezone.getObservances() == null || timezone.getObservances().isEmpty()) { timezone.getObservances().add(NO_TRANSITIONS); } return timezone; }
private static VTimeZone generateTimezoneForId(String timezoneId) throws ParseException { if (!TIMEZONE_DEFINITIONS.contains(timezoneId)) { return null; } TimeZone javaTz = TimeZone.getTimeZone(timezoneId); ZoneId zoneId = ZoneId.of(javaTz.getID(), ZoneId.SHORT_IDS); int rawTimeZoneOffsetInSeconds = javaTz.getRawOffset() / 1000; VTimeZone timezone = new VTimeZone(); timezone.getProperties().add(new TzId(timezoneId)); addTransitions(zoneId, timezone, rawTimeZoneOffsetInSeconds); addTransitionRules(zoneId, rawTimeZoneOffsetInSeconds, timezone); if (timezone.getObservances() == null || timezone.getObservances().isEmpty()) { timezone.getObservances().add(NO_TRANSITIONS); } return timezone; }
private static VTimeZone generateTimezoneForId(String timezoneId) throws ParseException { if(!TIMEZONE_DEFINITIONS.contains(timezoneId)){ return null; } java.util.TimeZone javaTz = java.util.TimeZone.getTimeZone(timezoneId); ZoneId zoneId = ZoneId.of(javaTz.getID(), ZoneId.SHORT_IDS); int rawTimeZoneOffsetInSeconds = javaTz.getRawOffset() / 1000; VTimeZone timezone = new VTimeZone(); timezone.getProperties().add(new TzId(timezoneId)); addTransitions(zoneId, timezone, rawTimeZoneOffsetInSeconds); addTransitionRules(zoneId, rawTimeZoneOffsetInSeconds, timezone); if(timezone.getObservances() == null || timezone.getObservances().isEmpty()){ timezone.getObservances().add(NO_TRANSITIONS); } return timezone; }
getProperties()); getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.TZURL, getProperties());
getProperties()); getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.TZURL, getProperties());
getProperties()); getProperties()); PropertyValidator.getInstance().assertOneOrLess(Property.TZURL, getProperties());
/** * Constructs an <code>ICalDate</code> from an iCalendar date. * @param date The date. * @throws UnknownTimeZoneException - if something is wrong this exception is thrown. */ public ICalDate(Date date) throws UnknownTimeZoneException { if (date instanceof DateTime) { value = Value.DATE_TIME; tz = ((DateTime) date).getTimeZone(); // We only support known tzids (Olson for the most part) if (tz != null) { tz = tzTranslator.translateToOlsonTz(tz); // If timezone can't be translated, then datetime will // essentiallyi be floating. if (tz != null) { String id = tz.getVTimeZone().getProperties(). getProperty(Property.TZID).getValue(); tzid = new TzId(id); } } } else { value = Value.DATE; } this.anytime = false; text = date.toString(); this.date = date; }
/** * Constructs an <code>ICalDate</code> from an iCalendar date. * @param date The date. * @throws UnknownTimeZoneException - if something is wrong this exception is thrown. */ public ICalDate(Date date) throws UnknownTimeZoneException { if (date instanceof DateTime) { value = Value.DATE_TIME; tz = ((DateTime) date).getTimeZone(); // We only support known tzids (Olson for the most part) if (tz != null) { tz = tzTranslator.translateToOlsonTz(tz); // If timezone can't be translated, then datetime will // essentiallyi be floating. if (tz != null) { String id = tz.getVTimeZone().getProperties(). getProperty(Property.TZID).getValue(); tzid = new TzId(id); } } } else { value = Value.DATE; } this.anytime = false; text = date.toString(); this.date = date; }
/** * Constructs an <code>ICalDate</code> from an iCalendar date * list. Date lists cannot be anytime. * @param dates The date list. * @throws UnknownTimeZoneException - if something is wrong this exception is thrown. */ public ICalDate(DateList dates) throws UnknownTimeZoneException { value = dates.getType(); tz = dates.getTimeZone(); if (tz != null) { String origId = tz.getID(); tz = tzTranslator.translateToOlsonTz(tz); if (tz == null) { throw new UnknownTimeZoneException(origId); } String id = tz.getVTimeZone().getProperties(). getProperty(Property.TZID).getValue(); tzid = new TzId(id); } text = dates.toString(); this.dates = dates; }
/** * Constructs an <code>ICalDate</code> from an iCalendar date * list. Date lists cannot be anytime. * @param dates The date list. * @throws UnknownTimeZoneException - if something is wrong this exception is thrown. */ public ICalDate(DateList dates) throws UnknownTimeZoneException { value = dates.getType(); tz = dates.getTimeZone(); if (tz != null) { String origId = tz.getID(); tz = tzTranslator.translateToOlsonTz(tz); if (tz == null) { throw new UnknownTimeZoneException(origId); } String id = tz.getVTimeZone().getProperties(). getProperty(Property.TZID).getValue(); tzid = new TzId(id); } text = dates.toString(); this.dates = dates; }