mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-21 21:25:38 +00:00
Merge branch 'master' into bug5774
This commit is contained in:
@@ -2,6 +2,7 @@ package com.sap.sse.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sse.datamining.annotations.Dimension;
|
||||
import com.sap.sse.datamining.annotations.Statistic;
|
||||
|
||||
/**
|
||||
@@ -77,6 +78,11 @@ public interface Speed extends Comparable<Speed>, Serializable {
|
||||
|
||||
@Statistic(messageKey="speedInKnots", resultDecimals=2)
|
||||
double getKnots();
|
||||
|
||||
@Dimension(messageKey="speedInFullKnots")
|
||||
default int getKnotsFloored() {
|
||||
return (int) Math.round(getKnots());
|
||||
}
|
||||
|
||||
double getMetersPerSecond();
|
||||
|
||||
|
||||
@@ -358,6 +358,9 @@ public class Util {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return {@code null} if the {@code iterable} is empty; its last element otherwise
|
||||
*/
|
||||
public static <T> T last(Iterable<T> iterable) {
|
||||
final T result;
|
||||
if (isEmpty(iterable)) {
|
||||
|
||||
@@ -99,7 +99,7 @@ public class CountryCodeFactoryImpl implements CountryCodeFactory {
|
||||
add(new CountryCodeImpl("ESTONIA", "EE", "EST", "ee", "EST", "EST", "233", "372"));
|
||||
add(new CountryCodeImpl("ETHIOPIA", "ET", "ETH", "et", "ETH", "ETH", "231", "251"));
|
||||
add(new CountryCodeImpl("EUROPEAN UNION", null, null, "eu", null, null, null, null));
|
||||
add(new CountryCodeImpl("FAEROE ISLANDS", "FO", "FRO", "fo", "FR", null, "234", "298"));
|
||||
add(new CountryCodeImpl("FAEROE ISLANDS", "FO", "FRO", "fo", "FR", "FRO", "234", "298"));
|
||||
add(new CountryCodeImpl("FALKLAND ISLANDS (MALVINAS)", "FK", "FLK", "fk", null, null, "238", "500"));
|
||||
add(new CountryCodeImpl("FIJI", "FJ", "FJI", "fj", "FJI", "FIJ", "242", "679"));
|
||||
add(new CountryCodeImpl("FINLAND", "FI", "FIN", "fi", "FIN", "FIN", "246", "358"));
|
||||
@@ -159,7 +159,7 @@ public class CountryCodeFactoryImpl implements CountryCodeFactory {
|
||||
add(new CountryCodeImpl("LIECHTENSTEIN (Fürstentum Liechtenstein)", "LI", "LIE", "li", "FL", "LIE", "438", "423"));
|
||||
add(new CountryCodeImpl("LITHUANIA", "LT", "LTU", "lt", "LT", "LTU", "440", "370"));
|
||||
add(new CountryCodeImpl("LUXEMBOURG", "LU", "LUX", "lu", "L", "LUX", "442", "352"));
|
||||
add(new CountryCodeImpl("MACAO (Special Administrative Region of China)", "MO", "MAC", "mo", null, null, "446", "853"));
|
||||
add(new CountryCodeImpl("MACAO (Special Administrative Region of China)", "MO", "MAC", "mo", null, "MAC", "446", "853"));
|
||||
add(new CountryCodeImpl("MACEDONIA (Former Yugoslav Republic of Macedonia)", "MK", "MKD", "mk", "MK", "MKD", "807", "389"));
|
||||
add(new CountryCodeImpl("MADAGASCAR", "MG", "MDG", "mg", "RM", "MAD", "450", "261"));
|
||||
add(new CountryCodeImpl("MALAWI", "MW", "MWI", "mw", "MW", "MAW", "454", "265"));
|
||||
|
||||
Reference in New Issue
Block a user