tmf: Correctly export all packages in runtime plugins
[deliverable/tracecompass.git] / org.eclipse.linuxtools.ctf.core / src / org / eclipse / linuxtools / internal / ctf / core / trace / Stream.java
index 1434fa781b5137b5260394d45da716bcab90c125..bd9234159c46ce234a82bbb7f51d23f873d69789 100644 (file)
@@ -53,7 +53,7 @@ public class Stream {
     /**
      * Maps event ids to events
      */
-    private HashMap<Long, EventDeclaration> events;
+    private HashMap<Long, EventDeclaration> events = new HashMap<Long, EventDeclaration>();
 
     /**
      * The inputs associated to this stream
@@ -78,63 +78,124 @@ public class Stream {
     // Getters/Setters/Predicates
     // ------------------------------------------------------------------------
 
+    /**
+     * Sets the id of a stream
+     * @param id the id of a stream
+     */
     public void setId(long id) {
         this.id = id;
         this.events = trace.createEvents(this.id);
     }
 
+    /**
+     * Gets the id of a stream
+     * @return id the id of a stream
+     */
     public Long getId() {
         return id;
     }
 
-    public boolean idIsSet() {
+    /**
+     * Is the id of a stream set
+     *
+     * @return If the ID is set or not
+     */
+    public boolean isIdSet() {
         return id != null;
     }
 
-    public boolean eventHeaderIsSet() {
+    /**
+     *
+     * @return is the event header set (timestamp and stuff) (see Ctf Spec)
+     */
+    public boolean isEventHeaderSet() {
         return eventHeaderDecl != null;
     }
 
-    public boolean eventContextIsSet() {
+    /**
+    *
+    * @return is the event context set (pid and stuff) (see Ctf Spec)
+    */
+    public boolean isEventContextSet() {
         return eventContextDecl != null;
     }
 
-    public boolean packetContextIsSet() {
+    /**
+     *
+     * @return Is the packet context set (see Ctf Spec)
+     */
+    public boolean isPacketContextSet() {
         return packetContextDecl != null;
     }
 
+    /**
+     *
+     * @param eventHeader the current event header for all events in this stream
+     */
     public void setEventHeader(StructDeclaration eventHeader) {
         this.eventHeaderDecl = eventHeader;
     }
 
+    /**
+     *
+     * @param eventContext the context for all events in this stream
+     */
     public void setEventContext(StructDeclaration eventContext) {
         this.eventContextDecl = eventContext;
     }
 
+    /**
+     *
+     * @param packetContext the packet context for all packets in this stream
+     */
     public void setPacketContext(StructDeclaration packetContext) {
         this.packetContextDecl = packetContext;
     }
 
+    /**
+     *
+     * @return the event header declaration in structdeclaration form
+     */
     public StructDeclaration getEventHeaderDecl() {
         return eventHeaderDecl;
     }
 
+    /**
+     *
+     * @return the event context declaration in structdeclaration form
+     */
     public StructDeclaration getEventContextDecl() {
         return eventContextDecl;
     }
 
+    /**
+     *
+     * @return the packet context declaration in structdeclaration form
+     */
     public StructDeclaration getPacketContextDecl() {
         return packetContextDecl;
     }
 
+    /**
+     *
+     * @return the set of all stream inputs for this stream
+     */
     public Set<StreamInput> getStreamInputs() {
         return inputs;
     }
 
+    /**
+     *
+     * @return the parent trace
+     */
     public CTFTrace getTrace() {
         return trace;
     }
 
+    /**
+     *
+     * @return all the event declarations for this stream, using the id as a key for the hashmap.
+     */
     public HashMap<Long, EventDeclaration> getEvents() {
         return events;
     }
@@ -153,8 +214,10 @@ public class Stream {
      * is present in the map.
      *
      * @param event
-     *            The event to add.
+     *            The event to add
      * @throws ParseException
+     *             If there was a problem reading the event or adding it to the
+     *             stream
      */
     public void addEvent(EventDeclaration event) throws ParseException {
         /*
This page took 0.05701 seconds and 5 git commands to generate.