Package net.solarnetwork.central.support
Class DelegatingParser<T>
java.lang.Object
net.solarnetwork.central.support.DelegatingParser<T>
- All Implemented Interfaces:
org.springframework.format.Parser<T>
A parser that delegates to a set of other parsers, returning the first
successful result.
-
Constructor Summary
ConstructorsConstructorDescriptionDelegatingParser(org.springframework.format.Parser<T>... delegates) Constructor. -
Method Summary
-
Constructor Details
-
DelegatingParser
Constructor.- Parameters:
delegates- the delegates to parse withparser- main parser- Throws:
IllegalArgumentException- ifdelegatesis null or empty
-
-
Method Details
-
parse
- Specified by:
parsein interfaceorg.springframework.format.Parser<T>- Throws:
ParseException
-