|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
edu.mit.jmwe.util.CompositeCollection<IMWEDesc>
edu.mit.jmwe.index.MWEDescSet
public class MWEDescSet
Default implementation of the IMWEDescSet
interface.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.mit.jmwe.util.CompositeCollection |
---|
CompositeCollection.CompositeCollectionItr |
Field Summary |
---|
Fields inherited from class edu.mit.jmwe.util.CompositeCollection |
---|
subsets |
Constructor Summary | |
---|---|
MWEDescSet()
Creates a new empty, mutable MWE desc set. |
|
MWEDescSet(Set<IRootMWEDesc> rootDescs,
Set<IInfMWEDesc> infDescs)
Creates a new mutable MWE desc set that contains the specified elements |
Method Summary | ||
---|---|---|
boolean |
add(IMWEDesc o)
|
|
static IMWEDescSet |
emptySet()
Returns an unmodifiable empty description set. |
|
Set<IInfMWEDesc> |
getInflectedMWEDescs()
Returns the set of inflected MWE desc objects contained herein. |
|
Set<IRootMWEDesc> |
getRootMWEDescs()
Returns the set of root MWE desc objects contained herein. |
|
void |
makeUnmodifiable()
Makes this set unmodifiable. |
|
static
|
makeUnmodifiable(Set<E> set)
Returns an unmodifiable view of the given set. |
|
boolean |
remove(Object o)
|
|
boolean |
removeAll(Collection<?> c)
|
|
static
|
replaceNull(Set<E> set)
If the given set is null , returns the empty set. |
Methods inherited from class edu.mit.jmwe.util.CompositeCollection |
---|
iterator, size |
Methods inherited from class java.util.AbstractCollection |
---|
addAll, clear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, retainAll, size, toArray, toArray |
Constructor Detail |
---|
public MWEDescSet()
public MWEDescSet(Set<IRootMWEDesc> rootDescs, Set<IInfMWEDesc> infDescs)
rootDescs
- the root descs to be included in the set; may be
null
infDescs
- the inflected descs to be included in the set; may be
null
Method Detail |
---|
public Set<IRootMWEDesc> getRootMWEDescs()
IMWEDescSet
getRootMWEDescs
in interface IMWEDescSet
public Set<IInfMWEDesc> getInflectedMWEDescs()
IMWEDescSet
getInflectedMWEDescs
in interface IMWEDescSet
public boolean add(IMWEDesc o)
add
in interface Collection<IMWEDesc>
add
in interface Set<IMWEDesc>
add
in class AbstractCollection<IMWEDesc>
public boolean remove(Object o)
remove
in interface Collection<IMWEDesc>
remove
in interface Set<IMWEDesc>
remove
in class AbstractCollection<IMWEDesc>
public boolean removeAll(Collection<?> c)
removeAll
in interface Collection<IMWEDesc>
removeAll
in interface Set<IMWEDesc>
removeAll
in class AbstractCollection<IMWEDesc>
public void makeUnmodifiable()
IMWEDescSet
UnsupportedOperationException
.
makeUnmodifiable
in interface IMWEDescSet
public static IMWEDescSet emptySet()
null
, initializes it so that subsequent calls to this method
return the static instance.
public static <E extends IMWEDesc> Set<E> makeUnmodifiable(Set<E> set)
set
- the set to be made unmodifiable
public static <E extends IMWEDesc> Set<E> replaceNull(Set<E> set)
null
, returns the empty set. Otherwise,
returns the set itself.
E
- the elements in the setset
- the set
null
, returns the empty set.
Otherwise, returns the set itself.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |