Lines Matching defs:Period
15 * In addition Period can either represent the duration as being into the past
18 * Use a PeriodFormatter to convert a Period to a String.
24 * Period p1 = Period.at(3, WEEK).and(2, DAY).inFuture();
25 * Period p2 = p1.and(12, HOUR);</pre>
27 public final class Period {
33 * Constructs a Period representing a duration of
37 * @return the new Period
39 public static Period at(float count, TimeUnit unit) {
41 return new Period(ETimeLimit.NOLIMIT, false, count, unit);
45 * Constructs a Period representing a duration more than
49 * @return the new Period
51 public static Period moreThan(float count, TimeUnit unit) {
53 return new Period(ETimeLimit.MT, false, count, unit);
57 * Constructs a Period representing a duration
61 * @return the new Period
63 public static Period lessThan(float count, TimeUnit unit) {
65 return new Period(ETimeLimit.LT, false, count, unit);
77 * @return the new Period
79 public Period and(float count, TimeUnit unit) {
88 * @return the new Period
90 public Period omit(TimeUnit unit) {
97 * @return the new Period
99 public Period at() {
106 * @return the new Period
108 public Period moreThan() {
115 * @return the new Period
117 public Period lessThan() {
124 * @return the new Period
126 public Period inFuture() {
133 * @return the new Period
135 public Period inPast() {
144 * @return the new Period
146 public Period inFuture(boolean future) {
155 * @return the new Period
157 public Period inPast(boolean past) {
238 * Returns true if rhs extends Period and
241 * @return true if rhs is a Period and is equal to this
245 return equals((Period)rhs);
256 * Note that this means that a period of 1000ms and a period of 1sec
259 * @param rhs the period to compare to
262 public boolean equals(Period rhs) {
291 private Period(int limit, boolean future, float count, TimeUnit unit) {
301 Period(int timeLimit, boolean inFuture, int[] counts) {
310 private Period setTimeUnitValue(TimeUnit unit, float value) {
318 * Sets the period to have the provided value, 1/1000 of the
321 * @param p the period to change
323 * @eturn the new Period object.
325 private Period setTimeUnitInternalValue(TimeUnit unit, int value) {
333 return new Period(timeLimit, inFuture, newCounts);
341 * @return the new Period
343 private Period setFuture(boolean future) {
345 return new Period(timeLimit, future, counts);
354 * @return the new Period
356 private Period setTimeLimit(byte limit) {
358 return new Period(limit, inFuture, counts);