diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/doc/allclasses-index.html b/doc/allclasses-index.html index 4bde91e..f76f974 100644 --- a/doc/allclasses-index.html +++ b/doc/allclasses-index.html @@ -1,11 +1,11 @@ - + All Classes and Interfaces - + @@ -56,24 +56,26 @@ loadScripts(document, 'script');

All Classes and Interfaces

-
+
Class
Description
- -
 
- -
+ +
 
+ +
 
+ +
Main class for CLI converter application
- -
+ +
Interface to clear OS terminal screen, on case of IDE Console - it prints 80 new lines.
+ it just prints 80 new lines.
- -
+ +
Class to create title, opts/menus Strings
diff --git a/doc/allpackages-index.html b/doc/allpackages-index.html index 3c0dc41..98e46e1 100644 --- a/doc/allpackages-index.html +++ b/doc/allpackages-index.html @@ -1,11 +1,11 @@ - + All Packages - + @@ -55,7 +55,7 @@ loadScripts(document, 'script');
Package
Description
- +
 
 
diff --git a/doc/conversor_alura_one/cl/conversor/app/Conversor.html b/doc/conversor_alura_one/cl/conversor/app/Conversor.html new file mode 100644 index 0000000..4689af3 --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/app/Conversor.html @@ -0,0 +1,164 @@ + + + + +Conversor + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +

Class Conversor

+
+
java.lang.Object +
cl.conversor.app.Conversor
+
+
+
+
public class Conversor +extends Object
+
+
+ +
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      Conversor

      +
      public Conversor()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      main

      +
      public static void main(String[] args)
      +
      +
      Parameters:
      +
      args -
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/app/class-use/Conversor.html b/doc/conversor_alura_one/cl/conversor/app/class-use/Conversor.html new file mode 100644 index 0000000..fa4c29a --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/app/class-use/Conversor.html @@ -0,0 +1,58 @@ + + + + +Uses of Class cl.conversor.app.Conversor + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
cl.conversor.app.Conversor

+
+No usage of cl.conversor.app.Conversor
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/app/package-summary.html b/doc/conversor_alura_one/cl/conversor/app/package-summary.html new file mode 100644 index 0000000..83493a7 --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/app/package-summary.html @@ -0,0 +1,84 @@ + + + + +cl.conversor.app + + + + + + + + + + + + + + + +
+ +
+
+
+ +

Package cl.conversor.app

+
+
+
package cl.conversor.app
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
     
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/app/package-tree.html b/doc/conversor_alura_one/cl/conversor/app/package-tree.html new file mode 100644 index 0000000..c6d37c5 --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/app/package-tree.html @@ -0,0 +1,72 @@ + + + + +cl.conversor.app Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package cl.conversor.app

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/app/package-use.html b/doc/conversor_alura_one/cl/conversor/app/package-use.html new file mode 100644 index 0000000..6e80311 --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/app/package-use.html @@ -0,0 +1,58 @@ + + + + +Uses of Package cl.conversor.app + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
cl.conversor.app

+
+No usage of cl.conversor.app
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/Color.html b/doc/conversor_alura_one/cl/conversor/vista/cli/Color.html new file mode 100644 index 0000000..2c0bc5a --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/Color.html @@ -0,0 +1,284 @@ + + + + +Color + + + + + + + + + + + + + + + +
+ +
+
+ +
+ + +

Enum Class Color

