Package org.apache.commons.collections.keyvalue

Examples of org.apache.commons.collections.keyvalue.MultiKey


   */
  public Object transform(URI baseUri, URI uri, Source source,
                        Map<QName, Object> parameters, URIResolver resolver) {
    Templates tm;
    synchronized (_templateCache) {
      tm = _templateCache.get(new MultiKey(baseUri, uri));
    }
    if (tm == null)
      throw new XslTransformException("XSL sheet" + uri + " has not been parsed before transformation!");
    try {
      Transformer tf = tm.newTransformer();
View Full Code Here


     * @return Map containing the list of aggregated lower level edges.
     */
    private Map<MultiKey, List<Edge>> aggregateEdges(List<Edge> lowLevelEdges) {
        Map<MultiKey, List<Edge>> nodePairToEdgeMap = new Hashtable<MultiKey, List<Edge>>();
        for (Edge edge : lowLevelEdges) {
            MultiKey key = new MultiKey(edge.source(), edge.target());
            if (nodePairToEdgeMap.containsKey(key)) {
                nodePairToEdgeMap.get(key).add(edge);
            } else {
                List<Edge> edgeList = new ArrayList<Edge>();
                edgeList.add(edge);
View Full Code Here

   
   
    //  Order
    Timestamp DateRequired = rLine.getDateRequired();
    int M_PriceList_ID = rLine.getParent().getM_PriceList_ID();
    MultiKey key = new MultiKey(C_BPartner_ID, DateRequired, M_PriceList_ID);
    m_order = m_cacheOrders.get(key);
    if (m_order == null)
    {
      m_order = new MOrder(getCtx(), 0, get_TrxName());
      m_order.setDatePromised(DateRequired);
View Full Code Here

                return oldValue;
            }
            entry = entry.next;
        }
       
        map.addMapping(index, hashCode, new MultiKey(key1, key2), value);
        return null;
    }
View Full Code Here

     * @param key1  the first key
     * @param key2  the second key
     * @return true if the key matches
     */
    protected boolean isEqualKey(AbstractHashedMap.HashEntry entry, Object key1, Object key2) {
        MultiKey multi = (MultiKey) entry.getKey();
        return
            multi.size() == 2 &&
            (key1 == null ? multi.getKey(0) == null : key1.equals(multi.getKey(0))) &&
            (key2 == null ? multi.getKey(1) == null : key2.equals(multi.getKey(1)));
    }
View Full Code Here

                return oldValue;
            }
            entry = entry.next;
        }
       
        map.addMapping(index, hashCode, new MultiKey(key1, key2, key3), value);
        return null;
    }
View Full Code Here

     * @param key2  the second key
     * @param key3  the third key
     * @return true if the key matches
     */
    protected boolean isEqualKey(AbstractHashedMap.HashEntry entry, Object key1, Object key2, Object key3) {
        MultiKey multi = (MultiKey) entry.getKey();
        return
            multi.size() == 3 &&
            (key1 == null ? multi.getKey(0) == null : key1.equals(multi.getKey(0))) &&
            (key2 == null ? multi.getKey(1) == null : key2.equals(multi.getKey(1))) &&
            (key3 == null ? multi.getKey(2) == null : key3.equals(multi.getKey(2)));
    }
View Full Code Here

                return oldValue;
            }
            entry = entry.next;
        }
       
        map.addMapping(index, hashCode, new MultiKey(key1, key2, key3, key4), value);
        return null;
    }
View Full Code Here

     * @param key3  the third key
     * @param key4  the fourth key
     * @return true if the key matches
     */
    protected boolean isEqualKey(AbstractHashedMap.HashEntry entry, Object key1, Object key2, Object key3, Object key4) {
        MultiKey multi = (MultiKey) entry.getKey();
        return
            multi.size() == 4 &&
            (key1 == null ? multi.getKey(0) == null : key1.equals(multi.getKey(0))) &&
            (key2 == null ? multi.getKey(1) == null : key2.equals(multi.getKey(1))) &&
            (key3 == null ? multi.getKey(2) == null : key3.equals(multi.getKey(2))) &&
            (key4 == null ? multi.getKey(3) == null : key4.equals(multi.getKey(3)));
    }
View Full Code Here

                return oldValue;
            }
            entry = entry.next;
        }
       
        map.addMapping(index, hashCode, new MultiKey(key1, key2, key3, key4, key5), value);
        return null;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.keyvalue.MultiKey

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.