本文整理匯總了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());
}