Package adams.data
Class DoubleAnonymizer
- java.lang.Object
-
- adams.data.AbstractAnonymizer<Double>
-
- adams.data.DoubleAnonymizer
-
- All Implemented Interfaces:
Serializable
public class DoubleAnonymizer extends AbstractAnonymizer<Double>
Anonymizes Double objects.- 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 DoubleAnonymizer()
Default constructor.DoubleAnonymizer(String id, int bufferSize)
Initializes the anonymizer with a random seed value.DoubleAnonymizer(String id, long seed, int bufferSize)
Initializes the anonymizer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Double
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
-
DoubleAnonymizer
public DoubleAnonymizer()
Default constructor. Uses a random ID and buffer size 100.
-
DoubleAnonymizer
public DoubleAnonymizer(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
-
DoubleAnonymizer
public DoubleAnonymizer(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 Double toAnonymized(Integer id)
Turns the anonymous integer ID into the appropriate data type.- Specified by:
toAnonymized
in classAbstractAnonymizer<Double>
- Parameters:
id
- the ID to convert- Returns:
- the final result
-
-