| 3156 | } |
| 3157 | |
| 3158 | private static class GlobalTimeLine |
| 3159 | implements TimeLine<Moment> { |
| 3160 | |
| 3161 | //~ Methoden ------------------------------------------------------ |
| 3162 | |
| 3163 | @Override |
| 3164 | public Moment stepForward(Moment timepoint) { |
| 3165 | |
| 3166 | try { |
| 3167 | if (useSI(timepoint)) { |
| 3168 | return timepoint.plus(1, SI.NANOSECONDS); |
| 3169 | } else { |
| 3170 | return timepoint.plus(1, TimeUnit.NANOSECONDS); |
| 3171 | } |
| 3172 | } catch (ArithmeticException iae) { |
| 3173 | return null; // out of range |
| 3174 | } |
| 3175 | |
| 3176 | } |
| 3177 | |
| 3178 | @Override |
| 3179 | public Moment stepBackwards(Moment timepoint) { |
| 3180 | |
| 3181 | try { |
| 3182 | if (useSI(timepoint)) { |
| 3183 | return timepoint.minus(1, SI.NANOSECONDS); |
| 3184 | } else { |
| 3185 | return timepoint.minus(1, TimeUnit.NANOSECONDS); |
| 3186 | } |
| 3187 | } catch (ArithmeticException iae) { |
| 3188 | return null; // out of range |
| 3189 | } |
| 3190 | |
| 3191 | } |
| 3192 | |
| 3193 | @Override |
| 3194 | public boolean isCalendrical() { |
| 3195 | |
| 3196 | return false; |
| 3197 | |
| 3198 | } |
| 3199 | |
| 3200 | @Override |
| 3201 | public Moment getMinimum() { |
| 3202 | |
| 3203 | return MIN; |
| 3204 | |
| 3205 | } |
| 3206 | |
| 3207 | @Override |
| 3208 | public Moment getMaximum() { |
| 3209 | |
| 3210 | return MAX; |
| 3211 | |
| 3212 | } |
| 3213 | |
| 3214 | @Override |
| 3215 | public int compare(Moment m1, Moment m2) { |
nothing calls this directly
no outgoing calls
no test coverage detected