1
0
Fork 0
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:
Nikolay Pultsin 2011-07-13 22:56:20 +01:00
parent 3b0179460c
commit 31b3f2607e
6 changed files with 51 additions and 64 deletions

View file

@ -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;
}