Ignore:
Timestamp:
06/11/20 16:34:40 (4 years ago)
Author:
bart
Message:

Update to version 1.41

Location:
timeline/src/main/java/geniusweb/progress
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • timeline/src/main/java/geniusweb/progress/Progress.java

    r1 r18  
    3434         *         eye on {@link #getTerminationTime()}.
    3535         */
    36         Double get(long currentTimeMs);
     36        Double get(Long currentTimeMs);
    3737
    3838        /**
     
    5151         * @return true iff the progress has passed the deadline.
    5252         */
    53         boolean isPastDeadline(long currentTimeMs);
     53        boolean isPastDeadline(Long currentTimeMs);
    5454}
  • timeline/src/main/java/geniusweb/progress/ProgressRounds.java

    r12 r18  
    99/**
    1010 * progress in terms of number of rounds. The round has to be updated by the
    11  * user of this class, calling {@link #advance()}.
     11 * user of this class, calling {@link #advance()}. immutable.
    1212 */
    1313@JsonTypeName("rounds")
     
    4949        /**
    5050         *
    51          * @return the current round. First round is 0. It is not recommended to use
    52          *         this, as this may make your code working with rounds only.
     51         * @return the current round. First round is 0. It is recommended that you
     52         *         use the functions in {@link Progress} instead of this, to ensure
     53         *         your code works with all implementations of Progress including
     54         *         future developments.
    5355         */
    5456        public Integer getCurrentRound() {
     
    5860        /**
    5961         *
    60          * @return total number of rounds. It is not recommended to use this, as
    61          *         this may make your code working with rounds only.
     62         * @return total number of rounds. It is recommended that you use the
     63         *         functions in {@link Progress} instead of this, to ensure your
     64         *         code works with all implementations of Progress including future
     65         *         developments.
    6266         */
    6367        public Integer getTotalRounds() {
     
    6670
    6771        @Override
    68         public Double get(long currentTimeMs) {
     72        public Double get(Long currentTimeMs) {
    6973                // deadline and current both are limited to MAXINT is 32 bits; double
    7074                // fits 52
     
    7983
    8084        @Override
    81         public boolean isPastDeadline(long currentTimeMs) {
     85        public boolean isPastDeadline(Long currentTimeMs) {
    8286                return currentRound >= duration || currentTimeMs > endtime.getTime();
    8387        }
  • timeline/src/main/java/geniusweb/progress/ProgressTime.java

    r1 r18  
    5151
    5252        @Override
    53         public Double get(long currentTimeMs) {
     53        public Double get(Long currentTimeMs) {
    5454                long delta = currentTimeMs - start.getTime();
    5555                // double should have ~53 digits of precision, and we're computing
     
    6666
    6767        @Override
    68         public boolean isPastDeadline(long currentTimeMs) {
     68        public boolean isPastDeadline(Long currentTimeMs) {
    6969                return currentTimeMs > start.getTime() + duration;
    7070        }
Note: See TracChangeset for help on using the changeset viewer.