Record Class FileBrowserConfig

java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.ui.browser.FileBrowserConfig

public record FileBrowserConfig(@Nonnull String listElementId, @Nullable String rootSelectorId, @Nullable String searchInputId, @Nullable String currentPathId, @Nonnull List<FileBrowserConfig.RootEntry> roots, @Nonnull Set<String> allowedExtensions, boolean enableRootSelector, boolean enableSearch, boolean enableDirectoryNav, boolean enableMultiSelect, int maxResults, @Nullable FileListProvider customProvider, boolean assetPackMode, @Nullable String assetPackSubPath, @Nullable Predicate<Path> terminalDirectoryPredicate) extends Record
Configuration for the ServerFileBrowser component. Uses builder pattern for ergonomic construction with sensible defaults.
  • Constructor Details

    • FileBrowserConfig

      public FileBrowserConfig(@Nonnull String listElementId, @Nullable String rootSelectorId, @Nullable String searchInputId, @Nullable String currentPathId, @Nonnull List<FileBrowserConfig.RootEntry> roots, @Nonnull Set<String> allowedExtensions, boolean enableRootSelector, boolean enableSearch, boolean enableDirectoryNav, boolean enableMultiSelect, int maxResults, @Nullable FileListProvider customProvider, boolean assetPackMode, @Nullable String assetPackSubPath, @Nullable Predicate<Path> terminalDirectoryPredicate)
      Creates an instance of a FileBrowserConfig record class.
      Parameters:
      listElementId - the value for the listElementId record component
      rootSelectorId - the value for the rootSelectorId record component
      searchInputId - the value for the searchInputId record component
      currentPathId - the value for the currentPathId record component
      roots - the value for the roots record component
      allowedExtensions - the value for the allowedExtensions record component
      enableRootSelector - the value for the enableRootSelector record component
      enableSearch - the value for the enableSearch record component
      enableDirectoryNav - the value for the enableDirectoryNav record component
      enableMultiSelect - the value for the enableMultiSelect record component
      maxResults - the value for the maxResults record component
      customProvider - the value for the customProvider record component
      assetPackMode - the value for the assetPackMode record component
      assetPackSubPath - the value for the assetPackSubPath record component
      terminalDirectoryPredicate - the value for the terminalDirectoryPredicate record component
  • Method Details

    • builder

      public static FileBrowserConfig.Builder builder()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • listElementId

      @Nonnull public String listElementId()
      Returns the value of the listElementId record component.
      Returns:
      the value of the listElementId record component
    • rootSelectorId

      @Nullable public String rootSelectorId()
      Returns the value of the rootSelectorId record component.
      Returns:
      the value of the rootSelectorId record component
    • searchInputId

      @Nullable public String searchInputId()
      Returns the value of the searchInputId record component.
      Returns:
      the value of the searchInputId record component
    • currentPathId

      @Nullable public String currentPathId()
      Returns the value of the currentPathId record component.
      Returns:
      the value of the currentPathId record component
    • roots

      @Nonnull public List<FileBrowserConfig.RootEntry> roots()
      Returns the value of the roots record component.
      Returns:
      the value of the roots record component
    • allowedExtensions

      @Nonnull public Set<String> allowedExtensions()
      Returns the value of the allowedExtensions record component.
      Returns:
      the value of the allowedExtensions record component
    • enableRootSelector

      public boolean enableRootSelector()
      Returns the value of the enableRootSelector record component.
      Returns:
      the value of the enableRootSelector record component
    • enableSearch

      public boolean enableSearch()
      Returns the value of the enableSearch record component.
      Returns:
      the value of the enableSearch record component
    • enableDirectoryNav

      public boolean enableDirectoryNav()
      Returns the value of the enableDirectoryNav record component.
      Returns:
      the value of the enableDirectoryNav record component
    • enableMultiSelect

      public boolean enableMultiSelect()
      Returns the value of the enableMultiSelect record component.
      Returns:
      the value of the enableMultiSelect record component
    • maxResults

      public int maxResults()
      Returns the value of the maxResults record component.
      Returns:
      the value of the maxResults record component
    • customProvider

      @Nullable public FileListProvider customProvider()
      Returns the value of the customProvider record component.
      Returns:
      the value of the customProvider record component
    • assetPackMode

      public boolean assetPackMode()
      Returns the value of the assetPackMode record component.
      Returns:
      the value of the assetPackMode record component
    • assetPackSubPath

      @Nullable public String assetPackSubPath()
      Returns the value of the assetPackSubPath record component.
      Returns:
      the value of the assetPackSubPath record component
    • terminalDirectoryPredicate

      @Nullable public Predicate<Path> terminalDirectoryPredicate()
      Returns the value of the terminalDirectoryPredicate record component.
      Returns:
      the value of the terminalDirectoryPredicate record component