io.orangebeard.client.entity.Attribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
Orangebeard Java Client, to be used in Orangebeard Java Listeners
package io.orangebeard.client.entity;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import static java.lang.String.format;
@NoArgsConstructor
@Getter
@EqualsAndHashCode
public class Attribute {
private String key;
private String value;
/**
* New attribute. Colons and Semicolons are removed because these are special values.
*/
public Attribute(String key, String value) {
this.key = key.replace(":", "").replace(";", "").trim();
this.value = value.replace(":", "").replace(";", "").trim();
}
/**
* New attribute. Colons and Semicolons are removed because these are special values.
*/
public Attribute(String value) {
this.value = value.replace(":", "").replace(";", "").trim();
}
@Override
public String toString() {
return format("key: %s; value:%s", key, value);
}
}