summaryrefslogtreecommitdiffstats
path: root/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/node/Address.java
blob: d7ef2228960b116b8b652d2733318462017a0f4a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.provision.node;

import java.util.Objects;

/**
 * Address info about a container that might run on a host.
 *
 * @author hakon
 */
public record Address(String hostname) {
    public Address {
        Objects.requireNonNull(hostname, "hostname cannot be null");
        if (hostname.isEmpty())
            throw new IllegalArgumentException("hostname cannot be empty");
    }
}