+
+
java.lang.Object +
java.lang.Enum<Color> +
cl.conversor.vista.cli.Color
+
+
+
+
+
All Implemented Interfaces:
+
Serializable, Comparable<Color>, Constable
+
+
+
public enum Color +extends Enum<Color>
+
+
+ +
+
+
    + +
  • +
    +

    Enum Constant Details

    +
      +
    • +
      +

      RESET

      +
      public static final Color RESET
      +
      +
    • +
    • +
      +

      BLACK

      +
      public static final Color BLACK
      +
      +
    • +
    • +
      +

      RED

      +
      public static final Color RED
      +
      +
    • +
    • +
      +

      GREEN

      +
      public static final Color GREEN
      +
      +
    • +
    • +
      +

      YELLOW

      +
      public static final Color YELLOW
      +
      +
    • +
    • +
      +

      BLUE

      +
      public static final Color BLUE
      +
      +
    • +
    • +
      +

      PURPLE

      +
      public static final Color PURPLE
      +
      +
    • +
    • +
      +

      CYAN

      +
      public static final Color CYAN
      +
      +
    • +
    • +
      +

      WHITE

      +
      public static final Color WHITE
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      values

      +
      public static Color[] values()
      +
      Returns an array containing the constants of this enum class, in +the order they are declared.
      +
      +
      Returns:
      +
      an array containing the constants of this enum class, in the order they are declared
      +
      +
      +
    • +
    • +
      +

      valueOf

      +
      public static Color valueOf(String name)
      +
      Returns the enum constant of this class with the specified name. +The string must match exactly an identifier used to declare an +enum constant in this class. (Extraneous whitespace characters are +not permitted.)
      +
      +
      Parameters:
      +
      name - the name of the enum constant to be returned.
      +
      Returns:
      +
      the enum constant with the specified name
      +
      Throws:
      +
      IllegalArgumentException - if this enum class has no constant with the specified name
      +
      NullPointerException - if the argument is null
      +
      +
      +
    • +
    • +
      +

      code

      +
      public final String code()
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html b/doc/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html index 5f28178..f5257ec 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/ConversorCli.html @@ -1,11 +1,11 @@ - + ConversorCli - + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/LimpiarConsola.html b/doc/conversor_alura_one/cl/conversor/vista/cli/LimpiarConsola.html index 3bbe87c..58cefa8 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/LimpiarConsola.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/LimpiarConsola.html @@ -1,11 +1,11 @@ - + LimpiarConsola - + @@ -73,7 +73,7 @@ loadScripts(document, 'script');
public interface LimpiarConsola
Interface to clear OS terminal screen, on case of IDE Console - it prints 80 new lines.
+ it just prints 80 new lines.
    diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/MenuPrincipal.html b/doc/conversor_alura_one/cl/conversor/vista/cli/MenuPrincipal.html index f44e83e..9bc8d84 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/MenuPrincipal.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/MenuPrincipal.html @@ -1,11 +1,11 @@ - + MenuPrincipal - + @@ -78,7 +78,7 @@ loadScripts(document, 'script');

-
public abstract class MenuPrincipal +
public class MenuPrincipal extends Object
Class to create title, opts/menus Strings
@@ -93,15 +93,12 @@ loadScripts(document, 'script');
Modifier and Type
Field
Description
-
static final String
- +
static final List<String>
+
 
-
static final List<String>
- + +
 
-
static final String
- -
 
@@ -113,7 +110,7 @@ loadScripts(document, 'script');
Constructor
Description
- +
 
@@ -123,18 +120,24 @@ loadScripts(document, 'script');

Method Summary

-
+
Modifier and Type
Method
Description
-
static String
- -
 
-
static String
- -
 
+ + +
 
+ +
banner(String mensaje)
+
 
+ + +
 
+ + +
 
@@ -153,23 +156,9 @@ loadScripts(document, 'script');

Field Details

  • -
    -

    mensaje

    -
    public static final String mensaje
    -
    -
    See Also:
    -
    - -
    -
    -
    -
  • -
  • -
    -

    saludo

    -
    public static final String saludo
    +
    +

    titulo

    +
    public String titulo
  • @@ -187,9 +176,9 @@ loadScripts(document, 'script');

    Constructor Details

    • -
      +

      MenuPrincipal

      -
      public MenuPrincipal()
      +
      public MenuPrincipal(String titulo)
    @@ -201,27 +190,47 @@ loadScripts(document, 'script');

    Method Details

    • +
      +

      banner

      +
      public String banner()
      +
      +
      Returns:
      +
      String Banner String
      +
      +
      +
    • +
    • banner

      -
      public static String banner(String msj)
      +
      public String banner(String mensaje)
      Parameters:
      msj - Application Title
      Returns:
      -
      String Title String
      +
      String Banner String
    • +
    • +
      +

      error_in

      +
      public String error_in()
      +
      +
      Returns:
      +
      String user input error message
      +
      +
      +
diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/Color.html b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/Color.html new file mode 100644 index 0000000..bbc88eb --- /dev/null +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/Color.html @@ -0,0 +1,91 @@ + + + + +Uses of Enum Class cl.conversor.vista.cli.Color + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Enum Class
cl.conversor.vista.cli.Color

+
+
Packages that use Color
+
+
Package
+
Description
+ +
 
+
+
+ +
+
+
+
+ + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html index 41fd517..ad04fb8 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/ConversorCli.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.vista.cli.ConversorCli - + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/LimpiarConsola.html b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/LimpiarConsola.html index 4cd6eb7..1b247fd 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/LimpiarConsola.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/LimpiarConsola.html @@ -1,11 +1,11 @@ - + Uses of Interface cl.conversor.vista.cli.LimpiarConsola - + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/MenuPrincipal.html b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/MenuPrincipal.html index d358918..c11200a 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/MenuPrincipal.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/class-use/MenuPrincipal.html @@ -1,11 +1,11 @@ - + Uses of Class cl.conversor.vista.cli.MenuPrincipal - + diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/package-summary.html b/doc/conversor_alura_one/cl/conversor/vista/cli/package-summary.html index de20088..5ad1635 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/package-summary.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/package-summary.html @@ -1,11 +1,11 @@ - + cl.conversor.vista.cli - + @@ -70,22 +70,24 @@ loadScripts(document, 'script'); +
+

Enum Class Hierarchy

+ +
diff --git a/doc/conversor_alura_one/cl/conversor/vista/cli/package-use.html b/doc/conversor_alura_one/cl/conversor/vista/cli/package-use.html index 25f536d..5630a74 100644 --- a/doc/conversor_alura_one/cl/conversor/vista/cli/package-use.html +++ b/doc/conversor_alura_one/cl/conversor/vista/cli/package-use.html @@ -1,11 +1,11 @@ - + Uses of Package cl.conversor.vista.cli - + @@ -51,7 +51,29 @@ loadScripts(document, 'script');

Uses of Package
cl.conversor.vista.cli

-No usage of cl.conversor.vista.cli +
Packages that use cl.conversor.vista.cli
+
+
Package
+
Description
+
cl.conversor.vista.cli
+
 
