Package com.google.ical.values

Examples of com.google.ical.values.TimeValue


   * with {@link com.google.ical.values.DateValueImpl#compareTo}.
   */
  static long comparable(DateValue dv) {
    long comp = (((((long) dv.year()) << 4) + dv.month()) << 5) + dv.day();
    if (dv instanceof TimeValue) {
      TimeValue tv = (TimeValue) dv;
      // We add 1 to comparable for timed values to make sure that timed
      // events are distinct from all-day events, in keeping with
      // DateValue.compareTo.

      // It would be odd if an all day exclusion matched a midnight event on
      // the same day, but not one at another time of day.
      return (((((comp << 5) + tv.hour()) << 6) + tv.minute()) << 6)
        +  tv.second() + 1;
    } else {
      return comp << 17;
    }
  }
View Full Code Here

TOP

Related Classes of com.google.ical.values.TimeValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.