Table of Contents
This is a complete util library to use with Java. It provides useful classes for a bunch of things Why SHOULD you use this API:
- It is fast and efficient
- It's easly understandable and usable for anyone familliar with Java
- Disgned for maximum extensibility and flexibility
- This project is currently actively updated
To get a local copy up and running follow these simple example steps.
You don't need anything more than the native Java JDK to get started!
Clone the repo
git clone https://github.com/Radi3nt/JavaUtil.git
ArgsHelper usage exemple:
MapArgumentRepository argumentRepository = new MapArgumentRepository("-");
StringArgumentParser usernameParser = new StringArgumentParser("-");
BooleanArgumentParser multiplayerParser = new BooleanArgumentParser("-");
argumentRepository.addArgumentParser("username", usernameParser);
argumentRepository.addArgumentParser("multiplayer", multiplayerParser);
ArgParser argParser = new ArgParser(new AlwaysValidScheme(), argumentRepository, new ListParserResultBuilderFactory());
try {
argParser.construct(args);
} catch (ArgumentException e) {
e.printStackTrace();
System.exit(-1);
}
String username = usernameParser.hasValue() ? usernameParser.getStringArgument().getValue() : "Radi3nt";
This code will parse arguments if they are present, and return a String value of "username", and a boolean value of "multiplayer". Launching this with all arguments would look like this:
java -jar App.jar -username "What a wonderfull username" -multiplayer false
More exmemples will be added in the future
- Cleaning up LogUtil
- Adding more helpers
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
Distributed under the Apache License 2.0. See LICENSE.txt
for more information.
Radi3nt - pro.radi3nt@gmail.com
Project Link: https://github.com/Radi3nt/JavaUtil