diff --git a/src/main/java/com/pixelgamelibrary/api/GameI.java b/src/main/java/com/pixelgamelibrary/api/Game.java similarity index 91% rename from src/main/java/com/pixelgamelibrary/api/GameI.java rename to src/main/java/com/pixelgamelibrary/api/Game.java index 260106b..129a484 100644 --- a/src/main/java/com/pixelgamelibrary/api/GameI.java +++ b/src/main/java/com/pixelgamelibrary/api/Game.java @@ -23,13 +23,13 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public interface GameI extends ApplicationListener { +public interface Game extends ApplicationListener { void create(); - void setScreen(ScreenI screen); + void setScreen(Screen screen); - ScreenI getScreen(); + Screen getScreen(); void render(); diff --git a/src/main/java/com/pixelgamelibrary/api/GameAdapter.java b/src/main/java/com/pixelgamelibrary/api/GameAdapter.java index 200a530..47ce18b 100644 --- a/src/main/java/com/pixelgamelibrary/api/GameAdapter.java +++ b/src/main/java/com/pixelgamelibrary/api/GameAdapter.java @@ -24,9 +24,9 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public class GameAdapter implements GameI { +public class GameAdapter implements Game { - private ScreenI screen; + private Screen screen; private OnSetScreenListener setOnSetScreenListener; @Override public void create() { @@ -34,7 +34,7 @@ public class GameAdapter implements GameI { } @Override - public void setScreen(ScreenI screen) { + public void setScreen(Screen screen) { this.screen = screen; System.out.println("setOnSetScreenListener=" + setOnSetScreenListener); if(setOnSetScreenListener != null) { @@ -44,7 +44,7 @@ public class GameAdapter implements GameI { } @Override - public ScreenI getScreen() { + public Screen getScreen() { return screen; } diff --git a/src/main/java/com/pixelgamelibrary/api/GameWrapper.java b/src/main/java/com/pixelgamelibrary/api/GameWrapper.java index fcb2321..4455191 100644 --- a/src/main/java/com/pixelgamelibrary/api/GameWrapper.java +++ b/src/main/java/com/pixelgamelibrary/api/GameWrapper.java @@ -25,11 +25,11 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public class GameWrapper implements GameI { +public class GameWrapper implements Game { - private final GameI game; + private final Game game; - public GameWrapper(GameI gameI) { + public GameWrapper(Game gameI) { this.game = gameI; } @@ -39,12 +39,12 @@ public class GameWrapper implements GameI { } @Override - public void setScreen(ScreenI screen) { + public void setScreen(Screen screen) { game.setScreen(screen); } @Override - public ScreenI getScreen() { + public Screen getScreen() { return game.getScreen(); } diff --git a/src/main/java/com/pixelgamelibrary/api/OnSetScreenListener.java b/src/main/java/com/pixelgamelibrary/api/OnSetScreenListener.java index c18db40..0fce302 100644 --- a/src/main/java/com/pixelgamelibrary/api/OnSetScreenListener.java +++ b/src/main/java/com/pixelgamelibrary/api/OnSetScreenListener.java @@ -25,6 +25,6 @@ package com.pixelgamelibrary.api; * @author robertvokac */ public interface OnSetScreenListener { - void onSetScreen(ScreenI screen); + void onSetScreen(Screen screen); } diff --git a/src/main/java/com/pixelgamelibrary/api/Pixel.java b/src/main/java/com/pixelgamelibrary/api/Pixel.java index 389ccd6..d4621ef 100644 --- a/src/main/java/com/pixelgamelibrary/api/Pixel.java +++ b/src/main/java/com/pixelgamelibrary/api/Pixel.java @@ -19,16 +19,15 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.pixelgamelibrary.api; -import com.pixelgamelibrary.api.interfaces.AppI; -import com.pixelgamelibrary.api.interfaces.AssetI; -import com.pixelgamelibrary.api.interfaces.AudioI; -import com.pixelgamelibrary.api.interfaces.GraphicsI; -import com.pixelgamelibrary.api.interfaces.InputI; -import com.pixelgamelibrary.api.interfaces.InternalI; -import com.pixelgamelibrary.api.interfaces.NetI; import com.pixelgamelibrary.api.interfaces.PixelBackend; -import com.pixelgamelibrary.api.interfaces.StorageI; -import com.pixelgamelibrary.api.interfaces.UtilsI; +import com.pixelgamelibrary.api.interfaces.Files; +import com.pixelgamelibrary.api.interfaces.Audio; +import com.pixelgamelibrary.api.interfaces.Graphics; +import com.pixelgamelibrary.api.interfaces.Input; +import com.pixelgamelibrary.api.interfaces.Internal; +import com.pixelgamelibrary.api.interfaces.Net; +import com.pixelgamelibrary.api.interfaces.Utils; +import com.pixelgamelibrary.api.interfaces.App; /** * @@ -47,39 +46,35 @@ public class Pixel { } //// - public static AppI app() { + public static App app() { return get().app(); } - public static GraphicsI graphics() { + public static Graphics graphics() { return get().graphics(); } - public static AudioI audio() { + public static Audio audio() { return get().audio(); } - public static InputI input() { + public static Input input() { return get().input(); } - public static NetI net() { + public static Net net() { return get().net(); } - public static AssetI asset() { - return get().asset(); + public static Files files() { + return get().files(); } - public static StorageI storage() { - return get().storage(); - } - - public static UtilsI utils() { + public static Utils utils() { return get().utils(); } - public static InternalI internal() { + public static Internal internal() { return get().internal(); } //// diff --git a/src/main/java/com/pixelgamelibrary/api/PixelApplication.java b/src/main/java/com/pixelgamelibrary/api/PixelApplication.java index 2a3661b..38d89a7 100644 --- a/src/main/java/com/pixelgamelibrary/api/PixelApplication.java +++ b/src/main/java/com/pixelgamelibrary/api/PixelApplication.java @@ -27,12 +27,12 @@ import java.util.Map; * @author robertvokac */ public abstract class PixelApplication { - abstract public GameI createGameViaMap(Map objects); + abstract public Game createGameViaMap(Map objects); - public GameI createGame() { + public Game createGame() { return createGame(new HashMap<>()); } - public GameI createGame(Object... objects) { + public Game createGame(Object... objects) { Map map = new HashMap<>(); int i = 0; int maxI = objects.length - 1; diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/AssetI.java b/src/main/java/com/pixelgamelibrary/api/PixelFeature.java similarity index 85% rename from src/main/java/com/pixelgamelibrary/api/interfaces/AssetI.java rename to src/main/java/com/pixelgamelibrary/api/PixelFeature.java index fbb10ec..fcf28c7 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/AssetI.java +++ b/src/main/java/com/pixelgamelibrary/api/PixelFeature.java @@ -17,14 +17,20 @@ // or write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////////////////////////////// -package com.pixelgamelibrary.api.interfaces; - -import com.pixelgamelibrary.api.storage.Storage; +package com.pixelgamelibrary.api; /** * * @author robertvokac */ -public interface AssetI { - Storage getAssets(); +public enum PixelFeature { + SOCKETS, + WEBSOCKETS, + AUDIO, + TOUCHSCREEN, + ACCELERATOR, + GYROSCOP, + VIBRATION, + MOUSE, + KEYBOARD; } diff --git a/src/main/java/com/pixelgamelibrary/api/ScreenI.java b/src/main/java/com/pixelgamelibrary/api/Screen.java similarity index 95% rename from src/main/java/com/pixelgamelibrary/api/ScreenI.java rename to src/main/java/com/pixelgamelibrary/api/Screen.java index 2b35551..1f1b956 100644 --- a/src/main/java/com/pixelgamelibrary/api/ScreenI.java +++ b/src/main/java/com/pixelgamelibrary/api/Screen.java @@ -23,7 +23,7 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public interface ScreenI extends ApplicationListener { +public interface Screen extends ApplicationListener { void render(float delta); } diff --git a/src/main/java/com/pixelgamelibrary/api/ScreenAdapter.java b/src/main/java/com/pixelgamelibrary/api/ScreenAdapter.java index 2851ea6..8e6f2eb 100644 --- a/src/main/java/com/pixelgamelibrary/api/ScreenAdapter.java +++ b/src/main/java/com/pixelgamelibrary/api/ScreenAdapter.java @@ -23,8 +23,8 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public class ScreenAdapter implements ScreenI{ -private GameI game = null; +public class ScreenAdapter implements Screen{ +private Game game = null; @Override public void resize(int width, int height) { diff --git a/src/main/java/com/pixelgamelibrary/api/ScreenWrapper.java b/src/main/java/com/pixelgamelibrary/api/ScreenWrapper.java index 05be481..c54148b 100644 --- a/src/main/java/com/pixelgamelibrary/api/ScreenWrapper.java +++ b/src/main/java/com/pixelgamelibrary/api/ScreenWrapper.java @@ -25,11 +25,11 @@ package com.pixelgamelibrary.api; * * @author robertvokac */ -public class ScreenWrapper implements ScreenI { +public class ScreenWrapper implements Screen { - private final ScreenI screen; + private final Screen screen; - public ScreenWrapper(ScreenI screenIn) { + public ScreenWrapper(Screen screenIn) { this.screen = screenIn; } @Override diff --git a/src/main/java/com/pixelgamelibrary/api/View.java b/src/main/java/com/pixelgamelibrary/api/View.java new file mode 100644 index 0000000..73b82c7 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/View.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api; + +/** + * + * @author robertvokac + */ +public enum View { + STRETCH, FIT, SCREEN, EXTEND; +} diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/AppI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/App.java similarity index 74% rename from src/main/java/com/pixelgamelibrary/api/interfaces/AppI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/App.java index 23b5429..831bcc7 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/AppI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/App.java @@ -19,14 +19,18 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.pixelgamelibrary.api.interfaces; -import com.pixelgamelibrary.api.GameI; +import com.pixelgamelibrary.api.PixelFeature; import com.pixelgamelibrary.api.Platform; +import com.pixelgamelibrary.api.Game; +import com.pixelgamelibrary.api.utils.ClipBoard; +import com.pixelgamelibrary.api.utils.LogLevel; +import com.pixelgamelibrary.api.utils.Preferences; /** * * @author robertvokac */ -public interface AppI { +public interface App { Platform getPlatform(); default boolean isOneOfPlatforms(Platform ... platforms) { @@ -42,12 +46,17 @@ public interface AppI { void warn(String msg); void error(String msg); void debug(String msg); + void setLogLevel(LogLevel logLevel); + Preferences getPreferences(String preferencesName); void setAppName(String appName); String getAppName(); boolean isAppNameSet(); - void setGame(GameI game); + void setGame(Game game); - GameI getGame(); - + Game getGame(); + boolean isFeatureEnabled(PixelFeature feature); + boolean isMobileDevice(); + void postRunnable(Runnable runnable); + ClipBoard getClipBoard(); } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/AudioI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Audio.java similarity index 95% rename from src/main/java/com/pixelgamelibrary/api/interfaces/AudioI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Audio.java index c22f3fc..d575b2d 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/AudioI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Audio.java @@ -23,6 +23,7 @@ package com.pixelgamelibrary.api.interfaces; * * @author robertvokac */ -public interface AudioI { +public interface Audio { + //Add MIDI support - todo } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/StorageI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Files.java similarity index 51% rename from src/main/java/com/pixelgamelibrary/api/interfaces/StorageI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Files.java index 7802db3..c48d256 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/StorageI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Files.java @@ -19,12 +19,50 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.pixelgamelibrary.api.interfaces; +import com.pixelgamelibrary.api.storage.FileHandle; import com.pixelgamelibrary.api.storage.Storage; +import com.pixelgamelibrary.api.storage.StorageException; +import com.pixelgamelibrary.api.storage.StorageType; +import static com.pixelgamelibrary.api.storage.StorageType.ASSETS; /** * * @author robertvokac */ -public interface StorageI { - Storage getStorage(); +public interface Files { + + Storage local(); + + Storage assets(); + + Storage external(); + + Storage relative(String absolutePath); + + Storage absolute(); + + Storage tmp(); + + default FileHandle file​(java.lang.String path, StorageType type) { + switch (type) { + case ASSETS: + return assets().file(path); + case LOCAL: + return local().file(path); + case EXTERNAL: + return external().file(path); + case ABSOLUTE: + return absolute().file(path); + case TMP: + return tmp().file(path); + default: + throw new StorageException("Unsupported StorageType: " + type); + } + } + + boolean isExternalStorageAvailable(); + + String getLocalStoragePath(); + + String getExternalStoragePath(); } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/GraphicsI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Graphics.java similarity index 90% rename from src/main/java/com/pixelgamelibrary/api/interfaces/GraphicsI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Graphics.java index d082b84..ea9b0c1 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/GraphicsI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Graphics.java @@ -20,13 +20,16 @@ package com.pixelgamelibrary.api.interfaces; import com.pixelgamelibrary.api.WindowMode; +import com.pixelgamelibrary.api.utils.Monitor; +import java.util.List; /** * * @author robertvokac */ -public interface GraphicsI { +public interface Graphics { boolean setToOriginalDisplayMode(); WindowMode setDisplayMode(boolean fullscreen, boolean window); + List getMonitors(); } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/InputI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Input.java similarity index 97% rename from src/main/java/com/pixelgamelibrary/api/interfaces/InputI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Input.java index 6c6cf75..5c8a3d8 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/InputI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Input.java @@ -23,6 +23,6 @@ package com.pixelgamelibrary.api.interfaces; * * @author robertvokac */ -public interface InputI { +public interface Input { } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/InternalI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Internal.java similarity index 97% rename from src/main/java/com/pixelgamelibrary/api/interfaces/InternalI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Internal.java index 2013ede..4bbfaaa 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/InternalI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Internal.java @@ -24,5 +24,5 @@ package com.pixelgamelibrary.api.interfaces; * * @author robertvokac */ -public interface InternalI { +public interface Internal { } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/NetI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Net.java similarity index 97% rename from src/main/java/com/pixelgamelibrary/api/interfaces/NetI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Net.java index c9b4463..3212f31 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/NetI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Net.java @@ -23,6 +23,6 @@ package com.pixelgamelibrary.api.interfaces; * * @author robertvokac */ -public interface NetI { +public interface Net { } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/PixelBackend.java b/src/main/java/com/pixelgamelibrary/api/interfaces/PixelBackend.java index 0d197aa..8cd30de 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/PixelBackend.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/PixelBackend.java @@ -25,14 +25,13 @@ package com.pixelgamelibrary.api.interfaces; */ public interface PixelBackend { - AppI app(); - GraphicsI graphics(); - AudioI audio(); - InputI input(); - NetI net(); - AssetI asset(); - StorageI storage(); - UtilsI utils(); - InternalI internal(); + App app(); + Graphics graphics(); + Audio audio(); + Input input(); + Net net(); + Files files(); + Utils utils(); + Internal internal(); } diff --git a/src/main/java/com/pixelgamelibrary/api/interfaces/UtilsI.java b/src/main/java/com/pixelgamelibrary/api/interfaces/Utils.java similarity index 89% rename from src/main/java/com/pixelgamelibrary/api/interfaces/UtilsI.java rename to src/main/java/com/pixelgamelibrary/api/interfaces/Utils.java index 99541e0..b8a60fd 100644 --- a/src/main/java/com/pixelgamelibrary/api/interfaces/UtilsI.java +++ b/src/main/java/com/pixelgamelibrary/api/interfaces/Utils.java @@ -19,6 +19,8 @@ /////////////////////////////////////////////////////////////////////////////////////////////// package com.pixelgamelibrary.api.interfaces; +import com.pixelgamelibrary.api.utils.CollectionUtils; +import com.pixelgamelibrary.api.utils.ReflectionUtils; import java.util.Arrays; import java.util.HashMap; import java.util.List; @@ -29,11 +31,13 @@ import java.util.stream.Stream; * * @author robertvokac */ -public interface UtilsI { +public interface Utils { XmlElement parseXml(String xmlString); default String decodeBase64AsString(String string) { return new String(decodeBase64AsByteArray(string)); } + + //json support - todo byte[] decodeBase64AsByteArray(String string); @@ -51,5 +55,7 @@ public interface UtilsI { default Stream splitStringToLinesAsStream(String string) { return Arrays.asList(string.split("\\r?\\n")).stream(); } + ReflectionUtils reflection(); + CollectionUtils collections(); } diff --git a/src/main/java/com/pixelgamelibrary/api/storage/FileHandle.java b/src/main/java/com/pixelgamelibrary/api/storage/FileHandle.java index 3c9aee9..3e69a17 100644 --- a/src/main/java/com/pixelgamelibrary/api/storage/FileHandle.java +++ b/src/main/java/com/pixelgamelibrary/api/storage/FileHandle.java @@ -17,7 +17,6 @@ // or write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////////////////////////////// - package com.pixelgamelibrary.api.storage; import java.util.List; @@ -27,39 +26,68 @@ import java.util.List; * @author robertvokac */ public interface FileHandle { + FileType type(); - String path (); - String name (); - String extension (); - String nameWithoutExtension (); - List list(); - default boolean isDirectory() { - return type() == FileType.DIRECTORY; - } - - default boolean isRegularFile() { - return type() == FileType.FILE; - } - FileHandle child(String name); - FileHandle sibling(String name); - FileHandle parent(); - boolean mkdir(); - boolean mkdirs(); - boolean exists(); - boolean delete(); - boolean deleteDirectory(); - boolean emptyDirectory(); - boolean copyTo(FileHandle destination); - boolean moveTo(FileHandle destination); - - long length(); - FileHandle tempFile (String prefix); - FileHandle tempDirectory (String prefix); - int depth(); - boolean writeString(String text); - boolean appendString(String text); - String readString(); - - boolean writeBytes(byte[] data); - byte[] readBytes(); + + String path(); + + String name(); + + String extension(); + + String nameWithoutExtension(); + + List list(); + + default boolean isDirectory() { + return type() == FileType.DIRECTORY; + } + + default boolean isRegularFile() { + return type() == FileType.FILE; + } + + FileHandle child(String name); + + FileHandle sibling(String name); + + FileHandle parent(); + + boolean mkdir(); + + boolean mkdirs(); + + boolean exists(); + + boolean delete(); + + boolean deleteDirectory(); + + boolean emptyDirectory(); + + boolean copyTo(FileHandle destination); + + boolean moveTo(FileHandle destination); + + long length(); + + FileHandle tempFile(String prefix); + + FileHandle tempDirectory(String prefix); + + int depth(); + + boolean writeString(String text); + + boolean appendString(String text); + + String readString(); + + boolean writeBytes(byte[] data); + + byte[] readBytes(); + + void flush(); + + Storage getStorage(); } diff --git a/src/main/java/com/pixelgamelibrary/api/storage/FileHandleImpl.java b/src/main/java/com/pixelgamelibrary/api/storage/FileHandleImpl.java index 2fae8af..de2a3fb 100644 --- a/src/main/java/com/pixelgamelibrary/api/storage/FileHandleImpl.java +++ b/src/main/java/com/pixelgamelibrary/api/storage/FileHandleImpl.java @@ -221,4 +221,14 @@ public class FileHandleImpl implements FileHandle { return storage.readBytes(path); } + @Override + public void flush() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public Storage getStorage() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + } diff --git a/src/main/java/com/pixelgamelibrary/api/storage/Storage.java b/src/main/java/com/pixelgamelibrary/api/storage/Storage.java index f3d083d..9d8cce5 100644 --- a/src/main/java/com/pixelgamelibrary/api/storage/Storage.java +++ b/src/main/java/com/pixelgamelibrary/api/storage/Storage.java @@ -23,10 +23,10 @@ import com.pixelgamelibrary.api.Platform; import java.util.List; /** - * This interface provides the methods to interact with the underlying storage system. - * It supports basic file system operations such as navigating directories, creating files - * and directories, and reading/writing data. - * + * This interface provides the methods to interact with the underlying storage + * system. It supports basic file system operations such as navigating + * directories, creating files and directories, and reading/writing data. + * * @author robertvokac */ public interface Storage { @@ -35,23 +35,23 @@ public interface Storage { /** * Returns the platform associated with this storage. - * + * * @return the platform object. */ Platform getPlatform(); /** * Changes the current working directory to the specified path. - * + * * @param path the path to change to. * @return a result message or an empty string if successful. */ public String changeDirectory(String path); /** - * Changes the directory to the default "home/user" directory, creating the necessary - * directories if they do not exist. - * + * Changes the directory to the default "home/user" directory, creating the + * necessary directories if they do not exist. + * * @return a result message or an empty string if successful. */ default String changeDirectory() { @@ -65,7 +65,7 @@ public interface Storage { /** * Creates a directory with the specified name. - * + * * @param argument the name of the directory to create. * @return a result message or an empty string if successful. */ @@ -73,7 +73,7 @@ public interface Storage { /** * Creates multiple directories specified by the arguments. - * + * * @param argument the names of the directories to create. * @return a result message or an empty string if successful. */ @@ -92,14 +92,14 @@ public interface Storage { /** * Returns the current working directory. - * + * * @return the path of the current working directory. */ public String printWorkingDirectory(); /** * Lists the contents of the specified directory. - * + * * @param workingDirectory the directory to list. * @return a list of file and directory names in the specified directory. */ @@ -107,8 +107,9 @@ public interface Storage { /** * Lists the contents of the current working directory. - * - * @return a list of file and directory names in the current working directory. + * + * @return a list of file and directory names in the current working + * directory. */ default List list() { return list(printWorkingDirectory()); @@ -116,7 +117,7 @@ public interface Storage { /** * Returns the depth of the specified directory path in the directory tree. - * + * * @param path the path to calculate depth for. * @return the depth of the path. */ @@ -132,7 +133,7 @@ public interface Storage { /** * Returns the depth of the current working directory in the directory tree. - * + * * @return the depth of the current working directory. */ default int depth() { @@ -141,7 +142,7 @@ public interface Storage { /** * Creates an empty file with the specified name. - * + * * @param name the name of the file to create. * @return a result message or an empty string if successful. */ @@ -149,7 +150,7 @@ public interface Storage { /** * Removes the file with the specified name. - * + * * @param name the name of the file to remove. * @return true if the file was successfully removed, false otherwise. */ @@ -157,7 +158,7 @@ public interface Storage { /** * Removes the directory with the specified name. - * + * * @param dirname the name of the directory to remove. * @return true if the directory was successfully removed, false otherwise. */ @@ -165,7 +166,7 @@ public interface Storage { /** * Copies a file from the source path to the target path. - * + * * @param source the source file path. * @param target the target file path. * @return a result message or an empty string if successful. @@ -174,7 +175,7 @@ public interface Storage { /** * Moves a file from the source path to the target path. - * + * * @param source the source file path. * @param target the target file path. * @return a result message or an empty string if successful. @@ -183,7 +184,7 @@ public interface Storage { /** * Reads the contents of a text file with the specified name. - * + * * @param name the name of the file to read. * @return the text content of the file. */ @@ -191,7 +192,7 @@ public interface Storage { /** * Reads the contents of a binary file with the specified name. - * + * * @param name the name of the file to read. * @return the binary content of the file. */ @@ -199,7 +200,7 @@ public interface Storage { /** * Saves the specified text content to a file with the given name. - * + * * @param name the name of the file to save. * @param text the text content to save. * @return a result message or an empty string if successful. @@ -208,7 +209,7 @@ public interface Storage { /** * Saves the specified binary data to a file with the given name. - * + * * @param name the name of the file to save. * @param data the binary data to save. * @return a result message or an empty string if successful. @@ -217,7 +218,7 @@ public interface Storage { /** * Checks whether a file or directory with the specified name exists. - * + * * @param name the name to check for existence. * @return true if the file or directory exists, false otherwise. */ @@ -225,7 +226,7 @@ public interface Storage { /** * Checks whether the specified name refers to a file. - * + * * @param name the name to check. * @return true if the name refers to a file, false otherwise. */ @@ -233,15 +234,16 @@ public interface Storage { /** * Checks whether the specified name refers to a directory. - * + * * @param name the name to check. * @return true if the name refers to a directory, false otherwise. */ public boolean isDirectory(String name); /** - * Returns a debug string with information about the current state of the storage. - * + * Returns a debug string with information about the current state of the + * storage. + * * @return a debug string. */ public String debug(); @@ -253,7 +255,7 @@ public interface Storage { /** * Returns the username associated with this storage. - * + * * @return the username. */ default String getUserName() { @@ -261,9 +263,9 @@ public interface Storage { } /** - * If the size of this storage is limited, returns the number of bytes it is limited to. - * Otherwise, returns 0. - * + * If the size of this storage is limited, returns the number of bytes it is + * limited to. Otherwise, returns 0. + * * @return the size limit in bytes, or 0 if there is no limit. */ default long getSizeLimit() { @@ -274,20 +276,20 @@ public interface Storage { * The default username for the storage. */ static final String USER = "user"; - + default FileHandle file(String path) { path = convertToAbsolutePathIfNeeded(path); return new FileHandleImpl(this, path); } + default FileHandle file() { return file(printWorkingDirectory()); } - + FileType type(String path); - + RegularFileType getRegularFileType(String path); - - + /** * Converts a path to an absolute path if it is not already absolute. * @@ -300,9 +302,10 @@ public interface Storage { } return printWorkingDirectory() + (printWorkingDirectory().equals("/") ? "" : SLASH) + path; } + default boolean isTextFile(String content) { try { - + // Check if the content contains any non-printable characters for (int i = 0; i < content.length(); i++) { char c = content.charAt(i); @@ -317,4 +320,37 @@ public interface Storage { return false; } } + + /** + * Saves and returns the current state of the storage. + * + * @param methodName + * @return + */ + byte[] backup(String methodName); + + /** + * Replaces the current content of the storage. + * @param methodName + * @param data + */ + void restore(String methodName, byte[] data); + + boolean isReadonly(); + + /** + * Returns the maximum size in count of bytes of the storage. If the maximum + * size is not defined for this storage, then 0 is returned. default long + * getMaxSize() { return 0; } + * + * /** + * Deletes all the content in the storage. + */ + void clear(); + + boolean isEmpty(); + + long size(); + + StorageType getStorageType(); } diff --git a/src/main/java/com/pixelgamelibrary/api/storage/StorageType.java b/src/main/java/com/pixelgamelibrary/api/storage/StorageType.java new file mode 100644 index 0000000..e5721dd --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/storage/StorageType.java @@ -0,0 +1,33 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// +package com.pixelgamelibrary.api.storage; + +/** + * + * @author robertvokac + */ +public enum StorageType { + ASSETS, + LOCAL, + EXTERNAL, + ABSOLUTE, + TMP, + UNDEFINED; +} diff --git a/src/main/java/com/pixelgamelibrary/api/storage/map/MapStorage.java b/src/main/java/com/pixelgamelibrary/api/storage/map/MapStorage.java index 657a068..bf65500 100644 --- a/src/main/java/com/pixelgamelibrary/api/storage/map/MapStorage.java +++ b/src/main/java/com/pixelgamelibrary/api/storage/map/MapStorage.java @@ -25,6 +25,7 @@ import com.pixelgamelibrary.api.storage.FileType; import com.pixelgamelibrary.api.storage.RegularFileType; import com.pixelgamelibrary.api.storage.StorageException; import com.pixelgamelibrary.api.storage.Storage; +import com.pixelgamelibrary.api.storage.StorageType; import java.util.List; import java.util.stream.Collectors; @@ -407,4 +408,39 @@ public class MapStorage implements Storage { return text.startsWith(BINARYFILE) ? RegularFileType.BINARY : RegularFileType.TEXT; } + + @Override + public byte[] backup(String methodName) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public void restore(String methodName, byte[] data) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public boolean isReadonly() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public void clear() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public boolean isEmpty() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public long size() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public StorageType getStorageType() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } } diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Animation.java b/src/main/java/com/pixelgamelibrary/api/utils/Animation.java new file mode 100644 index 0000000..c2076bc --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Animation.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Animation { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/AudioDevice.java b/src/main/java/com/pixelgamelibrary/api/utils/AudioDevice.java new file mode 100644 index 0000000..d48d5a9 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/AudioDevice.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface AudioDevice { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/AudioRecorder.java b/src/main/java/com/pixelgamelibrary/api/utils/AudioRecorder.java new file mode 100644 index 0000000..465b090 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/AudioRecorder.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface AudioRecorder { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Camera.java b/src/main/java/com/pixelgamelibrary/api/utils/Camera.java new file mode 100644 index 0000000..3edfcc6 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Camera.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Camera { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/ClipBoard.java b/src/main/java/com/pixelgamelibrary/api/utils/ClipBoard.java new file mode 100644 index 0000000..1b1fe23 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/ClipBoard.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class ClipBoard { + public ClipBoard() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/CollectionUtils.java b/src/main/java/com/pixelgamelibrary/api/utils/CollectionUtils.java new file mode 100644 index 0000000..4536cf3 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/CollectionUtils.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface CollectionUtils { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Color.java b/src/main/java/com/pixelgamelibrary/api/utils/Color.java new file mode 100644 index 0000000..25bfa5e --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Color.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Color { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Cursor.java b/src/main/java/com/pixelgamelibrary/api/utils/Cursor.java new file mode 100644 index 0000000..428b28b --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Cursor.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class Cursor { + public Cursor() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/CursorViewWithoutMouse.java b/src/main/java/com/pixelgamelibrary/api/utils/CursorViewWithoutMouse.java new file mode 100644 index 0000000..174c1cd --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/CursorViewWithoutMouse.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public enum CursorViewWithoutMouse { + NONE, NORMAL, MOVE; +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/DisplayMode.java b/src/main/java/com/pixelgamelibrary/api/utils/DisplayMode.java new file mode 100644 index 0000000..322df6f --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/DisplayMode.java @@ -0,0 +1,34 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class DisplayMode { + private int width, height, refreshRate, bitsPerPixel; + + public DisplayMode() { + + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Disposable.java b/src/main/java/com/pixelgamelibrary/api/utils/Disposable.java new file mode 100644 index 0000000..8202019 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Disposable.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Disposable { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/LifecycleListener.java b/src/main/java/com/pixelgamelibrary/api/utils/LifecycleListener.java new file mode 100644 index 0000000..ffc9381 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/LifecycleListener.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface LifecycleListener { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/LogLevel.java b/src/main/java/com/pixelgamelibrary/api/utils/LogLevel.java new file mode 100644 index 0000000..fced463 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/LogLevel.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public enum LogLevel { + NONE, ERROR, INFO, WARN, DEBUG; +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Monitor.java b/src/main/java/com/pixelgamelibrary/api/utils/Monitor.java new file mode 100644 index 0000000..a8d3dd8 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Monitor.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class Monitor { + public Monitor() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/PixMap.java b/src/main/java/com/pixelgamelibrary/api/utils/PixMap.java new file mode 100644 index 0000000..9e6a66d --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/PixMap.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface PixMap { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Preferences.java b/src/main/java/com/pixelgamelibrary/api/utils/Preferences.java new file mode 100644 index 0000000..4bb17b6 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Preferences.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Preferences { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/ReflectionUtils.java b/src/main/java/com/pixelgamelibrary/api/utils/ReflectionUtils.java new file mode 100644 index 0000000..bceeee1 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/ReflectionUtils.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface ReflectionUtils { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/ShapeRenderer.java b/src/main/java/com/pixelgamelibrary/api/utils/ShapeRenderer.java new file mode 100644 index 0000000..6d9e487 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/ShapeRenderer.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface ShapeRenderer { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Sprite.java b/src/main/java/com/pixelgamelibrary/api/utils/Sprite.java new file mode 100644 index 0000000..66a478e --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Sprite.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Sprite { + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/SpriteBatch.java b/src/main/java/com/pixelgamelibrary/api/utils/SpriteBatch.java new file mode 100644 index 0000000..4faa466 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/SpriteBatch.java @@ -0,0 +1,37 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface SpriteBatch { + +//https://libgdx.com/wiki/graphics/2d/spritebatch-textureregions-and-sprites +//draw (Texture texture, float x, float y)  Draws the texture using the texture's width and height. +//draw (Texture texture, float x, float y, int srcX, int srcY, int srcWidth, int srcHeight) Draws a portion of the texture. +//draw (Texture texture, float x, float y, float width, float height, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)    Draws a portion of a texture, stretched to the width and height, and optionally flipped. +//draw (Texture texture, float x, float y, float originX, float originY, float width, float height, float scaleX, float scaleY, float rotation, int srcX, int srcY, int srcWidth, int srcHeight, boolean flipX, boolean flipY)  This monster method draws a portion of a texture, stretched to the width and height, scaled and rotated around an origin, and optionally flipped. +//draw (Texture texture, float x, float y, float width, float height, float u, float v, float u2, float v2)   This draws a portion of a texture, stretched to the width and height. This is a somewhat advanced method as it uses texture coordinates from 0-1 rather than pixel coordinates. +//draw (Texture texture, float[] spriteVertices, int offset, int length)  This is an advanced method for passing in the raw geometry, texture coordinates, and color information. This can be used to draw any quadrilateral, not just rectangles. + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/Texture.java b/src/main/java/com/pixelgamelibrary/api/utils/Texture.java new file mode 100644 index 0000000..5dd7873 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/Texture.java @@ -0,0 +1,30 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public interface Texture { + void makeColorTransparent(int r, int g, int b); + void scale(double d); +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/TextureAtlas.java b/src/main/java/com/pixelgamelibrary/api/utils/TextureAtlas.java new file mode 100644 index 0000000..77803ae --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/TextureAtlas.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class TextureAtlas { + public TextureAtlas() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/TextureRegion.java b/src/main/java/com/pixelgamelibrary/api/utils/TextureRegion.java new file mode 100644 index 0000000..25380ad --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/TextureRegion.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class TextureRegion { + public TextureRegion() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/TmpDirectoryRegistry.java b/src/main/java/com/pixelgamelibrary/api/utils/TmpDirectoryRegistry.java new file mode 100644 index 0000000..3fd3020 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/TmpDirectoryRegistry.java @@ -0,0 +1,32 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public class TmpDirectoryRegistry { + public TmpDirectoryRegistry() { +//todo + } + +} diff --git a/src/main/java/com/pixelgamelibrary/api/utils/VibrationType.java b/src/main/java/com/pixelgamelibrary/api/utils/VibrationType.java new file mode 100644 index 0000000..9b4f359 --- /dev/null +++ b/src/main/java/com/pixelgamelibrary/api/utils/VibrationType.java @@ -0,0 +1,29 @@ +/////////////////////////////////////////////////////////////////////////////////////////////// +// Pixel: Game library. +// Copyright (C) 2024 the original author or authors. +// +// This program is free software: you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation, either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see +// or write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +/////////////////////////////////////////////////////////////////////////////////////////////// + +package com.pixelgamelibrary.api.utils; + +/** + * + * @author robertvokac + */ +public enum VibrationType { + NONE, ERROR, INFO, WARN, DEBUG; +} diff --git a/src/test/java/com/pixelgamelibrary/api/storage/map/MapStorageTest.java b/src/test/java/com/pixelgamelibrary/api/storage/map/MapStorageTest.java index 0b45c24..530fa42 100644 --- a/src/test/java/com/pixelgamelibrary/api/storage/map/MapStorageTest.java +++ b/src/test/java/com/pixelgamelibrary/api/storage/map/MapStorageTest.java @@ -1,18 +1,8 @@ package com.pixelgamelibrary.api.storage.map; -import com.pixelgamelibrary.api.GameI; import com.pixelgamelibrary.api.Pixel; import com.pixelgamelibrary.api.Platform; -import com.pixelgamelibrary.api.interfaces.AppI; -import com.pixelgamelibrary.api.interfaces.AssetI; -import com.pixelgamelibrary.api.interfaces.AudioI; -import com.pixelgamelibrary.api.interfaces.GraphicsI; -import com.pixelgamelibrary.api.interfaces.InputI; -import com.pixelgamelibrary.api.interfaces.InternalI; -import com.pixelgamelibrary.api.interfaces.NetI; import com.pixelgamelibrary.api.interfaces.PixelBackend; -import com.pixelgamelibrary.api.interfaces.StorageI; -import com.pixelgamelibrary.api.interfaces.UtilsI; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -21,6 +11,19 @@ import java.util.List; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; +import com.pixelgamelibrary.api.interfaces.Files; +import com.pixelgamelibrary.api.interfaces.Audio; +import com.pixelgamelibrary.api.interfaces.Graphics; +import com.pixelgamelibrary.api.interfaces.Input; +import com.pixelgamelibrary.api.interfaces.Internal; +import com.pixelgamelibrary.api.interfaces.Net; +import com.pixelgamelibrary.api.interfaces.Utils; +import com.pixelgamelibrary.api.interfaces.App; +import com.pixelgamelibrary.api.Game; +import com.pixelgamelibrary.api.PixelFeature; +import com.pixelgamelibrary.api.utils.ClipBoard; +import com.pixelgamelibrary.api.utils.LogLevel; +import com.pixelgamelibrary.api.utils.Preferences; // Tests for MapStorage class public class MapStorageTest { @@ -32,8 +35,8 @@ public class MapStorageTest { PixelBackend dummyPixelBackend = new PixelBackend() { @Override - public AppI app() { - return new AppI() { + public App app() { + return new App() { @Override public Platform getPlatform() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody @@ -79,12 +82,42 @@ public class MapStorageTest { } @Override - public void setGame(GameI game) { + public void setGame(Game game) { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public GameI getGame() { + public Game getGame() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public void setLogLevel(LogLevel logLevel) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public Preferences getPreferences(String preferencesName) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public boolean isFeatureEnabled(PixelFeature feature) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public boolean isMobileDevice() { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public void postRunnable(Runnable runnable) { + throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody + } + + @Override + public ClipBoard getClipBoard() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @@ -92,42 +125,37 @@ public class MapStorageTest { } @Override - public GraphicsI graphics() { + public Graphics graphics() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public AudioI audio() { + public Audio audio() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public InputI input() { + public Input input() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public NetI net() { + public Net net() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public AssetI asset() { + public Files files() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public StorageI storage() { + public Utils utils() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } @Override - public UtilsI utils() { - throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody - } - - @Override - public InternalI internal() { + public Internal internal() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } };