mirror of https://github.com/apache/jclouds.git
add clone checks
This commit is contained in:
parent
a307c44a22
commit
ed6cfca0a7
|
@ -198,6 +198,18 @@ public abstract class EntityType<T extends EntityType<T>> extends ResourceType<T
|
|||
equal(this.id, that.id) && equal(this.description, that.description) &&
|
||||
equal(this.tasksInProgress, that.tasksInProgress) && equal(this.name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clone(Object o) {
|
||||
if (this == o)
|
||||
return false;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
EntityType<?> that = EntityType.class.cast(o);
|
||||
return super.equals(that) &&
|
||||
equal(this.description, that.description) &&
|
||||
equal(this.name, that.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
|
|
@ -244,6 +244,17 @@ public class Media extends ResourceEntityType<Media> {
|
|||
return super.equals(that) &&
|
||||
equal(this.owner, that.owner) && equal(this.imageType, that.imageType) && equal(this.size, that.size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clone(Object o) {
|
||||
if (this == o)
|
||||
return false;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
Media that = Media.class.cast(o);
|
||||
return super.clone(that) &&
|
||||
equal(this.owner, that.owner) && equal(this.imageType, that.imageType) && equal(this.size, that.size);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
|
|
@ -167,6 +167,16 @@ public abstract class ResourceEntityType<T extends ResourceEntityType<T>> extend
|
|||
ResourceEntityType<?> that = ResourceEntityType.class.cast(o);
|
||||
return super.equals(that) && equal(this.files, that.files) && equal(this.status, that.status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean clone(Object o) {
|
||||
if (this == o)
|
||||
return false;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
ResourceEntityType<?> that = ResourceEntityType.class.cast(o);
|
||||
return super.clone(that) && equal(this.files, that.files);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
|
|
@ -160,6 +160,15 @@ public abstract class ResourceType<T extends ResourceType<T>> implements URISupp
|
|||
ResourceType<?> that = ResourceType.class.cast(o);
|
||||
return equal(this.href, that.href) && equal(this.links, that.links) && equal(this.type, that.type);
|
||||
}
|
||||
|
||||
public boolean clone(Object o) {
|
||||
if (this == o)
|
||||
return false;
|
||||
if (o == null || getClass() != o.getClass())
|
||||
return false;
|
||||
ResourceType<?> that = ResourceType.class.cast(o);
|
||||
return equal(this.type, that.type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
|
Loading…
Reference in New Issue