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

me.s3ns3iw00.jcommands.argument.ability.Optionality Maven / Gradle / Ivy

There is a newer version: 8.0.0
Show newest version
/*
 * Copyright (C) 2022 S3nS3IW00
 *
 * This file is part of JCommands.
 *
 * JCommands is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser general Public License as
 * published by the Free Software Foundation; either version 3 of
 * the License, or (at your option) any later version.
 *
 * JCommands is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this program; if not, see .
 */
package me.s3ns3iw00.jcommands.argument.ability;

import java.util.Optional;

/**
 * Identifies whether an argument can be optional or not
 */
@Deprecated
public interface Optionality {

    boolean isOptional();

    /**
     * Sets the argument optional
     * Only the last argument of the options can be set as optional
     */
    void setOptional();

    /**
     * Gets the value of the argument as optional
     *
     * @return the optional value
     */
    Optional getOptionalValue();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy