Class DelegatingParser<T>

java.lang.Object
net.solarnetwork.central.support.DelegatingParser<T>
All Implemented Interfaces:
org.springframework.format.Parser<T>

public class DelegatingParser<T> extends Object implements org.springframework.format.Parser<T>
A parser that delegates to a set of other parsers, returning the first successful result.
  • Constructor Details

    • DelegatingParser

      @SafeVarargs public DelegatingParser(org.springframework.format.Parser<T>... delegates)
      Constructor.
      Parameters:
      delegates - the delegates to parse with
      parser - main parser
      Throws:
      IllegalArgumentException - if delegates is null or empty
  • Method Details