本文整理了Java中com.google.cloud.Timestamp.equals()
方法的一些代码示例,展示了Timestamp.equals()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Timestamp.equals()
方法的具体详情如下:
包路径:com.google.cloud.Timestamp
类名称:Timestamp
方法名:equals
暂无
代码示例来源:origin: googleapis/google-cloud-java
@Override
boolean valueEquals(Value v) {
if (isCommitTimestamp) {
return v.isCommitTimestamp();
}
if (v.isCommitTimestamp()) {
return isCommitTimestamp;
}
return ((TimestampImpl) v).value.equals(value);
}
代码示例来源:origin: googleapis/google-cloud-java
/**
* Applies a document modification to the document tree. Returns the DocumentChange event for
* successful modifications.
*/
@Nullable
private DocumentChange modifyDoc(QueryDocumentSnapshot newDocument) {
ResourcePath resourcePath = newDocument.getReference().getResourcePath();
DocumentSnapshot oldDocument = documentSet.getDocument(resourcePath);
if (!oldDocument.getUpdateTime().equals(newDocument.getUpdateTime())) {
int oldIndex = documentSet.indexOf(resourcePath);
documentSet = documentSet.remove(resourcePath);
documentSet = documentSet.add(newDocument);
int newIndex = documentSet.indexOf(resourcePath);
return new DocumentChange(newDocument, Type.MODIFIED, oldIndex, newIndex);
}
return null;
};
代码示例来源:origin: com.google.cloud/google-cloud-spanner
@Override
boolean valueEquals(Value v) {
if (isCommitTimestamp) {
return v.isCommitTimestamp();
}
if (v.isCommitTimestamp()) {
return isCommitTimestamp;
}
return ((TimestampImpl) v).value.equals(value);
}
代码示例来源:origin: com.google.cloud/google-cloud-firestore
/**
* Applies a document modification to the document tree. Returns the DocumentChange event for
* successful modifications.
*/
@Nullable
private DocumentChange modifyDoc(QueryDocumentSnapshot newDocument) {
ResourcePath resourcePath = newDocument.getReference().getResourcePath();
DocumentSnapshot oldDocument = documentSet.getDocument(resourcePath);
if (!oldDocument.getUpdateTime().equals(newDocument.getUpdateTime())) {
int oldIndex = documentSet.indexOf(resourcePath);
documentSet = documentSet.remove(resourcePath);
documentSet = documentSet.add(newDocument);
int newIndex = documentSet.indexOf(resourcePath);
return new DocumentChange(newDocument, Type.MODIFIED, oldIndex, newIndex);
}
return null;
};
内容来源于网络,如有侵权,请联系作者删除!