Record Class PWSSDirectoryNavUtil

java.lang.Object
java.lang.Record
org.pwss.util.PWSSDirectoryNavUtil

public record PWSSDirectoryNavUtil() extends Record
The PWSSDirectoryNavUtil class provides utility methods to work with directories. This class is designed to operate in a stateless manner and only provides static methods for directory navigation.
  • Constructor Details

    • PWSSDirectoryNavUtil

      public PWSSDirectoryNavUtil()
      Creates an instance of a PWSSDirectoryNavUtil record class.
  • Method Details

    • GetSelectedFolderWithoutSubFolders

      public static List<File> GetSelectedFolderWithoutSubFolders(File selectedFolder)
      Retrieves the contents of the selected folder without including subfolders.
      Parameters:
      selectedFolder - The folder whose contents need to be retrieved
      Returns:
      A list of File objects representing the immediate contents of the selected folder
      Throws:
      NullPointerException - if the selected folder is null or its contents cannot be listed
    • 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.
      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.