summaryrefslogtreecommitdiff
path: root/graphs/java
diff options
context:
space:
mode:
Diffstat (limited to 'graphs/java')
-rw-r--r--graphs/java/.gitignore81
-rw-r--r--graphs/java/classics/.gitignore38
-rw-r--r--graphs/java/classics/pom.xml133
-rw-r--r--graphs/java/classics/src/main/java/fr/epita/assistants/classics/Classics.java104
-rw-r--r--graphs/java/creatureInterface/.gitignore38
-rw-r--r--graphs/java/creatureInterface/pom.xml134
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/BaseHuman.java51
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Creature.java28
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Dragon.java74
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Fish.java27
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/FlyingInterface.java12
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Human.java8
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mage.java59
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/MagicalInterface.java56
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mermaid.java110
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpeakableInterface.java47
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Spell.java48
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpellType.java11
-rw-r--r--graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SwimmingInterface.java25
-rw-r--r--graphs/java/drawing/.gitignore38
-rw-r--r--graphs/java/drawing/pom.xml139
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Circle.java27
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Entity.java20
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/IDrawable.java5
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Rectangle.java31
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Sharp.java9
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Square.java7
-rw-r--r--graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Triangle.java33
-rw-r--r--graphs/java/embedFiles/.gitignore38
-rw-r--r--graphs/java/embedFiles/pom.xml133
-rw-r--r--graphs/java/embedFiles/src/main/java/fr/epita/assistants/embedfiles/DisplayEmbedFile.java27
-rw-r--r--graphs/java/embedFiles/src/main/resources/other-sample.txt539
-rw-r--r--graphs/java/embedFiles/src/main/resources/sample.txt1
-rw-r--r--graphs/java/fgen/.gitignore38
-rw-r--r--graphs/java/fgen/pom.xml133
-rw-r--r--graphs/java/fgen/src/main/java/fr/epita/assistants/fgen/FGen.java105
-rw-r--r--graphs/java/fgen/src/main/resources/example.txt3
-rw-r--r--graphs/java/grades/.gitignore38
-rw-r--r--graphs/java/grades/pom.xml139
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/EntryNotFoundException.java13
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/GradeHandler.java98
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Activity.java4
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Grade.java4
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Student.java8
-rw-r--r--graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Subject.java8
-rw-r--r--graphs/java/helloWorld/pom.xml133
-rw-r--r--graphs/java/helloWorld/src/main/java/fr/epita/assistants/helloworld/HelloWorld.java12
-rw-r--r--graphs/java/linkedList/.gitignore38
-rw-r--r--graphs/java/linkedList/pom.xml31
-rw-r--r--graphs/java/linkedList/src/main/java/fr/epita/assistants/linkedlist/LinkedList.java99
-rw-r--r--graphs/java/linkedList/src/test/java/fr/epita/assistants/linkedlist/LinkedListTests.java38
-rw-r--r--graphs/java/loggingBasics/.gitignore38
-rw-r--r--graphs/java/loggingBasics/pom.xml146
-rw-r--r--graphs/java/loggingBasics/src/main/java/fr/epita/assistants/loggingbasics/Trombinoscope.java43
-rw-r--r--graphs/java/myKitten/.gitignore38
-rw-r--r--graphs/java/myKitten/assembly.xml20
-rw-r--r--graphs/java/myKitten/pom.xml138
-rw-r--r--graphs/java/myKitten/src/main/java/fr/epita/assistants/mykitten/MyKitten.java64
-rw-r--r--graphs/java/mySet/.gitignore38
-rw-r--r--graphs/java/mySet/pom.xml133
-rw-r--r--graphs/java/mySet/src/main/java/fr/epita/assistants/myset/GenericSet.java83
-rw-r--r--graphs/java/mySet/src/main/java/fr/epita/assistants/myset/IntegerSet.java83
-rw-r--r--graphs/java/notifyMe/.gitignore38
-rw-r--r--graphs/java/notifyMe/pom.xml133
-rw-r--r--graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/INotificationSender.java10
-rw-r--r--graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/ShellNotifier.java22
-rw-r--r--graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/IMultiNotificationSender.java26
-rw-r--r--graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/User.java41
-rw-r--r--graphs/java/nucBatlle/.gitignore38
-rw-r--r--graphs/java/nucBattle/.gitignore38
-rw-r--r--graphs/java/nucBattle/pom.xml150
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Battle.java18
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/BattleManager.java101
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Nuc.java20
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Packet.java20
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Report.java18
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/ReportType.java14
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Turn.java18
-rw-r--r--graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/TurnDeserializer.java30
-rw-r--r--graphs/java/nucBattle/src/main/resources/exampleBattle1.json66
-rw-r--r--graphs/java/observer/.gitignore38
-rw-r--r--graphs/java/observer/pom.xml133
-rw-r--r--graphs/java/observer/src/main/java/fr/epita/assistants/observer/Lifeguard.java21
-rw-r--r--graphs/java/observer/src/main/java/fr/epita/assistants/observer/Observable.java55
-rw-r--r--graphs/java/observer/src/main/java/fr/epita/assistants/observer/Person.java15
-rw-r--r--graphs/java/observer/src/main/java/fr/epita/assistants/observer/Swimmer.java55
-rw-r--r--graphs/java/observer/src/main/java/fr/epita/assistants/observer/SwimmerStatus.java11
-rw-r--r--graphs/java/pizzaStreams/.gitignore38
-rw-r--r--graphs/java/pizzaStreams/pom.xml138
-rw-r--r--graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Dough.java16
-rw-r--r--graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Pizza.java47
-rw-r--r--graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/PizzaStreams.java60
-rw-r--r--graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Topping.java82
-rw-r--r--graphs/java/practiceLombok/.gitignore38
-rw-r--r--graphs/java/practiceLombok/pom.xml139
-rw-r--r--graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Falcon.java10
-rw-r--r--graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Horse.java13
-rw-r--r--graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Shark.java10
-rw-r--r--graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Spider.java7
-rw-r--r--graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Tiger.java11
-rw-r--r--graphs/java/rockPaperScissors/.gitignore38
-rw-r--r--graphs/java/rockPaperScissors/pom.xml124
-rw-r--r--graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Bot.java18
-rw-r--r--graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/HandShape.java26
-rw-r--r--graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Match.java52
-rw-r--r--graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Player.java23
-rw-r--r--graphs/java/scheduler/.gitignore38
-rw-r--r--graphs/java/scheduler/pom.xml146
-rw-r--r--graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/MyTask.java48
-rw-r--r--graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/Task.java75
-rw-r--r--graphs/java/seq/.gitignore38
-rw-r--r--graphs/java/seq/pom.xml133
-rw-r--r--graphs/java/seq/src/main/java/fr/epita/assistants/seq/ExtendedStream.java204
-rw-r--r--graphs/java/seq/src/main/java/fr/epita/assistants/seq/Seq.java413
-rw-r--r--graphs/java/seq/src/test/java/fr/epita/assistants/seq/ExtendedStreamTest.java244
-rw-r--r--graphs/java/singleton/.gitignore38
-rw-r--r--graphs/java/singleton/pom.xml141
-rw-r--r--graphs/java/singleton/src/main/java/fr/epita/assistants/logger/Logger.java62
-rw-r--r--graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/SingletonEnumLogger.java49
-rw-r--r--graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/StaticSingletonLogger.java54
-rw-r--r--graphs/java/streamStudent/.gitignore38
-rw-r--r--graphs/java/streamStudent/pom.xml138
-rw-r--r--graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Pair.java67
-rw-r--r--graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Streamer.java58
-rw-r--r--graphs/java/streamStudent/src/test/java/fr/epita/assistants/streamstudent/StreamStudentTest.java63
-rw-r--r--graphs/java/test1/.gitignore38
-rw-r--r--graphs/java/test1/pom.xml141
-rw-r--r--graphs/java/test1/src/main/java/fr/epita/assistants/maths/Matrix.java33
-rw-r--r--graphs/java/test1/src/test/java/fr/epita/assistants/maths/MatrixTests.java113
-rw-r--r--graphs/java/test2/pom.xml141
-rw-r--r--graphs/java/test2/src/main/java/fr/epita/assistants/server/MyServer.java42
-rw-r--r--graphs/java/test2/src/main/java/fr/epita/assistants/test2/Test2.java48
-rw-r--r--graphs/java/test2/src/test/java/fr/epita/assistants/test2/Test2Test.java105
-rw-r--r--graphs/java/threadForkJoin/.gitignore38
-rw-r--r--graphs/java/threadForkJoin/pom.xml133
-rw-r--r--graphs/java/threadForkJoin/src/main/java/fr/epita/assistants/forkjoin/MyRecursiveTask.java49
-rw-r--r--graphs/java/threadForkJoin/src/test/java/fr/epita/assistants/forkjoin/RecursiveTaskTest.java34
-rw-r--r--graphs/java/throwback/.gitignore38
-rw-r--r--graphs/java/throwback/pom.xml133
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/IntegerException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/LongStringException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/NegativeIntegerException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/Pitcher.java21
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/PositiveIntegerException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/ShortStringException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/StringException.java7
-rw-r--r--graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/UnknownException.java7
-rw-r--r--graphs/java/travel/.gitignore38
-rw-r--r--graphs/java/travel/pom.xml138
-rw-r--r--graphs/java/travel/src/main/java/fr/epita/assistants/travel/Country.java44
-rw-r--r--graphs/java/travel/src/main/java/fr/epita/assistants/travel/Travel.java13
-rw-r--r--graphs/java/travel/src/main/resources/travel_times.csv29
-rw-r--r--graphs/java/triad/flake.nix29
-rw-r--r--graphs/java/triad/pom.xml133
-rw-r--r--graphs/java/triad/src/main/java/fr/epita/assistants/triad/FixMyMistake.java9
-rw-r--r--graphs/java/triad/src/main/java/fr/epita/assistants/triad/UglyClass.java36
-rw-r--r--graphs/java/triad/src/main/java/fr/epita/assistants/triad/WriteGettersAndConstructorForMe.java98
-rw-r--r--graphs/java/war/.gitignore38
-rw-r--r--graphs/java/war/pom.xml133
-rw-r--r--graphs/java/war/src/main/java/fr/epita/assistants/war/Assassin.java9
-rw-r--r--graphs/java/war/src/main/java/fr/epita/assistants/war/Combatant.java12
-rw-r--r--graphs/java/war/src/main/java/fr/epita/assistants/war/Knight.java9
-rw-r--r--graphs/java/war/src/main/java/fr/epita/assistants/war/Soldier.java38
-rw-r--r--graphs/java/war/src/main/java/fr/epita/assistants/war/Vehicle.java32
164 files changed, 9957 insertions, 0 deletions
diff --git a/graphs/java/.gitignore b/graphs/java/.gitignore
new file mode 100644
index 0000000..d951fc9
--- /dev/null
+++ b/graphs/java/.gitignore
@@ -0,0 +1,81 @@
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+*.tar
+# User-specific stuff
+.idea/
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/**/usage.statistics.xml
+.idea/**/dictionaries
+.idea/**/shelf
+
+# AWS User-specific
+.idea/**/aws.xml
+
+# Generated files
+.idea/**/contentModel.xml
+
+# Sensitive or high-churn files
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+.idea/**/dbnavigator.xml
+
+# Gradle
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# Gradle and Maven with auto-import
+# When using Gradle or Maven with auto-import, you should exclude module files,
+# since they will be recreated, and may cause churn. Uncomment if using
+# auto-import.
+# .idea/artifacts
+# .idea/compiler.xml
+# .idea/jarRepositories.xml
+# .idea/modules.xml
+# .idea/*.iml
+# .idea/modules
+# *.iml
+# *.ipr
+
+# CMake
+cmake-build-*/
+
+# Mongo Explorer plugin
+.idea/**/mongoSettings.xml
+
+# File-based project format
+*.iws
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# SonarLint plugin
+.idea/sonarlint/
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
+
+# Editor-based Rest Client
+.idea/httpRequests
+
+# Android studio 3.1+ serialized cache file
+.idea/caches/build_file_checksums.ser
+target/
+Main.java
diff --git a/graphs/java/classics/.gitignore b/graphs/java/classics/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/classics/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/classics/pom.xml b/graphs/java/classics/pom.xml
new file mode 100644
index 0000000..ce852cb
--- /dev/null
+++ b/graphs/java/classics/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>classics</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>2.22.2</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/classics/src/main/java/fr/epita/assistants/classics/Classics.java b/graphs/java/classics/src/main/java/fr/epita/assistants/classics/Classics.java
new file mode 100644
index 0000000..9be12e2
--- /dev/null
+++ b/graphs/java/classics/src/main/java/fr/epita/assistants/classics/Classics.java
@@ -0,0 +1,104 @@
+package fr.epita.assistants.classics;
+
+public class Classics {
+ /**
+ * Computes the factorial of n.
+ *
+ * @param n the nth value to compute, negative values should return -1
+ * @return the long value of n!
+ */
+ public static long factorial(int n) {
+ if (n < 0) return -1;
+ if (n == 0) return 1;
+ return n * factorial(n - 1);
+ }
+
+ /**
+ * Computes the nth value of the tribonacci suite.
+ * f(0) = 0, f(1) = 1, f(2) = 1, f(n+3) = f(n) + f(n+1) + f(n+2)
+ *
+ * @param n the nth sequence to compute
+ */
+ public static long tribonacci(int n) {
+ if (n < 0)
+ return -1;
+ if (n == 0) {
+ return 0;
+ }
+ long fst = 0;
+ if (n < 3) return 1;
+ long sec = 1;
+ long thd = 1;
+ while (n >= 3) {
+ long t = fst + sec + thd;
+ fst = sec;
+ sec = thd;
+ thd = t;
+ n--;
+ }
+ return thd;
+ }
+
+ /**
+ * Checks if a word is a palindrome.
+ *
+ * @param word the string to check
+ * @return true if the word is a palindrome, false otherwise.
+ */
+ public static boolean isPalindrome(String word) {
+ if (word == null) return false;
+ word = word.toLowerCase().strip();
+ if (word.isEmpty()) return true;
+ for (int i = 0, j = word.length() - 1; i < j; i++, j--) {
+ while (word.charAt(i) == ' ') {
+ i++;
+ }
+ while (word.charAt(j) == ' ') {
+ j--;
+ }
+ if (word.charAt(i) != word.charAt(j)) return false;
+ }
+ return true;
+ }
+
+ /**
+ * Sorts an array using an insertion sort.
+ *
+ * @param array the array to sort in place
+ */
+ public static void insertionSort(int[] array) {
+ if (array.length == 0) {
+ return;
+ }
+ for (int i = 1; i < array.length; i++) {
+ for (int j = i; j > 0 && array[j - 1] > array[j]; j--) {
+ int tmp = array[j];
+ array[j] = array[j - 1];
+ array[j - 1] = tmp;
+ }
+ }
+ }
+
+ /**
+ * Combines two strings by alternating their characters. Must use a StringBuilder.
+ * If the strings do not have the same length, appends the remaining characters at the end of the result.
+ * For instance, combine("abc", "def") returns "adbecf"
+ */
+ public static String combine(String a, String b) {
+ if (a.isEmpty())
+ return b;
+ if (b.isEmpty())
+ return a;
+ StringBuilder sb = new StringBuilder();
+ int i;
+ for (i = 0; i < Math.min(a.length(), b.length()); i++) {
+ sb.append(a.charAt(i));
+ sb.append(b.charAt(i));
+ }
+ if (b.length() > a.length()) {
+ for (; i < b.length(); i++)
+ sb.append(b.charAt(i));
+ }
+ return new String(sb);
+ }
+} \ No newline at end of file
diff --git a/graphs/java/creatureInterface/.gitignore b/graphs/java/creatureInterface/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/creatureInterface/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/creatureInterface/pom.xml b/graphs/java/creatureInterface/pom.xml
new file mode 100644
index 0000000..1272b4c
--- /dev/null
+++ b/graphs/java/creatureInterface/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>creatureInterface</artifactId>
+ <version>1.0</version>
+
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>2.22.2</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/BaseHuman.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/BaseHuman.java
new file mode 100644
index 0000000..308fde9
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/BaseHuman.java
@@ -0,0 +1,51 @@
+package fr.epita.assistants.creatureInterface;
+
+public abstract class BaseHuman extends Creature implements SpeakableInterface, SwimmingInterface{
+ /**
+ * Constructor for the Creature class.
+ *
+ * @param name The name of the creature
+ */
+ boolean inWater;
+ BaseHuman(String name) {
+ super(name);
+ inWater = false;
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void hello() {
+ System.out.println("Hello, my name is " + this.name + " and I'm a " + this.getClass().getSimpleName() + ".");
+ }
+
+ @Override
+ public void greet(SpeakableInterface contact) {
+ if (contact instanceof Human)
+ System.out.println("Hello " + contact.getName() + ", how are you?");
+ else
+ SpeakableInterface.super.greet(contact);
+ }
+
+ @Override
+ public void swim()
+ {
+ inWater = true;
+ System.out.println("I'm a " + this.getClass().getSimpleName() + " and I'm swimming.");
+ }
+
+ @Override
+ public boolean getSwimmingState()
+ {
+ return inWater;
+ }
+
+ @Override
+ public void emerge()
+ {
+ inWater = false;
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Creature.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Creature.java
new file mode 100644
index 0000000..1f63459
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Creature.java
@@ -0,0 +1,28 @@
+package fr.epita.assistants.creatureInterface;
+
+/**
+ * This abstract class provides a blueprint for creating creatures.
+ * All creatures extend this class.
+ */
+public abstract class Creature {
+ // The name of the creature
+ protected String name;
+
+ /**
+ * Constructor for the Creature class.
+ *
+ * @param name The name of the creature
+ */
+ Creature(String name) {
+ this.name = name;
+ }
+
+ /**
+ * Get the name of the creature.
+ *
+ * @return The name of the creature
+ */
+ public String getName() {
+ return name;
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Dragon.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Dragon.java
new file mode 100644
index 0000000..49ee99d
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Dragon.java
@@ -0,0 +1,74 @@
+package fr.epita.assistants.creatureInterface;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class Dragon extends Creature implements MagicalInterface, SpeakableInterface, FlyingInterface {
+ int mana;
+ Collection<Spell> spells = new ArrayList<Spell>();
+
+ public Dragon(String name, int mana) {
+ super(name);
+ this.mana = mana;
+ }
+
+ @Override
+ public void hello() {
+ System.out.println("Hello, my name is " + this.name + " and I'm a Dragon.");
+ }
+
+ @Override
+ public void greet(SpeakableInterface contact) {
+ if (contact instanceof Dragon) {
+ System.out.println("Greetings Lord " + contact.getName() + ".");
+ MagicalInterface.super.doSomeSparkles();
+ }
+ else
+ SpeakableInterface.super.greet(contact);
+ }
+
+ @Override
+ public void fly() {
+ System.out.println("I'm a Dragon and I'm flying.");
+ }
+
+ @Override
+ public int getMana() {
+ return this.mana;
+ }
+
+ @Override
+ public Collection<Spell> getSpells() {
+ return spells;
+ }
+
+ @Override
+ public void addSpell(Spell spell) {
+ if (spell.getSpellType() == SpellType.WATER)
+ System.out.println("Dragon cannot learn WATER spells.");
+ else if (!spells.contains(spell))
+ {
+ spells.add(spell);
+ }
+ }
+
+ @Override
+ public void castSpell(Spell spell) {
+ if (spell.getSpellType() == SpellType.WATER)
+ System.out.println("Dragon cannot learn WATER spells.");
+ else if (!spells.contains(spell))
+ System.out.println(this.name + " does not know " + spell.name() + ".");
+ else if (spell.getManaCost() > this.mana)
+ System.out.println(this.name + " does not have enough mana.");
+ else {
+ System.out.println(this.name + " casted " + spell.name() + ".");
+ this.mana -= spell.getManaCost();
+ }
+ }
+
+ @Override
+ public void regenMana(int mana) {
+ this.mana += mana;
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Fish.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Fish.java
new file mode 100644
index 0000000..b109493
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Fish.java
@@ -0,0 +1,27 @@
+package fr.epita.assistants.creatureInterface;
+
+public class Fish extends Creature implements SwimmingInterface{
+ /**
+ * Constructor for the Creature class.
+ *
+ * @param name The name of the creature
+ */
+ Fish(String name) {
+ super(name);
+ }
+
+ @Override
+ public void swim() {
+ System.out.println("I'm a " + this.getClass().getSimpleName() + " and I'm swimming.");
+ }
+
+ @Override
+ public boolean getSwimmingState() {
+ return true;
+ }
+
+ @Override
+ public void emerge() {
+ throw new RuntimeException(name + " died.");
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/FlyingInterface.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/FlyingInterface.java
new file mode 100644
index 0000000..49ab154
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/FlyingInterface.java
@@ -0,0 +1,12 @@
+package fr.epita.assistants.creatureInterface;
+
+/**
+ * This interface provides methods for flying.
+ * Creatures that fly implement this interface.
+ */
+public interface FlyingInterface {
+ /**
+ * Prints "I'm a {CreatureClassName} and I'm flying."
+ */
+ void fly();
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Human.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Human.java
new file mode 100644
index 0000000..b29b49f
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Human.java
@@ -0,0 +1,8 @@
+package fr.epita.assistants.creatureInterface;
+
+public class Human extends BaseHuman {
+ public Human(String name)
+ {
+ super(name);
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mage.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mage.java
new file mode 100644
index 0000000..dab7630
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mage.java
@@ -0,0 +1,59 @@
+package fr.epita.assistants.creatureInterface;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class Mage extends BaseHuman implements MagicalInterface{
+ int mana;
+ Collection<Spell> spells = new ArrayList<Spell>();
+ public Mage(String name, int mana) {
+ super(name);
+ this.mana = mana;
+ }
+
+ @Override
+ public void greet(SpeakableInterface contact)
+ {
+ if (contact instanceof Mage)
+ System.out.println("I welcome you, " + contact.getName() + ".");
+ else
+ super.greet(contact);
+ }
+
+ @Override
+ public int getMana() {
+ return this.mana;
+ }
+
+ @Override
+ public Collection<Spell> getSpells() {
+ return spells;
+ }
+
+ @Override
+ public void addSpell(Spell spell) {
+ if (!spells.contains(spell))
+ {
+ spells.add(spell);
+ }
+ }
+
+ @Override
+ public void castSpell(Spell spell) {
+ if (!spells.contains(spell))
+ System.out.println(this.name + " does not know " + spell.name() + ".");
+ else if (spell.getManaCost() > this.mana)
+ System.out.println(this.name + " does not have enough mana.");
+ else {
+ System.out.println(this.name + " casted " + spell.name() + ".");
+ this.mana -= spell.getManaCost();
+ }
+ }
+
+ @Override
+ public void regenMana(int mana) {
+ if (inWater)
+ mana = (int)(mana * 0.9);
+ this.mana += mana;
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/MagicalInterface.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/MagicalInterface.java
new file mode 100644
index 0000000..d7530ab
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/MagicalInterface.java
@@ -0,0 +1,56 @@
+package fr.epita.assistants.creatureInterface;
+
+import java.util.Collection;
+
+/**
+ * This interface provides methods for creatures that are Magical!
+ * Creatures that implement this interface have magical mana and spells.
+ */
+public interface MagicalInterface {
+ /**
+ * Get the mana of the creature.
+ *
+ * @return The mana of the creature
+ */
+ int getMana();
+
+ /**
+ * Get the spells of the creature.
+ *
+ * @return The spells of the creature
+ */
+ Collection<Spell> getSpells();
+
+ /**
+ * Add a spell to the creature.
+ * If the spell is already present, it will not be added.
+ * Be sure to check that the creature <strong>can</strong> learn the spell before adding it.
+ * Prints a message if the creature cannot learn the spell.
+ *
+ * @param spell The spell to add
+ */
+ void addSpell(Spell spell);
+
+ /**
+ * Cast a spell.
+ * If the creature knows the spell and has enough mana, the spell is cast.
+ * Otherwise, prints a message indicating the reason.
+ *
+ * @param spell The spell to cast
+ */
+ void castSpell(Spell spell);
+
+ /**
+ * Regenerate an amount of mana.
+ *
+ * @param mana The amount of mana to regenerate
+ */
+ void regenMana(int mana);
+
+ /**
+ * Do some sparkles ✨✨✨
+ */
+ default void doSomeSparkles() {
+ System.out.println("*sparkling effects*");
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mermaid.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mermaid.java
new file mode 100644
index 0000000..d086e8d
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Mermaid.java
@@ -0,0 +1,110 @@
+package fr.epita.assistants.creatureInterface;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class Mermaid extends Creature implements SpeakableInterface, MagicalInterface, SwimmingInterface {
+ int mana;
+ Collection<Spell> spells = new ArrayList<Spell>();
+ boolean swimmingState;
+
+ private String make_name(BaseHuman baseHuman, Fish fish) {
+ StringBuilder name = new StringBuilder();
+ name.append(baseHuman.getName().substring(0, 1).toUpperCase()).append(baseHuman.getName().substring(1).toLowerCase());
+ name.append(fish.getName().toLowerCase());
+ return new String(name);
+ }
+
+ public Mermaid(BaseHuman baseHuman, Fish fish)
+ {
+ super("");
+ this.name = make_name(baseHuman, fish);
+ if (baseHuman instanceof Mage)
+ {
+ for (Spell s : ((Mage) baseHuman).getSpells())
+ {
+ if (s.getSpellType() == SpellType.FIRE)
+ {
+ System.out.println(this.name + " forgot the spell " + s.name() + ".");
+ }
+ else
+ {
+ addSpell(s);
+ }
+ }
+ }
+ this.swimmingState = baseHuman.getSwimmingState();
+ this.mana = 0;
+ }
+
+ @Override
+ public void hello() {
+ System.out.println("Hello, my name is " + this.name + " and I'm a Mermaid.");
+ }
+
+ @Override
+ public void greet(SpeakableInterface contact) {
+ if (contact instanceof Mermaid)
+ System.out.println("Dear " + contact.getName() + ", welcome.");
+ else
+ SpeakableInterface.super.greet(contact);
+ }
+
+ @Override
+ public int getMana() {
+ return this.mana;
+ }
+
+ @Override
+ public Collection<Spell> getSpells() {
+ return spells;
+ }
+
+ @Override
+ public void addSpell(Spell spell) {
+ if (spell.getSpellType() == SpellType.FIRE)
+ System.out.println("Mermaid cannot learn FIRE spells.");
+ else if (!spells.contains(spell)) {
+ spells.add(spell);
+ }
+ }
+
+ @Override
+ public void castSpell(Spell spell) {
+ if (spell.getSpellType() == SpellType.FIRE)
+ System.out.println("Mermaid cannot learn FIRE spells.");
+ else if (!spells.contains(spell))
+ System.out.println(this.name + " does not know " + spell.name() + ".");
+ else if (spell.getSpellType() == SpellType.WATER && swimmingState && spell.getManaCost() * 0.6 <= this.mana) {
+ this.mana -= (int) (spell.getManaCost() * 0.6);
+ System.out.println(this.name + " casted " + spell.name() + ".");
+ } else if (spell.getManaCost() > this.mana)
+ System.out.println(this.name + " does not have enough mana.");
+ else {
+ System.out.println(this.name + " casted " + spell.name() + ".");
+ this.mana -= spell.getManaCost();
+ }
+ }
+
+ @Override
+ public void regenMana(int mana) {
+ this.mana += mana;
+ }
+
+ @Override
+ public void swim() {
+ swimmingState = true;
+ System.out.println("I'm a Mermaid and I'm swimming.");
+ }
+
+ @Override
+ public boolean getSwimmingState() {
+ return swimmingState;
+ }
+
+ @Override
+ public void emerge() {
+ swimmingState = false;
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpeakableInterface.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpeakableInterface.java
new file mode 100644
index 0000000..cc10988
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpeakableInterface.java
@@ -0,0 +1,47 @@
+package fr.epita.assistants.creatureInterface;
+
+import java.util.List;
+
+/**
+ * This interface provides communication methods for the objects of the class
+ * that implements it. Classes adopting this interface instantiate objects
+ * capable of communication.
+ */
+public interface SpeakableInterface {
+ /**
+ * Returns the name of the object that can speak
+ */
+ String getName();
+
+ /**
+ * Prints "Hello, my name is {creatureName} and I'm a {creatureClassName}."
+ */
+ void hello();
+
+ /**
+ * Greets the contact
+ * The default implementation greets the contact based on its type
+ * @param contact the creature to greet
+ */
+ default void greet(SpeakableInterface contact) {
+ if (contact instanceof Mage)
+ System.out.println("Salutations " + contact.getName() + ", keeper of Arcane secrets.");
+ else if (contact instanceof Human)
+ System.out.println("Salutations " + contact.getName() + " the human.");
+ else if (contact instanceof Dragon)
+ System.out.println("Salutations " + contact.getName() + ", keeper of Ancient treasures.");
+ else if (contact instanceof Mermaid)
+ System.out.println("Salutations " + contact.getName() + ", keeper of the Seas.");
+ }
+
+
+ /**
+ * Allows all speakers in the collection to say hello as explained in the hello() method
+ * @param speakers the list of creatures that can speak
+ */
+ static void helloAll(List<SpeakableInterface> speakers) {
+ for (SpeakableInterface speaker : speakers) {
+ speaker.hello();
+ }
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Spell.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Spell.java
new file mode 100644
index 0000000..87fe68a
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/Spell.java
@@ -0,0 +1,48 @@
+package fr.epita.assistants.creatureInterface;
+
+/**
+ * This enum represents a spell that some creature can cast.
+ * Refer to the subject for more information about enum with behavior.
+ */
+public enum Spell {
+ FIREBALL(40, SpellType.FIRE, "Launches a sphere of fire that explodes upon impact."),
+ HEAL(30, SpellType.NEUTRAL, "Channels divine energy to restore health."),
+ MAGIC_SHIELD(15, SpellType.NEUTRAL, "Summons an arcane shield that reflects attacks."),
+ TIDAL_WAVE(30, SpellType.WATER, "Summons a huge wave of water that crashes down dealing damage.");
+
+ /**
+ * The cost of the spell in mana.
+ */
+ private final int manaCost;
+
+ /**
+ * The type of the spell.
+ */
+ private final SpellType spellType;
+
+ /**
+ * The description of the spell.
+ */
+ private final String description;
+
+ Spell(int manaCost, SpellType spellType, String description) {
+ this.manaCost = manaCost;
+ this.spellType = spellType;
+ this.description = description;
+ }
+
+ public int getManaCost() {
+ return manaCost;
+ }
+
+ public SpellType getSpellType() {
+ return spellType;
+ }
+
+ /**
+ * This method prints a description of the spell and its mana cost.
+ */
+ public void what() {
+ System.out.println(this.description + "\tUses " + getManaCost() + " mana.");
+ }
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpellType.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpellType.java
new file mode 100644
index 0000000..53cca2a
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SpellType.java
@@ -0,0 +1,11 @@
+package fr.epita.assistants.creatureInterface;
+
+/**
+ * This enumeration provides the types of spells.
+ * Do not forget that creatures have restrictions on the types of spells they can learn.
+ */
+public enum SpellType {
+ FIRE,
+ WATER,
+ NEUTRAL,
+}
diff --git a/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SwimmingInterface.java b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SwimmingInterface.java
new file mode 100644
index 0000000..ede4d31
--- /dev/null
+++ b/graphs/java/creatureInterface/src/main/java/fr/epita/assistants/creatureInterface/SwimmingInterface.java
@@ -0,0 +1,25 @@
+package fr.epita.assistants.creatureInterface;
+
+/**
+ * This interface provides methods for swimming.
+ * Creatures that swim implement this interface.
+ */
+public interface SwimmingInterface {
+ /**
+ * Prints "I'm a {CreatureClassName} and I'm swimming."
+ */
+ void swim();
+
+ /**
+ * Returns true if the creature is swimming.
+ * It is up to the implementing class to determine the conditions for swimming.
+ *
+ * @return True if the creature is swimming
+ */
+ boolean getSwimmingState();
+
+ /**
+ * Emerges from the water.
+ */
+ void emerge();
+}
diff --git a/graphs/java/drawing/.gitignore b/graphs/java/drawing/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/drawing/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/drawing/pom.xml b/graphs/java/drawing/pom.xml
new file mode 100644
index 0000000..24df903
--- /dev/null
+++ b/graphs/java/drawing/pom.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>drawing</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>2.22.2</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>1.18.30</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Circle.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Circle.java
new file mode 100644
index 0000000..306d870
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Circle.java
@@ -0,0 +1,27 @@
+package fr.epita.assistants.drawing;
+
+public class Circle extends Entity {
+ private int radius;
+
+ public Circle(int radius) {
+ super();
+ this.radius = radius;
+ }
+
+ @Override
+ public void draw() {
+ for (int y = -radius; y < radius + 1; y++) {
+ for (int x = -radius; x < radius + 1; x++) {
+ if (Math.abs((radius * radius) - ((x * x) + (y * y))) < radius) {
+ System.out.print('#');
+ }
+ else
+ System.out.print(' ');
+ if (x < radius)
+ System.out.print(' ');
+ }
+ if (y < radius)
+ System.out.print("\n");
+ }
+ }
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Entity.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Entity.java
new file mode 100644
index 0000000..a91aa0f
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Entity.java
@@ -0,0 +1,20 @@
+package fr.epita.assistants.drawing;
+
+import lombok.Getter;
+
+public abstract class Entity implements IDrawable {
+ @Getter
+ private long id;
+ private static long SEQUENCE = 0;
+
+ public Entity() {
+ this.id = SEQUENCE;
+ SEQUENCE++;
+ }
+
+ @Override
+ public void draw() {
+ System.out.println("This shouldn't happen");
+ }
+
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/IDrawable.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/IDrawable.java
new file mode 100644
index 0000000..2af2df1
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/IDrawable.java
@@ -0,0 +1,5 @@
+package fr.epita.assistants.drawing;
+
+public interface IDrawable {
+ public void draw();
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Rectangle.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Rectangle.java
new file mode 100644
index 0000000..944a75b
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Rectangle.java
@@ -0,0 +1,31 @@
+package fr.epita.assistants.drawing;
+
+public class Rectangle extends Sharp {
+ private int width;
+
+ public Rectangle(int width, int length) {
+ super(length);
+ this.width = width;
+ }
+
+ @Override
+ public void draw() {
+ for (int i = 0; i < width; i++) {
+ System.out.print("# ");
+ }
+ System.out.print("\n");
+ for (int i = 0; i < length - 2; i++) {
+ System.out.print("# ");
+ for (int j = 0; j < width - 2; j++) {
+ System.out.print(" ");
+ }
+ System.out.println("# ");
+ }
+ if (length < 2)
+ return;
+ for (int i = 0; i < width; i++) {
+ System.out.print("# ");
+ }
+ System.out.print("\n");
+ }
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Sharp.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Sharp.java
new file mode 100644
index 0000000..604f255
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Sharp.java
@@ -0,0 +1,9 @@
+package fr.epita.assistants.drawing;
+
+public abstract class Sharp extends Entity {
+ protected int length;
+ public Sharp(int length) {
+ super();
+ this.length = length;
+ }
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Square.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Square.java
new file mode 100644
index 0000000..d807bcc
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Square.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.drawing;
+
+public class Square extends Rectangle {
+ public Square(int length) {
+ super(length, length);
+ }
+}
diff --git a/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Triangle.java b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Triangle.java
new file mode 100644
index 0000000..a43248c
--- /dev/null
+++ b/graphs/java/drawing/src/main/java/fr/epita/assistants/drawing/Triangle.java
@@ -0,0 +1,33 @@
+package fr.epita.assistants.drawing;
+
+public class Triangle extends Sharp {
+ public Triangle(int length) {
+ super(length);
+ }
+
+ @Override
+ public void draw() {
+ if (length == 0)
+ return;
+ if (length == 2)
+ {
+ System.out.println("#\n# #");
+ return;
+ }
+ System.out.println('#');
+ for (int y = 2; y < length; y++) {
+ System.out.print("# ");
+ for (int x = 0; x < y - 2; x++) {
+ System.out.print(" ");
+ }
+ System.out.println("#");
+ }
+ if (length > 2)
+ {
+ for (int i = 0; i < length; i++) {
+ System.out.print("# ");
+ }
+ }
+ System.out.print("\n");
+ }
+}
diff --git a/graphs/java/embedFiles/.gitignore b/graphs/java/embedFiles/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/embedFiles/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/embedFiles/pom.xml b/graphs/java/embedFiles/pom.xml
new file mode 100644
index 0000000..399dd7d
--- /dev/null
+++ b/graphs/java/embedFiles/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>embedFiles</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/embedFiles/src/main/java/fr/epita/assistants/embedfiles/DisplayEmbedFile.java b/graphs/java/embedFiles/src/main/java/fr/epita/assistants/embedfiles/DisplayEmbedFile.java
new file mode 100644
index 0000000..2dbd4b8
--- /dev/null
+++ b/graphs/java/embedFiles/src/main/java/fr/epita/assistants/embedfiles/DisplayEmbedFile.java
@@ -0,0 +1,27 @@
+package fr.epita.assistants.embedfiles;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.Optional;
+
+public class DisplayEmbedFile {
+ private final String filename;
+
+ public DisplayEmbedFile(String filename) {
+ this.filename = filename;
+ }
+
+ public Optional<String> display() {
+ Optional<String> res = Optional.empty();
+ InputStream in = ClassLoader.getSystemResourceAsStream(filename);
+ if (in != null) {
+ try {
+ res = Optional.of(new String(in.readAllBytes(), StandardCharsets.UTF_8));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ return res;
+ }
+}
diff --git a/graphs/java/embedFiles/src/main/resources/other-sample.txt b/graphs/java/embedFiles/src/main/resources/other-sample.txt
new file mode 100644
index 0000000..7631d8a
--- /dev/null
+++ b/graphs/java/embedFiles/src/main/resources/other-sample.txt
@@ -0,0 +1,539 @@
+vwM6YNMqdmoPi0uVyp7jd2v9/nhJxUCX41wPccxQanv1dWdrr2TlI3JtRQddIkMTJ2ZEKAMtR+b+
+tYDCreIQV3SmLcrB7E1JlBXUO3jxFjeoTG9tdVF3Ub8VQLny1QnOHq0q2+Y0GZbQdwN88MfSveyS
+MDnzJ+0ZUFGfWfChcLfGJYEqFI/CEnVEn1+QIQFPWaSJ+6emrKhSdt+ofWx0qbu1hfcaWmhbFpCV
+WBBB8fKKzO0HJSdKObokoeTv0Fckr7xwcRRnMS/lT6E3rjjFExyn94AT/CyRQg9tDdt0p8SWJqCu
+mNX1Ov8SdAWXSMXazdsOcjOA0BGjvZLIbxF4Dn+tUS3wgB781SA6KB3YncYwQoflJlc0Athe1ZVM
+G/8JORa4BwFbGp0e4lZMOhQR5iBx775HQhqOiHg8S/Ccj7BCnjDk0F2gnjv1qVLbUuryLi81L5Jp
+6dV5amPpN/PDGtohfrosA1VxrqPFKXKOs9cqOzszNs2Acuvnk9gxuKJ6SE1syAmN2tRf5G85jtE2
+PQ761pH7Cq8BEAt/j4yy46/Als/Hjg6W7yWN8BbG5ERS/czuILPZ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wFv3g3MHR1reK24EOQsWnTZ0KQWQb6r9+ac2a/zMrkScbLmEyUUZhLQFCwpud589m1XdRm24fx8j
+Z1mNlcWy6L+AS+kiRQGxoEWdERwlFlAuHPe6xUFSLFOEM2FMS5TOs+g9Hym8cp2WaZIQ53MM1QFz
+GlL6CwJ2JIU0sA+dnajLIyTHefjIgSkvMO+YMzLY6Eowf/NFGcxd4a7Fkc4Jfwc36t0nNFSob8xj
+M+Uj56a6FJnagwkt1+KaZOw+uo1uoIES4/h8oh8BxhDTBWOG18XJV8ufLVSjFnxmH9r7Pc7z0k9F
+8ilDbfSdmvu9qlqxverQkYyC++w0+9doH7QT2rvamPJvvzBsqjwOwMUcEg8TeeNB942bPIyIBlrq
+3HhCYDQ3nzGoWjzHsanJpGjIAYMJP5fN4MDZ0FwCBAkIu5P2BkYSydC8Utv54X2wS9s9sWxHb1kK
+lcGrz6do32OZNc3Wn7/5PBAar+RsCzmHbe80pMI7pMqx6xSooFAiYgyR8z1F38+RR17FeJrB
diff --git a/graphs/java/embedFiles/src/main/resources/sample.txt b/graphs/java/embedFiles/src/main/resources/sample.txt
new file mode 100644
index 0000000..f1811f5
--- /dev/null
+++ b/graphs/java/embedFiles/src/main/resources/sample.txt
@@ -0,0 +1 @@
+This is a sample \ No newline at end of file
diff --git a/graphs/java/fgen/.gitignore b/graphs/java/fgen/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/fgen/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/fgen/pom.xml b/graphs/java/fgen/pom.xml
new file mode 100644
index 0000000..d227bcc
--- /dev/null
+++ b/graphs/java/fgen/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>fgen</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/fgen/src/main/java/fr/epita/assistants/fgen/FGen.java b/graphs/java/fgen/src/main/java/fr/epita/assistants/fgen/FGen.java
new file mode 100644
index 0000000..5f5a470
--- /dev/null
+++ b/graphs/java/fgen/src/main/java/fr/epita/assistants/fgen/FGen.java
@@ -0,0 +1,105 @@
+package fr.epita.assistants.fgen;
+
+import java.io.*;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Comparator;
+import java.util.stream.Stream;
+
+public class FGen {
+ private Path cwd;
+
+ public FGen(final String inputPath) {
+ this.cwd = Paths.get(new File("").getAbsolutePath());
+ try (InputStream in = ClassLoader.getSystemResourceAsStream(inputPath)) {
+ BufferedReader br = new BufferedReader(new InputStreamReader(in));
+ String line;
+ while ((line = br.readLine()) != null) {
+ execute(line);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void execute(String l) {
+ String[] args = l.split("\\s+");
+ switch (args[0]) {
+ case "+":
+ create(args[1]);
+ break;
+ case "-":
+ delete(args[1]);
+ break;
+ case ">":
+ ceedee(args[1]);
+ break;
+ }
+ }
+
+ private void create(String pathName) {
+ Path path = cwd.resolve(pathName);
+ File f = new File(String.valueOf(path));
+ if (pathName.endsWith("/")) {
+ if (!f.exists()) {
+ if (!f.mkdirs())
+ {
+ throw new RuntimeException("Could not create directories");
+ }
+ }
+ } else {
+ if (!f.exists()) {
+ try {
+ if (pathName.contains("/"))
+ {
+ String tmp = cwd.toString() + "/" + pathName.substring(0, pathName.lastIndexOf('/'));
+ if (!new File(tmp).exists())
+ {
+ if (!new File(tmp).mkdirs())
+ throw new RuntimeException("create(file): Could not create dirs");
+ }
+ }
+
+ if (!f.createNewFile())
+ throw new RuntimeException("Could not create file");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+
+ private void ceedee(String pathName) {
+ Path res_path = cwd.resolve(pathName);
+ if (Files.exists(res_path) && Files.isDirectory(res_path)) {
+ cwd = res_path;
+ }
+ else throw new RuntimeException("Invalid path provided to cd");
+ }
+ private boolean deleteDirectory (File file){
+ File[] contents = file.listFiles();
+ if (contents != null) {
+ for (File f : contents) {
+ deleteDirectory(f);
+ }
+ }
+ return file.delete();
+ }
+
+ private void delete(String pathString) {
+ Path path = cwd.resolve(pathString);
+ File file = new File(String.valueOf(path));
+ if (Files.isDirectory(path)) {
+ if (!deleteDirectory(file))
+ throw new RuntimeException("Unable to delete dir");
+ } else {
+ try {
+ if (!Files.deleteIfExists(path))
+ return;
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/graphs/java/fgen/src/main/resources/example.txt b/graphs/java/fgen/src/main/resources/example.txt
new file mode 100644
index 0000000..f864008
--- /dev/null
+++ b/graphs/java/fgen/src/main/resources/example.txt
@@ -0,0 +1,3 @@
++ hello/dossier
+> hello
+- dossier \ No newline at end of file
diff --git a/graphs/java/grades/.gitignore b/graphs/java/grades/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/grades/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/grades/pom.xml b/graphs/java/grades/pom.xml
new file mode 100644
index 0000000..f48839f
--- /dev/null
+++ b/graphs/java/grades/pom.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>grades</artifactId>
+ <version>1.1</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>2.22.2</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>1.18.30</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/EntryNotFoundException.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/EntryNotFoundException.java
new file mode 100644
index 0000000..fa9d24e
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/EntryNotFoundException.java
@@ -0,0 +1,13 @@
+package fr.epita.assistants.grades;
+
+public class EntryNotFoundException extends RuntimeException {
+ /**
+ * @param entryClass The class of the collection's entries
+ * @param query The string representation of the search query
+ */
+ public EntryNotFoundException(Class<?> entryClass, String query) {
+ super(String.format("%s not found for: `%s`",
+ entryClass.getSimpleName(),
+ query));
+ }
+}
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/GradeHandler.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/GradeHandler.java
new file mode 100644
index 0000000..91da40b
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/GradeHandler.java
@@ -0,0 +1,98 @@
+package fr.epita.assistants.grades;
+
+import fr.epita.assistants.grades.model.*;
+
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+public class GradeHandler {
+ private final List<Activity> activities;
+ private final List<Student> students;
+
+ public GradeHandler() {
+ this.activities = new ArrayList<>();
+ this.students = new ArrayList<>();
+ }
+
+ /**
+ * @param activity The {@link Activity} to be added
+ * @return {@code true} (as specified by {@link List#add})
+ */
+ public boolean addActivity(Activity activity) {
+ this.activities.add(activity);
+ return true;
+ }
+
+ /**
+ * @param student The {@link Student} to be added
+ * @return {@code true} (as specified by {@link List#add})
+ */
+ public boolean addStudent(Student student) {
+ students.add(student);
+ return true;
+ }
+
+ /**
+ * @param name The name of the desired {@link Student}
+ * @return The desired student
+ * @throws EntryNotFoundException No known {@link Student} with the given name
+ */
+ public Student getStudent(String name) throws EntryNotFoundException {
+ Optional<Student> o = students.stream().filter(i -> i.name().equals(name)).findFirst();
+ if (o.isEmpty())
+ throw new EntryNotFoundException(Student.class, name);
+ else
+ return o.get();
+ }
+
+ /**
+ * @param grade The {@link Grade} to be added to the {@link Student}
+ * @param name The name of the desired {@link Student}
+ * @return {@code true} (as specified by {@link List#add})
+ * @throws EntryNotFoundException No known {@link Student} with the given name
+ */
+ public boolean addGradeToStudent(Grade grade, String name) throws EntryNotFoundException {
+ getStudent(name).grades().add(grade);
+ return true;
+ }
+
+ /**
+ * @param name The name of the desired {@link Student} to remove
+ * @return The removed {@link Student}
+ * @throws EntryNotFoundException No known {@link Student} with the given name
+ */
+ public Student removeStudent(String name) throws EntryNotFoundException {
+ Student s = getStudent(name);
+ students.remove(getStudent(name));
+ return s;
+ }
+
+ /**
+ * @param name The name of the desired {@link Student}
+ * @param function A {@link Function} returning an updated {@link Student} from the given one
+ * @throws EntryNotFoundException No known {@link Student} with the given name
+ */
+ public void updateStudent(String name, Function<Student, Student> function) throws EntryNotFoundException {
+ addStudent(function.apply(removeStudent(name)));
+ }
+
+ /**
+ * @param name The name of the {@link Student} from which to get grades
+ * @param subject The {@link Subject} from which we want the student's average
+ * @return The student's average grade in the specified subject (0 if no grades are available)
+ * @throws EntryNotFoundException No known {@link Student} with the given name
+ */
+ public double getStudentAverageInSubject(String name, Subject subject) throws EntryNotFoundException {
+ Optional<Student> o = students.stream().filter(i -> i.name().equals(name)).findFirst();
+ if (o.isPresent()) {
+ Student s = o.get();
+ OptionalDouble d = s.grades().stream().filter(g -> g.activity().subject() == subject).mapToDouble(Grade::grade).average();
+ if (d.isEmpty())
+ return 0.0;
+ else return d.getAsDouble();
+ }
+ else
+ throw new EntryNotFoundException(getClass(), name);
+ }
+}
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Activity.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Activity.java
new file mode 100644
index 0000000..fe3e285
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Activity.java
@@ -0,0 +1,4 @@
+package fr.epita.assistants.grades.model;
+
+public record Activity(String name, Subject subject, float weight) {
+}
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Grade.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Grade.java
new file mode 100644
index 0000000..fb63a6c
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Grade.java
@@ -0,0 +1,4 @@
+package fr.epita.assistants.grades.model;
+
+public record Grade(Activity activity, int grade) {
+}
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Student.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Student.java
new file mode 100644
index 0000000..335e073
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Student.java
@@ -0,0 +1,8 @@
+package fr.epita.assistants.grades.model;
+
+import lombok.Builder;
+
+import java.util.List;
+
+@Builder
+public record Student(String name, int age, List<Grade> grades) {}
diff --git a/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Subject.java b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Subject.java
new file mode 100644
index 0000000..00bc685
--- /dev/null
+++ b/graphs/java/grades/src/main/java/fr/epita/assistants/grades/model/Subject.java
@@ -0,0 +1,8 @@
+package fr.epita.assistants.grades.model;
+
+public enum Subject {
+ STEMS,
+ SHAPE,
+ HEAL,
+ Maths;
+}
diff --git a/graphs/java/helloWorld/pom.xml b/graphs/java/helloWorld/pom.xml
new file mode 100644
index 0000000..afbe2f5
--- /dev/null
+++ b/graphs/java/helloWorld/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>helloWorld</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/helloWorld/src/main/java/fr/epita/assistants/helloworld/HelloWorld.java b/graphs/java/helloWorld/src/main/java/fr/epita/assistants/helloworld/HelloWorld.java
new file mode 100644
index 0000000..b30d8a5
--- /dev/null
+++ b/graphs/java/helloWorld/src/main/java/fr/epita/assistants/helloworld/HelloWorld.java
@@ -0,0 +1,12 @@
+package fr.epita.assistants.helloworld;
+
+public class HelloWorld {
+ public void printHelloWorld()
+ {
+ System.out.print("Hello World!");
+ }
+ public void printHelloWorldErr()
+ {
+ System.err.println("Hello World!");
+ }
+}
diff --git a/graphs/java/linkedList/.gitignore b/graphs/java/linkedList/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/linkedList/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/linkedList/pom.xml b/graphs/java/linkedList/pom.xml
new file mode 100644
index 0000000..e1a9950
--- /dev/null
+++ b/graphs/java/linkedList/pom.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>linkedList</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <properties>
+ <maven.compiler.source>21</maven.compiler.source>
+ <maven.compiler.target>21</maven.compiler.target>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>RELEASE</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project> \ No newline at end of file
diff --git a/graphs/java/linkedList/src/main/java/fr/epita/assistants/linkedlist/LinkedList.java b/graphs/java/linkedList/src/main/java/fr/epita/assistants/linkedlist/LinkedList.java
new file mode 100644
index 0000000..c54f0f4
--- /dev/null
+++ b/graphs/java/linkedList/src/main/java/fr/epita/assistants/linkedlist/LinkedList.java
@@ -0,0 +1,99 @@
+package fr.epita.assistants.linkedlist;
+
+public class LinkedList<T extends Comparable<T>> {
+ static public class ListElement<T> {
+ T value;
+ ListElement<T> next;
+
+ public ListElement(T value) {
+ this.value = value;
+ this.next = null;
+ }
+ }
+
+ /**
+ * Initializes the list
+ **/
+ public ListElement<T> head;
+ public int size;
+ public LinkedList() {
+ this.head = new ListElement<T>(null);
+ this.size = 0;
+ }
+
+ /**
+ * Inserts the specified element into the list.
+ * The elements must be sorted in ascending order.
+ * null elements should be at the end of the list.
+ *
+ * @param e Element to be inserted
+ **/
+ public void insert(T e) {
+ ListElement<T> h = this.head;
+ while ((h.next != null) && (h.next.value.compareTo(e) < 0))
+ h = h.next;
+
+ if (h.next == null)
+ h.next = new ListElement<T>(e);
+ else
+ {
+ ListElement<T> tmp = h.next;
+ h.next = new ListElement<>(e);
+ h.next.next = tmp;
+ }
+ this.size++;
+ }
+
+ /**
+ * Returns the n-th element in the list.
+ *
+ * @param i Index
+ * @return The element at the given index
+ * @throws IndexOutOfBoundsException if there is no element at this
+ * index.
+ **/
+ public T get(int i) {
+ if (i >= this.size || i < 0)
+ throw new IndexOutOfBoundsException();
+ ListElement<T> h = this.head;
+ while(i-- != 0)
+ h = h.next;
+ return h.next.value;
+ }
+
+ /**
+ * Removes the first occurrence of the specified element in the list.
+ *
+ * @param e Element to remove
+ * @return returns the element that has been removed or null
+ **/
+ public T remove(T e) {
+ ListElement<T> h = this.head;
+ while ((h.next != null) && (h.next.value.compareTo(e) != 0))
+ h = h.next;
+ if (h.next == null)
+ return null;
+ ListElement<T> res = h.next;
+ h.next = h.next.next;
+ res.next = null;
+ this.size--;
+ return res.value;
+ }
+
+ /**
+ * Returns the size of the list.
+ *
+ * @return Number of elements in the list
+ **/
+ public int size() {
+ return this.size;
+ }
+
+ /**
+ * Removes all elements from the list.
+ **/
+ public void clear() {
+ this.head.next = null;
+ this.size = 0;
+ }
+} \ No newline at end of file
diff --git a/graphs/java/linkedList/src/test/java/fr/epita/assistants/linkedlist/LinkedListTests.java b/graphs/java/linkedList/src/test/java/fr/epita/assistants/linkedlist/LinkedListTests.java
new file mode 100644
index 0000000..58ee1b1
--- /dev/null
+++ b/graphs/java/linkedList/src/test/java/fr/epita/assistants/linkedlist/LinkedListTests.java
@@ -0,0 +1,38 @@
+package fr.epita.assistants.linkedlist;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class LinkedListTests {
+ @Test
+ @Timeout(value = 10, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
+ public void testInsertOne() {
+ LinkedList<Integer> list = new LinkedList<>();
+ list.insert(12);
+ assertEquals(Integer.valueOf(12), list.get(0), "Invalid element");
+ }
+
+ @Test
+ @Timeout(value = 10, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
+ public void testGetFail() {
+ LinkedList<Integer> list = new LinkedList<>();
+ list.insert(3);
+ list.insert(5);
+ list.insert(2);
+ assertThrows(IndexOutOfBoundsException.class, () -> list.get(4));
+ }
+
+ @Test
+ @Timeout(value = 10, threadMode = Timeout.ThreadMode.SEPARATE_THREAD)
+ public void testRemoveNotPresent() {
+ LinkedList<Integer> list = new LinkedList<>();
+ list.insert(1);
+ list.insert(2);
+ list.insert(3);
+ list.insert(4);
+ assertNull(list.remove(12), "Invalid return value of remove()");
+ }
+ // add your own tests here
+}
diff --git a/graphs/java/loggingBasics/.gitignore b/graphs/java/loggingBasics/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/loggingBasics/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/loggingBasics/pom.xml b/graphs/java/loggingBasics/pom.xml
new file mode 100644
index 0000000..9728beb
--- /dev/null
+++ b/graphs/java/loggingBasics/pom.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<modelVersion>4.0.0</modelVersion>
+<groupId>fr.epita.assistants</groupId>
+<artifactId>loggingBasics</artifactId>
+<version>1.0</version>
+
+<properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <logback-classic.version>1.4.5</logback-classic.version>
+ <slf4j-api.version>2.0.5</slf4j-api.version>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+</properties>
+
+<dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback-classic.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+</dependencies>
+
+<build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+</build>
+</project>
diff --git a/graphs/java/loggingBasics/src/main/java/fr/epita/assistants/loggingbasics/Trombinoscope.java b/graphs/java/loggingBasics/src/main/java/fr/epita/assistants/loggingbasics/Trombinoscope.java
new file mode 100644
index 0000000..2607802
--- /dev/null
+++ b/graphs/java/loggingBasics/src/main/java/fr/epita/assistants/loggingbasics/Trombinoscope.java
@@ -0,0 +1,43 @@
+package fr.epita.assistants.loggingbasics;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import fr.epita.assistants.Main;
+import org.slf4j.LoggerFactory;
+
+import java.util.*;
+
+public class Trombinoscope {
+ private final Logger LOGGER;
+ private final HashMap<String, Long> map;
+
+ public Trombinoscope() {
+ // FIXME: Instantiate logger with level TRACE
+ LOGGER = (Logger) LoggerFactory.getLogger(Trombinoscope.class);
+ LOGGER.setLevel(Level.TRACE);
+
+ // FIXME: Add logging here
+ LOGGER.trace("Instantiating new Trombinoscope");
+
+ map = new HashMap<>();
+ }
+
+ public Long putPerson(String name, long photoId) {
+ // FIXME: Add logging here
+ LOGGER.setLevel(Level.DEBUG);
+ LOGGER.debug("Putting person (\"" + name + "\", " + photoId + ")");
+
+ Long oldPhotoId = map.put(name,
+ photoId);
+
+ // FIXME: Add logging here
+
+ LOGGER.setLevel(Level.TRACE);
+ if (oldPhotoId == null)
+ LOGGER.trace("Added entry for person \"" + name + "\"");
+ else
+ LOGGER.trace("Updated entry for person \"" + name + "\"");
+
+ return oldPhotoId;
+ }
+}
diff --git a/graphs/java/myKitten/.gitignore b/graphs/java/myKitten/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/myKitten/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/myKitten/assembly.xml b/graphs/java/myKitten/assembly.xml
new file mode 100644
index 0000000..4a8c128
--- /dev/null
+++ b/graphs/java/myKitten/assembly.xml
@@ -0,0 +1,20 @@
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>tests</id>
+ <formats>
+ <format>jar</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>/</outputDirectory>
+ <useProjectArtifact>true</useProjectArtifact>
+ <!-- we're creating the test-jar as an attachement -->
+ <useProjectAttachments>true</useProjectAttachments>
+ <unpack>true</unpack>
+ <scope>test</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly> \ No newline at end of file
diff --git a/graphs/java/myKitten/pom.xml b/graphs/java/myKitten/pom.xml
new file mode 100644
index 0000000..e74e346
--- /dev/null
+++ b/graphs/java/myKitten/pom.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>myKitten</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.29.2-GA</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/myKitten/src/main/java/fr/epita/assistants/mykitten/MyKitten.java b/graphs/java/myKitten/src/main/java/fr/epita/assistants/mykitten/MyKitten.java
new file mode 100644
index 0000000..e63c2f7
--- /dev/null
+++ b/graphs/java/myKitten/src/main/java/fr/epita/assistants/mykitten/MyKitten.java
@@ -0,0 +1,64 @@
+package fr.epita.assistants.mykitten;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.stream.Stream;
+
+public class MyKitten {
+ /**
+ * Initializer.
+ *
+ * @param srcPath Source file path.
+ */
+ public MyKitten(String srcPath) {
+ try {
+ this.streamContent = Files.lines(Paths.get(srcPath));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Use the streamContent to replace `wordToReplace` with "miaou". Don't forget
+ * to add the line number beforehand for each line. Store the new
+ * result directly in the streamContent field.
+ *
+ * @param wordToReplace The word to replace
+ */
+ public void replaceByMiaou(String wordToReplace) {
+ final int[] line = {1};
+ this.streamContent = this.streamContent.map(i -> line[0]++ + " " + i).map(i -> i.replace(wordToReplace, "miaou"));
+ }
+
+ /**
+ * Use the streamContent to write the content into the destination file.
+ *
+ * @param destPath Destination file path.
+ */
+ public void toFile(String destPath) {
+ try {
+ Files.write(Paths.get(destPath), this.streamContent.toList(), StandardCharsets.UTF_8);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ /**
+ * Creates an instance of MyKitten and calls the above methods to do it
+ * straightforwardly.
+ *
+ * @param srcPath Source file path
+ * @param destPath Destination file path
+ * @param wordToReplace Word to replace
+ */
+ public static void miaou(String srcPath, String destPath,
+ String wordToReplace) {
+ MyKitten chatteDeTaDaronne = new MyKitten(srcPath);
+ chatteDeTaDaronne.replaceByMiaou(wordToReplace);
+ chatteDeTaDaronne.toFile(destPath);
+ }
+
+ public Stream<String> streamContent;
+}
diff --git a/graphs/java/mySet/.gitignore b/graphs/java/mySet/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/mySet/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/mySet/pom.xml b/graphs/java/mySet/pom.xml
new file mode 100644
index 0000000..c20e039
--- /dev/null
+++ b/graphs/java/mySet/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>mySet</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/GenericSet.java b/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/GenericSet.java
new file mode 100644
index 0000000..590751f
--- /dev/null
+++ b/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/GenericSet.java
@@ -0,0 +1,83 @@
+package fr.epita.assistants.myset;
+
+import java.util.ArrayList;
+
+public class GenericSet<T extends Comparable<T>> {
+ ArrayList<T> base_;
+
+ public GenericSet() {
+ base_ = new ArrayList<>();
+ }
+
+ private static <T extends Comparable<T>> void insertionSort(ArrayList<T> array) {
+ if (array.isEmpty()) {
+ return;
+ }
+ for (int i = 1; i < array.size(); i++) {
+ for (int j = i; j > 0 && array.get(j - 1).compareTo(array.get(j)) > 0; j--) {
+ T tmp = array.get(j);
+ array.set(j, array.get(j - 1));
+ array.set(j - 1, tmp);
+ }
+ }
+ }
+ public void insert(T i) {
+ if (!this.has(i)) {
+ this.base_.add(i);
+ insertionSort(base_);
+ }
+ }
+
+ public void remove(T i) {
+ this.base_.remove(i);
+ }
+
+ public boolean has(T i) {
+ return this.base_.contains(i);
+ }
+
+ public boolean isEmpty() {
+ return this.base_.isEmpty();
+ }
+
+ public T min() {
+ T min = base_.getFirst();
+ for (T t : base_) {
+ if (t.compareTo(min) < 0)
+ min = t;
+ }
+ return min;
+ }
+
+ public T max() {
+ T max = base_.getFirst();
+ for (T t : base_) {
+ if (t.compareTo(max) > 0)
+ max = t;
+ }
+ return max;
+ }
+
+ public int size() {
+ return base_.size();
+ }
+
+ public static <T extends Comparable<T>> GenericSet<T> intersection(GenericSet<T> a, GenericSet<T> b) {
+ GenericSet<T> res = new GenericSet<T>();
+ for (int i = 0; i < a.size(); i++) {
+ if (b.has(a.base_.get(i)))
+ res.insert(a.base_.get(i));
+ }
+ return res;
+ }
+
+ public static <T extends Comparable<T>> GenericSet<T> union(GenericSet<T> a, GenericSet<T> b) {
+ GenericSet<T> res = new GenericSet<>();
+ for (T i : a.base_)
+ res.insert(i);
+ for (T i : b.base_)
+ res.insert(i);
+
+ return res;
+ }
+}
diff --git a/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/IntegerSet.java b/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/IntegerSet.java
new file mode 100644
index 0000000..25dcfdc
--- /dev/null
+++ b/graphs/java/mySet/src/main/java/fr/epita/assistants/myset/IntegerSet.java
@@ -0,0 +1,83 @@
+package fr.epita.assistants.myset;
+
+import java.util.ArrayList;
+
+public class IntegerSet {
+ ArrayList<Integer> base_;
+
+ public IntegerSet() {
+ base_ = new ArrayList<Integer>();
+ }
+
+ private static void insertionSort(ArrayList<Integer> array) {
+ if (array.isEmpty()) {
+ return;
+ }
+ for (int i = 1; i < array.size(); i++) {
+ for (int j = i; j > 0 && array.get(j - 1).compareTo(array.get(j)) > 0; j--) {
+ Integer tmp = array.get(j);
+ array.set(j, array.get(j - 1));
+ array.set(j - 1, tmp);
+ }
+ }
+ }
+ public void insert(Integer i) {
+ if (!this.has(i)) {
+ this.base_.add(i);
+ insertionSort(base_);
+ }
+ }
+
+ public void remove(Integer i) {
+ this.base_.remove(i);
+ }
+
+ public boolean has(Integer i) {
+ return this.base_.contains(i);
+ }
+
+ public boolean isEmpty() {
+ return this.base_.isEmpty();
+ }
+
+ public Integer min() {
+ Integer min = base_.getFirst();
+ for (Integer integer : base_) {
+ if (integer < min)
+ min = integer;
+ }
+ return min;
+ }
+
+ public Integer max() {
+ Integer max = base_.getFirst();
+ for (Integer integer : base_) {
+ if (integer > max)
+ max = integer;
+ }
+ return max;
+ }
+
+ public int size() {
+ return base_.size();
+ }
+
+ public static IntegerSet intersection(IntegerSet a, IntegerSet b) {
+ IntegerSet res = new IntegerSet();
+ for (int i = 0; i < a.size(); i++) {
+ if (b.has(a.base_.get(i)))
+ res.insert(a.base_.get(i));
+ }
+ return res;
+ }
+
+ public static IntegerSet union(IntegerSet a, IntegerSet b) {
+ IntegerSet res = new IntegerSet();
+ for (Integer i : a.base_)
+ res.insert(i);
+ for (Integer i : b.base_)
+ res.insert(i);
+
+ return res;
+ }
+}
diff --git a/graphs/java/notifyMe/.gitignore b/graphs/java/notifyMe/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/notifyMe/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/notifyMe/pom.xml b/graphs/java/notifyMe/pom.xml
new file mode 100644
index 0000000..67e31e2
--- /dev/null
+++ b/graphs/java/notifyMe/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>notifyMe</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/INotificationSender.java b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/INotificationSender.java
new file mode 100644
index 0000000..6146e8e
--- /dev/null
+++ b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/INotificationSender.java
@@ -0,0 +1,10 @@
+package fr.epita.assistants.notifyme.notify;
+
+public interface INotificationSender {
+ /**
+ * Entrypoint to send notifications.
+ * @param parMessage the message to use for the notification - may be discarded by the␣
+ ↪→implementation
+ */
+ void notify(final String parSender, final String parReceiver, final String parMessage);
+}
diff --git a/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/ShellNotifier.java b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/ShellNotifier.java
new file mode 100644
index 0000000..c2631f7
--- /dev/null
+++ b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/notify/ShellNotifier.java
@@ -0,0 +1,22 @@
+package fr.epita.assistants.notifyme.notify;
+
+public class ShellNotifier implements INotificationSender {
+ final boolean err;
+
+ /**
+ * Constructor
+ *
+ * @param parStdErr if true, print to stderr, otherwise print to stdout
+ */
+ public ShellNotifier(final boolean parStdErr) {
+ err = parStdErr;
+ }
+
+ @Override
+ public void notify(String parSender, String parReceiver, String parMessage) {
+ if (err)
+ System.err.println("Notification from " + parSender + " to " + parReceiver + " received: " + parMessage);
+ else
+ System.out.println("Notification from " + parSender + " to " + parReceiver + " received: " + parMessage);
+ }
+}
diff --git a/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/IMultiNotificationSender.java b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/IMultiNotificationSender.java
new file mode 100644
index 0000000..501a070
--- /dev/null
+++ b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/IMultiNotificationSender.java
@@ -0,0 +1,26 @@
+package fr.epita.assistants.notifyme.user;
+
+import fr.epita.assistants.notifyme.notify.INotificationSender;
+
+import java.util.List;
+
+public interface IMultiNotificationSender {
+ /**
+ * Sends a notification to all registered notifiers
+ * @param parRecipient the recipient of the notification
+ * @param parMessage the message to send
+ */
+ void sendNotifications(String parRecipient, String parMessage);
+
+ /**
+ * Adds a notification sender to the list of possible recipients
+ * @param parNotifier the new notifier to add, should be ignored if null
+ */
+ void addNotifier(INotificationSender parNotifier);
+
+ /**
+ * Returns the list of notifiers
+ * @return the list of notifiers
+ */
+ List<INotificationSender> getNotifiers();
+}
diff --git a/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/User.java b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/User.java
new file mode 100644
index 0000000..58d4446
--- /dev/null
+++ b/graphs/java/notifyMe/src/main/java/fr/epita/assistants/notifyme/user/User.java
@@ -0,0 +1,41 @@
+package fr.epita.assistants.notifyme.user;
+
+import fr.epita.assistants.notifyme.notify.INotificationSender;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class User implements IMultiNotificationSender {
+ final List<INotificationSender> parNotificationList;
+ final String username;
+
+ public String getUsername() {
+ return username;
+ }
+
+ public User(String username) {
+ this.username = username;
+ this.parNotificationList = new ArrayList<>();
+ }
+
+ public User(String username, List<INotificationSender> parNotificationList) {
+ this.parNotificationList = parNotificationList;
+ this.username = username;
+ }
+
+ @Override
+ public void sendNotifications(String parRecipient, String parMessage) {
+ for (INotificationSender n : parNotificationList)
+ n.notify(username, parRecipient, parMessage);
+ }
+
+ @Override
+ public void addNotifier(INotificationSender parNotifier) {
+ parNotificationList.add(parNotifier);
+ }
+
+ @Override
+ public List<INotificationSender> getNotifiers() {
+ return parNotificationList;
+ }
+}
diff --git a/graphs/java/nucBatlle/.gitignore b/graphs/java/nucBatlle/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/nucBatlle/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/nucBattle/.gitignore b/graphs/java/nucBattle/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/nucBattle/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/nucBattle/pom.xml b/graphs/java/nucBattle/pom.xml
new file mode 100644
index 0000000..2ce959c
--- /dev/null
+++ b/graphs/java/nucBattle/pom.xml
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>nucBattle</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>1.18.30</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>2.18.0</version>
+ </dependency>
+ <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.18.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Battle.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Battle.java
new file mode 100644
index 0000000..35a9b3e
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Battle.java
@@ -0,0 +1,18 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Getter
+@AllArgsConstructor
+@NoArgsConstructor
+public class Battle {
+ @JsonProperty("battle_id")
+ private int battleId;
+
+ private List<Turn> turns;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/BattleManager.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/BattleManager.java
new file mode 100644
index 0000000..57d7dcc
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/BattleManager.java
@@ -0,0 +1,101 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.module.SimpleModule;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.stream.Stream;
+
+public class BattleManager {
+ String input;
+ private Map<String, Nuc> nucs;
+ private Battle battle;
+
+ public BattleManager(String input) {
+ this.input = input;
+ }
+
+ public void computeBattle(String reportPath) {
+ Report report = new Report();
+ try (Stream<String> stream = Files.lines(Paths.get(input))) {
+ String jsonString = stream.reduce("", (s1, s2) -> s1 + s2);
+ ObjectMapper om = new ObjectMapper();
+ JsonNode jn = om.readTree(jsonString);
+ if (jn == null || jn.isNull()) {
+ report.setType(ReportType.ERROR);
+ exportReport(reportPath, report);
+ }
+ nucs = om.readValue(jn.get("NUCs").toString(), new TypeReference<Map<String, Nuc>>() {
+ });
+
+ SimpleModule mod = new SimpleModule();
+ mod.addDeserializer(Turn.class, new TurnDeserializer(nucs));
+ om.registerModule(mod);
+ battle = om.readValue(jn.get("battle").toString(), Battle.class);
+ // winner pre-check
+ for (String t : nucs.keySet()) {
+ if (nucs.keySet().stream().filter(login -> !t.equals(login)).allMatch(login -> nucs.get(login).getHp() == 0.0)) {
+ report.setType(ReportType.WINNER);
+ report.setPlayer(t);
+ exportReport(reportPath, report);
+ return;
+ }
+ nucs.computeIfPresent(t, (k, tmp) -> new Nuc(tmp.getName(), Math.clamp(tmp.getHp(), 0, 100), tmp.getInstalledPrograms()));
+ }
+ for (Turn t : battle.getTurns()) {
+ if (nucs.get(t.getPlayerLogin()) == null || nucs.get(t.getTargetLogin()) == null) {
+ report.setType(ReportType.ERROR);
+ exportReport(reportPath, report);
+ return;
+ }
+ // cheater check
+ if (!t.getPlayerNuc().getInstalledPrograms().containsAll(t.getPacket().getUsedPrograms())) {
+ report.setType(ReportType.CHEATER);
+ report.setPlayer(t.getPlayerLogin());
+ exportReport(reportPath, report);
+ return;
+ }
+ // swap nukes to update damage
+ Nuc n = nucs.get(t.getTargetLogin());
+ Nuc tmp = new Nuc(n.getName(), Math.clamp(n.getHp() - t.getPacket().getDamage(), 0, 100),
+ n.getInstalledPrograms());
+ nucs.put(t.getTargetLogin(), tmp);
+
+ // winner check
+ if (nucs.keySet().stream().filter(login -> !t.getPlayerLogin().equals(login)).allMatch(login -> nucs.get(login).getHp() == 0.0)) {
+ report.setType(ReportType.WINNER);
+ report.setPlayer(t.getPlayerLogin());
+ exportReport(reportPath, report);
+ return;
+ }
+ }
+ report.setType(ReportType.UNFINISHED);
+ exportReport(reportPath, report);
+ } catch (IOException e) {
+ report.setType(ReportType.ERROR);
+ exportReport(reportPath, report);
+ }
+ }
+
+ private void exportReport(String reportPath, Report report) {
+ if (report.getType() != ReportType.ERROR && report.getType() != ReportType.CHEATER) {
+ report.outcome = new HashMap<>();
+ for (String login : nucs.keySet()) {
+ report.outcome.put(login, nucs.get(login).getHp());
+ }
+ }
+ ObjectMapper om = new ObjectMapper();
+ try {
+ om.writeValue(new File(reportPath), report);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+} \ No newline at end of file
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Nuc.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Nuc.java
new file mode 100644
index 0000000..e2e4a48
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Nuc.java
@@ -0,0 +1,20 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Getter
+@AllArgsConstructor
+@NoArgsConstructor
+public class Nuc {
+ private String name;
+
+ private float hp;
+
+ @JsonProperty("installed_programs")
+ private List<String> installedPrograms;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Packet.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Packet.java
new file mode 100644
index 0000000..e8806f7
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Packet.java
@@ -0,0 +1,20 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Getter
+@AllArgsConstructor
+@NoArgsConstructor
+public class Packet {
+ @JsonProperty("used_programs")
+ private List<String> usedPrograms;
+
+ private String command;
+
+ private float damage;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Report.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Report.java
new file mode 100644
index 0000000..56aa10d
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Report.java
@@ -0,0 +1,18 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+import java.util.Map;
+
+@NoArgsConstructor
+@Getter
+@Setter
+@JsonInclude(JsonInclude.Include.NON_NULL)
+public class Report {
+ ReportType type = ReportType.UNFINISHED;
+ String player = null;
+ Map<String, Float> outcome = null;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/ReportType.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/ReportType.java
new file mode 100644
index 0000000..c643c1b
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/ReportType.java
@@ -0,0 +1,14 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+public enum ReportType {
+ @JsonProperty("winner")
+ WINNER,
+ @JsonProperty("cheater")
+ CHEATER,
+ @JsonProperty("error")
+ ERROR,
+ @JsonProperty("unfinished")
+ UNFINISHED;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Turn.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Turn.java
new file mode 100644
index 0000000..57e44dc
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/Turn.java
@@ -0,0 +1,18 @@
+package fr.epita.assistants.nucbattle;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@Getter
+public class Turn {
+ private Nuc playerNuc;
+ private String playerLogin;
+
+ private Nuc targetNuc;
+ private String targetLogin;
+
+ private Packet packet;
+}
diff --git a/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/TurnDeserializer.java b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/TurnDeserializer.java
new file mode 100644
index 0000000..bfd60ba
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/java/fr/epita/assistants/nucbattle/TurnDeserializer.java
@@ -0,0 +1,30 @@
+package fr.epita.assistants.nucbattle;
+
+import com.fasterxml.jackson.core.JacksonException;
+import com.fasterxml.jackson.core.JsonParser;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationContext;
+import com.fasterxml.jackson.databind.JsonDeserializer;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import java.io.IOException;
+import java.util.Map;
+
+public class TurnDeserializer extends JsonDeserializer<Turn> {
+ public TurnDeserializer(Map<String, Nuc> nucs) {
+ this.nucs = nucs;
+ }
+
+ Map<String, Nuc> nucs;
+ @Override
+ public Turn deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JacksonException {
+ JsonNode node = jsonParser.getCodec().readTree(jsonParser);
+ String player_login = node.get("player_login").asText();
+ String target_login = node.get("target_login").asText();
+
+ final ObjectMapper om = new ObjectMapper();
+ Packet packet = om.readValue(node.get("packet").toString(), Packet.class);
+ return new Turn(nucs.get(player_login), player_login, nucs.get(target_login), target_login, packet);
+ }
+}
diff --git a/graphs/java/nucBattle/src/main/resources/exampleBattle1.json b/graphs/java/nucBattle/src/main/resources/exampleBattle1.json
new file mode 100644
index 0000000..3d541dd
--- /dev/null
+++ b/graphs/java/nucBattle/src/main/resources/exampleBattle1.json
@@ -0,0 +1,66 @@
+{
+ "NUCs": {
+ "xavier.login": {
+ "name": "r01p02",
+ "hp": 50.0,
+ "installed_programs": [
+ "yes",
+ "grep",
+ "pkill",
+ "ping",
+ "bash"
+ ]
+ },
+ "xavier.login2": {
+ "name": "r04p03",
+ "hp": 72.0,
+ "installed_programs": [
+ "find",
+ "cp",
+ "bash",
+ "wget"
+ ]
+ }
+ },
+ "battle": {
+ "battle_id": 9876,
+ "turns": [
+ {
+ "player_login": "xavier.prout",
+ "target_login": "xavier.login2",
+ "packet": {
+ "used_programs": [
+ "bash",
+ "yes"
+ ],
+ "command": "yes > ~/y",
+ "damage": 51.0
+ }
+ },
+ {
+ "player_login": "xavier.login2",
+ "target_login": "xavier.login",
+ "packet": {
+ "used_programs": [
+ "bash",
+ "cp",
+ "find"
+ ],
+ "command": "find / -type f -exec cp {} /tmp/ \\;",
+ "damage": 21.0
+ }
+ },
+ {
+ "player_login": "xavier.login",
+ "target_login": "xavier.login2",
+ "packet": {
+ "used_programs": [
+ "bash"
+ ],
+ "command": ":(){:|: &};:",
+ "damage": 32.0
+ }
+ }
+ ]
+ }
+}
diff --git a/graphs/java/observer/.gitignore b/graphs/java/observer/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/observer/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/observer/pom.xml b/graphs/java/observer/pom.xml
new file mode 100644
index 0000000..5755011
--- /dev/null
+++ b/graphs/java/observer/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>observer</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Lifeguard.java b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Lifeguard.java
new file mode 100644
index 0000000..87c5538
--- /dev/null
+++ b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Lifeguard.java
@@ -0,0 +1,21 @@
+package fr.epita.assistants.observer;
+
+import java.util.Set;
+
+public class Lifeguard implements Observable.Observer<Swimmer> {
+ String name;
+
+ public Lifeguard(String name) {
+ this.name = name;
+ System.out.println(name + " begins to keep an eye on the swimmers.");
+ }
+
+ @Override
+ public void onEvent(Swimmer event) {
+ if (event.getStatus() == SwimmerStatus.TOO_FAR)
+ System.out.println(name + ": " + event.getName() + "! You are too far, come back!");
+ else if (event.getStatus() == SwimmerStatus.DROWNING) {
+ System.out.println(name + ": I will save you " + event.getName() + "!");
+ }
+ }
+}
diff --git a/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Observable.java b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Observable.java
new file mode 100644
index 0000000..1739739
--- /dev/null
+++ b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Observable.java
@@ -0,0 +1,55 @@
+package fr.epita.assistants.observer;
+
+import java.util.Set;
+
+/**
+ * Observer interface.
+ *
+ * @param <EVENT_T> Type of observed events
+ */
+public interface Observable<EVENT_T> {
+
+ /**
+ * Get all registered observers.
+ *
+ * @return The set of observers
+ */
+ Set<Observer<EVENT_T>> getObservers();
+
+ /**
+ * Register observers.
+ *
+ * @param observers Observers to register
+ */
+ void register(final Observer<EVENT_T>... observers);
+
+ /**
+ * Unregister the given observer.
+ *
+ * @param observer The observer to deactivate
+ */
+ void unregister(final Observer<EVENT_T> observer);
+
+ /**
+ * Notify all registered observers of the given event.
+ *
+ * @param event The event to notify observers with.
+ */
+ void fire(final EVENT_T event);
+
+ /**
+ * Sub interface for observers.
+ *
+ * @param <EVENT_T> The type of observed events
+ */
+ @FunctionalInterface
+ interface Observer<EVENT_T> {
+
+ /**
+ * Notification callback.
+ *
+ * @param event The event being sent
+ */
+ void onEvent(final EVENT_T event);
+ }
+}
diff --git a/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Person.java b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Person.java
new file mode 100644
index 0000000..81247ac
--- /dev/null
+++ b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Person.java
@@ -0,0 +1,15 @@
+package fr.epita.assistants.observer;
+
+public class Person implements Observable.Observer<Swimmer> {
+ String name;
+
+ public Person(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public void onEvent(Swimmer event) {
+ if (event.getStatus() == SwimmerStatus.WAVING)
+ System.out.println(name + ": Waves back at " + event.getName() + ".");
+ }
+}
diff --git a/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Swimmer.java b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Swimmer.java
new file mode 100644
index 0000000..2ce803a
--- /dev/null
+++ b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/Swimmer.java
@@ -0,0 +1,55 @@
+package fr.epita.assistants.observer;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+public class Swimmer implements Observable<Swimmer> {
+ Set<Observer<Swimmer>> observers = new HashSet<>();
+ String name;
+ SwimmerStatus status = SwimmerStatus.OK;
+
+ public Swimmer(String name) {
+ this.name = name;
+ System.out.println(this.name + " goes into the sea.");
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public SwimmerStatus getStatus() {
+ return status;
+ }
+
+ @Override
+ public Set<Observer<Swimmer>> getObservers() {
+ return observers;
+ }
+
+ public void setStatus(SwimmerStatus status) {
+ this.status = status;
+ if (status == SwimmerStatus.DROWNING) {
+ System.out.println(name + ": I'm drowning, help!!");
+ }
+ else if (status == SwimmerStatus.WAVING)
+ System.out.println(name + ": Waves towards the shore.");
+ fire(this);
+ }
+
+ @Override
+ public void register(Observer<Swimmer>... observers) {
+ this.observers.addAll(Arrays.asList(observers));
+ }
+
+ @Override
+ public void unregister(Observer<Swimmer> observer) {
+ this.observers.remove(observer);
+ }
+
+ @Override
+ public void fire(Swimmer event) {
+ for (Observer<Swimmer> o : this.observers)
+ o.onEvent(event);
+ }
+}
diff --git a/graphs/java/observer/src/main/java/fr/epita/assistants/observer/SwimmerStatus.java b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/SwimmerStatus.java
new file mode 100644
index 0000000..71856c6
--- /dev/null
+++ b/graphs/java/observer/src/main/java/fr/epita/assistants/observer/SwimmerStatus.java
@@ -0,0 +1,11 @@
+package fr.epita.assistants.observer;
+
+/**
+ * Status of a swimmer.
+ */
+public enum SwimmerStatus {
+ OK,
+ DROWNING,
+ TOO_FAR,
+ WAVING
+}
diff --git a/graphs/java/pizzaStreams/.gitignore b/graphs/java/pizzaStreams/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/pizzaStreams/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/pizzaStreams/pom.xml b/graphs/java/pizzaStreams/pom.xml
new file mode 100644
index 0000000..ffa630f
--- /dev/null
+++ b/graphs/java/pizzaStreams/pom.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>pizzaStreams</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.29.2-GA</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Dough.java b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Dough.java
new file mode 100644
index 0000000..a0ea259
--- /dev/null
+++ b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Dough.java
@@ -0,0 +1,16 @@
+package fr.epita.assistants.pizzastreams;
+
+public enum Dough {
+ NATURE(2),
+ CAJUN(3);
+
+ private final Integer price;
+
+ Dough(final Integer price) {
+ this.price = price;
+ }
+
+ public Integer getPrice() {
+ return this.price;
+ }
+}
diff --git a/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Pizza.java b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Pizza.java
new file mode 100644
index 0000000..d47b8da
--- /dev/null
+++ b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Pizza.java
@@ -0,0 +1,47 @@
+package fr.epita.assistants.pizzastreams;
+
+import fr.epita.assistants.pizzastreams.Topping.Cheese;
+import fr.epita.assistants.pizzastreams.Topping.Protein;
+import fr.epita.assistants.pizzastreams.Topping.Sauce;
+import fr.epita.assistants.pizzastreams.Topping.Vegetable;
+
+import java.util.List;
+
+public class Pizza {
+ private final String name;
+ private final Dough dough;
+ private final Topping topping;
+ private final Integer price;
+
+ public Pizza(final String name, final Dough dough, final Sauce sauce, final Cheese cheese,
+ final List<Vegetable> vegetableList, final Protein protein) {
+ this.name = name;
+ this.topping = new Topping(sauce, cheese, vegetableList, protein);
+ this.dough = dough;
+
+ final int doughPrice = dough.getPrice();
+ final int saucePrice = topping.getSaucePrice();
+ final int cheesePrice = topping.getCheesePrice();
+ final int vegetablesPrice = topping.getVegetablesPrice();
+ final int proteinPrice = topping.getProteinPrice();
+
+ this.price = doughPrice + saucePrice + cheesePrice + vegetablesPrice
+ + proteinPrice;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Dough getDough() {
+ return dough;
+ }
+
+ public Topping getTopping() {
+ return topping;
+ }
+
+ public Integer getPrice() {
+ return price;
+ }
+}
diff --git a/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/PizzaStreams.java b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/PizzaStreams.java
new file mode 100644
index 0000000..26259a3
--- /dev/null
+++ b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/PizzaStreams.java
@@ -0,0 +1,60 @@
+package fr.epita.assistants.pizzastreams;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.stream.Stream;
+
+import fr.epita.assistants.pizzastreams.Topping.*;
+
+public class PizzaStreams {
+ /**
+ * @return The sum of the prices of all the pizzas in the stream
+ */
+ public static Integer getTotalPrice(Stream<Pizza> pizzaStream) {
+ return pizzaStream.mapToInt(Pizza::getPrice).sum();
+ }
+
+ /**
+ * @return The average price of the pizzas in the stream, or the
+ * double NaN if the stream is empty
+ */
+ public static Double getAveragePrice(Stream<Pizza> pizzaStream) {
+ return pizzaStream.mapToDouble(Pizza::getPrice).average().orElse(Double.NaN);
+ }
+
+ /**
+ * @return Names of the pizzas, sorted by price in ascending order
+ */
+ public static List<String> sortByPrice(Stream<Pizza> pizzaStream) {
+ return pizzaStream.sorted(Comparator.comparing(Pizza::getPrice)).map(Pizza::getName).toList();
+ }
+
+ /**
+ * @return The Pizza object that has the lowest price, or null by default
+ */
+ public static Pizza getCheapest(Stream<Pizza> pizzaStream) {
+ return pizzaStream.min(Comparator.comparing(Pizza::getPrice)).orElse(null);
+ }
+
+ /**
+ * @return Names of the pizzas with meat (Protein)
+ */
+ public static List<String> getCarnivorous(Stream<Pizza> pizzaStream) {
+ return pizzaStream.filter(i -> i.getTopping().getProtein().isPresent()).map(Pizza::getName).toList();
+ }
+
+ /**
+ * @return Names of the pizzas with at least one Vegetable and no Proteins
+ */
+ public static List<String> getVeggies(Stream<Pizza> pizzaStream) {
+ return pizzaStream.filter(i -> i.getTopping().getProtein().isEmpty() && !i.getTopping().getVegetableList().isEmpty()).map(Pizza::getName).toList();
+ }
+
+ /**
+ * @return true if all the pizzas with a nature dough are based with tomato
+ * and mozzarella (italian pizza criteria), false otherwise
+ */
+ public static boolean areAllNatureItalians(Stream<Pizza> pizzaStream) {
+ return pizzaStream.filter(i -> i.getDough() == Dough.NATURE).allMatch(i -> i.getTopping().getCheese() == Cheese.MOZZARELLA && i.getTopping().getSauce() == Sauce.TOMATO);
+ }
+}
diff --git a/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Topping.java b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Topping.java
new file mode 100644
index 0000000..aaacb58
--- /dev/null
+++ b/graphs/java/pizzaStreams/src/main/java/fr/epita/assistants/pizzastreams/Topping.java
@@ -0,0 +1,82 @@
+package fr.epita.assistants.pizzastreams;
+
+import java.util.List;
+import java.util.Optional;
+
+public class Topping {
+ public enum Sauce {
+ TOMATO,
+ BUFFALO,
+ PESTO,
+ }
+
+ public enum Cheese {
+ MOZZARELLA,
+ CHEDDAR,
+ CREAM,
+ }
+
+ public enum Vegetable {
+ OLIVE,
+ MUSHROOM,
+ ONION,
+ }
+
+ public enum Protein {
+ CHICKEN,
+ BACON,
+ MERGUEZ,
+ }
+
+ private final Sauce sauce;
+ private final Cheese cheese;
+ private final List<Vegetable> vegetableList;
+ private final Protein protein;
+
+ public Topping(final Sauce sauce, final Cheese cheese, final List<Vegetable> vegetableList,
+ final Protein protein) {
+ this.sauce = sauce;
+ this.cheese = cheese;
+ this.vegetableList = vegetableList;
+ this.protein = protein;
+ }
+
+ public Sauce getSauce() {
+ return sauce;
+ }
+
+ public Cheese getCheese() {
+ return cheese;
+ }
+
+ public List<Vegetable> getVegetableList() {
+ return vegetableList;
+ }
+
+ public Optional<Protein> getProtein() {
+ return Optional.ofNullable(protein);
+ }
+
+ public Integer getSaucePrice() {
+ return (sauce == Sauce.TOMATO) ? 1 : ((sauce == Sauce.BUFFALO) ? 2 : 3);
+ }
+
+ public Integer getCheesePrice() {
+ return (cheese == Cheese.MOZZARELLA) ? 2 : ((cheese == Cheese.CHEDDAR) ? 3 : 4);
+ }
+
+ public Integer getProteinPrice() {
+ return protein == null ? 0
+ : protein == Protein.CHICKEN ? 5 : 8;
+ }
+
+ public Integer getVegetablesPrice() {
+ return (vegetableList
+ .isEmpty()
+ ? 0
+ : vegetableList.stream()
+ .mapToInt((v) -> (v == Vegetable.OLIVE
+ || v == Vegetable.ONION) ? 1 : 2)
+ .sum());
+ }
+}
diff --git a/graphs/java/practiceLombok/.gitignore b/graphs/java/practiceLombok/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/practiceLombok/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/practiceLombok/pom.xml b/graphs/java/practiceLombok/pom.xml
new file mode 100644
index 0000000..de31828
--- /dev/null
+++ b/graphs/java/practiceLombok/pom.xml
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>practiceLombok</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ <version>1.18.30</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Falcon.java b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Falcon.java
new file mode 100644
index 0000000..6c35ffc
--- /dev/null
+++ b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Falcon.java
@@ -0,0 +1,10 @@
+package fr.epita.assistants.practicelombok;
+
+import lombok.Data;
+
+@Data
+public class Falcon {
+ String name;
+ String nickname;
+ int speed;
+}
diff --git a/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Horse.java b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Horse.java
new file mode 100644
index 0000000..da9981e
--- /dev/null
+++ b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Horse.java
@@ -0,0 +1,13 @@
+package fr.epita.assistants.practicelombok;
+
+import lombok.*;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@ToString
+@EqualsAndHashCode
+public class Horse {
+ @Getter @Setter private String name;
+ @ToString.Exclude @Getter @Setter private String nickname;
+ @EqualsAndHashCode.Exclude @Getter private int speed;
+}
diff --git a/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Shark.java b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Shark.java
new file mode 100644
index 0000000..a2e5f3d
--- /dev/null
+++ b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Shark.java
@@ -0,0 +1,10 @@
+package fr.epita.assistants.practicelombok;
+
+import lombok.*;
+
+@Value
+public class Shark {
+ String name;
+ String nickname;
+ int speed;
+}
diff --git a/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Spider.java b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Spider.java
new file mode 100644
index 0000000..0091fc6
--- /dev/null
+++ b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Spider.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.practicelombok;
+
+import lombok.*;
+@AllArgsConstructor
+public class Spider {
+ @Getter @Setter public String name;
+}
diff --git a/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Tiger.java b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Tiger.java
new file mode 100644
index 0000000..1028dd3
--- /dev/null
+++ b/graphs/java/practiceLombok/src/main/java/fr/epita/assistants/practicelombok/Tiger.java
@@ -0,0 +1,11 @@
+package fr.epita.assistants.practicelombok;
+
+import lombok.*;
+
+@AllArgsConstructor
+@NoArgsConstructor
+@ToString
+public class Tiger {
+ @Getter @Setter public String name;
+ @Getter @Setter public String nickname;
+}
diff --git a/graphs/java/rockPaperScissors/.gitignore b/graphs/java/rockPaperScissors/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/rockPaperScissors/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/rockPaperScissors/pom.xml b/graphs/java/rockPaperScissors/pom.xml
new file mode 100644
index 0000000..747b009
--- /dev/null
+++ b/graphs/java/rockPaperScissors/pom.xml
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>rockPaperScissors</artifactId>
+ <version>1.0</version>
+
+
+ <properties>
+ <versions.java>21</versions.java>
+
+ <versions.junit>5.9.1</versions.junit>
+
+ <versions.maven-compiler-plugin>3.8.1</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>2.22.2</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.6.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>2.0.5</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Bot.java b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Bot.java
new file mode 100644
index 0000000..5d8005b
--- /dev/null
+++ b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Bot.java
@@ -0,0 +1,18 @@
+package fr.epita.assistants.rockPaperScissors;
+
+public class Bot {
+ final String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public Bot(String name) {
+ this.name = name;
+ }
+
+ public final HandShape getBotHandShape()
+ {
+ return new HandShape((int) (Math.random() * 2));
+ }
+}
diff --git a/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/HandShape.java b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/HandShape.java
new file mode 100644
index 0000000..1d95c92
--- /dev/null
+++ b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/HandShape.java
@@ -0,0 +1,26 @@
+package fr.epita.assistants.rockPaperScissors;
+
+import java.util.Arrays;
+import java.util.List;
+
+/*
+ Note that this kind of class should be replaced with an Enum.
+ Enums will be introduced later in the workshop.
+ */
+
+public class HandShape {
+ final static private List<String> shapesValues = Arrays.asList("ROCK", "PAPER", "SCISSORS");
+ final private int index;
+
+ public HandShape(final int index) {
+ this.index= index;
+ }
+
+ public String getName(){
+ return shapesValues.get(index);
+ }
+
+ int getIndex() {
+ return index;
+ }
+} \ No newline at end of file
diff --git a/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Match.java b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Match.java
new file mode 100644
index 0000000..2116f58
--- /dev/null
+++ b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Match.java
@@ -0,0 +1,52 @@
+package fr.epita.assistants.rockPaperScissors;
+
+import java.util.Objects;
+
+public final class Match {
+ private static int matchCount;
+ private final int currentMatchNumber;
+ final String player1, player2;
+ final HandShape player1Choice, player2Choice;
+
+ public Match(String player1, String player2, HandShape player1Choice, HandShape player2Choice) {
+ this.currentMatchNumber = ++matchCount;
+ this.player1 = player1;
+ this.player2 = player2;
+ this.player1Choice = player1Choice;
+ this.player2Choice = player2Choice;
+ }
+
+ public static int getMatchCount() {
+ return matchCount;
+ }
+
+ static void resetMatchCount()
+ {
+ matchCount = 0;
+ }
+
+ public int getCurrentMatch() {
+ return currentMatchNumber;
+ }
+
+ public void runMatch()
+ {
+ System.out.println("Let's start match number " + currentMatchNumber + "!");
+ System.out.println("Rock, Paper, Scissors!");
+ System.out.println(player1 + " is playing: " + player1Choice.getName());
+ System.out.println(player2 + " is playing: " + player2Choice.getName());
+
+ if (player1Choice.getIndex() == player2Choice.getIndex())
+ {
+ System.out.println("DRAW!");
+ }
+ else if (player1Choice.getIndex() == (player2Choice.getIndex() + 1) % 3)
+ {
+ System.out.println("The winner is " + player1 + "!");
+ }
+ else
+ {
+ System.out.println("The winner is " + player2 + "!");
+ }
+ }
+}
diff --git a/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Player.java b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Player.java
new file mode 100644
index 0000000..72e0761
--- /dev/null
+++ b/graphs/java/rockPaperScissors/src/main/java/fr/epita/assistants/rockPaperScissors/Player.java
@@ -0,0 +1,23 @@
+package fr.epita.assistants.rockPaperScissors;
+
+public final class Player {
+ final String name;
+ int choice;
+
+ public void setChoice(int choice) {
+ this.choice = choice;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Player(String name) {
+ this.name = name;
+ }
+
+ public HandShape getPlayerHandShape()
+ {
+ return new HandShape(choice);
+ }
+}
diff --git a/graphs/java/scheduler/.gitignore b/graphs/java/scheduler/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/scheduler/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/scheduler/pom.xml b/graphs/java/scheduler/pom.xml
new file mode 100644
index 0000000..007367f
--- /dev/null
+++ b/graphs/java/scheduler/pom.xml
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>scheduler</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ <!-- FIXME This should only be for testing (not included in student pom) -->
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5-api</artifactId>
+ <version>1.0.0</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/MyTask.java b/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/MyTask.java
new file mode 100644
index 0000000..d1de4fb
--- /dev/null
+++ b/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/MyTask.java
@@ -0,0 +1,48 @@
+package fr.epita.assistants.scheduler;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.Executor;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+public class MyTask<INPUT_TYPE, RETURN_TYPE> implements Task<RETURN_TYPE> {
+
+ CompletableFuture<RETURN_TYPE> cpFuture;
+
+ public MyTask(CompletableFuture<RETURN_TYPE> cpFuture) {
+ this.cpFuture = cpFuture;
+ }
+
+ public static <RETURN_TYPE> Task<RETURN_TYPE> of(Supplier<RETURN_TYPE> actionSupplier) {
+ return new MyTask<>(CompletableFuture.supplyAsync(actionSupplier));
+ }
+
+ public static <RETURN_TYPE> Task<RETURN_TYPE> of(Supplier<RETURN_TYPE> actionSupplier, Executor executor) {
+ return new MyTask<>(CompletableFuture.supplyAsync(actionSupplier, executor));
+ }
+
+ @Override
+ public CompletableFuture<RETURN_TYPE> build() {
+ return cpFuture;
+ }
+
+ @Override
+ public Task<RETURN_TYPE> onErrorRecoverWith(Function<Throwable, RETURN_TYPE> recoveryFunction) {
+ return new MyTask<>(cpFuture.handle((result, exception) -> {
+ if (exception != null)
+ return recoveryFunction.apply(exception);
+ return result;
+ }));
+ }
+
+ @Override
+ public <NEW_RETURN_TYPE> Task<NEW_RETURN_TYPE> andThenDo(Function<RETURN_TYPE, NEW_RETURN_TYPE> action) {
+ return new MyTask<>(cpFuture.thenApply(action));
+ }
+
+ @Override
+ public Task<RETURN_TYPE> andThenWait(long number, TimeUnit timeUnit) {
+ return new MyTask<>(cpFuture.thenApplyAsync(i -> i, CompletableFuture.delayedExecutor(number, timeUnit)));
+ }
+}
diff --git a/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/Task.java b/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/Task.java
new file mode 100644
index 0000000..64c0c03
--- /dev/null
+++ b/graphs/java/scheduler/src/main/java/fr/epita/assistants/scheduler/Task.java
@@ -0,0 +1,75 @@
+package fr.epita.assistants.scheduler;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import java.util.function.Supplier;
+
+/**
+ * Represent a single task to be executed. Tasks can be chained using the andThenDo method.
+ *
+ * @param <RETURN_TYPE> The expected return type.
+ */
+public interface Task<RETURN_TYPE> {
+
+ /**
+ * Static initializer allowing the creation of a task instance with the given {@link Supplier}.
+ *
+ * @param actionSupplier The actual action to execute.
+ * @param <RETURN_TYPE> The expected return type, inferred by the call chain.
+ * @return A {@link Task} instance.
+ */
+ static <RETURN_TYPE> Task<RETURN_TYPE> of(Supplier<RETURN_TYPE> actionSupplier) {
+ throw new UnsupportedOperationException("This default implementation should never be called, and should be" +
+ "implemented in classes that implement this interface");
+ }
+
+ /**
+ * Build the actual completable future according to this instance specifications.
+ *
+ * @return The built {@link CompletableFuture}.
+ */
+ CompletableFuture<RETURN_TYPE> build();
+
+ /**
+ * Execute a task and return its result.
+ *
+ * @return The result of the execution of this task.
+ */
+ default RETURN_TYPE execute() {
+ try {
+ return build().get();
+ } catch (InterruptedException | ExecutionException exception) {
+ throw new RuntimeException("Exception during task computing", exception);
+ }
+ }
+
+ /**
+ * Specify a function that provides a recovery value to use if the task fails.
+ *
+ * @param recoveryFunction The function that will be called with the exception - should any happen - in order to
+ * compute a recovery value.
+ * @return The updated task.
+ */
+ Task<RETURN_TYPE> onErrorRecoverWith(final Function<Throwable, RETURN_TYPE> recoveryFunction);
+
+ /**
+ * Chain a new task to be executed after the current one, taking the output of the current one as its input.
+ *
+ * @param action The action to perform.
+ * @param <NEW_RETURN_TYPE> The return type of the task to create.
+ * @return The created task.
+ */
+ <NEW_RETURN_TYPE> Task<NEW_RETURN_TYPE> andThenDo(final Function<RETURN_TYPE, NEW_RETURN_TYPE> action);
+
+ /**
+ * Wait for the given number of timeUnit.
+ *
+ * @param number The number of units to wait for.
+ * @param timeUnit The unit.
+ * @return The created task.
+ */
+ Task<RETURN_TYPE> andThenWait(final long number, final TimeUnit timeUnit);
+
+}
diff --git a/graphs/java/seq/.gitignore b/graphs/java/seq/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/seq/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/seq/pom.xml b/graphs/java/seq/pom.xml
new file mode 100644
index 0000000..46ba851
--- /dev/null
+++ b/graphs/java/seq/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>seq</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/seq/src/main/java/fr/epita/assistants/seq/ExtendedStream.java b/graphs/java/seq/src/main/java/fr/epita/assistants/seq/ExtendedStream.java
new file mode 100644
index 0000000..0ba5f6a
--- /dev/null
+++ b/graphs/java/seq/src/main/java/fr/epita/assistants/seq/ExtendedStream.java
@@ -0,0 +1,204 @@
+package fr.epita.assistants.seq;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+import java.util.function.Function;
+import java.util.function.Supplier;
+import java.util.stream.Stream;
+
+/**
+ * Extends the {@link Stream} interface, adding some very strangely lacking useful methods.
+ * You should use the Forwarding-Interface pattern.
+ * <p>
+ * The use of infinite, unordered or parallel stream in this implementation will
+ * not be tested.
+ *
+ * @param <ELEMENT_TYPE> the type of stream.
+ */
+@SuppressWarnings("unused")
+public interface ExtendedStream<ELEMENT_TYPE> extends Stream<ELEMENT_TYPE> {
+
+
+ /**
+ * Creates a map out of the stream.
+ * In case of duplicate keys, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param keyMapper mapping function to extract map keys.
+ * @param <KEY_TYPE> the expected type of key.
+ * @return the created map.
+ */
+ <KEY_TYPE> Map<KEY_TYPE, ELEMENT_TYPE>
+ toMap(final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper);
+
+ /**
+ * Creates a map out of the stream.
+ * In case of key duplicates, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param map the map to fill/update.
+ * @param keyMapper mapping function to extract map keys.
+ * @param valueMapper mapping function to extract map values.
+ * @param <KEY_TYPE> the expected type of key.
+ * @param <VALUE_TYPE> the expected type of value.
+ * @param <MAP_TYPE> the complete return type.
+ * @return the created map.
+ */
+ <KEY_TYPE, VALUE_TYPE, MAP_TYPE extends Map<KEY_TYPE, VALUE_TYPE>>
+ MAP_TYPE toMap(final MAP_TYPE map,
+ final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper,
+ final Function<ELEMENT_TYPE, VALUE_TYPE> valueMapper);
+
+ /**
+ * Creates a map out of the stream.
+ * In case of duplicate keys, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param keyMapper mapping function to extract map keys.
+ * @param valueMapper mapping function to extract map values.
+ * @param <KEY_TYPE> the expected type of key.
+ * @param <VALUE_TYPE> the expected type of value.
+ * @return the created map.
+ */
+ <KEY_TYPE, VALUE_TYPE>
+ Map<KEY_TYPE, VALUE_TYPE> toMap(final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper,
+ final Function<ELEMENT_TYPE, VALUE_TYPE> valueMapper);
+
+ /**
+ * Converts the stream to a list.
+ *
+ * @return the created list.
+ */
+ List<ELEMENT_TYPE> toList();
+
+ /**
+ * Dumps the content of the stream to the given list.
+ *
+ * @param list the list to dump values to.
+ * @param <LIST> the exact type of list.
+ * @return the updated list.
+ */
+ <LIST extends List<ELEMENT_TYPE>> LIST toList(final LIST list);
+
+ /**
+ * Converts the stream to a set.
+ *
+ * @return the built set.
+ */
+ Set<ELEMENT_TYPE> toSet();
+
+ /**
+ * Dumps the content of the stream to the given set.
+ *
+ * @param set the set to update
+ * @param <SET> the set type.
+ * @return the updated set.
+ */
+ <SET extends Set<ELEMENT_TYPE>> SET toSet(final SET set);
+
+ /**
+ * Creates a stream of pairs of the content of the stream and values produced by a supplier.
+ *
+ * @param supplier the value supplier.
+ * @param <ASSOCIATED_TYPE> the type of associated values.
+ * @return the built stream.
+ */
+ <ASSOCIATED_TYPE>
+ ExtendedStream<Pair<ELEMENT_TYPE, ASSOCIATED_TYPE>> associate(final Supplier<ASSOCIATED_TYPE> supplier);
+
+ /**
+ * Creates a stream of pairs of the content of the stream and values produces by another stream.
+ * Once any of the two streams is closed, the produced stream is complete, regardless of potential values remaining
+ * in the other stream.
+ *
+ * @param supplier the value supplier.
+ * @param <ASSOCIATED_TYPE> the type of associated values.
+ * @return the built stream.
+ */
+ <ASSOCIATED_TYPE>
+ ExtendedStream<Pair<ELEMENT_TYPE, ASSOCIATED_TYPE>> associate(final Stream<ASSOCIATED_TYPE> supplier);
+
+ /**
+ * Prints the element of the stream on the standard output.
+ *
+ * @return this.
+ */
+ ExtendedStream<ELEMENT_TYPE> print();
+
+ /**
+ * Adds the content of the given stream to the current stream and returns it as a new one.
+ *
+ * @param stream the stream to add.
+ * @return a new stream containing the current one then the given one.
+ */
+ ExtendedStream<ELEMENT_TYPE> plus(final Stream<ELEMENT_TYPE> stream);
+
+ /**
+ * Builds a string by joining the string representation of all contained values, interspersed with the given string
+ * delimiter.
+ *
+ * @param delimiter the delimiter string.
+ * @return the built {@link String}.
+ */
+ String join(final String delimiter);
+
+ /**
+ * Builds a string by joining the string representation of all contained values.
+ *
+ * @return the built {@link String}.
+ */
+ String join();
+
+ /**
+ * Builds a pair of streams by partitioning the current one using the given pivot function.
+ *
+ * @param pivot the function to segregate the values of the given stream.
+ * @param <KEY_TYPE> type of partition key.
+ * @return the pair of created streams.
+ */
+ <KEY_TYPE>
+ ExtendedStream<Pair<KEY_TYPE, ExtendedStream<ELEMENT_TYPE>>>
+ partition(final Function<ELEMENT_TYPE, KEY_TYPE> pivot);
+
+ /**
+ * A utility class representing a pair.
+ *
+ * @param <FIRST_TYPE> the first value type.
+ * @param <SECOND_TYPE> the second value type.
+ */
+ @SuppressWarnings("WeakerAccess")
+ class Pair<FIRST_TYPE, SECOND_TYPE> {
+ /**
+ * The first value.
+ */
+ public final FIRST_TYPE first;
+
+ /**
+ * The second value.
+ */
+ public final SECOND_TYPE second;
+
+ /**
+ * Default CTor.
+ *
+ * @param first value of the same name.
+ * @param second value of the same name.
+ */
+ public Pair(final FIRST_TYPE first, final SECOND_TYPE second) {
+ this.first = first;
+ this.second = second;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) return false;
+ if (!obj.getClass().equals(Pair.class)) return false;
+ final Pair pair = (Pair) obj;
+ return Objects.equals(first, pair.first) && Objects.equals(second, pair.second);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(first, second);
+ }
+ }
+}
diff --git a/graphs/java/seq/src/main/java/fr/epita/assistants/seq/Seq.java b/graphs/java/seq/src/main/java/fr/epita/assistants/seq/Seq.java
new file mode 100644
index 0000000..31e5cab
--- /dev/null
+++ b/graphs/java/seq/src/main/java/fr/epita/assistants/seq/Seq.java
@@ -0,0 +1,413 @@
+package fr.epita.assistants.seq;
+
+import java.util.*;
+import java.util.function.*;
+import java.util.stream.*;
+
+public interface Seq<ELEMENT_TYPE> extends ExtendedStream<ELEMENT_TYPE> {
+ Stream<ELEMENT_TYPE> giveStream();
+
+ static <ELEMENT_TYPE> Seq<ELEMENT_TYPE> of(Stream<ELEMENT_TYPE> stream) {
+ return () -> stream;
+ }
+
+ static <ELEMENT_TYPE> Seq<ELEMENT_TYPE> of(List<ELEMENT_TYPE> list) {
+ return list::stream;
+ }
+
+ static <ELEMENT_TYPE> Seq<ELEMENT_TYPE> of(ELEMENT_TYPE... values) {
+ List<ELEMENT_TYPE> vals = new ArrayList<>(Arrays.asList(values));
+ return vals::stream;
+ }
+
+ /**
+ * Creates a map out of the stream.
+ * In case of duplicate keys, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param keyMapper mapping function to extract map keys.
+ * @param <KEY_TYPE> the expected type of key.
+ * @return the created map.
+ */
+ default <KEY_TYPE> Map<KEY_TYPE, ELEMENT_TYPE>
+ toMap(final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper) {
+ Map<KEY_TYPE, ELEMENT_TYPE> map = new HashMap<>();
+ giveStream().forEach(e -> map.put(keyMapper.apply(e), e));
+ return map;
+ }
+
+ /**
+ * Creates a map out of the stream.
+ * In case of key duplicates, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param map the map to fill/update.
+ * @param keyMapper mapping function to extract map keys.
+ * @param valueMapper mapping function to extract map values.
+ * @param <KEY_TYPE> the expected type of key.
+ * @param <VALUE_TYPE> the expected type of value.
+ * @param <MAP_TYPE> the complete return type.
+ * @return the created map.
+ */
+ default <KEY_TYPE, VALUE_TYPE, MAP_TYPE extends Map<KEY_TYPE, VALUE_TYPE>>
+ MAP_TYPE toMap(final MAP_TYPE map,
+ final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper,
+ final Function<ELEMENT_TYPE, VALUE_TYPE> valueMapper) {
+ giveStream().forEach(e -> map.put(keyMapper.apply(e), valueMapper.apply(e)));
+ return map;
+ }
+
+ /**
+ * Creates a map out of the stream.
+ * In case of duplicate keys, the latest element in the original stream will overwrite the one(s) in place.
+ *
+ * @param keyMapper mapping function to extract map keys.
+ * @param valueMapper mapping function to extract map values.
+ * @param <KEY_TYPE> the expected type of key.
+ * @param <VALUE_TYPE> the expected type of value.
+ * @return the created map.
+ */
+ default <KEY_TYPE, VALUE_TYPE>
+ Map<KEY_TYPE, VALUE_TYPE> toMap(final Function<ELEMENT_TYPE, KEY_TYPE> keyMapper,
+ final Function<ELEMENT_TYPE, VALUE_TYPE> valueMapper) {
+ Map<KEY_TYPE, VALUE_TYPE> map = new HashMap<>();
+ giveStream().forEach(e -> map.put(keyMapper.apply(e), valueMapper.apply(e)));
+ return map;
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> filter(Predicate<? super ELEMENT_TYPE> predicate) {
+ return giveStream().filter(predicate);
+ }
+
+ @Override
+ public default <R> Stream<R> map(Function<? super ELEMENT_TYPE, ? extends R> mapper) {
+ return giveStream().map(mapper);
+ }
+
+ @Override
+ public default IntStream mapToInt(ToIntFunction<? super ELEMENT_TYPE> mapper) {
+ return giveStream().mapToInt(mapper);
+ }
+
+ @Override
+ public default LongStream mapToLong(ToLongFunction<? super ELEMENT_TYPE> mapper) {
+ return giveStream().mapToLong(mapper);
+ }
+
+ @Override
+ public default DoubleStream mapToDouble(ToDoubleFunction<? super ELEMENT_TYPE> mapper) {
+ return giveStream().mapToDouble(mapper);
+ }
+
+ @Override
+ public default <R> Stream<R> flatMap(Function<? super ELEMENT_TYPE, ? extends Stream<? extends R>> mapper) {
+ return giveStream().flatMap(mapper);
+ }
+
+ @Override
+ public default IntStream flatMapToInt(Function<? super ELEMENT_TYPE, ? extends IntStream> mapper) {
+ return giveStream().flatMapToInt(mapper);
+ }
+
+ @Override
+ public default LongStream flatMapToLong(Function<? super ELEMENT_TYPE, ? extends LongStream> mapper) {
+ return giveStream().flatMapToLong(mapper);
+ }
+
+ @Override
+ public default DoubleStream flatMapToDouble(Function<? super ELEMENT_TYPE, ? extends DoubleStream> mapper) {
+ return giveStream().flatMapToDouble(mapper);
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> distinct() {
+ return giveStream().distinct();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> sorted() {
+ return giveStream().sorted();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> sorted(Comparator<? super ELEMENT_TYPE> comparator) {
+ return giveStream().sorted(comparator);
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> peek(Consumer<? super ELEMENT_TYPE> action) {
+ return giveStream().peek(action);
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> limit(long maxSize) {
+ return giveStream().limit(maxSize);
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> skip(long n) {
+ return giveStream().skip(n);
+ }
+
+ @Override
+ public default void forEach(Consumer<? super ELEMENT_TYPE> action) {
+ giveStream().forEach(action);
+ }
+
+ @Override
+ public default void forEachOrdered(Consumer<? super ELEMENT_TYPE> action) {
+ giveStream().forEachOrdered(action);
+ }
+
+ @Override
+ public default Object[] toArray() {
+ return giveStream().toArray();
+ }
+
+ @Override
+ public default <A> A[] toArray(IntFunction<A[]> generator) {
+ return giveStream().toArray(generator);
+ }
+
+ @Override
+ public default ELEMENT_TYPE reduce(ELEMENT_TYPE identity, BinaryOperator<ELEMENT_TYPE> accumulator) {
+ return giveStream().reduce(identity, accumulator);
+ }
+
+ @Override
+ public default Optional<ELEMENT_TYPE> reduce(BinaryOperator<ELEMENT_TYPE> accumulator) {
+ return giveStream().reduce(accumulator);
+ }
+
+ @Override
+ public default <U> U reduce(U identity, BiFunction<U, ? super ELEMENT_TYPE, U> accumulator, BinaryOperator<U> combiner) {
+ return giveStream().reduce(identity, accumulator, combiner);
+ }
+
+ @Override
+ public default <R> R collect(Supplier<R> supplier, BiConsumer<R, ? super ELEMENT_TYPE> accumulator, BiConsumer<R, R> combiner) {
+ return giveStream().collect(supplier, accumulator, combiner);
+ }
+
+ @Override
+ public default <R, A> R collect(Collector<? super ELEMENT_TYPE, A, R> collector) {
+ return giveStream().collect(collector);
+ }
+
+ /**
+ * Converts the stream to a list.
+ *
+ * @return the created list.
+ */
+ default List<ELEMENT_TYPE> toList() {
+ return giveStream().toList();
+ }
+
+ @Override
+ public default Optional<ELEMENT_TYPE> min(Comparator<? super ELEMENT_TYPE> comparator) {
+ return giveStream().min(comparator);
+ }
+
+ @Override
+ public default Optional<ELEMENT_TYPE> max(Comparator<? super ELEMENT_TYPE> comparator) {
+ return giveStream().max(comparator);
+ }
+
+ @Override
+ public default long count() {
+ return giveStream().count();
+ }
+
+ @Override
+ public default boolean anyMatch(Predicate<? super ELEMENT_TYPE> predicate) {
+ return giveStream().anyMatch(predicate);
+ }
+
+ @Override
+ public default boolean allMatch(Predicate<? super ELEMENT_TYPE> predicate) {
+ return giveStream().allMatch(predicate);
+ }
+
+ @Override
+ public default boolean noneMatch(Predicate<? super ELEMENT_TYPE> predicate) {
+ return giveStream().noneMatch(predicate);
+ }
+
+ @Override
+ public default Optional<ELEMENT_TYPE> findFirst() {
+ return giveStream().findFirst();
+ }
+
+ @Override
+ public default Optional<ELEMENT_TYPE> findAny() {
+ return giveStream().findAny();
+ }
+
+ /**
+ * Dumps the content of the stream to the given list.
+ *
+ * @param list the list to dump values to.
+ * @param <LIST> the exact type of list.
+ * @return the updated list.
+ */
+ default <LIST extends List<ELEMENT_TYPE>> LIST toList(final LIST list) {
+ giveStream().forEach(list::add);
+ return list;
+ }
+
+ /**
+ * Converts the stream to a set.
+ *
+ * @return the built set.
+ */
+ default Set<ELEMENT_TYPE> toSet() {
+ return giveStream().collect(Collectors.toSet());
+ }
+
+ /**
+ * Dumps the content of the stream to the given set.
+ *
+ * @param set the set to update
+ * @param <SET> the set type.
+ * @return the updated set.
+ */
+ default <SET extends Set<ELEMENT_TYPE>> SET toSet(final SET set) {
+ giveStream().forEach(set::add);
+ return set;
+ }
+
+ /**
+ * Creates a stream of pairs of the content of the stream and values produced by a supplier.
+ *
+ * @param supplier the value supplier.
+ * @param <ASSOCIATED_TYPE> the type of associated values.
+ * @return the built stream.
+ */
+ default <ASSOCIATED_TYPE>
+ ExtendedStream<Pair<ELEMENT_TYPE, ASSOCIATED_TYPE>> associate(final Supplier<ASSOCIATED_TYPE> supplier) {
+ return Seq.of(giveStream().map(e -> new Pair<ELEMENT_TYPE,
+ ASSOCIATED_TYPE>(e, supplier.get())));
+ }
+
+ /**
+ * Creates a stream of pairs of the content of the stream and values produces by another stream.
+ * Once any of the two streams is closed, the produced stream is complete, regardless of potential values remaining
+ * in the other stream.
+ *
+ * @param supplier the value supplier.
+ * @param <ASSOCIATED_TYPE> the type of associated values.
+ * @return the built stream.
+ */
+ default <ASSOCIATED_TYPE>
+ ExtendedStream<Pair<ELEMENT_TYPE, ASSOCIATED_TYPE>> associate(final Stream<ASSOCIATED_TYPE> supplier) {
+ List<ELEMENT_TYPE> elements = giveStream().toList();
+ List<ASSOCIATED_TYPE> assocs = supplier.toList();
+ return Seq.of(IntStream.range(0, Math.min(elements.size(),
+ assocs.size())).mapToObj(i -> new Pair<ELEMENT_TYPE, ASSOCIATED_TYPE>(elements.get(i), assocs.get(i))));
+ }
+
+ /**
+ * Prints the element of the stream on the standard output.
+ *
+ * @return this.
+ */
+ default ExtendedStream<ELEMENT_TYPE> print() {
+ return (ExtendedStream<ELEMENT_TYPE>) giveStream().peek(System.out::println);
+ }
+
+ /**
+ * Adds the content of the given stream to the current stream and returns it as a new one.
+ *
+ * @param stream the stream to add.
+ * @return a new stream containing the current one then the given one.
+ */
+ default ExtendedStream<ELEMENT_TYPE> plus(final Stream<ELEMENT_TYPE> stream) {
+ return Seq.of(Stream.concat(giveStream(), stream));
+ }
+
+ /**
+ * Builds a string by joining the string representation of all contained values, interspersed with the given string
+ * delimiter.
+ *
+ * @param delimiter the delimiter string.
+ * @return the built {@link String}.
+ */
+ default String join(final String delimiter) {
+ return giveStream().map(ELEMENT_TYPE::toString).collect(Collectors.joining(delimiter));
+ }
+
+ /**
+ * Builds a string by joining the string representation of all contained values.
+ *
+ * @return the built {@link String}.
+ */
+ default String join() {
+ return giveStream().map(ELEMENT_TYPE::toString).collect(Collectors.joining());
+ }
+
+ /**
+ * Builds a pair of streams by partitioning the current one using the given pivot function.
+ *
+ * @param pivot the function to segregate the values of the given stream.
+ * @param <KEY_TYPE> type of partition key.
+ * @return the pair of created streams.
+ */
+ default <KEY_TYPE>
+ ExtendedStream<Pair<KEY_TYPE, ExtendedStream<ELEMENT_TYPE>>>
+ partition(final Function<ELEMENT_TYPE, KEY_TYPE> pivot) {
+ Map<KEY_TYPE, List<ELEMENT_TYPE>> map = new HashMap<>();
+ giveStream().forEach(e -> {
+ KEY_TYPE key = pivot.apply(e);
+ List<ELEMENT_TYPE> assoc = new ArrayList<>();
+ if (map.containsKey(key)) {
+ assoc.addAll(map.get(key));
+ }
+ assoc.add(e);
+ map.put(key, assoc);
+ });
+ List<Pair<KEY_TYPE, ExtendedStream<ELEMENT_TYPE>>> list = new ArrayList<>();
+ for (KEY_TYPE key : map.keySet()) {
+ list.add(new Pair<>(key, Seq.of(map.get(key).stream())));
+ }
+ return Seq.of(list.stream());
+ }
+
+ @Override
+ public default Iterator<ELEMENT_TYPE> iterator() {
+ return giveStream().iterator();
+ }
+
+ @Override
+ public default Spliterator<ELEMENT_TYPE> spliterator() {
+ return giveStream().spliterator();
+ }
+
+ @Override
+ public default boolean isParallel() {
+ return giveStream().isParallel();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> sequential() {
+ return giveStream().sequential();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> parallel() {
+ return giveStream().parallel();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> unordered() {
+ return giveStream().unordered();
+ }
+
+ @Override
+ public default Stream<ELEMENT_TYPE> onClose(Runnable closeHandler) {
+ return giveStream().onClose(closeHandler);
+ }
+
+ @Override
+ public default void close() {
+ giveStream().close();
+ }
+}
diff --git a/graphs/java/seq/src/test/java/fr/epita/assistants/seq/ExtendedStreamTest.java b/graphs/java/seq/src/test/java/fr/epita/assistants/seq/ExtendedStreamTest.java
new file mode 100644
index 0000000..b0bb911
--- /dev/null
+++ b/graphs/java/seq/src/test/java/fr/epita/assistants/seq/ExtendedStreamTest.java
@@ -0,0 +1,244 @@
+package fr.epita.assistants.seq;
+
+import java.lang.reflect.Modifier;
+import java.time.Duration;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTimeoutPreemptively;
+
+import fr.epita.assistants.seq.ExtendedStream.Pair;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Supplier;
+import java.util.stream.Stream;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class ExtendedStreamTest {
+
+ private static <TYPE> ExtendedStream<TYPE> ctor(final List<TYPE> values) {
+ // FIXME: replace by your own implementation.
+ return Seq.of(values);
+ }
+
+ private static <TYPE> ExtendedStream<TYPE> ctor(final TYPE... values) {
+ // FIXME: replace by your own implementation.
+ return Seq.of(values);
+ }
+
+ private static <TYPE> ExtendedStream<TYPE> ctor(final Stream<TYPE> values) {
+ // FIXME: replace by your own implementation.
+ return Seq.of(values);
+ }
+
+ private static DummyObject dummy(final int id, final String name) {
+ return new DummyObject(id, name);
+ }
+
+ @Test
+ public void isSeqAnInterface() throws ClassNotFoundException {
+ Class<?> seqClass = Class.forName("fr.epita.assistants.seq.Seq");
+ int modifiers = seqClass.getModifiers();
+ boolean isInterface = Modifier.isInterface(modifiers);
+ assertTrue(isInterface, "Seq must be an interface");
+ }
+
+ @Test
+ public void toMapKeyValue() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<DummyObject> es = ctor(dummy(1, "1"), dummy(2, "2"), dummy(2, "4"), dummy(3, "3"));
+ final Map<Integer, String> map = es.toMap(DummyObject::getId, DummyObject::getName);
+ assertEquals(3, map.size());
+ assertEquals("1", map.get(1));
+ assertEquals("4", map.get(2));
+ assertEquals("3", map.get(3));
+ });
+ }
+
+ @Test
+ public void toMapKeyValueMap() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<DummyObject> es = ctor(dummy(1, "1"), dummy(2, "2"), dummy(2, "4"), dummy(3, "3"));
+ final Map<Integer, DummyObject> source = new HashMap<>();
+ source.put(42, new DummyObject(42, "me"));
+ final Map<Integer, DummyObject> map = es.toMap(source, DummyObject::getId, it -> it);
+ assertEquals(4, map.size());
+ assertEquals("1", map.get(1).name);
+ assertEquals("4", map.get(2).name);
+ assertEquals("3", map.get(3).name);
+ assertEquals("me", map.get(42).name);
+ });
+ }
+
+ @Test
+ public void toMapKey() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<DummyObject> es = ctor(dummy(1, "1"), dummy(2, "2"), dummy(2, "4"), dummy(3, "3"));
+ final Map<Integer, DummyObject> map = es.toMap(DummyObject::getId);
+ assertEquals(3, map.size());
+ assertEquals("1", map.get(1).name);
+ assertEquals("4", map.get(2).name);
+ assertEquals("3", map.get(3).name);
+ });
+ }
+
+
+ @Test
+ public void toList() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<DummyObject> es = ctor(dummy(1, "1"), dummy(2, "2"), dummy(2, "4"), dummy(3, "3"));
+ final List<DummyObject> list = es.toList();
+ assertEquals(4, list.size());
+ assertEquals("1", list.get(0).name);
+ assertEquals("2", list.get(1).name);
+ assertEquals("4", list.get(2).name);
+ assertEquals("3", list.get(3).name);
+
+ });
+ }
+
+ @Test
+ public void toListWithList() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<DummyObject> es = ctor(dummy(1, "1"), dummy(2, "2"), dummy(2, "4"), dummy(3, "3"));
+ final List<DummyObject> source = new ArrayList<>();
+ source.add(new DummyObject(42, "me"));
+ final List<DummyObject> list = es.toList(source);
+ assertEquals(5, list.size());
+ assertEquals("me", list.get(0).name);
+ assertEquals("1", list.get(1).name);
+ assertEquals("2", list.get(2).name);
+ assertEquals("4", list.get(3).name);
+ assertEquals("3", list.get(4).name);
+ });
+ }
+
+ @Test
+ public void toSet() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<Integer> es = ctor(1, 2, 2, 3);
+ final Set<Integer> set = es.toSet();
+ assertEquals(3, set.size());
+ assertTrue(set.contains(1));
+ assertTrue(set.contains(2));
+ assertTrue(set.contains(3));
+ });
+ }
+
+ @Test
+ public void toSetWithSet() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<Integer> es = ctor(1, 2, 2, 3);
+ final Set<Integer> source = new HashSet<>();
+ source.add(1);
+ source.add(2);
+ source.add(42);
+ final Set<Integer> set = es.toSet(source);
+ assertEquals(4, set.size());
+ assertTrue(set.contains(1));
+ assertTrue(set.contains(2));
+ assertTrue(set.contains(3));
+ assertTrue(set.contains(42));
+ });
+ }
+
+ @Test
+ public void associateWithSupplier() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<String> es = ctor("a", "b", "c");
+ final List<Pair<String, Integer>> list = es.associate(new Increment()).toList();
+
+ assertEquals(3, list.size());
+ assertEquals(new Pair<>("a", 0), list.get(0));
+ assertEquals(new Pair<>("b", 1), list.get(1));
+ assertEquals(new Pair<>("c", 2), list.get(2));
+
+
+ });
+ }
+
+ @Test
+ public void associateWithStream() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<String> es = ctor("a", "b", "c");
+ final List<Pair<String, Integer>> list = es.associate(ctor(0, 1, 2, 3, 4, 5)).toList();
+
+ assertEquals(3, list.size());
+ assertEquals(new Pair<>("a", 0), list.get(0));
+ assertEquals(new Pair<>("b", 1), list.get(1));
+ assertEquals(new Pair<>("c", 2), list.get(2));
+ });
+ }
+
+ @Test
+ public void plus() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<String> es = ctor("a", "b", "c").plus(ctor("d", "e", "f"));
+ assertEquals("abcdef", es.join());
+ });
+ }
+
+ @Test
+ public void join() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<String> es = ctor("a", "b", "c", "d", "e", "f");
+ assertEquals("abcdef", es.join());
+ });
+ }
+
+ @Test
+ public void joinWithDelimiter() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<String> es = ctor("a", "b", "c", "d", "e", "f");
+ assertEquals("a-b-c-d-e-f", es.join("-"));
+ });
+ }
+
+ @Test
+ public void partition() {
+ assertTimeoutPreemptively(Duration.ofSeconds(10), () -> {
+ final ExtendedStream<Integer> es = ctor(0, 1, 2, 3, 4, 5, 6, 7);
+ final ExtendedStream<Pair<Boolean, ExtendedStream<Integer>>> partitions = es.partition(val -> val % 2 == 0);
+ final List<Pair<Boolean, ExtendedStream<Integer>>> list = partitions.toList();
+
+
+ assertEquals(list.get(0).first ? "0246" : "1357", list.get(0).second.join());
+ assertEquals(list.get(0).first ? "1357" : "0246", list.get(1).second.join());
+ });
+ }
+
+ static class DummyObject {
+ public final Integer id;
+ public final String name;
+
+ public DummyObject(final Integer id, final String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+ }
+
+
+ static class Increment implements Supplier<Integer> {
+ private int increment = 0;
+
+ @Override
+ public Integer get() {
+ return increment++;
+ }
+ }
+}
diff --git a/graphs/java/singleton/.gitignore b/graphs/java/singleton/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/singleton/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/singleton/pom.xml b/graphs/java/singleton/pom.xml
new file mode 100644
index 0000000..6bb46cb
--- /dev/null
+++ b/graphs/java/singleton/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>singleton</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+ <versions.slf4j>1.7.36</versions.slf4j>
+ <versions.archunit>1.2.0</versions.archunit>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5</artifactId>
+ <version>${versions.archunit}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/singleton/src/main/java/fr/epita/assistants/logger/Logger.java b/graphs/java/singleton/src/main/java/fr/epita/assistants/logger/Logger.java
new file mode 100644
index 0000000..4cc59f8
--- /dev/null
+++ b/graphs/java/singleton/src/main/java/fr/epita/assistants/logger/Logger.java
@@ -0,0 +1,62 @@
+package fr.epita.assistants.logger;
+
+/**
+ * A standard logger interface
+ */
+public interface Logger {
+ /**
+ * The Level enum, representing the gravity of a log message.
+ */
+ enum Level {
+ INFO,
+ WARN,
+ ERROR
+ }
+
+ /**
+ * Formats a message and returns it as a string
+ * @param level The gravity level of the logged message.
+ * @param message The logged message.
+ * @return
+ */
+ static String getFormattedLog(final Level level, final String message) {
+ return '[' +
+ level.toString() +
+ "] " +
+ message;
+ }
+
+ /**
+ * Outputs the logged message with the format '[LEVEL] Message' to stderr.
+ *
+ * @param level The gravity level of the logged message.
+ * @param message The logged message.
+ */
+ void log(final Level level, final String message);
+
+ /**
+ * Getter for infoCounter.
+ *
+ * @return infoCounter.
+ */
+ int getInfoCounter();
+
+ /**
+ * Getter for warnCounter.
+ *
+ * @return warnCounter.
+ */
+ int getWarnCounter();
+
+ /**
+ * Getter for errorCounter.
+ *
+ * @return errorCounter.
+ */
+ int getErrorCounter();
+
+ /**
+ * Resets the counters.
+ */
+ void reset();
+}
diff --git a/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/SingletonEnumLogger.java b/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/SingletonEnumLogger.java
new file mode 100644
index 0000000..4fb969e
--- /dev/null
+++ b/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/SingletonEnumLogger.java
@@ -0,0 +1,49 @@
+package fr.epita.assistants.singleton;
+
+import fr.epita.assistants.logger.Logger;
+
+public enum SingletonEnumLogger implements Logger {
+ INSTANCE;
+ int infoCounter;
+ int errorCounter;
+ int warnCounter;
+
+ @Override
+ public void log(Level level, String message) {
+ switch (level)
+ {
+ case INFO:
+ infoCounter++;
+ break;
+ case WARN:
+ warnCounter++;
+ break;
+ case ERROR:
+ errorCounter++;
+ break;
+ }
+ System.err.println(Logger.getFormattedLog(level, message));
+ }
+
+ @Override
+ public int getInfoCounter() {
+ return infoCounter;
+ }
+
+ @Override
+ public int getWarnCounter() {
+ return warnCounter;
+ }
+
+ @Override
+ public int getErrorCounter() {
+ return errorCounter;
+ }
+
+ @Override
+ public void reset() {
+ infoCounter = 0;
+ warnCounter = 0;
+ errorCounter = 0;
+ }
+}
diff --git a/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/StaticSingletonLogger.java b/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/StaticSingletonLogger.java
new file mode 100644
index 0000000..51d1801
--- /dev/null
+++ b/graphs/java/singleton/src/main/java/fr/epita/assistants/singleton/StaticSingletonLogger.java
@@ -0,0 +1,54 @@
+package fr.epita.assistants.singleton;
+
+import fr.epita.assistants.logger.Logger;
+
+public class StaticSingletonLogger implements Logger {
+ int infoCounter;
+ int errorCounter;
+ int warnCounter;
+ private StaticSingletonLogger() {
+ infoCounter = 0;
+ errorCounter = 0;
+ warnCounter = 0;
+ }
+
+ private static class InstanceHolder {
+ private static final StaticSingletonLogger _INSTANCE = new StaticSingletonLogger();
+ }
+
+ public static StaticSingletonLogger getInstance() {
+ return InstanceHolder._INSTANCE;
+ }
+ @Override
+ public void log(Level level, String message) {
+ switch (level)
+ {
+ case INFO -> infoCounter++;
+ case WARN -> warnCounter++;
+ case ERROR -> errorCounter++;
+ }
+ System.err.println(Logger.getFormattedLog(level, message));
+ }
+
+ @Override
+ public int getInfoCounter() {
+ return infoCounter;
+ }
+
+ @Override
+ public int getWarnCounter() {
+ return warnCounter;
+ }
+
+ @Override
+ public int getErrorCounter() {
+ return errorCounter;
+ }
+
+ @Override
+ public void reset() {
+ infoCounter = 0;
+ warnCounter = 0;
+ errorCounter = 0;
+ }
+}
diff --git a/graphs/java/streamStudent/.gitignore b/graphs/java/streamStudent/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/streamStudent/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/streamStudent/pom.xml b/graphs/java/streamStudent/pom.xml
new file mode 100644
index 0000000..d304253
--- /dev/null
+++ b/graphs/java/streamStudent/pom.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>streamStudent</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.29.2-GA</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Pair.java b/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Pair.java
new file mode 100644
index 0000000..c3cde84
--- /dev/null
+++ b/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Pair.java
@@ -0,0 +1,67 @@
+package fr.epita.assistants.streamstudent;
+
+public class Pair<K, V> {
+
+ /**
+ * Key of this pair.
+ */
+ private K key;
+
+ /**
+ * Gets the key for this pair.
+ *
+ * @return key for this pair
+ */
+ public K getKey() {
+ return key;
+ }
+
+ /**
+ * Value of this pair.
+ */
+ private V value;
+
+ /**
+ * Gets the value for this pair.
+ *
+ * @return value for this pair
+ */
+ public V getValue() {
+ return value;
+ }
+
+ /**
+ * Creates a new pair.
+ *
+ * @param key The key for this pair
+ * @param value The value to use for this pair
+ */
+ public Pair(K key, V value) {
+ this.key = key;
+ this.value = value;
+ }
+
+
+ @Override
+ public int hashCode() {
+ return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o instanceof Pair) {
+ Pair pair = (Pair) o;
+ if (key != null ? !key.equals(pair.key) : pair.key != null) return false;
+ if (value != null ? !value.equals(pair.value) : pair.value != null) return false;
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ return "(" + key + ", " + value + ")";
+ }
+}
+
diff --git a/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Streamer.java b/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Streamer.java
new file mode 100644
index 0000000..87654a4
--- /dev/null
+++ b/graphs/java/streamStudent/src/main/java/fr/epita/assistants/streamstudent/Streamer.java
@@ -0,0 +1,58 @@
+package fr.epita.assistants.streamstudent;
+
+import java.util.Comparator;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.regex.Pattern;
+import java.util.stream.Stream;
+
+public class Streamer {
+ public Stream<Pair<Integer, String>> validator(Stream<Pair<Integer, String>> stream) {
+ return stream.filter(student -> student.getKey() >= 0 && student.getKey() <= 100 && (Pattern.matches("[^_" +
+ ".]*\\.[^_.]*", student.getValue()) || Pattern.matches("[^._]*_[^._]*", student.getValue())));
+ }
+
+ public Stream<Pair<Integer, String>> orderGrade(Stream<Pair<Integer, String>> stream) {
+ return stream.sorted((i, j) -> {
+ if (!Objects.equals(i.getKey(), j.getKey()))
+ return i.getKey().compareTo(j.getKey());
+ else
+ return i.getValue().compareTo(j.getValue());
+ });
+ }
+
+ public Stream<Pair<Integer, String>> lowercase(Stream<Pair<Integer, String>> stream) {
+ return stream.map(i -> {
+ if (Pattern.matches(".*[A-Z]+.*", i.getValue())) {
+ return new Pair<>(i.getKey() / 2, i.getValue().toLowerCase());
+ } else
+ return new Pair<>(i.getKey(), i.getValue().toLowerCase());
+ });
+ }
+
+ public Optional<Pair<Integer, String>> headOfTheClass(Stream<Pair<Integer, String>> stream) {
+ return stream.max((i, j) -> {
+ if (j.getKey().equals(i.getKey()))
+ return j.getValue().compareTo(i.getValue());
+ else
+ return i.getKey().compareTo(j.getKey());
+ });
+ }
+
+ public Stream<Pair<Integer, String>> quickFix(Stream<Pair<Integer, String>> stream) {
+ return stream.map(i -> {
+ if (Pattern.matches("[mM][Aa].*", i.getValue()) || Pattern.matches("[lL].*[xX]", i.getValue())) {
+ return new Pair<>(Math.clamp(i.getKey() * 2, 0, 100), i.getValue());
+ } else return i;
+ });
+ }
+
+ public Stream<Pair<Integer, String>> encryption(Stream<Pair<Integer, String>> stream) {
+ return stream.map(i -> {
+ StringBuilder sb = new StringBuilder();
+ sb.append(i.getValue(), i.getValue().length() / 2, i.getValue().length());
+ sb.append(i.getValue(), 0, i.getValue().length() / 2);
+ return new Pair<>(i.getKey(), sb.toString());
+ });
+ }
+}
diff --git a/graphs/java/streamStudent/src/test/java/fr/epita/assistants/streamstudent/StreamStudentTest.java b/graphs/java/streamStudent/src/test/java/fr/epita/assistants/streamstudent/StreamStudentTest.java
new file mode 100644
index 0000000..d36fc09
--- /dev/null
+++ b/graphs/java/streamStudent/src/test/java/fr/epita/assistants/streamstudent/StreamStudentTest.java
@@ -0,0 +1,63 @@
+package fr.epita.assistants.streamstudent;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.stream.Stream;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class StreamStudentTest {
+ static void assertStreamEquals(Stream<Pair<Integer, String>> expectedStream,
+ Stream<Pair<Integer, String>> actualStream) {
+ // Get iterators from stream
+ Iterator<Pair<Integer, String>> iterator1 = expectedStream.iterator();
+ Iterator<Pair<Integer, String>> iterator2 = actualStream.iterator();
+
+ while (iterator1.hasNext() && iterator2.hasNext()) {
+ // Get next objects
+ Pair<Integer, String> login1 = iterator1.next();
+ Pair<Integer, String> login2 = iterator2.next();
+
+ // Check if pairs are equal
+ assertEquals(login1, login2);
+ }
+
+ assertTrue(!iterator1.hasNext() && !iterator2.hasNext(),
+ "Streams do not have the same length");
+
+ }
+
+ @Test
+ public void validatorLoginContainsTwoOrMoreUnderscore() {
+ Pair<Integer, String> loginTwoUnderscore = new Pair<>(50, "xavier_login_");
+ Pair<Integer, String> loginValid = new Pair<>(90, "xavierlogin");
+ Pair<Integer, String> loginBoth = new Pair<>(90, "xavier._login");
+ Pair<Integer, String> loginMultipleUnderscord = new Pair<>(10, "_login__x");
+ Streamer streamer = new Streamer();
+
+ var loginList = List.of(loginTwoUnderscore, loginValid, loginBoth, loginMultipleUnderscord);
+
+ var actual = streamer.validator(loginList.stream());
+
+ assertEquals(0, actual.count());
+ }
+
+ @Test
+ public void encrypt1() {
+ Pair<Integer, String> loginTwoUnderscore = new Pair<>(50, "a_b");
+ Pair<Integer, String> xavier = new Pair<>(50, "xavier.login");
+ Pair<Integer, String> loginValid = new Pair<>(90, "thomas.kummel");
+ Pair<Integer, String> loginBoth = new Pair<>(90, "florian.fogliani");
+ Pair<Integer, String> loginMultipleUnderscord = new Pair<>(10, "malo.beauchamps");
+ Streamer streamer = new Streamer();
+
+ var loginList = List.of(loginTwoUnderscore, loginValid, loginBoth, loginMultipleUnderscord, xavier);
+
+ var actual = streamer.encryption(loginList.stream());
+ System.out.println("actual stream: " + actual.toString());
+ }
+
+ // Add your own tests here
+} \ No newline at end of file
diff --git a/graphs/java/test1/.gitignore b/graphs/java/test1/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/test1/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/test1/pom.xml b/graphs/java/test1/pom.xml
new file mode 100644
index 0000000..1959226
--- /dev/null
+++ b/graphs/java/test1/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>test1</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+ <versions.slf4j>1.7.36</versions.slf4j>
+ <versions.archunit>1.2.0</versions.archunit>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5</artifactId>
+ <version>${versions.archunit}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/test1/src/main/java/fr/epita/assistants/maths/Matrix.java b/graphs/java/test1/src/main/java/fr/epita/assistants/maths/Matrix.java
new file mode 100644
index 0000000..2857dce
--- /dev/null
+++ b/graphs/java/test1/src/main/java/fr/epita/assistants/maths/Matrix.java
@@ -0,0 +1,33 @@
+package fr.epita.assistants.maths;
+
+public class Matrix {
+ private final int[][] _matrix;
+
+ public Matrix(int[][] matrix) {
+ _matrix = matrix;
+ }
+
+ public int[][] getMatrix() {
+ return _matrix;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ Matrix mat = (Matrix) obj;
+ return mat._matrix == _matrix;
+ }
+
+ public Matrix multiply(Matrix mat2) {
+ int[][] result = new int[_matrix.length][_matrix[0].length];
+
+ for (int i = 0; i < _matrix.length; i++)
+ for (int j = 0; j < mat2._matrix[0].length; j++) {
+ int value = 0;
+ for (int x = 0, y = 0; x < _matrix[i].length && y < mat2._matrix.length; x++, y++)
+ value += _matrix[i][x] * mat2._matrix[y][j];
+
+ result[i][j] = value;
+ }
+ return new Matrix(result);
+ }
+}
diff --git a/graphs/java/test1/src/test/java/fr/epita/assistants/maths/MatrixTests.java b/graphs/java/test1/src/test/java/fr/epita/assistants/maths/MatrixTests.java
new file mode 100644
index 0000000..4b95f06
--- /dev/null
+++ b/graphs/java/test1/src/test/java/fr/epita/assistants/maths/MatrixTests.java
@@ -0,0 +1,113 @@
+package fr.epita.assistants.maths;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+public class MatrixTests {
+ @Test
+ public void ctor1() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ assertNotEquals(69, m.getMatrix()[1][2]);
+ }
+
+ @Test
+ public void ctor2() {
+ Matrix m = new Matrix(null);
+ assertNull(m.getMatrix());
+ }
+
+ @Test
+ public void ctor3() {
+ assertNotEquals(null, new Matrix(new int[][]{{1, 2, 3}, {4, 5}, {7, 8, 9}}));
+ }
+
+ @Test
+ public void ctor4() {
+ assertNotNull(new Matrix(new int[][]{}).getMatrix());
+ }
+
+ @Test
+ public void ctor5() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+
+ assertNotEquals(n.getMatrix()[1][2], m.getMatrix()[1][2]);
+ }
+
+ @Test
+ public void equals1() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ assertEquals(m, n);
+ }
+
+ @Test
+ public void equals2() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5}, {7, 8, 9}});
+ Matrix n = new Matrix(null);
+ assertNotEquals(m, n);
+ }
+
+ @Test
+ public void equals3() {
+ Matrix m = new Matrix(new int[][]{{1, 2}, {3, 4, 5}});
+ Matrix n = new Matrix(new int[][]{{1, 0}, {0, 1}});
+ assertNotEquals(m, n);
+ }
+
+ @Test
+ public void equals4() {
+ int[][] l = new int[][]{{1, 3, 4}, {1, 3, 4}};
+ assertEquals(new Matrix(l), new Matrix(l));
+ }
+
+ @Test
+ public void equals5() {
+ Matrix n = new Matrix(new int[][]{{1, 0}, {0, 1}});
+ assertTrue(n.equals("test"));
+ }
+
+ @Test
+ public void equals6() {
+ Matrix m = new Matrix(new int[][]{{1, 2}, {4}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{7, 8, 9}});
+ assertEquals(m, n);
+ }
+ @Test
+ public void equals7() {
+ Matrix m = new Matrix(new int[][]{{1, 2}, {4}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{});
+ assertEquals(m, n);
+ }
+ @Test
+ public void equals8() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 10}});
+ assertEquals(m, n);
+ }
+
+ @Test
+ public void mul1() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+
+ assertNotEquals(new Matrix(new int[][]{{30, 36, 42}, {66, 81, 96}, {102, 126, 150}}), m.multiply(n));
+ }
+
+ @Test
+ public void mul2() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+
+ assertNotEquals(new Matrix(new int[][]{{30, 36, 42}, {66, 81, 96}}), m.multiply(null));
+ }
+
+ @Test
+ public void mul3() {
+ Matrix m = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}});
+ Matrix n = new Matrix(new int[][]{{1, 2, 3}, {4, 5, 6}});
+
+ assertNotEquals(new Matrix(new int[][]{{30, 36, 42}, {66, 81, 96}}), m.multiply(n));
+ }
+ // add your own tests here
+} \ No newline at end of file
diff --git a/graphs/java/test2/pom.xml b/graphs/java/test2/pom.xml
new file mode 100644
index 0000000..f0ab353
--- /dev/null
+++ b/graphs/java/test2/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>test2</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+ <versions.slf4j>1.7.36</versions.slf4j>
+ <versions.archunit>1.2.0</versions.archunit>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.tngtech.archunit</groupId>
+ <artifactId>archunit-junit5</artifactId>
+ <version>${versions.archunit}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/test2/src/main/java/fr/epita/assistants/server/MyServer.java b/graphs/java/test2/src/main/java/fr/epita/assistants/server/MyServer.java
new file mode 100644
index 0000000..9a2a213
--- /dev/null
+++ b/graphs/java/test2/src/main/java/fr/epita/assistants/server/MyServer.java
@@ -0,0 +1,42 @@
+package fr.epita.assistants.server;
+
+import com.sun.net.httpserver.HttpServer;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+import static java.net.HttpURLConnection.HTTP_OK;
+
+public class MyServer {
+
+ private static HttpServer server = null;
+ private static ExecutorService executor;
+
+
+ public static void launchServer() throws IOException {
+ server = HttpServer.create(new InetSocketAddress("localhost", 8080), 0);
+ executor = Executors.newFixedThreadPool(10);
+ server.setExecutor(executor);
+ var context = server.createContext("/");
+ context.setHandler((arg) -> {
+ try {
+ Thread.sleep(1500);
+ arg.sendResponseHeaders(HTTP_OK, 0);
+ arg.close();
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ }
+ });
+ server.start();
+ }
+
+
+ public static void stopServer() {
+ if (server == null)
+ return;
+ server.stop(0);
+ executor.shutdownNow();
+ }
+}
diff --git a/graphs/java/test2/src/main/java/fr/epita/assistants/test2/Test2.java b/graphs/java/test2/src/main/java/fr/epita/assistants/test2/Test2.java
new file mode 100644
index 0000000..8427b43
--- /dev/null
+++ b/graphs/java/test2/src/main/java/fr/epita/assistants/test2/Test2.java
@@ -0,0 +1,48 @@
+package fr.epita.assistants.test2;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+public class Test2 {
+ /**
+ * Computes the nth value of the tribonacci suite.
+ * f(0) = 0, f(1) = 1, f(2) = 1, f(n+3) = f(n) + f(n+1) + f(n+2)
+ *
+ * @param n the nth sequence to compute
+ */
+ public static long tribonacci(int n) {
+ if (n < 0)
+ throw new IllegalArgumentException("Error: n must be positive");
+
+ if (n == 0)
+ return 0;
+ if (n < 3)
+ return 1;
+
+ long one = 0;
+ long two = 1;
+ long three = 1;
+ long res = 0;
+
+ for (long i = 3; i <= n; i++) {
+ res = one + two + three;
+ one = two;
+ two = three;
+ three = res;
+ }
+
+ return res;
+ }
+
+ public static long serverGetResponseCode() throws IOException {
+ URL url = new URL("http://localhost:8080/");
+ HttpURLConnection con = (HttpURLConnection) url.openConnection();
+ con.setRequestMethod("GET");
+ return con.getResponseCode();
+ }
+
+ public static int division(int a, int b) {
+ return a / b;
+ }
+}
diff --git a/graphs/java/test2/src/test/java/fr/epita/assistants/test2/Test2Test.java b/graphs/java/test2/src/test/java/fr/epita/assistants/test2/Test2Test.java
new file mode 100644
index 0000000..0318dc2
--- /dev/null
+++ b/graphs/java/test2/src/test/java/fr/epita/assistants/test2/Test2Test.java
@@ -0,0 +1,105 @@
+package fr.epita.assistants.test2;
+
+import fr.epita.assistants.server.MyServer;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+import java.io.IOException;
+import java.net.ConnectException;
+
+import static fr.epita.assistants.test2.Test2.*;
+import static org.junit.jupiter.api.Assertions.*;
+
+public class Test2Test {
+ @Test
+ void divPass() {
+ assertEquals(2, division(5, 2));
+ }
+
+ @Test
+ void divFZero() {
+ assertThrows(ArithmeticException.class, () -> division(5, 0));
+ }
+ @Test
+ void divZeroZero() {
+ assertThrows(ArithmeticException.class, () -> division(0, 0));
+ }
+
+ @Test
+ @Timeout(1)
+ void divTimeout() {
+ assertEquals(0, division(0, 2));
+ }
+ @Test
+ @Timeout(1)
+ void divTimeoutFatAss() {
+ assertNotEquals(554468611, division(745343524, 5546344));
+ }
+
+ @Test
+ void divServerPass() throws IOException {
+ MyServer.stopServer();
+ MyServer.launchServer();
+ long actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ MyServer.stopServer();
+ }
+ @Test
+ void divServerSpam() throws IOException {
+ MyServer.stopServer();
+ MyServer.launchServer();
+ long actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ actual = serverGetResponseCode();
+ assertEquals(200, actual);
+
+ MyServer.stopServer();
+ }
+ @Test
+ void divServerNotStarted() {
+ MyServer.stopServer();
+ assertThrows(ConnectException.class, () -> serverGetResponseCode());
+ }
+ @Test
+ @Timeout(1)
+ void divServerTimeout() throws IOException {
+ MyServer.stopServer();
+ MyServer.launchServer();
+ long actual = serverGetResponseCode();
+ assertEquals(200, actual);
+ MyServer.stopServer();
+ }
+ @Test
+ @Timeout(1)
+ void triboFail() {
+ assertThrows(IllegalArgumentException.class, () -> tribonacci(-1));
+ }
+ @Test
+ @Timeout(1)
+ void triboPass() {
+ assertEquals(0, tribonacci(0));
+ assertEquals(1, tribonacci(1));
+ assertEquals(1, tribonacci(2));
+ assertEquals(2, tribonacci(3));
+ assertEquals(4, tribonacci(4));
+ assertEquals(7, tribonacci(5));
+ assertEquals(13, tribonacci(6));
+ assertEquals(1, tribonacci(7));
+ assertEquals(1, tribonacci(8));
+ }
+ @Test
+ @Timeout(1)
+ void triboTime() {
+ assertEquals(-1, tribonacci(Integer.MAX_VALUE));
+ }
+}
diff --git a/graphs/java/threadForkJoin/.gitignore b/graphs/java/threadForkJoin/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/threadForkJoin/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/threadForkJoin/pom.xml b/graphs/java/threadForkJoin/pom.xml
new file mode 100644
index 0000000..8e857e4
--- /dev/null
+++ b/graphs/java/threadForkJoin/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>threadForkJoin</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/threadForkJoin/src/main/java/fr/epita/assistants/forkjoin/MyRecursiveTask.java b/graphs/java/threadForkJoin/src/main/java/fr/epita/assistants/forkjoin/MyRecursiveTask.java
new file mode 100644
index 0000000..5934f92
--- /dev/null
+++ b/graphs/java/threadForkJoin/src/main/java/fr/epita/assistants/forkjoin/MyRecursiveTask.java
@@ -0,0 +1,49 @@
+package fr.epita.assistants.forkjoin;
+
+import java.util.concurrent.ForkJoinTask;
+import java.util.concurrent.RecursiveTask;
+
+public class MyRecursiveTask extends RecursiveTask<Double> {
+ final private double[][] matrix;
+ final private int xLowerBound;
+ final private int xUpperBound;
+ final private int yLowerBound;
+ final private int yUpperBound;
+
+ public MyRecursiveTask(double[][] matrix, int xLowerBound, int xUpperBound, int yLowerBound, int yUpperBound) {
+ this.matrix = matrix;
+ this.xLowerBound = xLowerBound;
+ this.xUpperBound = xUpperBound;
+ this.yLowerBound = yLowerBound;
+ this.yUpperBound = yUpperBound;
+ }
+
+ @Override
+ protected Double compute() {
+ if (xUpperBound - xLowerBound <= 5 && yUpperBound - yLowerBound <= 5) {
+ Double avg = 0.0;
+ for (int j = yLowerBound; j < yUpperBound; j++) {
+ for (int i = xLowerBound; i < xUpperBound; i++) {
+ avg += matrix[j][i];
+ }
+ }
+ if ((xUpperBound - xLowerBound) * (yUpperBound - yLowerBound) == 0)
+ return 0.0;
+ return avg / ((xUpperBound - xLowerBound) * (yUpperBound - yLowerBound));
+ } else {
+ MyRecursiveTask t1 = new MyRecursiveTask(matrix, xLowerBound, xLowerBound + (xUpperBound - xLowerBound) / 2,
+ yLowerBound, yLowerBound + (yUpperBound - yLowerBound) / 2);
+ MyRecursiveTask t2 = new MyRecursiveTask(matrix, xLowerBound + (xUpperBound - xLowerBound) / 2, xUpperBound,
+ yLowerBound, yLowerBound + (yUpperBound - yLowerBound) / 2);
+ MyRecursiveTask t3 = new MyRecursiveTask(matrix, xLowerBound, xLowerBound + (xUpperBound - xLowerBound) / 2,
+ yLowerBound + (yUpperBound - yLowerBound) / 2, yUpperBound);
+ MyRecursiveTask t4 = new MyRecursiveTask(matrix, xLowerBound + (xUpperBound - xLowerBound) / 2, xUpperBound,
+ yLowerBound + (yUpperBound - yLowerBound) / 2, yUpperBound);
+ t1.fork();
+ t2.fork();
+ t3.fork();
+ t4.fork();
+ return (t1.join() + t2.join() + t3.join() + t4.join()) / 4;
+ }
+ }
+} \ No newline at end of file
diff --git a/graphs/java/threadForkJoin/src/test/java/fr/epita/assistants/forkjoin/RecursiveTaskTest.java b/graphs/java/threadForkJoin/src/test/java/fr/epita/assistants/forkjoin/RecursiveTaskTest.java
new file mode 100644
index 0000000..c8f6877
--- /dev/null
+++ b/graphs/java/threadForkJoin/src/test/java/fr/epita/assistants/forkjoin/RecursiveTaskTest.java
@@ -0,0 +1,34 @@
+package fr.epita.assistants.forkjoin;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.Timeout;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@Timeout(1)
+public class RecursiveTaskTest {
+ @Test
+ void exampleTest() {
+ // Create a Matrix
+ double[][] matrix = new double[][]{
+ new double[]{10, 52, 100, 50, 74, 25},
+ new double[]{10, 52, 100, 50, 74, 25},
+ new double[]{10, 52, 100, 50, 74, 25},
+ new double[]{10, 52, 100, 50, 74, 25},
+ new double[]{10, 52, 100, 50, 74, 25},
+ new double[]{10, 52, 100, 50, 74, 25}
+ };
+ double expected = 51.83;
+
+ MyRecursiveTask mrt = new MyRecursiveTask(matrix, 0, matrix[0].length, 0, matrix.length);
+
+ // Fork and join task
+ mrt.fork();
+ double got = mrt.join();
+
+ // Need delta because of 'double' type
+ assertEquals(expected, got, 0.01);
+ }
+
+ // Write your tests here ...
+}
diff --git a/graphs/java/throwback/.gitignore b/graphs/java/throwback/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/throwback/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/throwback/pom.xml b/graphs/java/throwback/pom.xml
new file mode 100644
index 0000000..ca306b0
--- /dev/null
+++ b/graphs/java/throwback/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>throwback</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/IntegerException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/IntegerException.java
new file mode 100644
index 0000000..7bc7337
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/IntegerException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public abstract class IntegerException extends Exception{
+ public IntegerException(String message) {
+ super("IntegerException: " + message);
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/LongStringException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/LongStringException.java
new file mode 100644
index 0000000..687c654
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/LongStringException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public class LongStringException extends StringException {
+ public LongStringException(String message) {
+ super("LongStringException: " + message + " (length: " + message.length() + ")");
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/NegativeIntegerException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/NegativeIntegerException.java
new file mode 100644
index 0000000..ce84fc1
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/NegativeIntegerException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public class NegativeIntegerException extends IntegerException {
+ public NegativeIntegerException(String message) {
+ super("NegativeIntegerException: " + message);
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/Pitcher.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/Pitcher.java
new file mode 100644
index 0000000..7093b08
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/Pitcher.java
@@ -0,0 +1,21 @@
+package fr.epita.assistants.throwback;
+
+import java.util.regex.Pattern;
+
+public class Pitcher {
+ public static void throwException(String message) throws
+ LongStringException, ShortStringException,
+ PositiveIntegerException, NegativeIntegerException,
+ UnknownException {
+ if (Pattern.matches("[0-9]+", message))
+ throw new PositiveIntegerException(message);
+ else if (Pattern.matches("-[0-9]+", message))
+ throw new NegativeIntegerException(message);
+ else if (Pattern.matches("[a-zA-Z ,.']{100,}", message))
+ throw new LongStringException(message);
+ else if (Pattern.matches("[a-zA-Z ,.']{1,100}", message))
+ throw new ShortStringException(message);
+ else
+ throw new UnknownException(message);
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/PositiveIntegerException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/PositiveIntegerException.java
new file mode 100644
index 0000000..124fcf1
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/PositiveIntegerException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public class PositiveIntegerException extends IntegerException{
+ public PositiveIntegerException(String message) {
+ super("PositiveIntegerException: " + message);
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/ShortStringException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/ShortStringException.java
new file mode 100644
index 0000000..28e5eda
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/ShortStringException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public class ShortStringException extends StringException {
+ public ShortStringException(String message) {
+ super("ShortStringException: " + message + " (length: " + message.length() + ")");
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/StringException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/StringException.java
new file mode 100644
index 0000000..03f10aa
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/StringException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public abstract class StringException extends Exception {
+ public StringException(String message) {
+ super("StringException: " + message);
+ }
+}
diff --git a/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/UnknownException.java b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/UnknownException.java
new file mode 100644
index 0000000..005ecee
--- /dev/null
+++ b/graphs/java/throwback/src/main/java/fr/epita/assistants/throwback/UnknownException.java
@@ -0,0 +1,7 @@
+package fr.epita.assistants.throwback;
+
+public class UnknownException extends Exception{
+ public UnknownException(String message) {
+ super("UnknownException: " + message);
+ }
+}
diff --git a/graphs/java/travel/.gitignore b/graphs/java/travel/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/travel/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/travel/pom.xml b/graphs/java/travel/pom.xml
new file mode 100644
index 0000000..671d430
--- /dev/null
+++ b/graphs/java/travel/pom.xml
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>travel</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ <dependency>
+ <groupId>com.opencsv</groupId>
+ <artifactId>opencsv</artifactId>
+ <version>4.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Country.java b/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Country.java
new file mode 100644
index 0000000..e616e64
--- /dev/null
+++ b/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Country.java
@@ -0,0 +1,44 @@
+package fr.epita.assistants.travel;
+
+import com.opencsv.CSVReader;
+
+import java.io.FileReader;
+import java.time.ZoneId;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+
+public class Country {
+ String countryName;
+ public Map<String, Integer> travelTimes;
+ ZoneId countryZone;
+ String filename;
+
+ public Country(String countryName, String countryZone, String inputFilePath) {
+ this.countryName = countryName;
+ this.countryZone = ZoneId.of(countryZone);
+ this.filename = inputFilePath;
+ this.travelTimes = initTravelTimes(inputFilePath);
+ }
+
+ public Map<String, Integer> initTravelTimes(String inputFilePath) {
+ Map<String, Integer> res = new HashMap<>();
+ try {
+ CSVReader c = new CSVReader(new FileReader(inputFilePath));
+ List<String[]> lines = c.readAll();
+ lines.removeFirst();
+ for (String[] line : lines) {
+ if (Objects.equals(line[0], this.countryName)) {
+ res.put(line[1], Integer.parseInt(line[2]));
+ }
+ else if (Objects.equals(line[1], this.countryName)) {
+ res.put(line[0], Integer.parseInt(line[2]));
+ }
+ }
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ return res;
+ }
+}
diff --git a/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Travel.java b/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Travel.java
new file mode 100644
index 0000000..9302e18
--- /dev/null
+++ b/graphs/java/travel/src/main/java/fr/epita/assistants/travel/Travel.java
@@ -0,0 +1,13 @@
+package fr.epita.assistants.travel;
+
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+
+public class Travel {
+ public static void travelTo(Country source, Country destination) {
+ ZonedDateTime t1 = ZonedDateTime.now(source.countryZone);
+ ZonedDateTime t2 = ZonedDateTime.now(destination.countryZone).plusHours(source.travelTimes.get(destination.countryName));
+ System.out.println("Boarding in " + source.countryName + ", local date and time is: " + t1.format(DateTimeFormatter.RFC_1123_DATE_TIME));
+ System.out.println("Landing in " + destination.countryName + ", local date and time on arrival will be: " + t2.format(DateTimeFormatter.RFC_1123_DATE_TIME));
+ }
+}
diff --git a/graphs/java/travel/src/main/resources/travel_times.csv b/graphs/java/travel/src/main/resources/travel_times.csv
new file mode 100644
index 0000000..a6b720b
--- /dev/null
+++ b/graphs/java/travel/src/main/resources/travel_times.csv
@@ -0,0 +1,29 @@
+source,destination,travel_time
+France,Italy,1
+France,England,2
+France,Vietnam,12
+France,Chicago,9
+France,Brazil,12
+France,Egypt,4
+France,Australia,24
+Italy,England,3
+Italy,Vietnam,11
+Italy,Chicago,9
+Italy,Brazil,12
+Italy,Egypt,3
+Italy,Australia,17
+England,Vietnam,12
+England,Chicago,11
+England,Brazil,12
+England,Egypt,5
+England,Australia,21
+Vietnam,Chicago,21
+Vietnam,Brazil,21
+Vietnam,Egypt,17
+Vietnam,Australia,6
+Chicago,Brazil,13
+Chicago,Egypt,13
+Chicago,Australia,21
+Brazil,Egypt,17
+Brazil,Australia,21
+Egypt,Australia,19 \ No newline at end of file
diff --git a/graphs/java/triad/flake.nix b/graphs/java/triad/flake.nix
new file mode 100644
index 0000000..6bf8d07
--- /dev/null
+++ b/graphs/java/triad/flake.nix
@@ -0,0 +1,29 @@
+{
+ description = "Java 2027";
+
+ inputs = {
+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
+ flake-utils.url = "github:numtide/flake-utils";
+ };
+
+ outputs = { self, nixpkgs, flake-utils, ... }:
+ flake-utils.lib.eachDefaultSystem (system:
+ let
+ pkgs = import nixpkgs {
+ inherit system;
+ };
+ in
+ with pkgs;
+ {
+ devShell = mkShell {
+ buildInputs = [
+ jdk21_headless
+ postgresql
+ quarkus
+ maven
+ nodejs_22
+ ];
+ };
+ }
+ );
+}
diff --git a/graphs/java/triad/pom.xml b/graphs/java/triad/pom.xml
new file mode 100644
index 0000000..66ce68d
--- /dev/null
+++ b/graphs/java/triad/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>triad</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/triad/src/main/java/fr/epita/assistants/triad/FixMyMistake.java b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/FixMyMistake.java
new file mode 100644
index 0000000..b5fa908
--- /dev/null
+++ b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/FixMyMistake.java
@@ -0,0 +1,9 @@
+package fr.epita.assistants.triad;
+
+public class FixMyMistake {
+ public static String myEasyFunction() {
+ // Place your cursor below on aMagicNumber and press Alt+Enter to fix the issue so that the method returns 43
+ final String aMagicNumber = "43";
+ return aMagicNumber;
+ }
+}
diff --git a/graphs/java/triad/src/main/java/fr/epita/assistants/triad/UglyClass.java b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/UglyClass.java
new file mode 100644
index 0000000..75b714d
--- /dev/null
+++ b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/UglyClass.java
@@ -0,0 +1,36 @@
+package fr.epita.assistants.triad;
+
+import java.util.List;
+import java.util.function.Function;
+
+public class UglyClass {
+ public static List<WriteGettersAndConstructorForMe> getMyMessWithParameters() {
+ return myNotSoUsefulMethod();
+ }
+
+ private static List<WriteGettersAndConstructorForMe> myNotSoUsefulMethod() {
+ if (false) {
+ return List.of();
+ } else
+ return List.of(new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne"
+ , "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false),
+ new WriteGettersAndConstructorForMe("name", "firstName", "lastName", "random", "anotherOne",
+ "anotherOne2", "anotherOne3", "xyz", 1, 2.0, 3.0f, true, false)).stream().filter(parameter -> parameter.getName().equals("name")).map(Function.identity()).toList();
+ }
+}
diff --git a/graphs/java/triad/src/main/java/fr/epita/assistants/triad/WriteGettersAndConstructorForMe.java b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/WriteGettersAndConstructorForMe.java
new file mode 100644
index 0000000..794a8f6
--- /dev/null
+++ b/graphs/java/triad/src/main/java/fr/epita/assistants/triad/WriteGettersAndConstructorForMe.java
@@ -0,0 +1,98 @@
+package fr.epita.assistants.triad;
+
+public class WriteGettersAndConstructorForMe {
+ private final String name;
+
+ public String getName() {
+ return name;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public String getRandom() {
+ return random;
+ }
+
+ public String getAnotherOne() {
+ return anotherOne;
+ }
+
+ public boolean isC() {
+ return c;
+ }
+
+ public Boolean getB() {
+ return b;
+ }
+
+ public float getZ() {
+ return z;
+ }
+
+ public double getY() {
+ return y;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public String getXyz() {
+ return xyz;
+ }
+
+ public String getAnotherOne3() {
+ return anotherOne3;
+ }
+
+ public String getAnotherOne2() {
+ return anotherOne2;
+ }
+
+ public WriteGettersAndConstructorForMe(String name, String firstName, String lastName, String random, String anotherOne, String anotherOne2, String anotherOne3, String xyz, int x, double y, float z, Boolean b, boolean c) {
+ this.name = name;
+ this.firstName = firstName;
+ this.lastName = lastName;
+ this.random = random;
+ this.anotherOne = anotherOne;
+ this.anotherOne2 = anotherOne2;
+ this.anotherOne3 = anotherOne3;
+ this.xyz = xyz;
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ this.b = b;
+ this.c = c;
+ }
+
+ private final String firstName;
+ private final String lastName;
+
+ private final String random;
+
+ private final String anotherOne;
+
+ private final String anotherOne2;
+
+ private final String anotherOne3;
+
+ private final String xyz;
+
+ private final int x;
+
+ private final double y;
+
+ private final float z;
+
+ private final Boolean b;
+
+ private final boolean c;
+
+ // FIXME: Add a constructor with all the parameters and all the getters
+}
diff --git a/graphs/java/war/.gitignore b/graphs/java/war/.gitignore
new file mode 100644
index 0000000..5ff6309
--- /dev/null
+++ b/graphs/java/war/.gitignore
@@ -0,0 +1,38 @@
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### IntelliJ IDEA ###
+.idea/modules.xml
+.idea/jarRepositories.xml
+.idea/compiler.xml
+.idea/libraries/
+*.iws
+*.iml
+*.ipr
+
+### Eclipse ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/
+
+### Mac OS ###
+.DS_Store \ No newline at end of file
diff --git a/graphs/java/war/pom.xml b/graphs/java/war/pom.xml
new file mode 100644
index 0000000..99cb248
--- /dev/null
+++ b/graphs/java/war/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>fr.epita.assistants</groupId>
+ <artifactId>war</artifactId>
+ <version>1.0</version>
+
+ <properties>
+ <versions.java>21</versions.java>
+ <versions.junit>5.9.1</versions.junit>
+ <versions.maven-compiler-plugin>3.13.0</versions.maven-compiler-plugin>
+ <versions.maven-surefire-plugin>3.5.0</versions.maven-surefire-plugin>
+ <versions.maven-jar-plugin>3.1.1</versions.maven-jar-plugin>
+ <versions.maven-install-plugin>3.1.0</versions.maven-install-plugin>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <surefire.reportsDirectory>${project.build.directory}/surefire-reports</surefire.reportsDirectory>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter</artifactId>
+ <version>${versions.junit}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.surefire</groupId>
+ <artifactId>surefire-junit-platform</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-compat</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>3.9.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-project</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-monitor</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-utils</artifactId>
+ <version>3.0.24</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-filtering</artifactId>
+ <version>3.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.plexus</groupId>
+ <artifactId>plexus-interpolation</artifactId>
+ <version>1.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-profile</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-artifact-manager</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-registry</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-repository-metadata</artifactId>
+ <version>2.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>classworlds</groupId>
+ <artifactId>classworlds</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.junit.platform</groupId>
+ <artifactId>junit-platform-commons</artifactId>
+ <version>1.9.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${versions.maven-compiler-plugin}</version>
+ <configuration>
+ <source>${versions.java}</source>
+ <target>${versions.java}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>${versions.maven-install-plugin}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${versions.maven-surefire-plugin}</version>
+ <configuration>
+ <reportsDirectory>${surefire.reportsDirectory}</reportsDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/graphs/java/war/src/main/java/fr/epita/assistants/war/Assassin.java b/graphs/java/war/src/main/java/fr/epita/assistants/war/Assassin.java
new file mode 100644
index 0000000..3415e41
--- /dev/null
+++ b/graphs/java/war/src/main/java/fr/epita/assistants/war/Assassin.java
@@ -0,0 +1,9 @@
+package fr.epita.assistants.war;
+
+public class Assassin extends Soldier{
+ public Assassin() {
+ this.health = 10;
+ this.damage = 9;
+ this.scream = "Out of the shadows!";
+ }
+}
diff --git a/graphs/java/war/src/main/java/fr/epita/assistants/war/Combatant.java b/graphs/java/war/src/main/java/fr/epita/assistants/war/Combatant.java
new file mode 100644
index 0000000..5dc9af4
--- /dev/null
+++ b/graphs/java/war/src/main/java/fr/epita/assistants/war/Combatant.java
@@ -0,0 +1,12 @@
+package fr.epita.assistants.war;
+
+public abstract class Combatant {
+ void printState()
+ {
+ System.err.println("Error 404. Class not found.");
+ }
+
+ abstract void attack(Soldier s);
+ abstract void attack(Vehicle v);
+ abstract void scream();
+}
diff --git a/graphs/java/war/src/main/java/fr/epita/assistants/war/Knight.java b/graphs/java/war/src/main/java/fr/epita/assistants/war/Knight.java
new file mode 100644
index 0000000..1258434
--- /dev/null
+++ b/graphs/java/war/src/main/java/fr/epita/assistants/war/Knight.java
@@ -0,0 +1,9 @@
+package fr.epita.assistants.war;
+
+public class Knight extends Soldier {
+ public Knight() {
+ this.health = 20;
+ this.damage = 5;
+ this.scream = "Be quick or be dead!";
+ }
+}
diff --git a/graphs/java/war/src/main/java/fr/epita/assistants/war/Soldier.java b/graphs/java/war/src/main/java/fr/epita/assistants/war/Soldier.java
new file mode 100644
index 0000000..67c3897
--- /dev/null
+++ b/graphs/java/war/src/main/java/fr/epita/assistants/war/Soldier.java
@@ -0,0 +1,38 @@
+package fr.epita.assistants.war;
+
+public class Soldier extends Combatant {
+ int health;
+ int damage;
+ String scream;
+
+ public Soldier() {
+ this.health = 15;
+ this.damage = 3;
+ this.scream = "No pity for losers!";
+ }
+
+ public void kill(){
+ this.health = 0;
+ }
+
+ @Override
+ public void printState()
+ {
+ System.out.println("I have " + this.health + " health points.");
+ }
+
+ @Override
+ public void attack(Soldier s) {
+ s.health -= this.damage;
+ }
+
+ @Override
+ public void attack(Vehicle v) {
+ System.out.println("I can't fight this.");
+ }
+
+ @Override
+ public void scream() {
+ System.out.println(this.scream);
+ }
+}
diff --git a/graphs/java/war/src/main/java/fr/epita/assistants/war/Vehicle.java b/graphs/java/war/src/main/java/fr/epita/assistants/war/Vehicle.java
new file mode 100644
index 0000000..b27d072
--- /dev/null
+++ b/graphs/java/war/src/main/java/fr/epita/assistants/war/Vehicle.java
@@ -0,0 +1,32 @@
+package fr.epita.assistants.war;
+
+public class Vehicle extends Combatant{
+ String name;
+ int defense;
+
+ public Vehicle(String name, int defense) {
+ this.name = name;
+ this.defense = defense;
+ }
+
+ @Override
+ public void printState()
+ {
+ System.out.println("I have " + this.defense + " defense points.");
+ }
+
+ @Override
+ public void attack(Soldier s) {
+ s.kill();
+ }
+
+ @Override
+ public void attack(Vehicle v) {
+ v.defense /= 2;
+ }
+
+ @Override
+ public void scream() {
+ System.out.println("I'm " + this.name + "!");
+ }
+}