4 Commits

Author SHA1 Message Date
b9fb24efb5 Add String helper 2020-06-09 11:56:55 +07:00
2bcd46b73c Add println 2020-06-09 09:59:31 +07:00
dd9c4f260c Updated main 2020-06-09 09:40:12 +07:00
23019913a5 Update package 2020-06-09 09:28:40 +07:00
3 changed files with 33 additions and 2 deletions

View File

@@ -1,2 +1 @@
rootProject.name = 'sample-module-gradle'
rootProject.name = 'sample-module-gradle'

View File

@@ -1,3 +1,5 @@
package com.cubetiqs.util;
/**
* Print Message
*
@@ -8,6 +10,16 @@ public class Print {
public static final String ID = "PRINT";
public static void print(String message) {
System.out.print(ID + " : " + message);
}
public static void println(String message) {
System.out.println(ID + " : " + message);
}
}
class Main {
public static void main(String[] args) {
Print.print("Hello");
}
}

View File

@@ -0,0 +1,20 @@
package com.cubetiqs.util;
/**
* String util helper
*
* @author sombochea
* @since 1.0
*/
public final class StringHelper {
public static String getOrDefault(String text, String fallback) {
if (text == null || text.isEmpty()) {
return fallback;
}
return text;
}
public static String getOrEmpty(String text) {
return getOrDefault(text, "");
}
}