reaproveitamento-poo-java

commit aa1c6a32801c0aab25a55994f9957755b0d3fe3c

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

utils: create a custom formatter

 src/org/porcellis/models/utils/Formatador.java | 11 +++++++++++


diff --git a/src/org/porcellis/models/utils/Formatador.java b/src/org/porcellis/models/utils/Formatador.java
new file mode 100644
index 0000000000000000000000000000000000000000..36329ec4d45c8215feaf0cf433853f2cd50a0233
--- /dev/null
+++ b/src/org/porcellis/models/utils/Formatador.java
@@ -0,0 +1,11 @@
+package org.porcellis.utils;
+
+import java.text.NumberFormat;
+import java.util.Locale;
+
+public class Formatador {
+	public static String formatarMoeda(double valor) {
+		return NumberFormat
+			.getCurrencyInstance(new Locale("pt", "BR")).format(valor);
+	}
+}