Skip to content

Commit 5e9ef93

Browse files
committed
rename method, update logic
1 parent 1d185a6 commit 5e9ef93

1 file changed

Lines changed: 26 additions & 17 deletions

File tree

ShimmerDriver/src/main/java/com/shimmerresearch/driverUtilities/UtilShimmer.java

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -793,23 +793,6 @@ public static boolean stringContainsItemFromListUpperCaseCheck(String inputStrin
793793
return false;
794794
}
795795

796-
public static boolean stringOnlyContainsItemFromListUpperCaseCheck(String inputString, String[] items) {
797-
798-
for(int i =0; i < items.length; i++) {
799-
800-
String[] words = items[i].toUpperCase().split("\\s+");
801-
String target = inputString.toUpperCase();
802-
803-
for (String w : words) {
804-
if (!target.contains(w)) {
805-
return false;
806-
}
807-
}
808-
return true;
809-
}
810-
return false;
811-
}
812-
813796
public static boolean stringContainsItemFromList(String inputString, String[] items) {
814797
for(int i =0; i < items.length; i++) {
815798
if(inputString.contains(items[i])) {
@@ -818,6 +801,32 @@ public static boolean stringContainsItemFromList(String inputString, String[] it
818801
}
819802
return false;
820803
}
804+
805+
public static boolean stringContainsOnlyWordsItemFromListUpperCaseCheck(String inputString, String[] items) {
806+
807+
boolean allMatched = true;
808+
String target = inputString.toUpperCase();
809+
810+
for (String item : items) {
811+
812+
String[] words = item.toUpperCase().split("\\s+");
813+
814+
System.out.println("target : " + target);
815+
for (String w : words) {
816+
System.out.println("words = " + w);
817+
818+
if (!target.contains(w)) {
819+
allMatched = false;
820+
}
821+
}
822+
823+
if(allMatched) {
824+
return true;
825+
}
826+
}
827+
828+
return false;
829+
}
821830

822831
public void threadSleep(long millis) {
823832
millisecondDelay(millis);

0 commit comments

Comments
 (0)