Package adams.data
Class IntegerAnonymizer
- java.lang.Object
-
- adams.data.AbstractAnonymizer<Integer>
-
- adams.data.IntegerAnonymizer
-
- All Implemented Interfaces:
Serializable
public class IntegerAnonymizer extends AbstractAnonymizer<Integer>
Anonymizes Integer objects.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.data.AbstractAnonymizer
m_Buffer, m_BufferSize, m_ID, m_Mapping, m_Random, m_Seed
-
-
Constructor Summary
Constructors Constructor Description IntegerAnonymizer()
Default constructor.IntegerAnonymizer(String id, int bufferSize)
Initializes the anonymizer with a random seed value.IntegerAnonymizer(String id, long seed, int bufferSize)
Initializes the anonymizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Integer
toAnonymized(Integer id)
Turns the anonymous integer ID into the appropriate data type.-
Methods inherited from class adams.data.AbstractAnonymizer
anonymize, fillBuffer, getBufferSize, getID, getSeed, hashCode, toString
-
-
-
-
Constructor Detail
-
IntegerAnonymizer
public IntegerAnonymizer()
Default constructor. Uses a random ID and buffer size 100.
-
IntegerAnonymizer
public IntegerAnonymizer(String id, int bufferSize)
Initializes the anonymizer with a random seed value.- Parameters:
id
- the ID of the anonymizerbufferSize
- the size of the buffer for unused IDs
-
IntegerAnonymizer
public IntegerAnonymizer(String id, long seed, int bufferSize)
Initializes the anonymizer.- Parameters:
id
- the ID of the anonymizerseed
- the seed value for the random number generatorbufferSize
- the size of the buffer for unused IDs
-
-
Method Detail
-
toAnonymized
protected Integer toAnonymized(Integer id)
Turns the anonymous integer ID into the appropriate data type.- Specified by:
toAnonymized
in classAbstractAnonymizer<Integer>
- Parameters:
id
- the ID to convert- Returns:
- the final result
-
-