+
+
+ +
+ diff --git a/doc/conversor_alura_one/module-summary.html b/doc/conversor_alura_one/module-summary.html index e8cec65..ad9c1d7 100644 --- a/doc/conversor_alura_one/module-summary.html +++ b/doc/conversor_alura_one/module-summary.html @@ -1,11 +1,11 @@ - + conversor_alura_one - + diff --git a/doc/element-list b/doc/element-list index 7734060..41558ad 100644 --- a/doc/element-list +++ b/doc/element-list @@ -1,3 +1,3 @@ module:conversor_alura_one -cl.conversor +cl.conversor.app cl.conversor.vista.cli diff --git a/doc/help-doc.html b/doc/help-doc.html index b281db6..c118b7c 100644 --- a/doc/help-doc.html +++ b/doc/help-doc.html @@ -1,11 +1,11 @@ - + API Help - + @@ -70,7 +70,6 @@ loadScripts(document, 'script');
  • Other Files
  • Use
  • Tree (Class Hierarchy)
  • -
  • Constant Field Values
  • All Packages
  • All Classes and Interfaces
  • Index
  • @@ -167,10 +166,6 @@ The following sections describe the different kinds of pages in this collection.
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • -
    -

    Constant Field Values

    -

    The Constant Field Values page lists the static final fields and their values.

    -

    All Packages

    The All Packages page contains an alphabetic index of all packages contained in the documentation.

    diff --git a/doc/index-files/index-1.html b/doc/index-files/index-1.html index 822a956..bac0c70 100644 --- a/doc/index-files/index-1.html +++ b/doc/index-files/index-1.html @@ -1,11 +1,11 @@ - + B-Index - + @@ -51,13 +51,19 @@ loadScripts(document, 'script');

    Index

    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages

    B

    -
    banner(String) - Static method in class cl.conversor.vista.cli.MenuPrincipal
    +
    banner() - Method in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    banner(String) - Method in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    BLACK - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    BLUE - Enum constant in enum class cl.conversor.vista.cli.Color
     
    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages diff --git a/doc/index-files/index-10.html b/doc/index-files/index-10.html new file mode 100644 index 0000000..a1dedd6 --- /dev/null +++ b/doc/index-files/index-10.html @@ -0,0 +1,71 @@ + + + + +V-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    V

    +
    +
    valueOf(String) - Static method in enum class cl.conversor.vista.cli.Color
    +
    +
    Returns the enum constant of this class with the specified name.
    +
    +
    values() - Static method in enum class cl.conversor.vista.cli.Color
    +
    +
    Returns an array containing the constants of this enum class, in +the order they are declared.
    +
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-11.html b/doc/index-files/index-11.html new file mode 100644 index 0000000..b186cc7 --- /dev/null +++ b/doc/index-files/index-11.html @@ -0,0 +1,64 @@ + + + + +W-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    W

    +
    +
    WHITE - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-12.html b/doc/index-files/index-12.html new file mode 100644 index 0000000..72e7800 --- /dev/null +++ b/doc/index-files/index-12.html @@ -0,0 +1,64 @@ + + + + +Y-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    Y

    +
    +
    YELLOW - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-2.html b/doc/index-files/index-2.html index d8c5833..36059b4 100644 --- a/doc/index-files/index-2.html +++ b/doc/index-files/index-2.html @@ -1,11 +1,11 @@ - + C-Index - + @@ -51,18 +51,22 @@ loadScripts(document, 'script');

    Index

    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages

    C

    -
    cl.conversor - package cl.conversor
    +
    cl.conversor.app - package cl.conversor.app
     
    cl.conversor.vista.cli - package cl.conversor.vista.cli
     
    clear() - Static method in interface cl.conversor.vista.cli.LimpiarConsola
     
    -
    Conversor - Class in cl.conversor
    +
    code() - Method in enum class cl.conversor.vista.cli.Color
     
    -
    Conversor() - Constructor for class cl.conversor.Conversor
    +
    Color - Enum Class in cl.conversor.vista.cli
    +
     
    +
    Conversor - Class in cl.conversor.app
    +
     
    +
    Conversor() - Constructor for class cl.conversor.app.Conversor
     
    conversor_alura_one - module conversor_alura_one
     
    @@ -72,8 +76,10 @@ loadScripts(document, 'script');
    ConversorCli() - Constructor for class cl.conversor.vista.cli.ConversorCli
     
    +
    CYAN - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages diff --git a/doc/index-files/index-3.html b/doc/index-files/index-3.html index 7039aec..b843cae 100644 --- a/doc/index-files/index-3.html +++ b/doc/index-files/index-3.html @@ -1,12 +1,12 @@ - -L-Index + +E-Index - - + + @@ -51,16 +51,13 @@ loadScripts(document, 'script');

    Index

    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values -

    L

    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    E

    -
    LimpiarConsola - Interface in cl.conversor.vista.cli
    -
    -
    Interface to clear OS terminal screen, on case of IDE Console - it prints 80 new lines.
    -
    +
    error_in() - Method in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages diff --git a/doc/index-files/index-4.html b/doc/index-files/index-4.html index 76ab771..403514f 100644 --- a/doc/index-files/index-4.html +++ b/doc/index-files/index-4.html @@ -1,12 +1,12 @@ - -M-Index + +G-Index - - + + @@ -51,27 +51,13 @@ loadScripts(document, 'script');

    Index

    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values -

    M

    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    G

    -
    main(String[]) - Static method in class cl.conversor.Conversor
    -
     
    -
    main(String[]) - Static method in class cl.conversor.vista.cli.ConversorCli
    -
     
    -
    mensaje - Static variable in class cl.conversor.vista.cli.MenuPrincipal
    -
     
    -
    menu - Static variable in class cl.conversor.vista.cli.MenuPrincipal
    -
     
    -
    menu_opcs() - Static method in class cl.conversor.vista.cli.MenuPrincipal
    -
     
    -
    MenuPrincipal - Class in cl.conversor.vista.cli
    -
    -
    Class to create title, opts/menus Strings
    -
    -
    MenuPrincipal() - Constructor for class cl.conversor.vista.cli.MenuPrincipal
    +
    GREEN - Enum constant in enum class cl.conversor.vista.cli.Color
     
    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages diff --git a/doc/index-files/index-5.html b/doc/index-files/index-5.html index 18edf4c..9011125 100644 --- a/doc/index-files/index-5.html +++ b/doc/index-files/index-5.html @@ -1,12 +1,12 @@ - -S-Index + +L-Index - - + + @@ -51,13 +51,16 @@ loadScripts(document, 'script');

    Index

    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values -

    S

    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    L

    -
    saludo - Static variable in class cl.conversor.vista.cli.MenuPrincipal
    -
     
    +
    LimpiarConsola - Interface in cl.conversor.vista.cli
    +
    +
    Interface to clear OS terminal screen, on case of IDE Console + it just prints 80 new lines.
    +
    -B C L M S 
    All Classes and Interfaces|All Packages|Constant Field Values +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages diff --git a/doc/index-files/index-6.html b/doc/index-files/index-6.html new file mode 100644 index 0000000..7ef6d2e --- /dev/null +++ b/doc/index-files/index-6.html @@ -0,0 +1,76 @@ + + + + +M-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    M

    +
    +
    main(String[]) - Static method in class cl.conversor.app.Conversor
    +
     
    +
    main(String[]) - Static method in class cl.conversor.vista.cli.ConversorCli
    +
     
    +
    menu - Static variable in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    menu_opcs() - Method in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    MenuPrincipal - Class in cl.conversor.vista.cli
    +
    +
    Class to create title, opts/menus Strings
    +
    +
    MenuPrincipal(String) - Constructor for class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-7.html b/doc/index-files/index-7.html new file mode 100644 index 0000000..b7f14a6 --- /dev/null +++ b/doc/index-files/index-7.html @@ -0,0 +1,64 @@ + + + + +P-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    P

    +
    +
    PURPLE - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-8.html b/doc/index-files/index-8.html new file mode 100644 index 0000000..551b589 --- /dev/null +++ b/doc/index-files/index-8.html @@ -0,0 +1,66 @@ + + + + +R-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    R

    +
    +
    RED - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    RESET - Enum constant in enum class cl.conversor.vista.cli.Color
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index-files/index-9.html b/doc/index-files/index-9.html new file mode 100644 index 0000000..102f326 --- /dev/null +++ b/doc/index-files/index-9.html @@ -0,0 +1,64 @@ + + + + +T-Index + + + + + + + + + + + + + + + +
    + +
    +
    +
    +

    Index

    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages +

    T

    +
    +
    titulo - Variable in class cl.conversor.vista.cli.MenuPrincipal
    +
     
    +
    +B C E G L M P R T V W Y 
    All Classes and Interfaces|All Packages
    +
    +
    + + diff --git a/doc/index.html b/doc/index.html index ab2e988..3274585 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,11 +1,11 @@ - + Generated Documentation (Untitled) - + diff --git a/doc/member-search-index.js b/doc/member-search-index.js index 6f33fcc..3f05eac 100644 --- a/doc/member-search-index.js +++ b/doc/member-search-index.js @@ -1 +1 @@ -memberSearchIndex = [{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"banner(String)","u":"banner(java.lang.String)"},{"p":"cl.conversor.vista.cli","c":"LimpiarConsola","l":"clear()"},{"p":"cl.conversor","c":"Conversor","l":"Conversor()","u":"%3Cinit%3E()"},{"p":"cl.conversor.vista.cli","c":"ConversorCli","l":"ConversorCli()","u":"%3Cinit%3E()"},{"p":"cl.conversor","c":"Conversor","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"cl.conversor.vista.cli","c":"ConversorCli","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"mensaje"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"menu"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"menu_opcs()"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"MenuPrincipal()","u":"%3Cinit%3E()"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"saludo"}];updateSearchResults(); \ No newline at end of file +memberSearchIndex = [{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"banner()"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"banner(String)","u":"banner(java.lang.String)"},{"p":"cl.conversor.vista.cli","c":"Color","l":"BLACK"},{"p":"cl.conversor.vista.cli","c":"Color","l":"BLUE"},{"p":"cl.conversor.vista.cli","c":"LimpiarConsola","l":"clear()"},{"p":"cl.conversor.vista.cli","c":"Color","l":"code()"},{"p":"cl.conversor.app","c":"Conversor","l":"Conversor()","u":"%3Cinit%3E()"},{"p":"cl.conversor.vista.cli","c":"ConversorCli","l":"ConversorCli()","u":"%3Cinit%3E()"},{"p":"cl.conversor.vista.cli","c":"Color","l":"CYAN"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"error_in()"},{"p":"cl.conversor.vista.cli","c":"Color","l":"GREEN"},{"p":"cl.conversor.app","c":"Conversor","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"cl.conversor.vista.cli","c":"ConversorCli","l":"main(String[])","u":"main(java.lang.String[])"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"menu"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"menu_opcs()"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"MenuPrincipal(String)","u":"%3Cinit%3E(java.lang.String)"},{"p":"cl.conversor.vista.cli","c":"Color","l":"PURPLE"},{"p":"cl.conversor.vista.cli","c":"Color","l":"RED"},{"p":"cl.conversor.vista.cli","c":"Color","l":"RESET"},{"p":"cl.conversor.vista.cli","c":"MenuPrincipal","l":"titulo"},{"p":"cl.conversor.vista.cli","c":"Color","l":"valueOf(String)","u":"valueOf(java.lang.String)"},{"p":"cl.conversor.vista.cli","c":"Color","l":"values()"},{"p":"cl.conversor.vista.cli","c":"Color","l":"WHITE"},{"p":"cl.conversor.vista.cli","c":"Color","l":"YELLOW"}];updateSearchResults(); \ No newline at end of file diff --git a/doc/overview-tree.html b/doc/overview-tree.html index 2b289a8..62f46d1 100644 --- a/doc/overview-tree.html +++ b/doc/overview-tree.html @@ -1,11 +1,11 @@ - + Class Hierarchy - + @@ -52,7 +52,7 @@ loadScripts(document, 'script');

    Hierarchy For All Packages

    Package Hierarchies: @@ -61,7 +61,7 @@ loadScripts(document, 'script');
    +
    +

    Enum Class Hierarchy

    + +
    diff --git a/doc/package-search-index.js b/doc/package-search-index.js index 33c7d20..744fc2a 100644 --- a/doc/package-search-index.js +++ b/doc/package-search-index.js @@ -1 +1 @@ -packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"m":"conversor_alura_one","l":"cl.conversor"},{"m":"conversor_alura_one","l":"cl.conversor.vista.cli"}];updateSearchResults(); \ No newline at end of file +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"m":"conversor_alura_one","l":"cl.conversor.app"},{"m":"conversor_alura_one","l":"cl.conversor.vista.cli"}];updateSearchResults(); \ No newline at end of file diff --git a/doc/tag-search-index.js b/doc/tag-search-index.js index f2a440c..0367dae 100644 --- a/doc/tag-search-index.js +++ b/doc/tag-search-index.js @@ -1 +1 @@ -tagSearchIndex = [{"l":"Constant Field Values","h":"","u":"constant-values.html"}];updateSearchResults(); \ No newline at end of file +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/doc/type-search-index.js b/doc/type-search-index.js index 1550f92..8c5ea35 100644 --- a/doc/type-search-index.js +++ b/doc/type-search-index.js @@ -1 +1 @@ -typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"cl.conversor","l":"Conversor"},{"p":"cl.conversor.vista.cli","l":"ConversorCli"},{"p":"cl.conversor.vista.cli","l":"LimpiarConsola"},{"p":"cl.conversor.vista.cli","l":"MenuPrincipal"}];updateSearchResults(); \ No newline at end of file +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"cl.conversor.vista.cli","l":"Color"},{"p":"cl.conversor.app","l":"Conversor"},{"p":"cl.conversor.vista.cli","l":"ConversorCli"},{"p":"cl.conversor.vista.cli","l":"LimpiarConsola"},{"p":"cl.conversor.vista.cli","l":"MenuPrincipal"}];updateSearchResults(); \ No newline at end of file diff --git a/jars/Conversor.jar b/jars/Conversor.jar deleted file mode 100644 index 8a93014..0000000 Binary files a/jars/Conversor.jar and /dev/null differ diff --git a/src/cl/conversor/Conversor.java b/src/cl/conversor/app/Conversor.java similarity index 51% rename from src/cl/conversor/Conversor.java rename to src/cl/conversor/app/Conversor.java index b7b622b..a80e58e 100644 --- a/src/cl/conversor/Conversor.java +++ b/src/cl/conversor/app/Conversor.java @@ -1,7 +1,8 @@ /** - * + * Currency conversor for Alura Challenge - G5 ONE + * @author DevFzn */ -package cl.conversor; +package cl.conversor.app; /** @@ -13,6 +14,9 @@ public class Conversor { * @param args */ public static void main(String[] args) { + for (String string : args) { + System.out.println(string); + } cl.conversor.vista.cli.ConversorCli.main(args); } diff --git a/src/cl/conversor/vista/cli/Color.java b/src/cl/conversor/vista/cli/Color.java new file mode 100644 index 0000000..8a97ee1 --- /dev/null +++ b/src/cl/conversor/vista/cli/Color.java @@ -0,0 +1,22 @@ +package cl.conversor.vista.cli; + +public enum Color { + RESET ("\u001B[0m"), + BLACK ("\u001B[30m"), + RED ("\u001B[31m"), + GREEN ("\u001B[32m"), + YELLOW ("\u001B[33m"), + BLUE ("\u001B[34m"), + PURPLE ("\u001B[35m"), + CYAN ("\u001B[36m"), + WHITE ("\u001B[37m"); + + private final String code; + Color(String code) { + this.code = code; + } + + public final String code() { + return this.code; + } +} diff --git a/src/cl/conversor/vista/cli/ConversorCli.java b/src/cl/conversor/vista/cli/ConversorCli.java index 2a490a1..0efeb5c 100644 --- a/src/cl/conversor/vista/cli/ConversorCli.java +++ b/src/cl/conversor/vista/cli/ConversorCli.java @@ -10,16 +10,22 @@ public class ConversorCli { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); LimpiarConsola.clear(); - System.out.println(MenuPrincipal.saludo); + MenuPrincipal menu = new MenuPrincipal("Bienvenido al conversor de monedas"); + System.out.println(menu.banner()); int input = 1; while (input != 0) { - System.out.println(MenuPrincipal.menu_opcs()); + System.out.println(menu.menu_opcs()); System.out.print("Ingresa una opción\n --> "); - input = Integer.valueOf(entrada.nextShort()); - LimpiarConsola.clear(); + try { + input = Integer.valueOf(entrada.next()); + LimpiarConsola.clear(); + } catch (Exception e) { + LimpiarConsola.clear(); + System.out.println(menu.banner(menu.error_in())); + } } - System.out.println("Finalizando conversor"); + System.out.println(" = Aplicación Finalizada ="); entrada.close(); System.exit(0); } diff --git a/src/cl/conversor/vista/cli/LimpiarConsola.java b/src/cl/conversor/vista/cli/LimpiarConsola.java index a77e5d3..85bc224 100644 --- a/src/cl/conversor/vista/cli/LimpiarConsola.java +++ b/src/cl/conversor/vista/cli/LimpiarConsola.java @@ -2,7 +2,7 @@ package cl.conversor.vista.cli; /** * Interface to clear OS terminal screen, on case of IDE Console - * it prints 80 new lines. + * it just prints 80 new lines. */ public interface LimpiarConsola { diff --git a/src/cl/conversor/vista/cli/MenuPrincipal.java b/src/cl/conversor/vista/cli/MenuPrincipal.java index c67a87e..3a69a0b 100644 --- a/src/cl/conversor/vista/cli/MenuPrincipal.java +++ b/src/cl/conversor/vista/cli/MenuPrincipal.java @@ -5,45 +5,79 @@ import java.util.List; /** * Class to create title, opts/menus Strings */ -public abstract class MenuPrincipal { - public static final String mensaje = "Bienvenido al Conversor-CLI"; - public static final String saludo = banner(mensaje); +public class MenuPrincipal { + public String titulo; public static final List menu = List.of( "Salir", "juan", "roberto", "pancracio", - "zerafin" + "zerafin" + Color.RESET.code() ); - + private static final String color_baner = Color.YELLOW.code(); + private static final String color_titulo = Color.CYAN.code(); + private static final String color_opcs = Color.GREEN.code(); + private static final String color_ind = Color.PURPLE.code(); + private static final String color_rst = Color.RESET.code(); + private static final String color_err = Color.RED.code(); + private static final String mensaje_error = "¡Debes ingresar un número válido!"; + public MenuPrincipal(String titulo) { + this.titulo = titulo; + } + /** - * @param msj Application Title - * @return String Title String + * @return String Banner String */ - public static String banner(String msj) { - int largo = msj.length()+8; + public String banner() { + int largo = this.titulo.length()+8; StringBuilder titulo = new StringBuilder(); + titulo.append(color_baner); titulo.append("=".repeat(largo)); - titulo.append("\n -- "+msj+" -- "); + titulo.append("\n -- "+ color_titulo + this.titulo + + color_baner + " -- " + color_rst); return titulo.toString(); } + /** + * @param msj Application Title + * @return String Banner String + */ + public String banner(String mensaje) { + int largo = this.titulo.length()+8; + StringBuilder titulo = new StringBuilder(); + titulo.append(color_baner); + titulo.append("=".repeat(largo)); + titulo.append("\n -- "+ color_titulo + mensaje + + color_baner + " -- " + color_rst); + return titulo.toString(); + } + /** * @return formatted String that represents menus options */ - public static String menu_opcs() { - int largo = mensaje.length()+8; + public String menu_opcs() { + int largo = this.titulo.length()+8; int pad = 4; StringBuilder opciones = new StringBuilder(); - opciones.append("=".repeat(largo)+"\n"); - opciones.append(" Menu de opciones:\n\n"); + opciones.append(color_baner + "=".repeat(largo) + + "\n" + color_rst); + opciones.append(color_opcs + " Menu de opciones:\n\n"); for (int i = 0; i < menu.size(); i++) { if (i!=0) { - opciones.append(" ".repeat(pad)+i+") "+menu.get(i)+"\n"); + opciones.append(" ".repeat(pad) + color_ind + i +") " + + color_opcs + menu.get(i) + "\n"); } } - opciones.append(" ".repeat(pad)+"0) "+menu.get(0)+"\n"); - opciones.append("\n"+"=".repeat(largo)); + opciones.append(" ".repeat(pad) + color_err + "0) " + color_rst + + color_opcs + menu.get(0) + "\n" + color_rst); + opciones.append("\n" + color_baner + "=".repeat(largo) + color_rst); return opciones.toString(); } + + /** + * @return String user input error message + */ + public String error_in() { + return new StringBuilder(color_err + mensaje_error + color_rst).toString(); + } } diff --git a/target/Conversor.jar b/target/Conversor.jar new file mode 100644 index 0000000..4479178 Binary files /dev/null and b/target/Conversor.jar differ