-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
711 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/ | ||
# | ||
# Linux start script should use lf | ||
/gradlew text eol=lf | ||
|
||
# These are Windows script files and should use crlf | ||
*.bat text eol=crlf | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
||
# Ignore Gradle build output directory | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>extenso</name> | ||
<comment>Project extenso created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>1659479287507</id> | ||
<name></name> | ||
<type>30</type> | ||
<matcher> | ||
<id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
arguments= | ||
auto.sync=false | ||
build.scans.enabled=false | ||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) | ||
connection.project.dir= | ||
eclipse.preferences.version=1 | ||
gradle.user.home= | ||
java.home=/home/fernando/.asdf/installs/java/openjdk-18.0.2 | ||
jvm.arguments= | ||
offline.mode=false | ||
override.workspace.settings=true | ||
show.console.view=true | ||
show.executions.view=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="bin/main" path="src/main/java"> | ||
<attributes> | ||
<attribute name="gradle_scope" value="main"/> | ||
<attribute name="gradle_used_by_scope" value="main,test"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="bin/main" path="src/main/resources"> | ||
<attributes> | ||
<attribute name="gradle_scope" value="main"/> | ||
<attribute name="gradle_used_by_scope" value="main,test"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="bin/test" path="src/test/java"> | ||
<attributes> | ||
<attribute name="gradle_scope" value="test"/> | ||
<attribute name="gradle_used_by_scope" value="test"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="src" output="bin/test" path="src/test/resources"> | ||
<attributes> | ||
<attribute name="gradle_scope" value="test"/> | ||
<attribute name="gradle_used_by_scope" value="test"/> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-18/"/> | ||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> | ||
<classpathentry kind="output" path="bin/default"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>app</name> | ||
<comment>Project app created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
<filteredResources> | ||
<filter> | ||
<id>1659479287504</id> | ||
<name></name> | ||
<type>30</type> | ||
<matcher> | ||
<id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
<arguments>node_modules|.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
</matcher> | ||
</filter> | ||
</filteredResources> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir=.. | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* This file was generated by the Gradle 'init' task. | ||
* | ||
* This generated file contains a sample Java application project to get you started. | ||
* For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle | ||
* User Manual available at https://docs.gradle.org/7.5/userguide/building_java_projects.html | ||
*/ | ||
|
||
plugins { | ||
// Apply the application plugin to add support for building a CLI application in Java. | ||
application | ||
} | ||
|
||
repositories { | ||
// Use Maven Central for resolving dependencies. | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
// Use TestNG framework, also requires calling test.useTestNG() below | ||
testImplementation("org.testng:testng:7.4.0") | ||
|
||
// This dependency is used by the application. | ||
implementation("com.google.guava:guava:31.0.1-jre") | ||
} | ||
|
||
application { | ||
// Define the main class for the application. | ||
mainClass.set("extenso.App") | ||
} | ||
|
||
tasks.named<Test>("test") { | ||
// Use TestNG for unit tests. | ||
useTestNG() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* | ||
* This Java source file was generated by the Gradle 'init' task. | ||
*/ | ||
package extenso; | ||
|
||
public class App { | ||
|
||
public static void main(String[] args) { | ||
NumberToText.text(3); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package extenso; | ||
|
||
import java.util.HashMap; | ||
|
||
public class NumberToText { | ||
private static HashMap hm; | ||
private static int number; | ||
|
||
private static void numberAnalizer() { | ||
String num = String.valueOf(number); | ||
int strSize = num.length(); | ||
String[] decomposed = num.split(""); | ||
System.out.println(decomposed[0]); | ||
} | ||
|
||
public static final String text(int number) { | ||
createMapNumbers(); | ||
numberAnalizer(); | ||
return ""; | ||
} | ||
|
||
private static void createMapNumbers() { | ||
hm = new HashMap<String, String>(); | ||
hm.put("1", "um"); | ||
hm.put("2", "dois"); | ||
hm.put("3", "tres"); | ||
hm.put("4", "quatro"); | ||
hm.put("5", "cinco"); | ||
hm.put("6", "seis"); | ||
hm.put("7", "sete"); | ||
hm.put("8", "oito"); | ||
hm.put("9", "nove"); | ||
hm.put("10", "dez"); | ||
hm.put("11", "onze"); | ||
hm.put("12", "doze"); | ||
hm.put("13", "treze"); | ||
hm.put("14", "quatorze"); | ||
hm.put("15", "quinze"); | ||
hm.put("16", "dezesseis"); | ||
hm.put("17", "dezessete"); | ||
hm.put("18", "dezoito"); | ||
hm.put("19", "dezenove"); | ||
hm.put("2_", "vinte"); | ||
hm.put("3_", "trinta"); | ||
hm.put("4_", ""); | ||
hm.put("5_", "um"); | ||
hm.put("6_", "um"); | ||
hm.put("7_", "um"); | ||
hm.put("8_", "um"); | ||
hm.put("9_", "um"); | ||
hm.put("100", "cem"); | ||
hm.put("1__", "cento"); | ||
hm.put("2__", "duzentos"); | ||
hm.put("3__", "trezentos"); | ||
hm.put("4__", "quatrocentos"); | ||
hm.put("5__", "quinhentos"); | ||
hm.put("6__", "seiscentos"); | ||
hm.put("7__", "setecentos"); | ||
hm.put("8__", "oitocentos"); | ||
hm.put("9__", "novecentos"); | ||
hm.put("___", "mil"); | ||
hm.put("1______", "milhão"); | ||
hm.put("______", "milhões"); | ||
hm.put("1_________", "Bilhão"); | ||
hm.put("_________", "bilhões"); | ||
hm.put("1____________", "trilhão"); | ||
hm.put("____________", "trilhões"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* | ||
* This Java source file was generated by the Gradle 'init' task. | ||
*/ | ||
package extenso; | ||
|
||
import org.testng.annotations.*; | ||
import static org.testng.Assert.*; | ||
|
||
public class AppTest { | ||
@Test public void appHasAGreeting() { | ||
App classUnderTest = new App(); | ||
assertNotNull(classUnderTest.getGreeting(), "app should have a greeting"); | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.