___ ___ _ _
| __|__ _ ____ _ / _ \ _ __| |_(_)___ _ _ ___
| _|/ _` (_-< || | (_) | '_ \ _| / _ \ ' \(_-<
|___\__,_/__/\_, |\___/| .__/\__|_\___/_||_/__/
|__/ |_|
README LANGUAGES [ English | 中文 ]
Easy (to define) Options!
A lightweight, easy-to-use option definition library in Java, useful for runtime library developers.
For the latest JavaDoc release, CLICK HERE.
public interface DemoOptions {
/**
* Option descriptions
*/
OptionType<String> SEPARATOR = OptionType.of(":-:");
}
public class Sample {
public static void main(String[] args) {
OptionHolder holder = new OptionHolder(); // Create holder
holder.set(DemoOptions.SEPARATOR, ":-)"); // Set value
String separator = holder.get(DemoOptions.SEPARATOR); // Get value
// Set value to default
String previous = holder.set(DemoOptions.SEPARATOR, null);
}
}
Remote Repository Configuration
<project>
<repositories>
<repository>
<!-- Using Maven Central Repository for secure and stable updates, though synchronization might be needed. -->
<id>maven</id>
<name>Maven Central</name>
<url>https://repo1.maven.org/maven2</url>
</repository>
<repository>
<!-- Using GitHub dependencies for real-time updates, configure required (recommended). -->
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/CarmJos/EasyOptions</url>
</repository>
</repositories>
</project>
Generic Native Dependency
<project>
<dependencies>
<dependency>
<groupId>cc.carm.lib</groupId>
<artifactId>easyoptions</artifactId>
<version>[LATEST RELEASE]</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
Remote Repository Configuration
repositories {
// Using Maven Central Repository for secure and stable updates, though synchronization might be needed.
mavenCentral()
// Using GitHub dependencies for real-time updates, configure required (recommended).
maven { url 'https://maven.pkg.github.com/CarmJos/EasyOptions' }
}
Generic Native Dependency
dependencies {
api "cc.carm.lib:easyoptions:[LATEST RELEASE]"
}
If you appreciate this plugin, consider supporting me with a donation!
Thank you for supporting open-source projects!
Many thanks to Jetbrains for kindly providing a license for us to work on this and other open-source projects.
This project's source code is licensed under The MIT License.