Skip to content

Commit 176147c

Browse files
committed
Update ChronoParser.java
1 parent 655ed2b commit 176147c

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

base/src/main/java/net/time4j/format/expert/ChronoParser.java

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* -----------------------------------------------------------------------
3-
* Copyright © 2013-2018 Meno Hochschild, <http://www.menodata.de/>
3+
* Copyright © 2013-2024 Meno Hochschild, <http://www.menodata.de/>
44
* -----------------------------------------------------------------------
55
* This file (ChronoParser.java) is part of project Time4J.
66
*
@@ -171,5 +171,27 @@ default AttributeQuery getAttributes() {
171171
return Attributes.empty();
172172

173173
}
174+
175+
/**
176+
* <p>Creates a simple placeholder in situations where parsing
177+
* is not used. </p>
178+
*
179+
* @param <T> generic type of chronological entity to be parsed
180+
* @return dummy parser
181+
* @since 5.9.4
182+
*/
183+
/*[deutsch]
184+
* <p>Erzeugt einen einfachen Platzhalter in Situationen, in denen
185+
* das Parsen nicht gebraucht wird. </p>
186+
*
187+
* @param <T> generic type of chronological entity to be parsed
188+
* @return dummy parser
189+
* @since 5.9.4
190+
*/
191+
static <T> ChronoParser<T> unsupported() {
192+
return (CharSequence text, ParseLog status, AttributeQuery attrs) -> {
193+
throw new UnsupportedOperationException("Parsing not used.");
194+
};
195+
}
174196

175197
}

0 commit comments

Comments
 (0)