Пример #1
0
  /**
   * Create a network device entity
   *
   * @param id id
   * @param macAddress MAC address
   * @param reachabilityStatus reachability status
   * @throws NullPointerException if any of the parameters is {@code null}
   */
  public NetworkDeviceEntity(
      SerialNumber id, MacAddress macAddress, ReachabilityStatus reachabilityStatus) {
    if (id == null) {
      throw new NullPointerException("id cannot be null");
    }

    if (macAddress == null) {
      throw new NullPointerException("macAddress cannot be null");
    }

    if (reachabilityStatus == null) {
      throw new NullPointerException("reachabilityStatus cannot be null");
    }

    this.id = id.getValue();
    this.macAddress = macAddress.getValue();
    this.reachabilityStatus = reachabilityStatus;
  }
Пример #2
0
 /** @return the macAddress */
 public MacAddress getMacAddress() {
   return MacAddress.valueOf(this.macAddress);
 }