Class DynamicVersionExtractor

java.lang.Object
com.deviceatlas.device.DynamicVersionExtractor

public class DynamicVersionExtractor extends Object
The "version" dynamic value extractor extracts a dynamic value and ensures it is a version value.
  • Constructor Summary

    Constructors
    Constructor
    Description
    DynamicVersionExtractor(com.deviceatlas.device.DelimitersHandler delimitersBeforeHandler, com.deviceatlas.device.DelimitersHandler delimitersAfterHandler, String prefix, boolean keepPrefix, char decimalSeperator, boolean suffixAllowed, char suffixSeperator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    getDynamicValue(String identifier, int startIndex)
    Extracts the characters between a valid delimiter (if defined) and up to the next delimiter.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DynamicVersionExtractor

      public DynamicVersionExtractor(com.deviceatlas.device.DelimitersHandler delimitersBeforeHandler, com.deviceatlas.device.DelimitersHandler delimitersAfterHandler, String prefix, boolean keepPrefix, char decimalSeperator, boolean suffixAllowed, char suffixSeperator)
  • Method Details

    • getDynamicValue

      public String getDynamicValue(String identifier, int startIndex)
      Extracts the characters between a valid delimiter (if defined) and up to the next delimiter. By default the ending delimiter is one of the standard set but a custom delimiter can be defined instead. The extracted value is loosely validated to ensure it is a version number and fits the defined version number criteria.
      Parameters:
      identifier - The identifier string to extract the dynamic version value from
      startIndex - The character index in the identifier where the dynamic value starts
      Returns:
      The dynamic value string or null if no dynamic value found.