Compare commits
4 Commits
v0.1
...
0.0.1-SNAP
| Author | SHA1 | Date | |
|---|---|---|---|
| b9fb24efb5 | |||
| 2bcd46b73c | |||
| dd9c4f260c | |||
| 23019913a5 |
@@ -1,2 +1 @@
|
|||||||
rootProject.name = 'sample-module-gradle'
|
rootProject.name = 'sample-module-gradle'
|
||||||
|
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
package com.cubetiqs.util;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print Message
|
* Print Message
|
||||||
*
|
*
|
||||||
@@ -8,6 +10,16 @@ public class Print {
|
|||||||
public static final String ID = "PRINT";
|
public static final String ID = "PRINT";
|
||||||
|
|
||||||
public static void print(String message) {
|
public static void print(String message) {
|
||||||
|
System.out.print(ID + " : " + message);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void println(String message) {
|
||||||
System.out.println(ID + " : " + message);
|
System.out.println(ID + " : " + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Main {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
Print.print("Hello");
|
||||||
|
}
|
||||||
|
}
|
||||||
20
src/main/java/com/cubetiqs/util/StringHelper.java
Normal file
20
src/main/java/com/cubetiqs/util/StringHelper.java
Normal 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, "");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user