All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openmuc.openiec61850.internal.cli.ValueCliParameter Maven / Gradle / Ivy

Go to download

OpenIEC61850 is a library implementing the IEC 61850 MMS communication standard (client and server).

There is a newer version: 1.7.0
Show newest version
package org.openmuc.openiec61850.internal.cli;

abstract class ValueCliParameter extends CliParameter {

    String parameterName;

    ValueCliParameter(CliParameterBuilder builder, String parameterName) {
        super(builder);
        this.parameterName = parameterName;
    }

    @Override
    int appendSynopsis(StringBuilder sb) {
        int length = 0;
        if (optional) {
            sb.append("[");
            length++;
        }
        sb.append(name).append(" <").append(parameterName).append(">");
        length += (name.length() + 3 + parameterName.length());
        if (optional) {
            sb.append("]");
            length++;
        }
        return length;
    }

    @Override
    void appendDescription(StringBuilder sb) {
        sb.append("\t").append(name).append(" <").append(parameterName).append(">\n\t    ").append(description);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy