org.apache.hadoop.tools.rumen.anonymization
Class WordList

java.lang.Object
  extended by org.apache.hadoop.tools.rumen.anonymization.WordList
All Implemented Interfaces:
State

public class WordList
extends Object
implements State

Represents the list of words used in list-backed anonymizers.


Constructor Summary
WordList()
           
WordList(String name)
           
 
Method Summary
 void add(String word)
          Adds the specified word to the list if the word is not already added.
 boolean contains(String word)
          Returns 'true' if the list contains the specified word.
 String getName()
          Get the name of the state.
 int getSize()
          Returns the size of the list.
 Map<String,Integer> getWords()
          Gets the words.
 int indexOf(String word)
          Returns the index of the specified word in the list.
 boolean isUpdated()
          Returns 'true' if the list is updated since creation (and reload).
 void setName(String name)
          Note: That this API is only for Jackson JSON deserialization.
 void setSize(int size)
          Sets the size of the list.
 void setWords(Map<String,Integer> list)
          Sets the words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordList

public WordList()

WordList

public WordList(String name)
Method Detail

getName

public String getName()
Description copied from interface: State
Get the name of the state.

Specified by:
getName in interface State

add

public void add(String word)
Adds the specified word to the list if the word is not already added.


contains

public boolean contains(String word)
Returns 'true' if the list contains the specified word.


indexOf

public int indexOf(String word)
Returns the index of the specified word in the list.


getSize

public int getSize()
Returns the size of the list.


isUpdated

public boolean isUpdated()
Returns 'true' if the list is updated since creation (and reload).

Specified by:
isUpdated in interface State

setSize

public void setSize(int size)
Sets the size of the list. Note: That this API is only for Jackson JSON deserialization.


setName

public void setName(String name)
Note: That this API is only for Jackson JSON deserialization.

Specified by:
setName in interface State

getWords

public Map<String,Integer> getWords()
Gets the words. Note: That this API is only for Jackson JSON serialization.


setWords

public void setWords(Map<String,Integer> list)
Sets the words. Note: That this API is only for Jackson JSON deserialization.



Copyright © 2012 Apache Software Foundation. All Rights Reserved.