Skip to content

Radi3nt/JavaUtil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents
  1. About The Project
  2. Getting Started
  3. Roadmap
  4. Contributing
  5. License
  6. Contact

About The Project

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

(back to top)

Getting Started

To get a local copy up and running follow these simple example steps.

Installation

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

(back to top)

Usage

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

(back to top)

Roadmap

  • Cleaning up LogUtil
  • Adding more helpers

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

(back to top)

License

Distributed under the Apache License 2.0. See LICENSE.txt for more information.

(back to top)

Contact

Radi3nt - pro.radi3nt@gmail.com

Project Link: https://github.com/Radi3nt/JavaUtil

(back to top)