Skip to content

Commit

Permalink
Update JavaDocs to avoid warnings on recent JDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
KosherJava authored Jan 1, 2025
1 parent d064715 commit 85f2989
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/main/java/com/kosherjava/zmanim/util/Time.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Zmanim Java API
* Copyright (C) 2004-2020 Eliyahu Hershfeld
* Copyright (C) 2004-2025 Eliyahu Hershfeld
*
* This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General
* Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option)
Expand All @@ -22,7 +22,7 @@
* this API. The time class is used to represent numeric time such as the time in hours, minutes, seconds and
* milliseconds of a {@link com.kosherjava.zmanim.AstronomicalCalendar#getTemporalHour() temporal hour}.
*
* @author © Eliyahu Hershfeld 2004 - 2020
* @author © Eliyahu Hershfeld 2004 - 2025
*/
public class Time {
/** milliseconds in a second. */
Expand All @@ -35,26 +35,31 @@ public class Time {
private static final int HOUR_MILLIS = MINUTE_MILLIS * 60;

/**
* The hour.
* @see #getHours()
*/
private int hours;

/**
* The minutes.
* @see #getMinutes()
*/
private int minutes;

/**
* The seconds.
* @see #getSeconds()
*/
private int seconds;

/**
* The milliseconds.
* @see #getMilliseconds()
*/
private int milliseconds;

/**
* Is the time negative
* @see #isNegative()
* @see #setIsNegative(boolean)
*/
Expand Down Expand Up @@ -85,8 +90,8 @@ public Time(double millis) {
}

/**
* A constructor that sets the time by milliseconds. The milliseconds are converted to hours, minutes, seconds
* and milliseconds. If the milliseconds are negative it will call {@link #setIsNegative(boolean)}.
* A constructor that sets the time from milliseconds. The milliseconds are converted to hours, minutes,
* seconds and milliseconds. If the milliseconds are negative it will call {@link#setIsNegative(boolean)}.
* @param millis the milliseconds to set.
*/
public Time(int millis) {
Expand All @@ -108,7 +113,7 @@ public Time(int millis) {
}

/**
* Does the time represent a negative time 9such as using this to subtract time from another Time.
* Does the time represent a negative time, such as using this to subtract time from another Time.
* @return if the time is negative.
*/
public boolean isNegative() {
Expand All @@ -124,13 +129,15 @@ public void setIsNegative(boolean isNegative) {
}

/**
* Get the hour.
* @return Returns the hour.
*/
public int getHours() {
return this.hours;
}

/**
* Set the hour.
* @param hours
* The hours to set.
*/
Expand All @@ -139,13 +146,15 @@ public void setHours(int hours) {
}

/**
* Get the minutes.
* @return Returns the minutes.
*/
public int getMinutes() {
return this.minutes;
}

/**
* Set the minutes.
* @param minutes
* The minutes to set.
*/
Expand All @@ -154,13 +163,15 @@ public void setMinutes(int minutes) {
}

/**
* Get the seconds.
* @return Returns the seconds.
*/
public int getSeconds() {
return this.seconds;
}

/**
* Set the seconds.
* @param seconds
* The seconds to set.
*/
Expand All @@ -169,13 +180,15 @@ public void setSeconds(int seconds) {
}

/**
* Get the milliseconds.
* @return Returns the milliseconds.
*/
public int getMilliseconds() {
return this.milliseconds;
}

/**
* Set the milliseconds.
* @param milliseconds
* The milliseconds to set.
*/
Expand Down

0 comments on commit 85f2989

Please sign in to comment.