io.deepsense.neptune.clientlibrary.models.NeptuneImage Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.models;
import com.google.common.base.Preconditions;
import java.awt.image.BufferedImage;
import java.util.Objects;
/**
* Represents information about images sent to image channels.
*/
public class NeptuneImage {
private final String name;
private final String description;
private final BufferedImage data;
/**
* Constructs an image representation that can be sent to Neptune image channels.
*
* @param name The name of this image.
* @param description The description of this image.
* @param data The data of this image.
*/
public NeptuneImage(String name, String description, BufferedImage data) {
this.name = Preconditions.checkNotNull(name);
this.description = Preconditions.checkNotNull(description);
this.data = Preconditions.checkNotNull(data);
}
/**
*
* @return The name of this image.
*/
public String getName() {
return name;
}
/**
*
* @return The description of this image.
*/
public String getDescription() {
return description;
}
/**
*
* @return The data of this image.
*/
public BufferedImage getData() {
return data;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NeptuneImage that = (NeptuneImage) o;
return Objects.equals(name, that.name)
&& Objects.equals(description, that.description)
&& Objects.equals(data, that.data);
}
@Override
public int hashCode() {
return Objects.hash(name, description, data);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy