dev.cel.common.internal.AutoValue_Latin1CodePointArray Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of runtime Show documentation
Show all versions of runtime Show documentation
Common Expression Language Runtime for Java
The newest version!
package dev.cel.common.internal;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import dev.cel.common.annotations.Internal;
import java.util.Arrays;
@VisibleForTesting
@Internal
@SuppressWarnings("Immutable")
// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_Latin1CodePointArray extends Latin1CodePointArray {
private final int size;
private final ImmutableList lineOffsets;
private final byte[] codePoints;
private final int offset;
AutoValue_Latin1CodePointArray(
int size,
ImmutableList lineOffsets,
byte[] codePoints,
int offset) {
this.size = size;
if (lineOffsets == null) {
throw new NullPointerException("Null lineOffsets");
}
this.lineOffsets = lineOffsets;
if (codePoints == null) {
throw new NullPointerException("Null codePoints");
}
this.codePoints = codePoints;
this.offset = offset;
}
@Override
public int size() {
return size;
}
@Override
public ImmutableList lineOffsets() {
return lineOffsets;
}
@SuppressWarnings("AutoValueImmutableFields")
@Override
byte[] codePoints() {
return codePoints;
}
@Override
int offset() {
return offset;
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Latin1CodePointArray) {
Latin1CodePointArray that = (Latin1CodePointArray) o;
return this.size == that.size()
&& this.lineOffsets.equals(that.lineOffsets())
&& Arrays.equals(this.codePoints, (that instanceof AutoValue_Latin1CodePointArray) ? ((AutoValue_Latin1CodePointArray) that).codePoints : that.codePoints())
&& this.offset == that.offset();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= size;
h$ *= 1000003;
h$ ^= lineOffsets.hashCode();
h$ *= 1000003;
h$ ^= Arrays.hashCode(codePoints);
h$ *= 1000003;
h$ ^= offset;
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy