本文整理了Java中com.google.protobuf.Struct.internalGetFields()
方法的一些代码示例,展示了Struct.internalGetFields()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Struct.internalGetFields()
方法的具体详情如下:
包路径:com.google.protobuf.Struct
类名称:Struct
方法名:internalGetFields
暂无
代码示例来源:origin: com.google.protobuf/protobuf-java
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 1:
return internalGetFields();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
代码示例来源:origin: com.google.protobuf/protobuf-java
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.protobuf.Struct)) {
return super.equals(obj);
}
com.google.protobuf.Struct other = (com.google.protobuf.Struct) obj;
boolean result = true;
result = result && internalGetFields().equals(
other.internalGetFields());
result = result && unknownFields.equals(other.unknownFields);
return result;
}
代码示例来源:origin: com.google.protobuf/protobuf-java
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetFields(),
FieldsDefaultEntryHolder.defaultEntry,
1);
unknownFields.writeTo(output);
}
代码示例来源:origin: com.google.protobuf/protobuf-java
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public java.util.Map<java.lang.String, com.google.protobuf.Value> getFieldsMap() {
return internalGetFields().getMap();
}
/**
代码示例来源:origin: com.google.protobuf/protobuf-java
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public boolean containsFields(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetFields().getMap().containsKey(key);
}
/**
代码示例来源:origin: com.google.protobuf/protobuf-java
public int getFieldsCount() {
return internalGetFields().getMap().size();
}
/**
代码示例来源:origin: com.google.protobuf/protobuf-java
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public com.google.protobuf.Value getFieldsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, com.google.protobuf.Value> map =
internalGetFields().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
代码示例来源:origin: com.google.protobuf/protobuf-java
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public com.google.protobuf.Value getFieldsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, com.google.protobuf.Value> map =
internalGetFields().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
代码示例来源:origin: com.google.protobuf/protobuf-java
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetFields().getMap().isEmpty()) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + internalGetFields().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
代码示例来源:origin: com.google.protobuf/protobuf-java
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Value> entry
: internalGetFields().getMap().entrySet()) {
com.google.protobuf.MapEntry<java.lang.String, com.google.protobuf.Value>
fields__ = FieldsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, fields__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
代码示例来源:origin: yeriomin/play-store-api
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public java.util.Map<java.lang.String, com.google.protobuf.Value> getFieldsMap() {
return java.util.Collections.unmodifiableMap(
internalGetFields());
}
/**
代码示例来源:origin: yeriomin/play-store-api
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public com.google.protobuf.Value getFieldsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, com.google.protobuf.Value> map =
internalGetFields();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
代码示例来源:origin: yeriomin/play-store-api
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public com.google.protobuf.Value getFieldsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map<java.lang.String, com.google.protobuf.Value> map =
internalGetFields();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
/**
代码示例来源:origin: yeriomin/play-store-api
public int getFieldsCount() {
return internalGetFields().size();
}
/**
代码示例来源:origin: yeriomin/play-store-api
/**
* <pre>
* Unordered map of dynamically typed values.
* </pre>
*
* <code>map<string, .google.protobuf.Value> fields = 1;</code>
*/
public boolean containsFields(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetFields().containsKey(key);
}
/**
代码示例来源:origin: yeriomin/play-store-api
public int getSerializedSize() {
int size = memoizedSerializedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Value> entry
: internalGetFields().entrySet()) {
size += FieldsDefaultEntryHolder.defaultEntry.computeMessageSize(
1, entry.getKey(), entry.getValue());
}
memoizedSerializedSize = size;
return size;
}
代码示例来源:origin: yeriomin/play-store-api
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (java.util.Map.Entry<java.lang.String, com.google.protobuf.Value> entry
: internalGetFields().entrySet()) {
FieldsDefaultEntryHolder.defaultEntry.serializeTo(
output, 1, entry.getKey(), entry.getValue());
}
}
代码示例来源:origin: yeriomin/play-store-api
com.google.protobuf.Struct other = (com.google.protobuf.Struct) arg1;
fields_ = visitor.visitMap(
fields_, other.internalGetFields());
if (visitor == com.google.protobuf.GeneratedMessageLite.MergeFromVisitor
.INSTANCE) {
内容来源于网络,如有侵权,请联系作者删除!