mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
Library: keys instead of \000-separated strings
This commit is contained in:
parent
3b0179460c
commit
31b3f2607e
6 changed files with 51 additions and 64 deletions
|
@ -61,6 +61,17 @@ public final class Library {
|
|||
return root;
|
||||
}
|
||||
|
||||
public LibraryTree getLibraryTree(LibraryTree.Key key) {
|
||||
if (key == null) {
|
||||
return null;
|
||||
}
|
||||
if (key.Parent == null) {
|
||||
return getRootTree(key.Id);
|
||||
}
|
||||
final LibraryTree parentTree = getLibraryTree(key.Parent);
|
||||
return parentTree != null ? (LibraryTree)parentTree.getSubTree(key.Id) : null;
|
||||
}
|
||||
|
||||
public boolean hasState(int state) {
|
||||
return myState >= state || myInterrupted;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue