Class 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()
      Returns true if there are no CWEs; otherwise false.
      java.util.stream.Stream<java.lang.String> stream()
      Streams the CWEs.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CweSet

        public CweSet()
    • 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 class java.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()
        Returns true if there are no CWEs; otherwise false.
        Returns:
        true if there are no CWEs; otherwise false