Modifier and Type | Class and Description |
---|---|
static class |
DefaultLinkInfoPattern.LinkType |
Modifier and Type | Field and Description |
---|---|
static Object |
NO_ATTACHMENT
An object reference denoting no attachment.
|
Constructor and Description |
---|
DefaultLinkInfoPattern()
Default constructor, where type is initialized to INDIRECT,
cost is initialized to 0.0 and the attachment initialized to
NO_ATTACHMENT . |
DefaultLinkInfoPattern(LinkInfo copyMe)
Copy constructor; creates a new instance with the same data.
|
Modifier and Type | Method and Description |
---|---|
Object |
attachment() |
double |
cost() |
DefaultLinkInfoPattern |
setAttachment(Object attachment)
Sets the attachment for this link info.
|
DefaultLinkInfoPattern |
setCost(double cost)
Sets the cost for this link info.
|
DefaultLinkInfoPattern |
setType(DefaultLinkInfoPattern.LinkType type)
Sets the type for this link info.
|
String |
toString() |
DefaultLinkInfoPattern.LinkType |
type() |
void |
updateWith(DefaultLinkInfoPattern updateFrom)
Updates this link info from the given link info, for those fields
marked as dirty.
|
public static final Object NO_ATTACHMENT
public DefaultLinkInfoPattern()
NO_ATTACHMENT
.public DefaultLinkInfoPattern(LinkInfo copyMe)
copyMe
- the info instance to copyNullPointerException
- if copyMe is nullpublic DefaultLinkInfoPattern.LinkType type()
public double cost()
public Object attachment()
public DefaultLinkInfoPattern setType(DefaultLinkInfoPattern.LinkType type)
type
- the link typepublic DefaultLinkInfoPattern setCost(double cost)
cost
- the costpublic DefaultLinkInfoPattern setAttachment(Object attachment)
null
to clear
the attachment.attachment
- the object to be attachedpublic void updateWith(DefaultLinkInfoPattern updateFrom)
updateFrom
- the info to update fromCopyright © 2015. All Rights Reserved.