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.Serializable
Collection 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 void
addCwe(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.boolean
isEmpty()
Returnstrue
if there are no CWEs; otherwisefalse
.java.util.stream.Stream<java.lang.String>
stream()
Streams the CWEs.java.lang.String
toString()
-
-
-
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:
toString
in 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()
Returnstrue
if there are no CWEs; otherwisefalse
.- Returns:
true
if there are no CWEs; otherwisefalse
-
-