|
TreeMap Java Library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttreemap.demo.TMFileSizeDate
public class TMFileSizeDate
The TMFileSizeDate class implements an example of a TMComputeSize for a TMFileNode. It use the date of the file as a size.
| Constructor Summary | |
|---|---|
TMFileSizeDate()
Constructor. |
|
| 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 TMFileSizeDate()
| 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 date
of the file, 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 date of the file 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 | |||||||||