mirror of https://github.com/apache/jclouds.git
add convenience constructor to make a reference to an entityType from the entityType
This commit is contained in:
parent
633dd489b1
commit
6bed78b5a0
|
@ -88,6 +88,10 @@ public class Reference extends ReferenceType<Reference> {
|
||||||
public Builder fromReference(Reference in) {
|
public Builder fromReference(Reference in) {
|
||||||
return fromReferenceType(in);
|
return fromReferenceType(in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder fromEntity(EntityType<?> in) {
|
||||||
|
return href(in.getHref()).id(in.getId()).name(in.getName()).type(in.getType());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Reference(URI href, String id, String name, String type) {
|
public Reference(URI href, String id, String name, String type) {
|
||||||
|
|
Loading…
Reference in New Issue