blob: 01341a5570491101a897a8c0ac34841bd8696651 [file] [log] [blame]
tom3065d122014-09-03 21:56:43 -07001package org.onlab.onos.net;
2
3import org.onlab.onos.net.provider.ProviderId;
4
5/**
6 * Base implementation of network elements, i.e. devices or hosts.
7 */
8public class AbstractElement extends AbstractModel implements Element {
9
10 protected final ElementId id;
11
12 /**
13 * Creates a network element attributed to the specified provider.
14 *
15 * @param providerId identity of the provider
16 * @param id element identifier
17 */
18 protected AbstractElement(ProviderId providerId, ElementId id) {
19 super(providerId);
20 this.id = id;
21 }
22
23 @Override
24 public ElementId id() {
25 return id;
26 }
27
28}