4b5b8fe93483e7746118d0309690f5435da860fd
[pingpong.git] / Code / Projects / SmartPlugDetector / src / main / java / edu / uci / iotproject / FlowPattern.java
1 package edu.uci.iotproject;
2
3 import java.util.Collections;
4 import java.util.List;
5
6 /**
7  * TODO add class documentation.
8  *
9  * @author Janus Varmarken
10  */
11 public class FlowPattern {
12
13     private final String patternId;
14
15     /**
16      * The hostname that this {@code FlowPattern} is associated with.
17      */
18     private final String hostname;
19
20     /**
21      * The order of packet lengths that defines this {@link FlowPattern}
22      */
23     private final List<Integer> flowPacketOrder;
24
25     public FlowPattern(String patternId, String hostname, List<Integer> flowPacketOrder) {
26         this.patternId = patternId;
27         this.hostname = hostname;
28         this.flowPacketOrder = Collections.unmodifiableList(flowPacketOrder);
29     }
30
31     public String getHostname() {
32         return hostname;
33     }
34
35     /**
36      * Get the the sequence of packet lengths that defines this {@code FlowPattern}.
37      * @return the the sequence of packet lengths that defines this {@code FlowPattern}.
38      */
39     public List<Integer> getPacketOrder() {
40         return flowPacketOrder;
41     }
42
43 }