Package com.cobber.fta.plugins
Class IMEI
- Object
-
- LogicalType
-
- LogicalTypeCode
-
- LogicalTypeInfinite
-
- com.cobber.fta.plugins.CheckDigitLT
-
- com.cobber.fta.plugins.CheckDigitLuhn
-
- com.cobber.fta.plugins.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)
-
-
Field Summary
-
Fields inherited from class com.cobber.fta.plugins.CheckDigitLT
BACKOUT_REGEXP, length, validator
-
Fields inherited from class com.cobber.fta.LogicalType
analysisConfig, defn, locale, localeInfo, pluginLocaleEntry, priority, threshold
-
-
Constructor Summary
Constructors Constructor Description IMEI(PluginDefinition plugin)
Construct a plugin to detect an IMEI.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isValid(String input, boolean detectMode, long count)
Is the supplied String an instance of this Semantic type?String
nextRandom()
nextRandom will generate a random (secure) valid example of this Semantic Type.-
Methods inherited from class com.cobber.fta.plugins.CheckDigitLT
analyzeSet, getBaseType, getRegExp, initialize, isCandidate
-
Methods inherited from class com.cobber.fta.LogicalTypeInfinite
isClosed, isRegExpComplete
-
Methods inherited from class com.cobber.fta.LogicalTypeCode
getRandom, seed
-
Methods inherited from class com.cobber.fta.LogicalType
acceptsBaseType, compareTo, getConfidence, getDescription, getHeaderConfidence, getPluginDefinition, getPriority, getSemanticType, getSignature, getThreshold, isLocaleSensitive, isValid, setThreshold
-
-
-
-
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 classCheckDigitLuhn
- 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 interfaceLTRandom
- Overrides:
nextRandom
in classCheckDigitLuhn
- Returns:
- a new valid example of the Semantic Type.
-
-