Skip to content

Commit

Permalink
update javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Suret committed Jun 23, 2015
1 parent 218a62f commit 924fdd9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions src/main/java/org/dhatim/businesshours/BusinessPeriod.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class BusinessPeriod {
private final BusinessTemporal end;

/**
* Builds a new instance of {@link BusinessPeriod}
* Builds a new instance of {@link BusinessPeriod}.
* @param start when the period opens
* @param end when the period closes
*/
Expand All @@ -48,7 +48,7 @@ public BusinessPeriod(BusinessTemporal start, BusinessTemporal end) {
}

/**
* Tells if this period is always open
* Tells if this period is always open.
* @return true if the business is always open, false otherwise
*/
public boolean alwaysOpen() {
Expand All @@ -75,7 +75,7 @@ public long timeBeforeOpening(Temporal temporal, ChronoUnit unit) {
}

/**
* Get a {@link CronExpression} that triggers at each period opening
* Get a {@link CronExpression} that triggers at each period opening.
* e.g. if the period is 9am-18pm, the result will be <code>0 9 * * *</code>
* @return <code>null</code> if the period is always open, else the cron expression
*/
Expand All @@ -84,15 +84,15 @@ public CronExpression getStartCron() {
}

/**
* Get the opening time of this period
* Get the opening time of this period.
* @return when this period opens
*/
public BusinessTemporal getStart() {
return start;
}

/**
* Get the closing time of this period
* Get the closing time of this period.
* @return when this period closes
*/
public BusinessTemporal getEnd() {
Expand Down Expand Up @@ -125,7 +125,7 @@ public boolean equals(Object obj) {
}

/**
* Merge intersecting or adjacent periods
* Merge intersecting or adjacent periods.
* @param periods the periods to merge
* @return the merged periods.
* Their opening time spans will be exactly the same as the input periods.
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/org/dhatim/businesshours/BusinessTemporal.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static BusinessTemporal from(TemporalAccessor temporal, Set<ChronoField>
}

/**
* Check that the given fields are contiguous and have a fixed length
* Check that the given fields are contiguous and have a fixed length.
*
* @param supportedFields the fields
*/
Expand Down Expand Up @@ -203,7 +203,7 @@ public long until(Temporal endExclusive, TemporalUnit unit) {
}

/**
* Increments the least significant field of this Business Temporal by one
* Increments the least significant field of this Business Temporal by one.
*
* @return a new Business Temporal with the incremented field
*/
Expand Down Expand Up @@ -236,8 +236,8 @@ public long since(final Temporal temporal, ChronoUnit unit) {
}

/**
* get all the fields that are measured with a unit greater than or equals
* to the provided unit
* Get all the fields that are measured with a unit greater than or equals
* to the provided unit.
*
* @param unit the unit
* @return a set containing the relevant fields
Expand Down Expand Up @@ -287,7 +287,7 @@ public boolean equals(Object obj) {

/**
* Equivalent of Duration.get(unit), but supports units differents than
* SECOND and NANO
* SECOND and NANO.
*
* @param duration the duration
* @param unit the unit
Expand All @@ -298,7 +298,7 @@ private static long durationInUnit(Duration duration, TemporalUnit unit) {
}

/**
* Equivalent of Temporal.getLong with arbitrary base and range units
* Equivalent of Temporal.getLong with arbitrary base and range units.
*
* @param temporal the temporal to query
* @param baseUnit the base unit
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/dhatim/businesshours/CronExpression.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public int hashCode() {

/**
* Tells if this cron expression is equals to the given one.
* Two cron expresions are equals if they trigger at exactly the same moments.
* Two cron expresions are equals if they trigger at exactly the same instants.
* @param obj the object to this expression compare to
* @return true if the expressions are equals, false otherwise
*/
Expand All @@ -145,7 +145,7 @@ public boolean equals(Object obj) {
}

/**
* Convert this cron expression into its string representation
* Convert this cron expression into its string representation.
*
* @see <a href="https://en.wikipedia.org/wiki/Cron#CRON_expression">the
* cron expression format</a>
Expand Down Expand Up @@ -193,7 +193,7 @@ private static String rangeToString(ValueRange range) {
/**
* Merge the given cron expressions where it is possible.
* For instance, <code>"2 18 * * *"</code> and <code>"4 18 * * *"</code>
* can be merged in <code>"2,4 18 * * *"</code>
* can be merged in <code>"2,4 18 * * *"</code>.
* @param crons the cron expressions to merge
* @return the merged cron expressions.
* They will trigger at the exact same moments as the input cron expressions.
Expand Down

0 comments on commit 924fdd9

Please sign in to comment.