Added Javadoc and instructions for contribution

This commit is contained in:
Cametendo
2026-04-24 11:20:25 +02:00
parent cb9b464a99
commit 5dc7d88b7f
12 changed files with 431 additions and 0 deletions

View File

@@ -1,5 +1,25 @@
package org.cametendo;
/**
* Utility class for parsing yes/no user responses.
*
* <p>This class provides a simple method to interpret user input as a boolean
* value, accepting various forms of "yes" and treating everything else as "no".</p>
*
* @author Cametendo
* @version 1.0
*/
public class YesNo {
/**
* Parses user input to determine if it represents a "yes" response.
*
* <p>Accepts "Y", "y", and empty string (default) as yes responses.
* All other inputs are treated as no responses.</p>
*
* @param input User input string to parse
* @return true if the input represents a yes response, false otherwise
*/
public static boolean check(String input) {
switch (input) {
case "Y":