1717package org .springframework .batch .core ;
1818
1919/**
20- * Enumeration representing the status of an Execution .
21- *
20+ * Enumeration representing the status of an execution .
21+ *
2222 * @author Lucas Ward
2323 * @author Dave Syer
2424 * @author Michael Minella
@@ -28,14 +28,14 @@ public enum BatchStatus {
2828
2929 /**
3030 * The order of the status values is significant because it can be used to
31- * aggregate a set of status values - the result should be the maximum
32- * value. Since COMPLETED is first in the order, only if all elements of an
33- * execution are COMPLETED will the aggregate status be COMPLETED. A running
34- * execution is expected to move from STARTING to STARTED to COMPLETED
31+ * aggregate a set of status values. The result should be the maximum
32+ * value. Since {@code COMPLETED} is first in the order, only if all elements of an
33+ * execution are {@code COMPLETED} can the aggregate status be COMPLETED. A running
34+ * execution is expected to move from {@code STARTING} to {@code STARTED} to {@code COMPLETED}
3535 * (through the order defined by {@link #upgradeTo(BatchStatus)}). Higher
36- * values than STARTED signify more serious failure. ABANDONED is used for
37- * steps that have finished processing, but were not successful, and where
38- * they should be skipped on a restart (so FAILED is the wrong status).
36+ * values than {@code STARTED} signify more serious failures. {@code ABANDONED} is used for
37+ * steps that have finished processing but were not successful and where
38+ * they should be skipped on a restart (so {@code FAILED} is the wrong status).
3939 */
4040
4141 /**
@@ -72,7 +72,7 @@ public enum BatchStatus {
7272 UNKNOWN ;
7373
7474 /**
75- * Convenience method to return the higher value status of the statuses pass in to the method.
75+ * Convenience method to return the higher value status of the statuses passed to the method.
7676 *
7777 * @param status1 The first status to check.
7878 * @param status2 The second status to check.
@@ -83,8 +83,8 @@ public static BatchStatus max(BatchStatus status1, BatchStatus status2) {
8383 }
8484
8585 /**
86- * Convenience method to decide if a status indicates work is in progress.
87- *
86+ * Convenience method to decide if a status indicates that work is in progress.
87+ *
8888 * @return true if the status is STARTING, STARTED
8989 */
9090 public boolean isRunning () {
@@ -94,8 +94,8 @@ public boolean isRunning() {
9494 /**
9595 * Convenience method to decide if a status indicates execution was
9696 * unsuccessful.
97- *
98- * @return true if the status is FAILED or greater
97+ *
98+ * @return {@code true} if the status is {@code FAILED} or greater.
9999 */
100100 public boolean isUnsuccessful () {
101101 return this == FAILED || this .isGreaterThan (FAILED );
@@ -104,13 +104,13 @@ public boolean isUnsuccessful() {
104104 /**
105105 * Method used to move status values through their logical progression, and
106106 * override less severe failures with more severe ones. This value is
107- * compared with the parameter and the one that has higher priority is
108- * returned. If both are STARTED or less than the value returned is the
109- * largest in the sequence STARTING, STARTED, COMPLETED. Otherwise the value
107+ * compared with the parameter, and the one that has higher priority is
108+ * returned. If both are {@code STARTED} or less than the value returned is the
109+ * largest in the sequence {@code STARTING}, {@code STARTED}, {@code COMPLETED} . Otherwise, the value
110110 * returned is the maximum of the two.
111- *
112- * @param other another status to compare to
113- * @return either this or the other status depending on their priority
111+ *
112+ * @param other Another status to which to compare.
113+ * @return either this or the other status, depending on their priority.
114114 */
115115 public BatchStatus upgradeTo (BatchStatus other ) {
116116 if (isGreaterThan (STARTED ) || other .isGreaterThan (STARTED )) {
@@ -124,36 +124,36 @@ public BatchStatus upgradeTo(BatchStatus other) {
124124 }
125125
126126 /**
127- * @param other a status value to compare
128- * @return true if this is greater than other
127+ * @param other A status value to which to compare.
128+ * @return {@code true} if this is greater than {@code other}.
129129 */
130130 public boolean isGreaterThan (BatchStatus other ) {
131131 return this .compareTo (other ) > 0 ;
132132 }
133133
134134 /**
135- * @param other a status value to compare
136- * @return true if this is less than other
135+ * @param other A status value to which to compare.
136+ * @return {@code true} if this is less than {@code other}.
137137 */
138138 public boolean isLessThan (BatchStatus other ) {
139139 return this .compareTo (other ) < 0 ;
140140 }
141141
142142 /**
143- * @param other a status value to compare
144- * @return true if this is less than other
143+ * @param other A status value to which to compare.
144+ * @return {@code true} if this is less than {@code other}.
145145 */
146146 public boolean isLessThanOrEqualTo (BatchStatus other ) {
147147 return this .compareTo (other ) <= 0 ;
148148 }
149149
150150 /**
151- * Find a BatchStatus that matches the beginning of the given value. If no
152- * match is found, return COMPLETED as the default because has is low
151+ * Find a {@code BatchStatus} that matches the beginning of the given value. If no
152+ * match is found, return {@code COMPLETED} as the default because it has low
153153 * precedence.
154- *
155- * @param value a string representing a status
156- * @return a BatchStatus
154+ *
155+ * @param value A string representing a status.
156+ * @return a { BatchStatus} object.
157157 */
158158 public static BatchStatus match (String value ) {
159159 for (BatchStatus status : values ()) {
0 commit comments