Package org.waveprotocol.wave.model.util

Examples of org.waveprotocol.wave.model.util.StringSet


  /**
   * Removes entire saved object.
   */
  void clear() {
    final StringSet keys = CollectionUtils.createStringSet();
    gadgetSupplements.each(new ProcV<GadgetState>() {
      @Override
      public void apply(String key, GadgetState value) {
        keys.add(key);
      }
    });
    keys.each(new Proc() {
      @Override
      public void apply(String key) {
        gadgetSupplements.get(key).remove();
      }
    });
View Full Code Here


    }
  }

  public void addChildren(String parentType, String ... childTypes) {
    parentType = fixType(parentType);
    StringSet permitted = permittedChildren.get(parentType);
    if (permitted == null) {
      permittedChildren.put(parentType, permitted = CollectionUtils.createStringSet());
    }
    for (String childType : childTypes) {
      checkNotTopLevel(childType);
      permitted.add(childType);
    }
  }
View Full Code Here

    }

    if (permittedValues.length == 0) {
      attrs.put(attrName, null);
    } else {
      StringSet values = attrs.get(attrName);
      if (values == null) {
        attrs.put(attrName, values = CollectionUtils.createStringSet());
      }

      for (String value : permittedValues) {
        values.add(value);
      }
    }
  }
View Full Code Here

  @Override
  public boolean permitsChild(String parentType, String childType) {
    parentType = fixType(parentType);
    checkNotTopLevel(childType);
    StringSet permitted = permittedChildren.get(parentType);
    return permitted != null && permitted.contains(childType);
  }
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.util.StringSet

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.