Skip to content

Instantly share code, notes, and snippets.

View gicappa's full-sized avatar
🏠
Working from home

Gian Carlo Pace gicappa

🏠
Working from home
  • Hyland / Alfresco
  • Gallarate, VA
  • X @gicappa
View GitHub Profile
package gk;
import static java.math.BigDecimal.ZERO;
import java.math.BigDecimal;
import java.util.Scanner;
public class AmountParser {
Scanner sc = new Scanner(System.in);
/**
* Reads only valid amount from standard output and returns
* it to the caller.
*
* @param prompt to be shown to the user to mark where to input
* @param min amount allowed
* @param max amount allowed
* @return the valid amount
*/
public BigDecimal inputBigDecimalValue(String prompt, BigDecimal min, BigDecimal max) {
@gicappa
gicappa / 1-Emapp.java
Last active March 4, 2023 15:45
Hexagonal Architecture
package application;
/* ... */
// Application level is the holder of primary drivers
// This is actually the specific implementation of the application server
// (SparkJava in this case)
public class Emapp implements Runnable {
private final Mapper mapper;