diff --git a/.idea/modules.xml b/.idea/modules.xml index ef8a6f4..6deebf6 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,6 +2,7 @@ + diff --git a/out/production/Generics/ArrayList.class b/out/production/Generics/ArrayList.class new file mode 100644 index 0000000..b2f791f Binary files /dev/null and b/out/production/Generics/ArrayList.class differ diff --git a/out/production/Generics/Main.class b/out/production/Generics/Main.class new file mode 100644 index 0000000..fcdea01 Binary files /dev/null and b/out/production/Generics/Main.class differ diff --git a/out/production/Lambda/Ex1.class b/out/production/Lambda/Ex1.class new file mode 100644 index 0000000..7250b60 Binary files /dev/null and b/out/production/Lambda/Ex1.class differ diff --git a/out/production/Lambda/Ex2.class b/out/production/Lambda/Ex2.class new file mode 100644 index 0000000..597f8f8 Binary files /dev/null and b/out/production/Lambda/Ex2.class differ diff --git a/out/production/Lambda/Main.class b/out/production/Lambda/Main.class new file mode 100644 index 0000000..599ba64 Binary files /dev/null and b/out/production/Lambda/Main.class differ diff --git a/src/Lambda/Lambda.iml b/src/Lambda/Lambda.iml new file mode 100644 index 0000000..9092d60 --- /dev/null +++ b/src/Lambda/Lambda.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/src/Lambda/src/Ex1.java b/src/Lambda/src/Ex1.java new file mode 100644 index 0000000..2255e5e --- /dev/null +++ b/src/Lambda/src/Ex1.java @@ -0,0 +1,5 @@ +public interface Ex1 { + + public boolean isCharInString(char letter, String word); + +} diff --git a/src/Lambda/src/Ex2.java b/src/Lambda/src/Ex2.java new file mode 100644 index 0000000..f55aeed --- /dev/null +++ b/src/Lambda/src/Ex2.java @@ -0,0 +1,5 @@ +public interface Ex2 { + + public double smallPowerLarge(int num1, int num2); + +} diff --git a/src/Lambda/src/Ex3_1.java b/src/Lambda/src/Ex3_1.java new file mode 100644 index 0000000..a26b733 --- /dev/null +++ b/src/Lambda/src/Ex3_1.java @@ -0,0 +1,5 @@ +public interface Ex3_1 { + + public int ex1_1(int x); + +} diff --git a/src/Lambda/src/Ex3_2.java b/src/Lambda/src/Ex3_2.java new file mode 100644 index 0000000..827f1e7 --- /dev/null +++ b/src/Lambda/src/Ex3_2.java @@ -0,0 +1,5 @@ +public interface Ex3_2 { + + public void ex3_2(Ex3_1 x, int y); + +} diff --git a/src/Lambda/src/Main.java b/src/Lambda/src/Main.java new file mode 100644 index 0000000..ba89a65 --- /dev/null +++ b/src/Lambda/src/Main.java @@ -0,0 +1,27 @@ +import java.util.*; +public class Main { + public static void main(String[] args) { + + Ex1 isCharInWord = (letter, word) -> (isCharInWord(letter, word)); + Ex2 smallToThePowerOfLarge = ((num1, num2) -> (smallPowerLarge(num1, num2))); + Ex3_2 x = (Ex3_1 t, int y) -> t.ex1_1(y); + } + public static boolean isCharInWord (char letter, String word) { + for (int i = 0; i < word.length(); i++) { + if (word.charAt(i) == letter) { + return true; + } + } + return false; + } + + public static double smallPowerLarge(int num1, int num2) { + if (num1 > num2) { + return Math.pow(num2, num1); + } + else { + return Math.pow(num1, num2); + } + } + +} \ No newline at end of file