Class LogicalTypeFinite

    • Field Detail

      • minLength

        protected int minLength
      • maxLength

        protected int maxLength
    • Constructor Detail

    • Method Detail

      • getMembers

        public abstract java.util.Set<java.lang.String> getMembers()
      • getBaseType

        public FTAType getBaseType()
        Description copied from class: LogicalType
        The underlying type we are qualifying.
        Specified by:
        getBaseType in class LogicalType
        Returns:
        The underlying type - e.g. STRING, LONG, etc.
      • isValid

        public boolean isValid​(java.lang.String input)
        Description copied from class: LogicalType
        Is the supplied String an instance of this logical type?
        Specified by:
        isValid in class LogicalType
        Parameters:
        input - String to check (trimmed for Numeric base Types, un-trimmed for String base Type)
        Returns:
        true iff the supplied String is an instance of this Logical type.
      • initialize

        public boolean initialize​(java.util.Locale locale)
                           throws FTAPluginException
        Description copied from class: LogicalType
        Called to perform any initialization.
        Overrides:
        initialize in class LogicalTypeCode
        Parameters:
        locale - The locale used for this analysis
        Returns:
        True if initialization was successful.
        Throws:
        FTAPluginException - Thrown when the plugin is incorrectly configured.
      • isRegExpComplete

        public boolean isRegExpComplete()
        Description copied from class: LogicalType
        Is the returned Regular Expression a true representation of the Logical Type. For example, \\d{5} is not for US ZIP codes, whereas (?i)(male|female) could be valid for a Gender.
        Overrides:
        isRegExpComplete in class LogicalType
        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 class LogicalType
        Returns:
        A boolean indicating if the set is closed.
      • getSize

        public int getSize()
        Get the number of members in this Logical Type.
        Returns:
        The number of members
      • getMinLength

        public int getMinLength()
        Get the minimum length of instances of this Logical Type.
        Returns:
        The minimum length of instances
      • getMaxLength

        public int getMaxLength()
        Get the maximum length of instances of this Logical Type.
        Returns:
        The maximum length of instances