|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nih.nlm.umls.meta.impl.StringContextImpl
Default implementation of the StringContext
interface.
Nested Class Summary |
Nested classes inherited from class gov.nih.nlm.umls.meta.AtomElement |
AtomElement.ByLanguageRestrictor, AtomElement.BySourceRestrictor |
Nested classes inherited from class gov.nih.nlm.umls.meta.SourceElement |
SourceElement.BySourceComparator, SourceElement.BySourceRestrictor |
Constructor Summary | |
StringContextImpl()
Instantiates an empty StringContext . |
|
StringContextImpl(StringContext sc)
Instantiates a StringContext from the specified StringContext . |
Method Summary | |
void |
addSourceContext(SourceContext sc)
Adds the specified SourceContext . |
void |
clearSourceContexts()
Removes all SourceContext s. |
int |
compareTo(Object o)
Compares this StringContext to another one. |
boolean |
equals(Object o)
Returns true if the specified object is
equal to this object. |
Atom |
getAtom()
Returns the Atom for this StringContext . |
ContextGroup |
getContextGroup()
Returns the ContextGroup that holds this StringContext . |
String |
getKeyFields()
Returns a String key which can be used
by equals, compareTo, and hashCode methods. |
Source |
getSource()
Returns the source for this StringContext . |
SourceContext[] |
getSourceContexts()
Returns all SourceContext s. |
List |
getSourceContextsAsList()
Returns all SourceContext s as a List . |
int |
hashCode()
Return a hash code based on key fields. |
void |
removeSourceContext(SourceContext sc)
Removes the specified SourceContext . |
void |
setAtom(Atom atom)
Sets the source for this StringContext . |
void |
setContextGroup(ContextGroup cg)
Sets the ContextGroup that holds this StringContext . |
void |
setSource(Source source)
Sets the source for this StringContext . |
void |
setSourceContexts(List scs)
Replace the SourceContext s with the ones in the specified List . |
void |
setSourceContexts(SourceContext[] scs)
Replace the SourceContext s with the ones in the specified array. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StringContextImpl()
StringContext
.
public StringContextImpl(StringContext sc)
StringContext
from the specified StringContext
.
sc
- StringContext
to be copiedMethod Detail |
public ContextGroup getContextGroup()
ContextGroup
that holds this StringContext
.
getContextGroup
in interface StringContext
ContextGroup
that holds this StringContext
public void setContextGroup(ContextGroup cg)
ContextGroup
that holds this StringContext
.
setContextGroup
in interface StringContext
cg
- the ContextGroup
that holds this StringContext
public SourceContext[] getSourceContexts()
SourceContext
s.
getSourceContexts
in interface StringContext
SourceContext
spublic List getSourceContextsAsList()
SourceContext
s as a List
.
getSourceContextsAsList
in interface StringContext
SourceContext
spublic void addSourceContext(SourceContext sc)
SourceContext
.
addSourceContext
in interface StringContext
sc
- the SourceContext
to be addedpublic void removeSourceContext(SourceContext sc)
SourceContext
.
removeSourceContext
in interface StringContext
sc
- the SourceContext
to be removedpublic void clearSourceContexts()
SourceContext
s.
clearSourceContexts
in interface StringContext
public void setSourceContexts(SourceContext[] scs)
SourceContext
s with the ones in the specified array.
setSourceContexts
in interface StringContext
scs
- a SourceContext
[]
public void setSourceContexts(List scs)
SourceContext
s with the ones in the specified List
.
setSourceContexts
in interface StringContext
scs
- a List
of SourceContext
spublic Atom getAtom()
Atom
for this StringContext
.
getAtom
in interface AtomElement
Atom
public void setAtom(Atom atom)
StringContext
.
setAtom
in interface AtomElement
atom
- Source
public Source getSource()
StringContext
.
getSource
in interface SourceElement
Source
public void setSource(Source source)
StringContext
.
setSource
in interface SourceElement
source
- Source
public String getKeyFields()
String
key which can be used
by equals, compareTo, and hashCode methods.
getKeyFields
in interface StringContext
String
composed from the cui, aui, sui,
versioned source, tty, and code.public int hashCode()
public boolean equals(Object o)
true
if the specified object is
equal to this object. The specified object must be an
StringContext
with matching key fields.
o
- an Object
to compare against
true
if Object o is equal
false
otherwisepublic int compareTo(Object o)
StringContext
to another one. Results
are indeterminate if the specified parameter is not of the
same class.
compareTo
in interface Comparable
o
- the Object
to compare to
int
representing the relative ordering
of this and the compare-to object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |