diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4951bbe..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Datenstrukturen.md b/Datenstrukturen.md index 7377d28..a47d127 100644 --- a/Datenstrukturen.md +++ b/Datenstrukturen.md @@ -1,3 +1,41 @@ +### Enums +Enums sind gleich wie in Java + +```Groovy +enum Day{ + MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY +} + +Day today = Day.MONDAY +``` + +Man kann in Enums zusätzlich noch Eigenschaften und Methoden einbauen + +```Groovy +enum Day{ + MONDAY("First Day of the Week"), + TUESDAY("Second Day of the Week), + //... + + final String description + + Day(String description){ + this.description = description + } + + String getDescription(){ + return description + } +} + + Day today = Day.FRIDAY + def description = today.getDescription + println("Today is $today: $description") + +``` + +Zusätzlich dazu kann man auch Methoden überschreiben (z.B. toString()-Methode) + ### Ranges Ähnlich wie in Ruby, jedoch nicht gleich ```Groovy @@ -109,3 +147,5 @@ Entfernen eines Elements: ```Groovy mySet.remove(1) println mySet // [2,3,4,5,6,7] +``` + diff --git a/aufgaben.md b/yuliya/aufgaben.md similarity index 100% rename from aufgaben.md rename to yuliya/aufgaben.md diff --git a/yuliya/groovy.pptx b/yuliya/groovy.pptx new file mode 100644 index 0000000..f2a2b16 Binary files /dev/null and b/yuliya/groovy.pptx differ diff --git a/yuliya/groovy_code_screenshots/folie10_methode_ohne_klasse.png b/yuliya/groovy_code_screenshots/folie10_methode_ohne_klasse.png new file mode 100644 index 0000000..cec1c19 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie10_methode_ohne_klasse.png differ diff --git a/yuliya/groovy_code_screenshots/folie11_instanzmethoden.png b/yuliya/groovy_code_screenshots/folie11_instanzmethoden.png new file mode 100644 index 0000000..f1a160b Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie11_instanzmethoden.png differ diff --git a/yuliya/groovy_code_screenshots/folie12_statische_methoden.png b/yuliya/groovy_code_screenshots/folie12_statische_methoden.png new file mode 100644 index 0000000..6e1646b Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie12_statische_methoden.png differ diff --git a/yuliya/groovy_code_screenshots/folie13_dynamische_methoden.png b/yuliya/groovy_code_screenshots/folie13_dynamische_methoden.png new file mode 100644 index 0000000..950179c Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie13_dynamische_methoden.png differ diff --git a/yuliya/groovy_code_screenshots/folie14_expando.png b/yuliya/groovy_code_screenshots/folie14_expando.png new file mode 100644 index 0000000..e3f1a7b Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie14_expando.png differ diff --git a/yuliya/groovy_code_screenshots/folie15_defaultparameter.png b/yuliya/groovy_code_screenshots/folie15_defaultparameter.png new file mode 100644 index 0000000..2ce22d0 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie15_defaultparameter.png differ diff --git a/yuliya/groovy_code_screenshots/folie16_clusures.png b/yuliya/groovy_code_screenshots/folie16_clusures.png new file mode 100644 index 0000000..3e2538c Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie16_clusures.png differ diff --git a/yuliya/groovy_code_screenshots/folie17_closure_referenzierung.png b/yuliya/groovy_code_screenshots/folie17_closure_referenzierung.png new file mode 100644 index 0000000..8a8b38f Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie17_closure_referenzierung.png differ diff --git a/yuliya/groovy_code_screenshots/folie18_closure_parameter.png b/yuliya/groovy_code_screenshots/folie18_closure_parameter.png new file mode 100644 index 0000000..9128d87 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie18_closure_parameter.png differ diff --git a/yuliya/groovy_code_screenshots/folie19_aufruf_closure.png b/yuliya/groovy_code_screenshots/folie19_aufruf_closure.png new file mode 100644 index 0000000..a5b7867 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie19_aufruf_closure.png differ diff --git a/yuliya/groovy_code_screenshots/folie20_closures_maps.png b/yuliya/groovy_code_screenshots/folie20_closures_maps.png new file mode 100644 index 0000000..2ae1437 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie20_closures_maps.png differ diff --git a/yuliya/groovy_code_screenshots/folie21_methodenverkettung.png b/yuliya/groovy_code_screenshots/folie21_methodenverkettung.png new file mode 100644 index 0000000..9fe3032 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie21_methodenverkettung.png differ diff --git a/yuliya/groovy_code_screenshots/folie22_mixin.png b/yuliya/groovy_code_screenshots/folie22_mixin.png new file mode 100644 index 0000000..5706674 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie22_mixin.png differ diff --git a/yuliya/groovy_code_screenshots/folie2_def_klasse.png b/yuliya/groovy_code_screenshots/folie2_def_klasse.png new file mode 100644 index 0000000..bc67917 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie2_def_klasse.png differ diff --git a/yuliya/groovy_code_screenshots/folie3_konstruktoren.png b/yuliya/groovy_code_screenshots/folie3_konstruktoren.png new file mode 100644 index 0000000..26d3711 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie3_konstruktoren.png differ diff --git a/yuliya/groovy_code_screenshots/folie4_mapkonstruktor.png b/yuliya/groovy_code_screenshots/folie4_mapkonstruktor.png new file mode 100644 index 0000000..4e4ef21 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie4_mapkonstruktor.png differ diff --git a/yuliya/groovy_code_screenshots/folie5_konstruktorueberladung.png b/yuliya/groovy_code_screenshots/folie5_konstruktorueberladung.png new file mode 100644 index 0000000..c050666 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie5_konstruktorueberladung.png differ diff --git a/yuliya/groovy_code_screenshots/folie6_eigenschaften.png b/yuliya/groovy_code_screenshots/folie6_eigenschaften.png new file mode 100644 index 0000000..2c009ea Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie6_eigenschaften.png differ diff --git a/yuliya/groovy_code_screenshots/folie7_getter_setter.png b/yuliya/groovy_code_screenshots/folie7_getter_setter.png new file mode 100644 index 0000000..579e1be Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie7_getter_setter.png differ diff --git a/yuliya/groovy_code_screenshots/folie9_def_methode.png b/yuliya/groovy_code_screenshots/folie9_def_methode.png new file mode 100644 index 0000000..dfdcce7 Binary files /dev/null and b/yuliya/groovy_code_screenshots/folie9_def_methode.png differ diff --git a/klassen&methoden.md b/yuliya/klassen&methoden.md similarity index 100% rename from klassen&methoden.md rename to yuliya/klassen&methoden.md diff --git a/klassen&methoden.pdf b/yuliya/klassen&methoden.pdf similarity index 100% rename from klassen&methoden.pdf rename to yuliya/klassen&methoden.pdf