本文整理汇总了Java中org.waveprotocol.wave.model.operation.wave.VersionUpdateOp类的典型用法代码示例。如果您正苦于以下问题:Java VersionUpdateOp类的具体用法?Java VersionUpdateOp怎么用?Java VersionUpdateOp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VersionUpdateOp类属于org.waveprotocol.wave.model.operation.wave包,在下文中一共展示了VersionUpdateOp类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isNoop
import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //导入依赖的package包/类
/**
* Returns true iff the wavelet operation is considered a no-op as far as undo
* is concerned.
*
* @param op
*/
static boolean isNoop(WaveletOperation op) {
if (op instanceof VersionUpdateOp || op instanceof NoOp) {
return true;
} else if (op instanceof AddParticipant || op instanceof RemoveParticipant
|| op instanceof WaveletBlipOperation) {
return false;
} else {
// This happens when the op parameter is a non-core subclass of
// WaveletOperation, not supported by wave.
throw new RuntimeException("Unhandled op:" + op.getClass());
}
}
示例2: checkVersionUpdate
import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //导入依赖的package包/类
private void checkVersionUpdate(WaveletOperation operation, long versionIncrement,
HashedVersion distinctVersion) {
assertTrue(operation instanceof VersionUpdateOp);
VersionUpdateOp vop = (VersionUpdateOp) operation;
assertEquals(versionIncrement, vop.getContext().getVersionIncrement());
assertEquals(distinctVersion, vop.getContext().getHashedVersion());
}
示例3: visitVersionUpdateOp
import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //导入依赖的package包/类
@Override
public void visitVersionUpdateOp(VersionUpdateOp op) {
// Not serialisable
}
示例4: visitVersionUpdateOp
import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //导入依赖的package包/类
@Override
public void visitVersionUpdateOp(VersionUpdateOp op) {
throw new UnsupportedOperationException();
}
示例5: checkVersionUpdate
import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //导入依赖的package包/类
private void checkVersionUpdate(WaveletOperation operation, HashedVersion distinctVersion) {
assertTrue(operation instanceof VersionUpdateOp);
VersionUpdateOp vop = (VersionUpdateOp) operation;
assertEquals(distinctVersion, vop.getContext().getHashedVersion());
}