Class TrimmingPostProcessor

java.lang.Object
org.codice.alliance.libs.klv.TrimmingPostProcessor
All Implemented Interfaces:
PostProcessor

public class TrimmingPostProcessor extends Object implements PostProcessor
Trim all of the Trimmable handlers. This is in case one of the values was not supplied by the KLV data. For example the lat value was supplied, but the lon value was KlvDataElement.isErrorIndicated().
  • Constructor Details

    • TrimmingPostProcessor

      public TrimmingPostProcessor()
  • Method Details

    • postProcess

      public void postProcess(Map<String,org.codice.ddf.libs.klv.KlvDataElement> dataElements, Map<String,KlvHandler> handlers)
      Description copied from interface: PostProcessor
      A typical implementation would search dataElements for specific instances, calculate a new value, and then call the KlvHandler in handlers that corresponds to the new data.
      Specified by:
      postProcess in interface PostProcessor
      Parameters:
      dataElements - map of klv data element names to klv data elements that were retrieved from the current klv metadata packet
      handlers - map of klv data element names to the handlers that process the klv data elements