Class CweSet
- java.lang.Object
-
- org.owasp.dependencycheck.dependency.CweSet
-
- All Implemented Interfaces:
java.io.Serializable
public class CweSet extends java.lang.Object implements java.io.SerializableCollection of CWEs with a pretty print implemented in the toString().- Author:
- Jeremy Long
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CweSet()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCwe(java.lang.String cwe)Adds a CWE to the set.java.util.Set<java.lang.String>getEntries()Get the value of CWEs.java.util.Map<java.lang.String,java.lang.String>getFullCwes()Returns a map of CWE-ID and title.booleanisEmpty()Returnstrueif there are no CWEs; otherwisefalse.java.util.stream.Stream<java.lang.String>stream()Streams the CWEs.java.lang.StringtoString()
-
-
-
Method Detail
-
getEntries
public java.util.Set<java.lang.String> getEntries()
Get the value of CWEs.- Returns:
- the value of CWEs
-
addCwe
public void addCwe(java.lang.String cwe)
Adds a CWE to the set.- Parameters:
cwe- new CWE to add
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
stream
public java.util.stream.Stream<java.lang.String> stream()
Streams the CWEs.- Returns:
- the stream of CWE
-
getFullCwes
public java.util.Map<java.lang.String,java.lang.String> getFullCwes()
Returns a map of CWE-ID and title.- Returns:
- a map of CWE-ID and title.
-
isEmpty
public boolean isEmpty()
Returnstrueif there are no CWEs; otherwisefalse.- Returns:
trueif there are no CWEs; otherwisefalse
-
-