|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.waldheinz.fs.AbstractFsObject
public class AbstractFsObject
A base class that helps to implement the FsObject interface.
| Constructor Summary | |
|---|---|
protected |
AbstractFsObject(boolean readOnly)
Creates a new instance of AbstractFsObject which will be valid
and have the specified read-only state. |
| Method Summary | |
|---|---|
protected void |
checkValid()
Convience method to check if this object is still valid and throw an IllegalStateException if it is not. |
protected void |
checkWritable()
Convience method to check if this object is writable. |
protected void |
invalidate()
Marks this object as invalid. |
boolean |
isReadOnly()
Checks if this FsObject is read-only. |
boolean |
isValid()
Checks if this FsObject is still valid. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractFsObject(boolean readOnly)
AbstractFsObject which will be valid
and have the specified read-only state.
readOnly - if the new object will be read-only| Method Detail |
|---|
public final boolean isValid()
FsObject is still valid.
An object is not valid anymore if it has been removed from the
filesystem. All invocations on methods (except this method and the
methods inherited from Object) of
invalid objects must throw an IllegalStateException.
isValid in interface FsObjectFsObject is still validcheckValid(),
invalidate()protected final void invalidate()
isValid(),
checkValid()
protected final void checkValid()
throws IllegalStateException
IllegalStateException if it is not.
IllegalStateException - if this object was invalidatedisValid(),
invalidate()
protected final void checkWritable()
throws IllegalStateException,
ReadOnlyException
IllegalStateException - if this object was invalidated
ReadOnlyException - if this object was created with the read-only
flag setpublic final boolean isReadOnly()
FsObjectFsObject is read-only. Any attempt to modify a
read-only FsObject must result in a ReadOnlyException
being thrown, and the modification must not be performed.
isReadOnly in interface FsObjectFsObject is read-only
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||