Searched refs:formatter (Results 1 - 25 of 78) sorted by relevance

1234

/openjdk10/jdk/src/jdk.internal.opt/share/classes/jdk/internal/joptsimple/util/
H A DDateConverter.java72 private final DateFormat formatter; field in class:DateConverter
75 * Creates a converter that uses the given date formatter/parser.
77 * @param formatter the formatter/parser to use
78 * @throws NullPointerException if {@code formatter} is {@code null}
80 public DateConverter( DateFormat formatter ) {
81 if ( formatter == null )
82 throw new NullPointerException( "illegal null formatter" );
84 this.formatter = formatter;
[all...]
/openjdk10/jdk/src/java.base/share/classes/java/util/
H A DFormattable.java122 * Formats the object using the provided {@link Formatter formatter}.
124 * @param formatter
125 * The {@link Formatter formatter}. Implementing classes may call
126 * {@link Formatter#out() formatter.out()} or {@link
127 * Formatter#locale() formatter.locale()} to obtain the {@link
129 * {@code formatter} respectively.
161 * formatter class specification.
163 void formatTo(Formatter formatter, int flags, int width, int precision); argument
/openjdk10/jdk/test/java/time/tck/java/time/format/
H A DTCKLocalizedOffsetIdPrinterParser.java33 * Test localized behavior of formatter.
39 DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.S O")
41 String date = formatter.format(ZonedDateTime.now(ZoneOffset.UTC));
42 formatter.parse(date) ;
H A DTCKFormatStyle.java111 DateTimeFormatter formatter = builder.appendLocalized(style, style).appendLiteral(" ").appendZoneOrOffsetId().toFormatter();
112 formatter = formatter.withLocale(Locale.US);
113 assertEquals(formatter.format(temporal), formattedStr);
H A DTCKResolverStyle.java123 DateTimeFormatter formatter = builder.appendOptional(optionalFormatter).toFormatter();
124 formatter = formatter.withResolverStyle(style);
126 TemporalAccessor accessor = formatter.parse(str);
132 formatter.parse(str);
H A DTCKSignStyle.java121 DateTimeFormatter formatter = builder.appendValue(ChronoField.YEAR, 2, 4, style)
123 formatter = formatter.withZone(ZoneOffset.UTC);
125 String output = formatter.format(localDate);
129 formatter.format(localDate);
/openjdk10/jdk/test/sun/text/resources/Format/
H A DBug4651568.java46 DecimalFormat formatter =
49 if (formatter.toLocalizedPattern().equals(
55 " Received: " + formatter.toLocalizedPattern() );
/openjdk10/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/util/
H A DForwardingDiagnosticFormatter.java39 * A delegated diagnostic formatter delegates all formatting
40 * actions to an underlying formatter (aka the delegated formatter).
51 * The delegated formatter
53 protected F formatter; field in class:ForwardingDiagnosticFormatter
56 * configuration object used by this formatter
60 public ForwardingDiagnosticFormatter(F formatter) { argument
61 this.formatter = formatter;
62 this.configuration = new ForwardingConfiguration(formatter
[all...]
/openjdk10/jdk/test/javax/swing/JFormattedTextField/8080972/
H A DTestDefaultFormatter.java47 private static void testDefaultFormatter(DefaultFormatter formatter ) {
49 System.out.println("formatter: " + formatter.getClass());
50 formatter.setValueClass(UserValueClass.class);
51 UserValueClass userValue = (UserValueClass) formatter.stringToValue("test");
/openjdk10/jdk/test/java/text/Format/DateFormat/
H A Dbug4097450.java50 SimpleDateFormat formatter;
58 formatter = new SimpleDateFormat(dformat[i]);
60 System.out.print(resultFormatter.format(formatter.parse(dstring[
/openjdk10/jdk/test/java/time/test/java/time/format/
H A DTestDateTimeParsing.java137 public void test_parse_instantZones_ZDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) { argument
138 TemporalAccessor actual = formatter.parse(text);
143 public void test_parse_instantZones_LDT(DateTimeFormatter formatter, String text, ZonedDateTime expected) { argument
144 TemporalAccessor actual = formatter.parse(text);
149 public void test_parse_instantZones_Instant(DateTimeFormatter formatter, String text, ZonedDateTime expected) { argument
150 TemporalAccessor actual = formatter.parse(text);
155 public void test_parse_instantZones_supported(DateTimeFormatter formatter, String text, ZonedDateTime expected) { argument
156 TemporalAccessor actual = formatter.parse(text);
176 public void test_parse_instantNoZone_ZDT(DateTimeFormatter formatter, String text, Instant expected) { argument
177 TemporalAccessor actual = formatter
182 test_parse_instantNoZone_LDT(DateTimeFormatter formatter, String text, Instant expected) argument
188 test_parse_instantNoZone_Instant(DateTimeFormatter formatter, String text, Instant expected) argument
194 test_parse_instantNoZone_supported(DateTimeFormatter formatter, String text, Instant expected) argument
[all...]
H A DTestTextParserWithLocale.java117 DateTimeFormatter formatter = getPatternFormatter(pattern).withLocale(locale);
119 assertEquals(DayOfWeek.from(formatter.parse(input, pos)), expected);
152 DateTimeFormatter formatter = getFormatter(field, style).withLocale(locale);
154 assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue);
183 DateTimeFormatter formatter = getFormatter(field).withLocale(locale);
184 assertEquals(formatter.parseUnresolved(input, pos).getLong(field), (long) expectedValue);
/openjdk10/jdk/test/java/util/logging/HigherResolutionTimeStamps/
H A DXmlFormatterNanos.java106 public boolean useInstant(XMLFormatter formatter) { argument
108 formatter.getClass().getName()+".useInstant", "true"));
192 XMLFormatter formatter = new XMLFormatter();
193 testMatching(formatter, record, instant, expectedNanos, conf.useInstant(formatter));
199 private static void testMatching(XMLFormatter formatter, argument
207 String str = formatter.format(record);
211 throw new RuntimeException(formatter.getClass().getSimpleName()
221 throw new RuntimeException(formatter.getClass().getSimpleName()
231 throw new RuntimeException(formatter
[all...]
H A DLogRecordWithNanos.java72 SimpleFormatter formatter = new SimpleFormatter();
73 String str = formatter.format(record);
117 String str2 = formatter.format(record2);
/openjdk10/jdk/src/demo/share/applets/Clock/
H A DClock.java63 private SimpleDateFormat formatter; // Formats the date displayed field in class:Clock
74 formatter = new SimpleDateFormat("EEE MMM dd hh:mm:ss yyyy",
77 lastdate = formatter.format(currentDate);
114 formatter.applyPattern("s");
116 s = Integer.parseInt(formatter.format(currentDate));
120 formatter.applyPattern("m");
122 m = Integer.parseInt(formatter.format(currentDate));
126 formatter.applyPattern("h");
128 h = Integer.parseInt(formatter.format(currentDate));
146 formatter
[all...]
/openjdk10/jdk/src/java.base/share/classes/java/time/format/
H A DDateTimePrintContext.java103 * The formatter, not null.
105 private DateTimeFormatter formatter; field in class:DateTimePrintContext
107 * Whether the current formatter is optional.
115 * @param formatter the formatter controlling the format, not null
117 DateTimePrintContext(TemporalAccessor temporal, DateTimeFormatter formatter) { argument
119 this.temporal = adjust(temporal, formatter);
120 this.formatter = formatter;
123 private static TemporalAccessor adjust(final TemporalAccessor temporal, DateTimeFormatter formatter) { argument
[all...]
H A DDateTimeParseContext.java95 * The formatter, not null.
97 private DateTimeFormatter formatter; field in class:DateTimeParseContext
118 * @param formatter the formatter controlling the parse, not null
120 DateTimeParseContext(DateTimeFormatter formatter) { argument
122 this.formatter = formatter;
131 DateTimeParseContext newContext = new DateTimeParseContext(formatter);
147 return formatter.getLocale();
158 return formatter
[all...]
/openjdk10/jdk/src/java.base/share/classes/java/io/
H A DPrintWriter.java68 private Formatter formatter; field in class:PrintWriter
795 * formatter class specification.
848 * formatter class specification.
905 if ((formatter == null)
906 || (formatter.locale() != Locale.getDefault()))
907 formatter = new Formatter(this);
908 formatter.format(Locale.getDefault(), format, args);
952 * formatter class specification.
965 if ((formatter == null) || (formatter
[all...]
H A DPrintStream.java63 private Formatter formatter; field in class:PrintStream
860 * formatter class specification.
912 * formatter class specification.
957 * formatter class specification.
970 if ((formatter == null)
971 || (formatter.locale() !=
973 formatter = new Formatter((Appendable) this);
974 formatter.format(Locale.getDefault(Locale.Category.FORMAT),
1016 * formatter class specification.
1029 if ((formatter
[all...]
/openjdk10/jdk/src/jdk.jcmd/share/classes/sun/tools/jstat/
H A DJStatLogger.java127 public void logSamples(OutputFormatter formatter, int headerRate, argument
138 out.println(formatter.getHeader());
146 out.println(formatter.getHeader());
149 out.println(formatter.getRow());
H A DJstat.java109 OutputFormatter formatter = null;
113 formatter = new OptionOutputFormatter(monitoredVm, format);
147 formatter = new RawOutputFormatter(logged,
180 logger.logSamples(formatter, arguments.headerRate(),
/openjdk10/hotspot/src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/
H A DHotSpotMethod.java76 public void formatTo(Formatter formatter, int flags, int width, int precision) { argument
78 formatter.format(applyFormattingFlagsAndWidth(base, flags & ~ALTERNATE, width));
/openjdk10/jaxp/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/io/
H A DMalformedByteSequenceException.java47 /** message formatter **/
74 * @param formatter The MessageFormatter used for building the
82 public MalformedByteSequenceException(MessageFormatter formatter, argument
84 fFormatter = formatter;
132 // The references to the message formatter and locale
/openjdk10/jdk/src/java.logging/share/classes/java/util/logging/
H A DHandler.java64 private volatile Formatter formatter; field in class:Handler
88 * @param specifiedFormatter if not null, this is the formatter to configure
98 final Formatter formatter = specifiedFormatter == null
99 ? manager.getFormatterProperty(cname + ".formatter", defaultFormatter)
108 setFormatter(formatter);
169 formatter = Objects.requireNonNull(newFormatter);
177 return formatter;
/openjdk10/jdk/src/java.base/share/classes/java/time/
H A DMonthDay.java298 * Obtains an instance of {@code MonthDay} from a text string using a specific formatter.
300 * The text is parsed using the formatter, returning a month-day.
303 * @param formatter the formatter to use, not null
307 public static MonthDay parse(CharSequence text, DateTimeFormatter formatter) { argument
308 Objects.requireNonNull(formatter, "formatter");
309 return formatter.parse(text, MonthDay::from);
636 * Formats this month-day using the specified formatter.
638 * This month-day will be passed to the formatter t
644 format(DateTimeFormatter formatter) argument
[all...]

Completed in 159 milliseconds

1234