public abstract class Instance<L,T extends AttributeLocationProvider<L>> extends AttributeLocationProvider<L>
MeasurementInstance and ResourceConfigurationPropertyInstance.
Instances can be associated with a specific resource - see setResource(Resource). Once assigned
a resource, an instance is owned by that resource for the instance's lifetime. You can use
the copy constructor to create a copy of an instance and reassign that new instance to a new resource.| Modifier | Constructor and Description |
|---|---|
protected |
Instance(ID id,
Name name,
AttributeLocation<L> attributeLocation,
T type) |
protected |
Instance(Instance<L,T> original,
boolean disown)
Copy constructor with the added feature of allowing the new copy to be "disowned" from any
resource that the original instance was owned by.
|
| Modifier and Type | Method and Description |
|---|---|
Resource<L> |
getResource() |
T |
getType() |
void |
setResource(Resource<L> resource) |
getAttributeLocationgetNameaddProperty, equals, getID, getProperties, hashCode, isPersisted, removeProperty, setPersisted, toStringprotected Instance(ID id, Name name, AttributeLocation<L> attributeLocation, T type)
protected Instance(Instance<L,T> original, boolean disown)
original - the object to copydisown - if true, the new copy will not have an owning resource.
if false, the new instance will be owned by the same resource that owns the original.Copyright © 2015–2017 Red Hat, Inc.. All rights reserved.