Class IMEI

  • All Implemented Interfaces:
    LTRandom, Comparable<LogicalType>

    public class IMEI
    extends CheckDigitLuhn
    Plugin to detect IMEI numbers (15 digits with a valid LUHN check digit)
    • Constructor Detail

      • IMEI

        public IMEI​(PluginDefinition plugin)
        Construct a plugin to detect an IMEI.
        Parameters:
        plugin - The definition of this plugin.
    • Method Detail

      • isValid

        public boolean isValid​(String input,
                               boolean detectMode,
                               long count)
        Description copied from class: LogicalType
        Is the supplied String an instance of this Semantic type?
        Overrides:
        isValid in class CheckDigitLuhn
        Parameters:
        input - String to check (trimmed for Numeric base Types, un-trimmed for String base Type)
        detectMode - If true then we are in the process of detection, otherwise it is a simple validity check.
        count - The number of instance of this sample.
        Returns:
        true iff the supplied String is an instance of this Semantic type.
      • nextRandom

        public String nextRandom()
        Description copied from interface: LTRandom
        nextRandom will generate a random (secure) valid example of this Semantic Type.
        Specified by:
        nextRandom in interface LTRandom
        Overrides:
        nextRandom in class CheckDigitLuhn
        Returns:
        a new valid example of the Semantic Type.