Skip to content

Commit 140993d

Browse files
committed
final face lift of 1.6
1 parent 6407a47 commit 140993d

File tree

41 files changed

+267
-251
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+267
-251
lines changed

.run/CoreMaster.run.xml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
<component name="ProjectRunConfigurationManager">
2-
<configuration default="false" name="CoreMaster" type="Application" factoryName="Application" nameIsGenerated="true">
3-
<option name="MAIN_CLASS_NAME" value="net.juligames.core.master.CoreMaster" />
4-
<module name="Master" />
5-
<option name="PROGRAM_PARAMETERS" value="--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED" />
6-
<option name="VM_PARAMETERS" value="-Dhazelcast.diagnostics.enabled=true -DcoreDebug=true " />
7-
<extension name="coverage">
8-
<pattern>
9-
<option name="PATTERN" value="net.juligames.core.master.*" />
10-
<option name="ENABLED" value="true" />
11-
</pattern>
12-
</extension>
13-
<method v="2">
14-
<option name="Make" enabled="true" />
15-
</method>
16-
</configuration>
2+
<configuration default="false" name="CoreMaster" type="Application" factoryName="Application"
3+
nameIsGenerated="true">
4+
<option name="MAIN_CLASS_NAME" value="net.juligames.core.master.CoreMaster"/>
5+
<module name="Master"/>
6+
<option name="PROGRAM_PARAMETERS"
7+
value="--add-modules java.se --add-exports java.base/jdk.internal.ref=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED"/>
8+
<option name="VM_PARAMETERS" value="-Dhazelcast.diagnostics.enabled=true -DcoreDebug=true "/>
9+
<extension name="coverage">
10+
<pattern>
11+
<option name="PATTERN" value="net.juligames.core.master.*"/>
12+
<option name="ENABLED" value="true"/>
13+
</pattern>
14+
</extension>
15+
<method v="2">
16+
<option name="Make" enabled="true"/>
17+
</method>
18+
</configuration>
1719
</component>

API/src/main/java/net/juligames/core/api/API.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ public interface API extends Logging {
152152

153153
/**
154154
* When using a {@link LogManager} you should use {@link API#getJavaLogManager()} to get hold of it
155+
*
155156
* @return an {@link LogManager} instance that is or acts like {@link LogManager#getLogManager()}
156157
* @apiNote This is not associated with the {@link de.bentzin.tools.logging} package and environment
157158
*/

API/src/main/java/net/juligames/core/api/config/EnumInterpreter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
* }
3131
* }
3232
* </pre>
33+
*
3334
* @author Ture Bentzin
3435
* 15.03.2023
35-
3636
*/
3737
@ApiStatus.AvailableSince("1.5")
3838
@ApiStatus.Experimental

