|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vinculumtech.carrierwave.Icon
Icon is a paritally immutable token representnig an Image and/or Imageable instance.
It is only partially immutable since the becomeSoft()
method changes the state of the Icon
instance.
Field Summary | |
static java.lang.String |
ICON_PREFIX
|
static int |
NO_INDEX
No index value. |
static java.lang.Object |
NO_KEY
No key value. |
Constructor Summary | |
protected |
Icon(Icon parent,
java.lang.String imageType,
java.lang.String edge)
|
protected |
Icon(Icon parent,
java.lang.String imageType,
java.lang.String edge,
int index)
|
protected |
Icon(Icon parent,
java.lang.String imageType,
java.lang.String edge,
java.lang.Object key)
|
|
Icon(java.lang.String externalForm)
Takes the externalized form of an Icon and initializes this instance. |
protected |
Icon(java.lang.String imageType,
java.lang.String referenceableName)
|
protected |
Icon(java.lang.String host,
java.lang.String imageType,
java.lang.Object objectId)
|
protected |
Icon(java.lang.String host,
java.lang.String imageType,
java.lang.Object objectId,
java.lang.String referenceableName)
|
protected |
Icon(java.lang.String host,
java.lang.String imageType,
java.lang.String referenceableName)
|
Method Summary | |
void |
becomeSoft()
Forces this Icon instance to loose its objectId if it has a referenceableName. This is useful for long term storage of an Icon instance where the referenceableName is more durable than the objectId (ie, during developement or schema migration). |
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object object)
|
Icon |
getChild()
|
java.lang.String |
getEdge()
If this instance references a dependent object, returns the edge off the parent object used to reach the dependent object. |
protected java.lang.String |
getFullEdge()
|
java.lang.String |
getHost()
|
java.lang.String |
getImageType()
|
int |
getIndex()
If this Icon instance references an object in a List , this
method will return the index that identifies it in that List |
java.lang.Object |
getKey()
If this Icon instance references an object in a Map , this
method will return the key that identifies it in that Map |
java.lang.Object |
getObjectId()
Returns the object id of the object this instance references. |
Icon |
getParent()
|
java.lang.String |
getReferenceableName()
|
Icon |
getRoot()
Returns the top level parent Icon instance or this if this instance is the root.This method always returns a value. |
int |
hashCode()
|
boolean |
hasIndex()
|
boolean |
hasKey()
|
boolean |
hasObjectId()
|
boolean |
hasReferenceableName()
|
boolean |
isContained()
|
boolean |
isImageableIcon()
|
boolean |
isImageIcon()
|
protected void |
setIndex(int index)
|
protected void |
setKey(java.lang.Object key)
|
java.lang.String |
toExternalForm()
This method returns a "stringized" version of this Icon instance. Currently it is of the format: |
java.lang.StringBuffer |
toExternalForm(java.lang.StringBuffer stringBuffer)
|
java.lang.String |
toString()
Simply calls toExternalForm |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String ICON_PREFIX
public static final int NO_INDEX
public static final java.lang.Object NO_KEY
Constructor Detail |
public Icon(java.lang.String externalForm)
externalForm
- protected Icon(Icon parent, java.lang.String imageType, java.lang.String edge)
protected Icon(Icon parent, java.lang.String imageType, java.lang.String edge, int index)
protected Icon(Icon parent, java.lang.String imageType, java.lang.String edge, java.lang.Object key)
protected Icon(java.lang.String imageType, java.lang.String referenceableName)
protected Icon(java.lang.String host, java.lang.String imageType, java.lang.String referenceableName)
protected Icon(java.lang.String host, java.lang.String imageType, java.lang.Object objectId)
protected Icon(java.lang.String host, java.lang.String imageType, java.lang.Object objectId, java.lang.String referenceableName)
Method Detail |
public final void becomeSoft()
public final boolean isImageIcon()
public final boolean isImageableIcon()
public final java.lang.String getHost()
public final java.lang.Object getObjectId()
public final boolean hasObjectId()
public final java.lang.String getReferenceableName()
public final boolean hasReferenceableName()
public final java.lang.String getImageType()
public final Icon getParent()
public final Icon getChild()
public final Icon getRoot()
this
if this instance is the root.
this
public final java.lang.String getEdge()
protected final java.lang.String getFullEdge()
protected final void setIndex(int index)
public final int getIndex()
List
, this
method will return the index that identifies it in that List
List
this Icon instance referencespublic final boolean hasIndex()
protected final void setKey(java.lang.Object key)
public final java.lang.Object getKey()
Map
, this
method will return the key that identifies it in that Map
Map
this Icon instance referencespublic final boolean hasKey()
public final boolean isContained()
Map
or List
public final java.lang.String toExternalForm()
ICON:imageType{HOST:hostname}{ID:id}{RNAME:name} ICON:imageType{HOST:hostname}{ID:id}{RNAME:name}.imageType{EDGE:edge} ICON:imageType{HOST:hostname}{ID:id}{RNAME:name}.imageType{EDGE:edge[index]} ICON:imageType{HOST:hostname}{ID:id}{RNAME:name}.imageType{EDGE:edge}
public final java.lang.StringBuffer toExternalForm(java.lang.StringBuffer stringBuffer)
public final java.lang.String toString()
public final int hashCode()
public final boolean equals(java.lang.Object object)
public final java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |