Package io.github.turtleisaac.nds4j
Class Fnt.Folder
java.lang.Object
io.github.turtleisaac.nds4j.Fnt.Folder
- Enclosing class:
Fnt
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
getFilenameOf
(int id) Find the filename of the file with the given ID.getFiles()
int
int
Find the file ID for the given filename, or for the given file path (using "/" as the separator) relative to this folder.getSubfolder
(String path) Find the Folder instance for the given subfolder name, or for the given folder path (using "/" as the separator) relative to this folder.int
hashCode()
toString()
String[]
toStringList
(int indent) Return aString
containing all file positions relative to thisFolder
, indented based on subfolder
-
Field Details
-
folders
-
files
-
firstId
protected int firstId -
name
-
-
Constructor Details
-
Folder
public Folder() -
Folder
-
Folder
-
-
Method Details
-
getFiles
-
getFolders
-
getFirstId
public int getFirstId() -
getIdOf
Find the file ID for the given filename, or for the given file path (using "/" as the separator) relative to this folder.- Parameters:
name
- aString
representing the path to the file- Returns:
- an
int
representing the file ID of the specified file, or-1
if not found
-
getSubfolder
Find the Folder instance for the given subfolder name, or for the given folder path (using "/" as the separator) relative to this folder.- Parameters:
path
- aString
representing the path to the subfolder- Returns:
- a
Folder
representing the found subfolder, ornull
if not found
-
getFilenameOf
Find the filename of the file with the given ID. If it exists in a subfolder, the filename will be returned as a path separated by "/"s.- Parameters:
id
- anint
representing the file ID- Returns:
- a
String
containing the path to the given file, ornull
if not found
-
toStringList
Return aString
containing all file positions relative to thisFolder
, indented based on subfolder- Parameters:
indent
- anint
specifying the base indent- Returns:
- a
String[]
containing the output
-
toString
-
equals
-
hashCode
public int hashCode()
-