API/src/main/java/net/juligames/core/api/config/Interpreter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* This is an example implementation for interpreting Integers
1515
* <pre>
1616
* {@code
17-
17+
*
1818
* public final class IntegerInterpreter implements Interpreter<Integer> {
1919
*
2020
* @Override
@@ -93,7 +93,7 @@ default <R> void reverseAndThenComplete(@NotNull T t, @NotNull CompletableFuture
9393
* CompletableFuture with the result of the interpretation. This process is known as "interpreting the input as an
9494
* instance of Type T". If the interpretation fails, an Exception will be thrown.
9595
*
96-
* @param input the input to be interpreted
96+
* @param input the input to be interpreted
9797
* @param completableFuture the CompletableFuture that should be completed with the result of the interpretation
9898
* @throws Exception will be thrown if the input cant be interpreted according to this implementation
9999
*/

API/src/main/java/net/juligames/core/api/config/PrimitiveInterpreter.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55

66
/**
77
* This might be used later outside of this package
8+
*
89
* @author Ture Bentzin
910
* 12.04.2023
1011
*/
1112
@ApiStatus.Internal
1213
@ApiStatus.AvailableSince("1.6")
13-
public sealed interface PrimitiveInterpreter<T> permits Interpreter{
14+
public sealed interface PrimitiveInterpreter<T> permits Interpreter {
1415

1516
/**
1617
* Converts the given input according to this implementation to a given Object of the provided Type.
1718
* This process is known as "interpreting the input as an instance of Type T"
19+
*
1820
* @param input the input to be interpreted
1921
* @return the instance of T that results the interpretation
2022
* @throws Exception will be thrown if the input cant be interpreted according to this implementation

API/src/main/java/net/juligames/core/api/config/Reverser.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ public sealed interface Reverser<T> permits Interpreter, Reverser.PrivateReverse
1818

1919
/**
2020
* The function#apply should never return null
21+
*
2122
* @param function the function
23+
* @param <T> Type
2224
* @return a reverser based on the function
23-
* @param <T> Type
2425
*/
2526
@Contract(pure = true)
2627
static <T> @NotNull Reverser<T> ofFunctional(@NotNull Function<T, String> function) {
@@ -30,9 +31,10 @@ public sealed interface Reverser<T> permits Interpreter, Reverser.PrivateReverse
3031
/**
3132
* This will return a new {@link Reverser} that will execute the {@link #reverse(Object)} method from the given
3233
* tReverser. This only benefits of you want to prevent casting this {@link Reverser} to a {@link Interpreter}!
34+
*
3335
* @param tReverser the reverser
36+
* @param <T> T
3437
* @return a new reverser
35-
* @param <T> T
3638
*/
3739
@ApiStatus.Experimental
3840
@Contract(pure = true)
@@ -44,8 +46,9 @@ public sealed interface Reverser<T> permits Interpreter, Reverser.PrivateReverse
4446
* This {@link Reverser} will reverse the given object ONLY based on its toString!
4547
* Should only be used with EXTREME caution!
4648
* This does not respect {@link CustomInterpretable}
47-
* @return a new reverser
49+
*
4850
* @param <T> T
51+
* @return a new reverser
4952
*/
5053
@ApiStatus.Experimental
5154
@Contract(pure = true)
@@ -57,8 +60,9 @@ public sealed interface Reverser<T> permits Interpreter, Reverser.PrivateReverse
5760
* This {@link Reverser} will reverse the given object ONLY based on its {@link String#valueOf(Object)}!
5861
* Should only be used with EXTREME caution!
5962
* This does not respect {@link CustomInterpretable}
60-
* @return a new reverser
63+
*
6164
* @param <T> T
65+
* @return a new reverser
6266
*/
6367
@ApiStatus.Experimental
6468
@Contract(pure = true)
@@ -81,6 +85,7 @@ public sealed interface Reverser<T> permits Interpreter, Reverser.PrivateReverse
8185

8286
/**
8387
* Meant ONLY for use with {@link #ofFunctional(Function)}
88+
*
8489
* @param <T> the type
8590
*/
8691
@ApiStatus.Internal

API/src/main/java/net/juligames/core/api/config/mapbacked/DictionaryFeedInterpreter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public DictionaryFeedInterpreter(@NotNull Supplier<Dictionary<String, E>> dictio
3232
/**
3333
* Constructs a new {@link DictionaryFeedInterpreter} instance with the given dictionary supplier and map part factory.
3434
*
35-
* @param dictionarySupplier the supplier to use to provide the backing dictionary
35+
* @param dictionarySupplier the supplier to use to provide the backing dictionary
3636
* @param dictionaryPartFactory the function to use to create map parts based on the dictionary and the key
3737
*/
3838
public DictionaryFeedInterpreter(@NotNull Supplier<Dictionary<String, E>> dictionarySupplier,
@@ -64,7 +64,7 @@ public DictionaryFeedInterpreter(@NotNull Supplier<Dictionary<String, E>> dictio
6464
/**
6565
* Creates a new map part with the given key and dictionary supplier using the factory function.
6666
*
67-
* @param key the key of the new map part
67+
* @param key the key of the new map part
6868
* @param dictionarySupplier the dictionary supplier to use for the new map part
6969
* @return the newly created map part
7070
*/

API/src/main/java/net/juligames/core/api/config/mapbacked/MapFeedInterpreter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ public MapFeedInterpreter(@NotNull Supplier<Map<String, E>> mapSupplier,
4949
}
5050

5151
public @NotNull MapPart<E> fabricate(@NotNull String key, @NotNull Supplier<Map<String, E>> mapSupplier) {
52-
return mapPartFactory.apply(key,mapSupplier);
52+
return mapPartFactory.apply(key, mapSupplier);
5353
}
5454

5555
protected @NotNull MapPart<E> fabricate(@NotNull String key) {
56-
return mapPartFactory.apply(key,mapSupplier);
56+
return mapPartFactory.apply(key, mapSupplier);
5757
}
5858

5959
private record MapPartImpl<E>(String key, Supplier<Map<String, E>> mapSupplier) implements MapPart<E> {

API/src/main/java/net/juligames/core/api/config/property/PropertyInterpreter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* be used as the "key" for getting the property. If you {@link #reverse(Object)} then {@link String#valueOf(Object)}
1313
* will be used
1414
* <p>
15-
* This is an example on how to use the {@link PropertyInterpreter} specifically the {@link PropertyInterpreter#stringPropertyInterpreter()}
15+
* This is an example on how to use the {@link PropertyInterpreter} specifically the {@link PropertyInterpreter#stringPropertyInterpreter()}
1616
* </p>
1717
* <pre>
1818
* {@code

API/src/main/java/net/juligames/core/api/config/representations/Interpretation.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* 17.04.2023
1010
*/
1111
@ApiStatus.AvailableSince("1.6")
12-
public abstract class Interpretation<T> implements Representation<T>{
12+
public abstract class Interpretation<T> implements Representation<T> {
13+
14+
public final @NotNull PrimitiveInterpreter<T> interpreter;
1315

1416
public Interpretation(@NotNull PrimitiveInterpreter<T> interpreter) {
1517
this.interpreter = interpreter;
1618
}
1719

18-
public final @NotNull PrimitiveInterpreter<T> interpreter;
19-
2020
@Override
2121
public final @NotNull T represent() {
2222
try {

0 commit comments

Comments
 (0)