|
TreeMap Java Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttreemap.demo.TMFileSize
public class TMFileSize
The TMFileSize class implements an example of a TMComputeSize for a TMFileNode.
| Constructor Summary | |
|---|---|
TMFileSize()
|
|
| Method Summary | |
|---|---|
float |
getSize(TMNode node)
Returns the size of the node. |
boolean |
isCompatibleWith(TMNode node)
Test if this TMComputeSize could be used with the kind of TMNode passed in parameter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TMFileSize()
| Method Detail |
|---|
public boolean isCompatibleWith(TMNode node)
isCompatibleWith in interface TMComputeSizenode - the TMNode to test the compatibility with
true if this kind of node is compatible;
false otherwise
public float getSize(TMNode node)
throws TMExceptionBadTMNodeKind
0 for a folder, and the size
of the file, in byte, for a file.
getSize in interface TMComputeSizenode - we compute the size of this node;
should be an instance of TMFileNode
0 for a folder;
the size of the file in byte for a file
TMExceptionBadTMNodeKind - If the node is not an
instance of TMFileNode
|
TreeMap Java Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||