public abstract class Inode extends ImageWriter implements Comparable<Inode>
Inode
is an abstract class, with information shared by all types of Inodes.Modifier and Type | Field and Description |
---|---|
protected boolean |
IS_FOLDER |
Modifier | Constructor and Description |
---|---|
protected |
Inode(String name,
int id,
int parentId,
boolean isFolder,
long creationTimeMs)
Create an inode.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Inode o) |
boolean |
equals(Object o) |
abstract ClientFileInfo |
generateClientFileInfo(String path) |
long |
getCreationTimeMs() |
int |
getId() |
String |
getName() |
int |
getParentId() |
int |
hashCode() |
boolean |
isDirectory() |
boolean |
isFile() |
boolean |
isPinned() |
void |
reverseId() |
void |
setName(String name) |
void |
setParentId(int parentId) |
void |
setPinned(boolean pinned) |
String |
toString() |
writeElement
protected Inode(String name, int id, int parentId, boolean isFolder, long creationTimeMs)
name
- the name of the inode.id
- the id of the inode, which is globaly unique.parentId
- the parent of the inode. -1 if there is no parent.isFolder
- if the inode presents a foldercreationTimeMs
- the creation time of the inode.public int compareTo(Inode o)
compareTo
in interface Comparable<Inode>
public abstract ClientFileInfo generateClientFileInfo(String path)
public long getCreationTimeMs()
public int getId()
public String getName()
public int getParentId()
public boolean isPinned()
public boolean isDirectory()
public boolean isFile()
public void reverseId()
public void setName(String name)
public void setParentId(int parentId)
public void setPinned(boolean pinned)
Copyright © 2014. All rights reserved.