summaryrefslogtreecommitdiffstats
path: root/node-admin/src/main/java/com/yahoo/vespa/hosted/node/admin/maintenance/acl/iptables/Command.java
blob: ab9131c8b52896ee7509ec8c54855b9f27768b62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package com.yahoo.vespa.hosted.node.admin.maintenance.acl.iptables;

/**
 * Represents a single iptables command
 *
 * @author mpolden
 */
public interface Command {

    String asString();

    default String asString(String commandName) {
        return commandName + " "  + asString();
    }

    default String[] asArray(String commandName) {
        return asString(commandName).split(" ");
    }
}