Package org.spdx.core
Class ModelSet<T>
- java.lang.Object
-
- org.spdx.core.ModelCollection<Object>
-
- org.spdx.core.ModelSet<T>
-
public class ModelSet<T> extends ModelCollection<Object> implements Set<Object>
A ModelCollection implemented as a set where all items in the collection are unique based on equality (not based on equivalence).- Author:
- Gary O'Neall
-
-
Field Summary
-
Fields inherited from class org.spdx.core.ModelCollection
externalMap
-
-
Constructor Summary
Constructors Constructor Description ModelSet(IModelStore modelStore, String objectUri, PropertyDescriptor propertyDescriptor, IModelCopyManager copyManager, Class<?> type, String specVersion, String idPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Object element)
boolean
addAll(Collection c)
-
Methods inherited from class org.spdx.core.ModelCollection
clear, contains, containsAll, getModelStore, getObjectUri, getPropertyDescriptor, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray, toImmutableList
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Constructor Detail
-
ModelSet
public ModelSet(IModelStore modelStore, String objectUri, PropertyDescriptor propertyDescriptor, @Nullable IModelCopyManager copyManager, @Nullable Class<?> type, String specVersion, String idPrefix) throws InvalidSPDXAnalysisException
- Parameters:
modelStore
- Storage for the model collectionobjectUri
- Object URI or anonymous IDpropertyDescriptor
- descriptor for the property use for the model collectionscopyManager
- if non-null, use this to copy properties when referenced outside this model storetype
- The class of the elements to be stored in the collection if none, null if not knownspecVersion
- version of the SPDX spec the object complies withidPrefix
- prefix to be used when generating new SPDX IDs- Throws:
InvalidSPDXAnalysisException
- on parsing or store errors
-
-
Method Detail
-
add
public boolean add(Object element)
- Specified by:
add
in interfaceCollection<T>
- Specified by:
add
in interfaceSet<T>
- Overrides:
add
in classModelCollection<Object>
-
addAll
public boolean addAll(Collection c)
- Specified by:
addAll
in interfaceCollection<T>
- Specified by:
addAll
in interfaceSet<T>
- Overrides:
addAll
in classModelCollection<Object>
-
-