@@ -26,37 +26,37 @@ public static void main(String[] args) {
2626
2727 System .out .println ("\n Simple solution for numbers:" );
2828 long startTimeV1 = clock .millis ();
29- boolean found1 = ArrayFinds .findElementV1 (numbers .clone (), 1 );
29+ boolean found1 = ArrayFinds .containsElementV1 (numbers .clone (), 1 );
3030 displayExecutionTime (clock .millis () - startTimeV1 );
3131 System .out .println ("The element was found?: " + found1 );
3232
3333 System .out .println ("\n Solution based on Arrays.binarySearch() for numbers:" );
3434 long startTimeV2 = clock .millis ();
35- boolean found2 = ArrayFinds .findElementV2 (numbers .clone (), 1 );
35+ boolean found2 = ArrayFinds .containsElementV2 (numbers .clone (), 1 );
3636 displayExecutionTime (clock .millis () - startTimeV2 );
3737 System .out .println ("The element was found?: " + found2 );
3838
3939 System .out .println ("\n Solution based on Stream.anyMatch() for numbers:" );
4040 long startTimeV3 = clock .millis ();
41- boolean found3 = ArrayFinds .findElementV3 (numbers .clone (), 1 );
41+ boolean found3 = ArrayFinds .containsElementV3 (numbers .clone (), 1 );
4242 displayExecutionTime (clock .millis () - startTimeV3 );
4343 System .out .println ("The element was found?: " + found3 );
4444
4545 System .out .println ("\n Simple solution for Melon:" );
4646 long startTimeV4 = clock .millis ();
47- boolean found4 = ArrayFinds .findElementObjectV1 (melons .clone (), new Melon ("Gac" , 1200 ));
47+ boolean found4 = ArrayFinds .containsElementObjectV1 (melons .clone (), new Melon ("Gac" , 1200 ));
4848 displayExecutionTime (clock .millis () - startTimeV4 );
4949 System .out .println ("The Melon was found?: " + found4 );
5050
5151 System .out .println ("\n Solution based on Comparator for Melon:" );
5252 long startTimeV5 = clock .millis ();
53- boolean found5 = ArrayFinds .findElementObjectV2 (melons .clone (), new Melon ("Gac" , 1205 ), byType );
53+ boolean found5 = ArrayFinds .containsElementObjectV2 (melons .clone (), new Melon ("Gac" , 1205 ), byType );
5454 displayExecutionTime (clock .millis () - startTimeV5 );
5555 System .out .println ("The Melon was found?: " + found5 );
5656
5757 System .out .println ("\n Solution based on binarySearch() for Melon:" );
5858 long startTimeV6 = clock .millis ();
59- boolean found6 = ArrayFinds .findElementObjectV3 (melons .clone (), new Melon ("Honeydew" , 1200 ), byWeight );
59+ boolean found6 = ArrayFinds .containsElementObjectV3 (melons .clone (), new Melon ("Honeydew" , 1200 ), byWeight );
6060 displayExecutionTime (clock .millis () - startTimeV6 );
6161 System .out .println ("The Melon was found?: " + found6 );
6262
0 commit comments