public LibraryNavItem(LocalFileList localFileList) {
   this.localFileList = localFileList;
   if (localFileList instanceof SharedFileList) {
     this.sharedFileList = (SharedFileList) localFileList;
     this.navType = sharedFileList.isPublic() ? NavType.PUBLIC_SHARED : NavType.LIST;
   } else {
     this.sharedFileList = null;
     this.navType = NavType.LIBRARY;
   }
 }
  public boolean isShared() {
    if (getType() == NavType.PUBLIC_SHARED) {
      return true;
    }

    if (sharedFileList != null) {
      return sharedFileList.getFriendIds().size() > 0;
    }

    return false;
  }
 public String getDisplayText() {
   switch (navType) {
     case LIST:
       return sharedFileList.getCollectionName();
     case LIBRARY:
       return I18n.tr("Library");
     case PUBLIC_SHARED:
       return I18n.tr("Public Shared");
     default:
       throw new IllegalStateException("unknown type: " + navType);
   }
 }
 public int getId() {
   return sharedFileList != null ? sharedFileList.getId() : -1;
 }