(T entity)
| 68 | //~ Methoden ---------------------------------------------------------- |
| 69 | |
| 70 | @Override |
| 71 | public T apply(T entity) { |
| 72 | |
| 73 | if (this.fraction == '9') { |
| 74 | return entity; |
| 75 | } |
| 76 | |
| 77 | int nano = entity.get(NANO_OF_SECOND); |
| 78 | int max = entity.getMaximum(NANO_OF_SECOND); |
| 79 | |
| 80 | switch (this.fraction) { |
| 81 | case '3': |
| 82 | nano = (nano / MIO) * MIO + (this.up ? 999999 : 0); |
| 83 | return entity.with(NANO_OF_SECOND, Math.min(max, nano)); |
| 84 | case '6': |
| 85 | nano = (nano / KILO) * KILO + (this.up ? 999 : 0); |
| 86 | return entity.with(NANO_OF_SECOND, Math.min(max, nano)); |
| 87 | default: |
| 88 | throw new UnsupportedOperationException( |
| 89 | "Unknown: " + this.fraction); |
| 90 | } |
| 91 | |
| 92 | } |
| 93 | |
| 94 | } |
nothing calls this directly
no test coverage detected