[CORD-2432][CORD-2431] Initial t3 implementation
Change-Id: I1ed421f82c234bb006ed2cefefea53d773f1efc9
diff --git a/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java b/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java
new file mode 100644
index 0000000..3cfb41a
--- /dev/null
+++ b/apps/t3/src/main/java/org/onosproject/t3/api/GroupsInDevice.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2017-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.t3.api;
+
+import org.onosproject.net.ConnectPoint;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.group.Group;
+
+import java.util.List;
+
+/**
+ * Class to represent the groups in a device for a given output and packet.
+ */
+//FIXME consider removing.
+public class GroupsInDevice {
+
+ private ConnectPoint output;
+ private List<Group> groups;
+ private TrafficSelector selector;
+
+ /**
+ * Saves the given groups for the output connect point and the selector.
+ * @param output the output connect point
+ * @param groups the groups
+ * @param selector the selector representing the final packet
+ */
+ public GroupsInDevice(ConnectPoint output, List<Group> groups, TrafficSelector selector) {
+
+ this.output = output;
+ this.groups = groups;
+ this.selector = selector;
+ }
+
+ /**
+ * Returns the output connect point.
+ * @return the connect point
+ */
+ public ConnectPoint getOutput() {
+ return output;
+ }
+
+ /**
+ * Returns the groups.
+ * @return groups.
+ */
+ public List<Group> getGroups() {
+ return groups;
+ }
+
+ /**
+ * Returns the final packet after traversing the network.
+ * @return the selector with packet info
+ */
+ public TrafficSelector getFinalPacket() {
+ return selector;
+ }
+
+ @Override
+ public String toString() {
+ return "GroupsInDevice{" +
+ "output=" + output +
+ ", groups=" + groups +
+ ", selector=" + selector +
+ '}';
+ }
+
+}