/** * Convert a protocol buffer Comparator to a ByteArrayComparable * * @param proto the protocol buffer Comparator to convert * @return the converted ByteArrayComparable */ @SuppressWarnings("unchecked") public static ByteArrayComparable toComparator(ComparatorProtos.Comparator proto) throws IOException { String type = proto.getName(); String funcName = "parseFrom"; byte [] value = proto.getSerializedComparator().toByteArray(); try { Class<?> c = Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER); Method parseFrom = c.getMethod(funcName, byte[].class); if (parseFrom == null) { throw new IOException("Unable to locate function: " + funcName + " in type: " + type); } return (ByteArrayComparable)parseFrom.invoke(null, value); } catch (Exception e) { throw new IOException(e); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasSerializedComparator()) { hash = (37 * hash) + SERIALIZED_COMPARATOR_FIELD_NUMBER; hash = (53 * hash) + getSerializedComparator().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other = (org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasSerializedComparator() == other.hasSerializedComparator()); if (hasSerializedComparator()) { result = result && getSerializedComparator() .equals(other.getSerializedComparator()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
/** * Convert a protocol buffer Comparator to a ByteArrayComparable * * @param proto the protocol buffer Comparator to convert * @return the converted ByteArrayComparable */ @SuppressWarnings("unchecked") public static ByteArrayComparable toComparator(ComparatorProtos.Comparator proto) throws IOException { String type = proto.getName(); String funcName = "parseFrom"; byte [] value = proto.getSerializedComparator().toByteArray(); try { Class<? extends ByteArrayComparable> c = (Class<? extends ByteArrayComparable>)Class.forName(type, true, CLASS_LOADER); Method parseFrom = c.getMethod(funcName, byte[].class); if (parseFrom == null) { throw new IOException("Unable to locate function: " + funcName + " in type: " + type); } return (ByteArrayComparable)parseFrom.invoke(null, value); } catch (Exception e) { throw new IOException(e); } }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other = (org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasSerializedComparator() == other.hasSerializedComparator()); if (hasSerializedComparator()) { result = result && getSerializedComparator() .equals(other.getSerializedComparator()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other = (org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasSerializedComparator() == other.hasSerializedComparator()); if (hasSerializedComparator()) { result = result && getSerializedComparator() .equals(other.getSerializedComparator()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator)) { return super.equals(obj); } org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other = (org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator) obj; boolean result = true; result = result && (hasName() == other.hasName()); if (hasName()) { result = result && getName() .equals(other.getName()); } result = result && (hasSerializedComparator() == other.hasSerializedComparator()); if (hasSerializedComparator()) { result = result && getSerializedComparator() .equals(other.getSerializedComparator()); } result = result && getUnknownFields().equals(other.getUnknownFields()); return result; }
/** * Convert a protocol buffer Comparator to a ByteArrayComparable * * @param proto the protocol buffer Comparator to convert * @return the converted ByteArrayComparable */ @SuppressWarnings("unchecked") public static ByteArrayComparable toComparator(ComparatorProtos.Comparator proto) throws IOException { String type = proto.getName(); String funcName = "parseFrom"; byte [] value = proto.getSerializedComparator().toByteArray(); try { Class<?> c = Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER); Method parseFrom = c.getMethod(funcName, byte[].class); if (parseFrom == null) { throw new IOException("Unable to locate function: " + funcName + " in type: " + type); } return (ByteArrayComparable)parseFrom.invoke(null, value); } catch (Exception e) { throw new IOException(e); } }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasSerializedComparator()) { hash = (37 * hash) + SERIALIZED_COMPARATOR_FIELD_NUMBER; hash = (53 * hash) + getSerializedComparator().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasSerializedComparator()) { hash = (37 * hash) + SERIALIZED_COMPARATOR_FIELD_NUMBER; hash = (53 * hash) + getSerializedComparator().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptorForType().hashCode(); if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasSerializedComparator()) { hash = (37 * hash) + SERIALIZED_COMPARATOR_FIELD_NUMBER; hash = (53 * hash) + getSerializedComparator().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other) { if (other == org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasSerializedComparator()) { setSerializedComparator(other.getSerializedComparator()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other) { if (other == org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasSerializedComparator()) { setSerializedComparator(other.getSerializedComparator()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other) { if (other == org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasSerializedComparator()) { setSerializedComparator(other.getSerializedComparator()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>optional bytes serialized_comparator = 2;</code> */ public Builder clearSerializedComparator() { bitField0_ = (bitField0_ & ~0x00000002); serializedComparator_ = getDefaultInstance().getSerializedComparator(); onChanged(); return this; }
/** * <code>optional bytes serialized_comparator = 2;</code> */ public Builder clearSerializedComparator() { bitField0_ = (bitField0_ & ~0x00000002); serializedComparator_ = getDefaultInstance().getSerializedComparator(); onChanged(); return this; }
/** * <code>optional bytes serialized_comparator = 2;</code> */ public Builder clearSerializedComparator() { bitField0_ = (bitField0_ & ~0x00000002); serializedComparator_ = getDefaultInstance().getSerializedComparator(); onChanged(); return this; }
/** * Convert a protocol buffer Comparator to a ByteArrayComparable * * @param proto the protocol buffer Comparator to convert * @return the converted ByteArrayComparable */ @SuppressWarnings("unchecked") public static ByteArrayComparable toComparator(ComparatorProtos.Comparator proto) throws IOException { String type = proto.getName(); String funcName = "parseFrom"; byte [] value = proto.getSerializedComparator().toByteArray(); try { Class<?> c = Class.forName(type, true, ClassLoaderHolder.CLASS_LOADER); Method parseFrom = c.getMethod(funcName, byte[].class); if (parseFrom == null) { throw new IOException("Unable to locate function: " + funcName + " in type: " + type); } return (ByteArrayComparable)parseFrom.invoke(null, value); } catch (Exception e) { throw new IOException(e); } }
public Builder mergeFrom(org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator other) { if (other == org.apache.hadoop.hbase.protobuf.generated.ComparatorProtos.Comparator.getDefaultInstance()) return this; if (other.hasName()) { bitField0_ |= 0x00000001; name_ = other.name_; onChanged(); } if (other.hasSerializedComparator()) { setSerializedComparator(other.getSerializedComparator()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }
/** * <code>optional bytes serialized_comparator = 2;</code> */ public Builder clearSerializedComparator() { bitField0_ = (bitField0_ & ~0x00000002); serializedComparator_ = getDefaultInstance().getSerializedComparator(); onChanged(); return this; }