Class ByteCalculator
java.lang.Object
com.github.rvesse.airline.examples.userguide.parser.ByteCalculator
- All Implemented Interfaces:
ExampleRunnable
@Command(name="byte-calc",
description="Computes the number of bytes")
public class ByteCalculator
extends Object
implements ExampleRunnable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
bytes
@Option(name={"-b","--bytes"}, description="Quantity of bytes, optionally expressed in compact form e.g. 1GB", typeConverterProvider=KiloAs1024.class) private Long bytes
-
-
Constructor Details
-
ByteCalculator
public ByteCalculator()
-
-
Method Details
-
run
public int run()Description copied from interface:ExampleRunnable
Runs the command and returns an exit code that the application should return- Specified by:
run
in interfaceExampleRunnable
- Returns:
- Exit code
-
main
-