aboutsummaryrefslogtreecommitdiff
path: root/kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java
diff options
context:
space:
mode:
Diffstat (limited to 'kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java')
-rw-r--r--kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java76
1 files changed, 38 insertions, 38 deletions
diff --git a/kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java b/kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java
index dc75b10d..32213c79 100644
--- a/kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java
+++ b/kamon-core/src/main/java/kamon/context/generated/binary/context/Entry.java
@@ -33,9 +33,9 @@ public class Entry implements Serializable {
- public String name;
+ public String key;
- public byte[] content;
+ public byte[] value;
/** Default constructor */
@@ -47,8 +47,8 @@ public class Entry implements Serializable {
/** Colfer zero values. */
private void init() {
- name = "";
- content = _zeroBytes;
+ key = "";
+ value = _zeroBytes;
}
/**
@@ -181,11 +181,11 @@ public class Entry implements Serializable {
int i = offset;
try {
- if (! this.name.isEmpty()) {
+ if (! this.key.isEmpty()) {
buf[i++] = (byte) 0;
int start = ++i;
- String s = this.name;
+ String s = this.key;
for (int sIndex = 0, sLength = s.length(); sIndex < sLength; sIndex++) {
char c = s.charAt(sIndex);
if (c < '\u0080') {
@@ -211,7 +211,7 @@ public class Entry implements Serializable {
}
int size = i - start;
if (size > Entry.colferSizeMax)
- throw new IllegalStateException(format("colfer: kamon/context/generated/binary/context.Entry.name size %d exceeds %d UTF-8 bytes", size, Entry.colferSizeMax));
+ throw new IllegalStateException(format("colfer: kamon/context/generated/binary/context.Entry.key size %d exceeds %d UTF-8 bytes", size, Entry.colferSizeMax));
int ii = start - 1;
if (size > 0x7f) {
@@ -227,12 +227,12 @@ public class Entry implements Serializable {
buf[ii] = (byte) size;
}
- if (this.content.length != 0) {
+ if (this.value.length != 0) {
buf[i++] = (byte) 1;
- int size = this.content.length;
+ int size = this.value.length;
if (size > Entry.colferSizeMax)
- throw new IllegalStateException(format("colfer: kamon/context/generated/binary/context.Entry.content size %d exceeds %d bytes", size, Entry.colferSizeMax));
+ throw new IllegalStateException(format("colfer: kamon/context/generated/binary/context.Entry.value size %d exceeds %d bytes", size, Entry.colferSizeMax));
int x = size;
while (x > 0x7f) {
@@ -243,7 +243,7 @@ public class Entry implements Serializable {
int start = i;
i += size;
- System.arraycopy(this.content, 0, buf, start, size);
+ System.arraycopy(this.value, 0, buf, start, size);
}
buf[i++] = (byte) 0x7f;
@@ -294,11 +294,11 @@ public class Entry implements Serializable {
if (shift == 28 || b >= 0) break;
}
if (size < 0 || size > Entry.colferSizeMax)
- throw new SecurityException(format("colfer: kamon/context/generated/binary/context.Entry.name size %d exceeds %d UTF-8 bytes", size, Entry.colferSizeMax));
+ throw new SecurityException(format("colfer: kamon/context/generated/binary/context.Entry.key size %d exceeds %d UTF-8 bytes", size, Entry.colferSizeMax));
int start = i;
i += size;
- this.name = new String(buf, start, size, StandardCharsets.UTF_8);
+ this.key = new String(buf, start, size, StandardCharsets.UTF_8);
header = buf[i++];
}
@@ -310,12 +310,12 @@ public class Entry implements Serializable {
if (shift == 28 || b >= 0) break;
}
if (size < 0 || size > Entry.colferSizeMax)
- throw new SecurityException(format("colfer: kamon/context/generated/binary/context.Entry.content size %d exceeds %d bytes", size, Entry.colferSizeMax));
+ throw new SecurityException(format("colfer: kamon/context/generated/binary/context.Entry.value size %d exceeds %d bytes", size, Entry.colferSizeMax));
- this.content = new byte[size];
+ this.value = new byte[size];
int start = i;
i += size;
- System.arraycopy(buf, start, this.content, 0, size);
+ System.arraycopy(buf, start, this.value, 0, size);
header = buf[i++];
}
@@ -367,62 +367,62 @@ public class Entry implements Serializable {
}
/**
- * Gets kamon/context/generated/binary/context.Entry.name.
+ * Gets kamon/context/generated/binary/context.Entry.key.
* @return the value.
*/
- public String getName() {
- return this.name;
+ public String getKey() {
+ return this.key;
}
/**
- * Sets kamon/context/generated/binary/context.Entry.name.
+ * Sets kamon/context/generated/binary/context.Entry.key.
* @param value the replacement.
*/
- public void setName(String value) {
- this.name = value;
+ public void setKey(String value) {
+ this.key = value;
}
/**
- * Sets kamon/context/generated/binary/context.Entry.name.
+ * Sets kamon/context/generated/binary/context.Entry.key.
* @param value the replacement.
* @return {link this}.
*/
- public Entry withName(String value) {
- this.name = value;
+ public Entry withKey(String value) {
+ this.key = value;
return this;
}
/**
- * Gets kamon/context/generated/binary/context.Entry.content.
+ * Gets kamon/context/generated/binary/context.Entry.value.
* @return the value.
*/
- public byte[] getContent() {
- return this.content;
+ public byte[] getValue() {
+ return this.value;
}
/**
- * Sets kamon/context/generated/binary/context.Entry.content.
+ * Sets kamon/context/generated/binary/context.Entry.value.
* @param value the replacement.
*/
- public void setContent(byte[] value) {
- this.content = value;
+ public void setValue(byte[] value) {
+ this.value = value;
}
/**
- * Sets kamon/context/generated/binary/context.Entry.content.
+ * Sets kamon/context/generated/binary/context.Entry.value.
* @param value the replacement.
* @return {link this}.
*/
- public Entry withContent(byte[] value) {
- this.content = value;
+ public Entry withValue(byte[] value) {
+ this.value = value;
return this;
}
@Override
public final int hashCode() {
int h = 1;
- if (this.name != null) h = 31 * h + this.name.hashCode();
- for (byte b : this.content) h = 31 * h + b;
+ if (this.key != null) h = 31 * h + this.key.hashCode();
+ for (byte b : this.value) h = 31 * h + b;
return h;
}
@@ -435,8 +435,8 @@ public class Entry implements Serializable {
if (o == null) return false;
if (o == this) return true;
return o.getClass() == Entry.class
- && (this.name == null ? o.name == null : this.name.equals(o.name))
- && java.util.Arrays.equals(this.content, o.content);
+ && (this.key == null ? o.key == null : this.key.equals(o.key))
+ && java.util.Arrays.equals(this.value, o.value);
}
}