Package org.neo4j.batchimport.collections

Source Code of org.neo4j.batchimport.collections.PrimitiveIntReverseRelationshipMap

package org.neo4j.batchimport.collections;

import edu.ucla.sspace.util.primitive.IntIntHashMultiMap;
import edu.ucla.sspace.util.primitive.IntIntMultiMap;
import edu.ucla.sspace.util.primitive.IntSet;

/**
* @author mh
* @since 27.10.12
*/
public class PrimitiveIntReverseRelationshipMap { // implements ReverseRelationshipMap {
    private final IntIntMultiMap inner=new IntIntHashMultiMap();

    public void add(int key, int value) {
        inner.put(key,value);
    }

    public int[] remove(int key) {
        IntSet relIds = inner.remove(key);
        if (relIds==null) return null;
        return relIds.toPrimitiveArray();
    }
}
TOP

Related Classes of org.neo4j.batchimport.collections.PrimitiveIntReverseRelationshipMap

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.