當前位置: 首頁>>代碼示例>>Java>>正文


Java VersionUpdateOp類代碼示例

本文整理匯總了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());
  }
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:19,代碼來源:OpUtils.java

示例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());
}
 
開發者ID:apache,項目名稱:incubator-wave,代碼行數:8,代碼來源:DeltaPairTest.java

示例3: visitVersionUpdateOp

import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //導入依賴的package包/類
@Override
public void visitVersionUpdateOp(VersionUpdateOp op) {
  // Not serialisable
}
 
開發者ID:ArloJamesBarnes,項目名稱:walkaround,代碼行數:5,代碼來源:OperationSerializer.java

示例4: visitVersionUpdateOp

import org.waveprotocol.wave.model.operation.wave.VersionUpdateOp; //導入依賴的package包/類
@Override
public void visitVersionUpdateOp(VersionUpdateOp op) {
  throw new UnsupportedOperationException();
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:5,代碼來源:WaveletOperationInverter.java

示例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());
}
 
開發者ID:jorkey,項目名稱:Wiab.pro,代碼行數:6,代碼來源:DeltaPairTest.java


注:本文中的org.waveprotocol.wave.model.operation.wave.VersionUpdateOp類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。