Package com.cobber.fta
Class LogicalTypeInfinite
- Object
-
- LogicalType
-
- LogicalTypeCode
-
- LogicalTypeInfinite
-
- All Implemented Interfaces:
LTRandom
,Comparable<LogicalType>
- Direct Known Subclasses:
Aadhar_IN
,Address2EN
,AddressEN
,CheckDigitLT
,CoordinateDMS
,EmailLT
,FreeText
,GUID
,IN_JA
,IPV4Address
,IPV6Address
,JobTitleEN
,NameFirstLast
,NameLastFirst
,NHS_UK
,PhoneNumberLT
,PostalCodeFR
,PostalCodeJA
,PostalCodeMX
,PostalCodeSE
,SSN_CH
,SSN_FR
,UKPostalCode
,URLLT
,USZip5
,USZipPlus4
,VIN
public abstract class LogicalTypeInfinite extends LogicalTypeCode
All Logical Types that consist of a unconstrained domain, for example, an infinite (or large) number of elements should subclass this abstract class.
-
-
Field Summary
-
Fields inherited from class com.cobber.fta.LogicalTypeCode
random
-
Fields inherited from class com.cobber.fta.LogicalType
defn, locale, pluginLocaleEntry, priority, threshold
-
-
Constructor Summary
Constructors Constructor Description LogicalTypeInfinite(PluginDefinition plugin)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
isCandidate(String trimmed, StringBuilder compressed, int[] charCounts, int[] lastIndex)
A fast check to see if the supplied String might be an instance of this logical type?boolean
isClosed()
Does the set of members enumerated reflect the entire set.boolean
isRegExpComplete()
Is the returned Regular Expression a true and complete representation of the Logical Type.-
Methods inherited from class com.cobber.fta.LogicalTypeCode
initialize, seed
-
Methods inherited from class com.cobber.fta.LogicalType
acceptsBaseType, analyzeSet, compareTo, getBaseType, getConfidence, getDescription, getHeaderConfidence, getPluginDefinition, getPriority, getQualifier, getRegExp, getSignature, getThreshold, isLocaleSensitive, isValid, setThreshold
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.cobber.fta.LTRandom
nextRandom
-
-
-
-
Constructor Detail
-
LogicalTypeInfinite
public LogicalTypeInfinite(PluginDefinition plugin)
-
-
Method Detail
-
isCandidate
public abstract boolean isCandidate(String trimmed, StringBuilder compressed, int[] charCounts, int[] lastIndex)
A fast check to see if the supplied String might be an instance of this logical type?- Parameters:
trimmed
- String to checkcompressed
- A compressed representation of the input string (e.g. \d{5} for 20351).charCounts
- An array of occurrence counts for characters in the input (ASCII-only).lastIndex
- An array of the last index where character is located (ASCII-only).- Returns:
- true iff the supplied String is a possible instance of this Logical type.
-
isRegExpComplete
public boolean isRegExpComplete()
Description copied from class:LogicalType
Is the returned Regular Expression a true and complete representation of the Logical Type. For example, \\d{5} is not for US ZIP codes (e.g. 00000 is not a valid Zip), whereas (?i)(male|female) could be valid for a Gender.- Overrides:
isRegExpComplete
in classLogicalType
- Returns:
- The Java Regular Expression that most closely matches this Logical Type.
-
isClosed
public boolean isClosed()
Description copied from class:LogicalType
Does the set of members enumerated reflect the entire set. For example any of the ISO sets are reference sets and hence complete, compared to FirstName and LastName where the set provided is of the common names. If isClosed() is true then isValid() false does not imply that the input is not valid just that it is not in the set of 'known' members.- Specified by:
isClosed
in classLogicalType
- Returns:
- A boolean indicating if the set is closed.
-
-