public class StringValue$$Native implements StringValue, BytesMarshallable, Byteable, Copyable<net.openhft.lang.values.StringValue> {
private static final int VALUE = 0;
private Bytes _bytes;
private long _offset;
public void setValue(java.lang.CharSequence $) {
_bytes.writeUTFΔ(_offset + VALUE, 64, $);
}
public java.lang.String getValue() {
return _bytes.readUTFΔ(_offset + VALUE);
}
public java.lang.StringBuilder getUsingValue(StringBuilder builder){
_bytes.position(_offset + VALUE);
_bytes.readUTFΔ(builder);
return builder;
}
@Override
public void copyFrom(net.openhft.lang.values.StringValue from) {
setValue(from.getValue());
}
@Override
public void writeMarshallable(Bytes out) {
{
long pos = out.position();
out.writeUTFΔ(getValue());
long newPos = pos + 64;
out.zeroOut(out.position(), newPos);
out.position(newPos);
}
}
@Override
public void readMarshallable(Bytes in) {
setValue(in.readUTFΔ());
}
@Override
public void bytes(Bytes bytes, long offset) {
this._bytes = bytes;
this._offset = offset;
}
@Override
public Bytes bytes() {
return _bytes;
}
@Override
public long offset() {
return _offset;
}
@Override
public int maxSize() {
return 64;
}
public int hashCode() {
long lhc = longHashCode();
return (int) ((lhc >>> 32) ^ lhc);
}
public long longHashCode() {
return calcLongHashCode(getValue());
}
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof StringValue)) return false;
StringValue that = (StringValue) o;
if(!isEqual(getValue(), that.getValue())) return false;
return true;
}
public String toString() {
if (_bytes == null) return "bytes is null";
StringBuilder sb = new StringBuilder();
sb.append("StringValue{ ");
sb.append("value= ").append(getValue());
sb.append(" }");
return sb.toString();
}
}