Package com.trifork.clj_ds

Examples of com.trifork.clj_ds.IPersistentCollection.seq()


      Map<EObject, IPersistentCollection> map) {
   
    for (Map.Entry<EObject, IPersistentCollection> ent : map.entrySet()) {

      IPersistentCollection values = ent.getValue();
      for (ISeq seq = values.seq(); seq != null; seq = seq.next()) {
        ETuple val = (ETuple) seq.first();
        if (matches(val)) {
          vals = vals.cons(val);
        }
      }
View Full Code Here


        map = map.next();
        collent = (IMapEntry) map.first();
        c = (IPersistentCollection) collent.getValue();
      }
     
      coll = c.seq();
      map_seq = map.next();
    }
   
    ELSeq(ISeq coll, ISeq map_seq) {
      this.coll = coll;
View Full Code Here

  protected ESeq lookup(EObject key) {
    IPersistentMap ipm = deref();
    IPersistentCollection set = (IPersistentCollection) ipm.valAt(key);
    ESeq res = ERT.NIL;
    if (set == null) return res;
    for(ISeq s = set.seq(); s != null; s = s.next())
    {
      res = res.cons((EObject) s.first());
    }   
    return res.reverse();
  }
View Full Code Here

   
    IPersistentMap map = deref();
    IPersistentCollection coll = (IPersistentCollection) map.valAt(key);
    if (coll == null) return ERT.NIL;
   
    return matcher.match_vars(ERT.NIL, coll.seq()).reverse();
  }
 

  @SuppressWarnings("rawtypes")
  @Override
View Full Code Here

   
    IPersistentMap map = deref();
    IPersistentCollection coll = (IPersistentCollection) map.valAt(key);
    if (coll == null) return ERT.NIL;
   
    return matcher.match_members(ERT.NIL, coll.seq()).reverse();
  }

  @Override
  protected void delete(final EObject key) {
    in_tx(new WithMap<Object>() {
View Full Code Here

    } else {
      IPersistentCollection coll = (IPersistentCollection) map.valAt(key);
      if (coll == null) {
        return Native.am_$end_of_table;       
      } else {
        EBagCont cont0 = new EBagCont(matcher, null, coll.seq(), limit);
        return cont0.select();
      }
    }
   
  }
View Full Code Here

        if (key == null) {
          vals = matcher.matching_values_bag(vals, (Map<EObject, IPersistentCollection>) map);
        } else {
          IPersistentCollection coll = (IPersistentCollection) map.valAt(key);
          if (coll != null) {
            vals = matcher.matching_values_coll(vals, coll.seq());
          }
        }
       
        int count = 0;
        for (; !vals.isNil(); vals = vals.tail()) {
View Full Code Here

      while ((seq_has_more(map_seq) || seq_has_more(coll_seq)) && (limit < 0 || count < limit)) {
       
        if (!seq_has_more(coll_seq)) {
          IMapEntry ent = (IMapEntry) map_seq.first();
          IPersistentCollection coll = (IPersistentCollection) ent.getValue();
          coll_seq = coll.seq();
          map_seq = map_seq.next();
        }
       
        assert seq_has_more(coll_seq);
       
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.