|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LabelFactory
A LabelFactory
object acts as a factory for creating
objects of class Label
, or some descendant class.
It can also make Labels from Strings, optionally with options.
Method Summary | |
---|---|
Label |
newLabel(Label oldLabel)
Create a new Label , where the label is formed from
the Label object passed in. |
Label |
newLabel(java.lang.String labelStr)
Make a new label with this String as the
value . |
Label |
newLabel(java.lang.String labelStr,
int options)
Make a new label with this String as the value, and
the type determined in an implementation-dependent way from the
options value. |
Label |
newLabelFromString(java.lang.String encodedLabelStr)
Make a new label. |
Method Detail |
---|
Label newLabel(java.lang.String labelStr)
String
as the
value
.
Any other fields of the label would normally be null
.
labelStr
- The String that will be used for balue
Label newLabel(java.lang.String labelStr, int options)
String
as the value, and
the type determined in an implementation-dependent way from the
options value.
labelStr
- The String that will be used for valueoptions
- May determine what kind of label is created
Label newLabelFromString(java.lang.String encodedLabelStr)
encodedLabelStr
- The String that will be used for labelling the
object (by decoding it into parts)
Label newLabel(Label oldLabel)
Label
, where the label is formed from
the Label
object passed in. The new Label is
guaranteed to at least copy the value()
of the
source label (if non-null); it may also copy other components
(this is implementation-specific). However, if oldLabel is of
the same type as is produced by the factory, then the whole
label should be cloned, so that the returnedLabel.equals(oldLabel).
Implementation note: That last sentence isn't true of all
current implementations (e.g., WordTag), but we should make it
so that it is true!
oldLabel
- The Label that the new label is being created from
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |