Package org.waveprotocol.wave.model.util.ReadableStringSet

Examples of org.waveprotocol.wave.model.util.ReadableStringSet.Proc


    Preconditions.checkPositionIndexes(start, end, annotations.size());
    Preconditions.checkNotNull(keys, "GenericAnnotationCursor: Key set must not be null");

    this.annotations = annotations;
    this.end = end;
    keys.each(new Proc() {
      @Override
      public void apply(String key) {
        advance(new KeyLocation(key, start));
      }
    });
View Full Code Here


      // TODO(danilatos): More efficient, too much hashmap munging.
      boundaryBefore = new HashMap<String, Object>();
      boundaryAfter = new HashMap<String, Object>();

      nextChangingKeys.each(new Proc() {
        @Override
        public void apply(String key) {
          Object newValue = localAnnotations.getAnnotation(start, key);

          boundaryBefore.put(key, currentValues.get(key));
View Full Code Here

    }
    return annotations.lastAnnotationChange(start, end, key, fromValue);
  }

  void checkValidPersistentKeys(ReadableStringSet keys) {
    keys.each(new Proc() {
      @Override
      public void apply(String key) {
        Annotations.checkPersistentKey(key);
      }
    });
View Full Code Here

  }

  @Override
  public StringSet knownKeys() {
    final StringSet knownKeys = CollectionUtils.createStringSet();
    annotations.knownKeysLive().each(new Proc() {
      @Override
      public void apply(String key) {
        if (!Annotations.isLocal(key)) {
          knownKeys.add(key);
        }
View Full Code Here

          public AnnotationMap updateWithNoCompatibilityCheck(AnnotationsUpdate mutation) {
            return new AnnotationMapImpl(this).updateWithNoCompatibilityCheck(mutation);
          }
        }
        final AnnoMap annotations = new AnnoMap();
        doc.knownKeys().each(new Proc() {
          @Override
          public void apply(String key) {
            String value = doc.getAnnotation(pos, key);
            if (value != null) {
              annotations.put(key, value);
View Full Code Here

        new DefaultAnnotationBehaviour(AnnotationFamily.CONTENT) {
      @Override
      public BiasDirection getBias(final StringMap<Object> left, final StringMap<Object> right,
          CursorDirection cursor) {
        final Box<BiasDirection> ret = Box.create(BiasDirection.NEITHER);
        KEYS.each(new Proc() {
          @Override
          public void apply(String key) {
            if (left.get(key) != null) {
              ret.boxed = BiasDirection.RIGHT;
            } else if (right.get(key) != null) {
View Full Code Here

                open.remove(key);
              }
            }
          });
        }
        open.each(new Proc() {
          @Override
          public void apply(String key) {
            events.add(new AnnotationEndEvent(finalLocation, key));
          }
        });
View Full Code Here

      //System.out.print(" ---> " + requestedValues + ",   " + newValues + ",   " + endKeys);
      //System.out.println(",   " + deletionValues);
    }

    private void closeEndKeys() {
      endKeys.each(new Proc() {
        @Override
        public void apply(String key) {
          builder.endAnnotation(key);
        }
      });
View Full Code Here

        }
      });
    }

    // fill in values that change
    keysToCheck.each(new Proc() {
      public void apply(String key) {
        String left = leftValues.get(key);
        String right = rightValues.get(key);
        if (ValueUtils.notEqual(left, right)) {
          leftSide.put(key, left);
View Full Code Here

  }

  public void refresh() {
    final EditorUpdateEventImpl updates = editor.debugGetUpdateEventImpl();
    updateEventsPanel.clear();
    updates.debugGetAllUpdateEventNames().each(new Proc() {
      @Override
      public void apply(final String element) {
        addCheckBox(updateEventsPanel, element,
            !updates.debugGetSuppressedUpdateEventNames().contains(element),
            new ValueChangeHandler<Boolean>() {
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.util.ReadableStringSet.Proc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.