コード例 #1
0
  public void setAll(UpcomingWeather rec) {
    timestamp.set(rec.timestamp().getMillis(), rec.timestamp().getTimeZone());

    if (ProbabilityCodeImpl.GetByName(rec.probabilitycode().get())
        != ProbabilityCodeImpl.ID_UNKNOWN) {
      probabilitycode.set(rec.probabilitycode().get());
    } else {
      probabilitycode.set(ProbabilityCodeImpl.NAME_UNKNOWN);
    }

    temperature.set(rec.temperature().get());
    humidity.set(rec.humidity().get());
    pressure.set(rec.pressure().get());
    precipitation.set(rec.precipitation().get());
    cloudiness.set(rec.cloudiness().get());
    fog.set(rec.fog().get());
    windSpeed.set(rec.windspeed().get());
    windDirection.set(rec.windDirection().get());
    dewpointTemperature.set(rec.dewpointTemperature().get());
  }
コード例 #2
0
ファイル: Abstime.java プロジェクト: dschachinger/colibri
 /** Parse value string into a Abstime. */
 public static Abstime parse(String val) throws Exception {
   Abstime a = new Abstime();
   a.decodeVal(val);
   return a;
 }
コード例 #3
0
ファイル: Abstime.java プロジェクト: dschachinger/colibri
 /**
  * Get the prev day of the specified weekday. If today is the specified weekday, then return one
  * week before now.
  */
 public Abstime prevWeekday(int weekday) {
   Abstime t = prevDay();
   while (t.getWeekday() != weekday) t = t.prevDay();
   return t;
 }
コード例 #4
0
ファイル: Abstime.java プロジェクト: dschachinger/colibri
 /**
  * Get the next day of the specified weekday. If today is the specified weekday, then return one
  * week from now.
  */
 public Abstime nextWeekday(int weekday) {
   Abstime t = nextDay();
   while (t.getWeekday() != weekday) t = t.nextDay();
   return t;
 }
コード例 #5
0
ファイル: Abstime.java プロジェクト: dschachinger/colibri
 /** Is the time of the specified instance equal to the date of this instance? */
 public boolean timeEquals(Abstime that) {
   return that.getTimeOfDayMillis() == getTimeOfDayMillis();
 }
コード例 #6
0
ファイル: Abstime.java プロジェクト: dschachinger/colibri
 /** Is the date of the specified instance equal to the date of this instance? */
 public boolean dateEquals(Abstime that) {
   return (that.getYear() == getYear())
       && (that.getMonth() == getMonth())
       && (that.getDay() == getDay());
 }