public class WordFactory extends java.lang.Object implements LabelFactory
WordFactory acts as a factory for creating objects of
class Word.| Constructor and Description |
|---|
WordFactory()
Creates a new WordFactory.
|
| Modifier and Type | Method and Description |
|---|---|
Label |
newLabel(Label oldLabel)
Create a new
Word Label, where the label is
formed from
the Label object passed in. |
Label |
newLabel(java.lang.String word)
Create a new word, where the label is formed from
the
String passed in. |
Label |
newLabel(java.lang.String word,
int options)
Create a new word, where the label is formed from
the
String passed in. |
Label |
newLabelFromString(java.lang.String word)
Create a new word, where the label is formed from
the
String passed in. |
public Label newLabel(java.lang.String word)
String passed in.newLabel in interface LabelFactoryword - The word that will go into the Wordpublic Label newLabel(java.lang.String word, int options)
String passed in.newLabel in interface LabelFactoryword - The word that will go into the Wordoptions - is ignored by a WordFactorypublic Label newLabelFromString(java.lang.String word)
String passed in.newLabelFromString in interface LabelFactoryword - The word that will go into the Wordpublic Label newLabel(Label oldLabel)
Word Label, where the label is
formed from
the Label object passed in. Depending on what fields
each label has, other things will be null.newLabel in interface LabelFactoryoldLabel - The Label that the new label is being created from