Package adams.data

Class StringAnonymizer

    • Constructor Detail

      • StringAnonymizer

        public StringAnonymizer()
        Default constructor. Uses a random ID and buffer size 100.
      • StringAnonymizer

        public StringAnonymizer​(String id,
                                int bufferSize)
        Initializes the anonymizer with a random seed value.
        Parameters:
        id - the ID of the anonymizer
        bufferSize - the size of the buffer for unused IDs
      • StringAnonymizer

        public StringAnonymizer​(String id,
                                long seed,
                                int bufferSize)
        Initializes the anonymizer.
        Parameters:
        id - the ID of the anonymizer
        seed - the seed value for the random number generator
        bufferSize - the size of the buffer for unused IDs
    • Method Detail

      • toAnonymized

        protected String toAnonymized​(Integer id)
        Turns the anonymous integer ID into the appropriate data type.
        Specified by:
        toAnonymized in class AbstractAnonymizer<String>
        Parameters:
        id - the ID to convert
        Returns:
        the final result