|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.progeeks.util.DefaultFixable
public class DefaultFixable
Default implementation of the Fixable interface.
| Field Summary | |
|---|---|
protected boolean |
fixed
|
| Constructor Summary | |
|---|---|
DefaultFixable()
Creates a new unfixed object. |
|
DefaultFixable(boolean fixed)
Creates an object preinitialized to the specified fixed state. |
|
| Method Summary | |
|---|---|
protected void |
checkModification()
Convenience method for subclass to check the fixed state and automatically throw an exception. |
boolean |
isFixed()
Returns true if this object cannot be modified. |
void |
setFixed(boolean fixed)
Sets the mutable/immutable state of this object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean fixed
| Constructor Detail |
|---|
public DefaultFixable()
public DefaultFixable(boolean fixed)
| Method Detail |
|---|
public void setFixed(boolean fixed)
throws IllegalModificationException
setFixed in interface FixableIllegalModificationException - if the object does not support a specific
mutability shift. For example, most immutable objects
will not allow setFixed( false ).
protected void checkModification()
throws IllegalModificationException
IllegalModificationExceptionpublic boolean isFixed()
isFixed in interface Fixable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||