File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed
src/main/java/net/onelitefeather/guira/functional Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change 1+ package net .onelitefeather .guira .functional ;
2+
3+ import net .onelitefeather .guira .data .SetupData ;
4+ import org .jetbrains .annotations .NotNull ;
5+ import org .jetbrains .annotations .Nullable ;
6+
7+ import java .util .Optional ;
8+ import java .util .UUID ;
9+
10+ /**
11+ * Functional interface for getting setup data associated with a specific {@link UUID}.
12+ *
13+ * @author theEvilReaper
14+ * @version 0.1.0
15+ * @since 0.3.0
16+ */
17+ @ FunctionalInterface
18+ public interface OptionalSetupGetter {
19+
20+ /**
21+ * Gets the setup data for the given {@link UUID}.
22+ *
23+ * @param uuid the {@link UUID} of the player
24+ * @return an Optional containing the setup data if it exists, or an empty Optional if it does not
25+ */
26+ @ NotNull Optional <@ Nullable SetupData > get (@ NotNull UUID uuid );
27+ }
Original file line number Diff line number Diff line change 1+ package net .onelitefeather .guira .functional ;
2+
3+ import net .onelitefeather .guira .data .SetupData ;
4+ import org .jetbrains .annotations .NotNull ;
5+ import org .jetbrains .annotations .Nullable ;
6+
7+ import java .util .UUID ;
8+
9+ /**
10+ * Functional interface for getting setup data associated with a specific {@link UUID}.
11+ *
12+ * @author theEvilReaper
13+ * @version 0.1.0
14+ * @since 0.3.0
15+ */
16+ @ FunctionalInterface
17+ public interface SetupDataGetter {
18+
19+ /**
20+ * Retrieves the setup data for the specified {@link UUID}.
21+ *
22+ * @param uuid the {@link UUID} of the player
23+ * @return the setup data associated with the {@link UUID}, or null if no data exists
24+ */
25+ @ Nullable SetupData getData (@ NotNull UUID uuid );
26+ }
You can’t perform that action at this time.
0 commit comments