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

com.github.alex1304.ultimategdbot.api.command.CommandDocumentationEntry Maven / Gradle / Ivy

There is a newer version: 6.0.2
Show newest version
package com.github.alex1304.ultimategdbot.api.command;

import java.util.Collections;
import java.util.Map;
import java.util.Objects;

/**
 * Represents a documentation entry. An entry is a subsection of the
 * documentation of the command. An entry shows one possible syntax for the
 * command, a description of what this part of the command does, and the
 * different flags that can be used.
 */
public class CommandDocumentationEntry {

	private final String syntax;
	private final String description;
	private final Map flagInfo;
	
	public CommandDocumentationEntry(String syntax, String description, Map flagInfo) {
		this.syntax = Objects.requireNonNull(syntax);
		this.description = Objects.requireNonNull(description);
		this.flagInfo = Collections.unmodifiableMap(flagInfo);
	}

	/**
	 * Gets the syntax of the command relevant for this entry.
	 *  
	 * @return the syntax
	 */
	public String getSyntax() {
		return syntax;
	}
	
	/**
	 * Gets the description of what the command does, according to the usage
	 * represented by this entry.
	 * 
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Gets information on the flags that can be used with this part of the command.
	 * 
	 * @return the information on available flags
	 */
	public Map getFlagInfo() {
		return flagInfo;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy