1 16 package org.joda.time; 17 18 import java.util.Locale ; 19 20 33 public abstract class DateTimeField { 34 35 40 public abstract DateTimeFieldType getType(); 41 42 52 public abstract String getName(); 53 54 59 public abstract boolean isSupported(); 60 61 68 public abstract boolean isLenient(); 69 70 78 public abstract int get(long instant); 79 80 88 public abstract String getAsText(long instant, Locale locale); 89 90 96 public abstract String getAsText(long instant); 97 98 107 public abstract String getAsText(ReadablePartial partial, int fieldValue, Locale locale); 108 109 117 public abstract String getAsText(ReadablePartial partial, Locale locale); 118 119 127 public abstract String getAsText(int fieldValue, Locale locale); 128 129 137 public abstract String getAsShortText(long instant, Locale locale); 138 139 146 public abstract String getAsShortText(long instant); 147 148 157 public abstract String getAsShortText(ReadablePartial partial, int fieldValue, Locale locale); 158 159 167 public abstract String getAsShortText(ReadablePartial partial, Locale locale); 168 169 177 public abstract String getAsShortText(int fieldValue, Locale locale); 178 179 200 public abstract long add(long instant, int value); 201 202 212 public abstract long add(long instant, long value); 213 214 241 public abstract int[] add(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd); 242 243 270 public abstract int[] addWrapPartial(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd); 271 272 293 public abstract long addWrapField(long instant, int value) ; 294 295 319 public abstract int[] addWrapField(ReadablePartial instant, int fieldIndex, int[] values, int valueToAdd); 320 321 340 public abstract int getDifference(long minuendInstant, long subtrahendInstant); 341 342 361 public abstract long getDifferenceAsLong(long minuendInstant, long subtrahendInstant); 362 363 379 public abstract long set(long instant, int value); 380 381 399 public abstract int[] set(ReadablePartial instant, int fieldIndex, int[] values, int newValue); 400 401 416 public abstract long set(long instant, String text, Locale locale); 417 418 431 public abstract long set(long instant, String text); 432 433 450 public abstract int[] set(ReadablePartial instant, int fieldIndex, int[] values, String text, Locale locale); 451 452 461 public abstract DurationField getDurationField(); 462 463 469 public abstract DurationField getRangeDurationField(); 470 471 480 public abstract boolean isLeap(long instant); 481 482 491 public abstract int getLeapAmount(long instant); 492 493 499 public abstract DurationField getLeapDurationField(); 500 501 507 public abstract int getMinimumValue(); 508 509 515 public abstract int getMinimumValue(long instant); 516 517 523 public abstract int getMinimumValue(ReadablePartial instant); 524 525 533 public abstract int getMinimumValue(ReadablePartial instant, int[] values); 534 535 541 public abstract int getMaximumValue(); 542 543 549 public abstract int getMaximumValue(long instant); 550 551 557 public abstract int getMaximumValue(ReadablePartial instant); 558 559 567 public abstract int getMaximumValue(ReadablePartial instant, int[] values); 568 569 575 public abstract int getMaximumTextLength(Locale locale); 576 577 583 public abstract int getMaximumShortTextLength(Locale locale); 584 585 599 public abstract long roundFloor(long instant); 600 601 613 public abstract long roundCeiling(long instant); 614 615 624 public abstract long roundHalfFloor(long instant); 625 626 635 public abstract long roundHalfCeiling(long instant); 636 637 650 public abstract long roundHalfEven(long instant); 651 652 664 public abstract long remainder(long instant); 665 666 671 public abstract String toString(); 672 673 } 674 | Popular Tags |