public class WordListAnonymizerUtility extends Object
DefaultAnonymizableDataType
using a WordList
for anonymization.
//TODO There is no caching for saving memory.Constructor and Description |
---|
WordListAnonymizerUtility() |
Modifier and Type | Method and Description |
---|---|
static String[] |
extractSuffix(String data,
String[] suffixes)
Extracts a known suffix from the given data.
|
static boolean |
hasSuffix(String data,
String[] suffixes)
Checks if the given data has a known suffix.
|
static boolean |
isKnownData(String data)
Checks if the given data is known.
|
static boolean |
isKnownData(String data,
String[] knownWords)
Checks if the given data is known.
|
static boolean |
needsAnonymization(String data)
Checks if the data needs anonymization.
|
public static boolean needsAnonymization(String data)
public static boolean hasSuffix(String data, String[] suffixes)
public static String[] extractSuffix(String data, String[] suffixes)
RuntimeException
- if the data doesn't have a suffix.
Use hasSuffix(String, String[])
to make sure that the
given data has a suffix.public static boolean isKnownData(String data)
KNOWN_WORDS
to
detect if the given data is a commonly used (so called 'known') word.Copyright © 2013 Apache Software Foundation. All rights reserved.