org.apache.pig.newplan
Class PlanEdge

java.lang.Object
  extended by org.apache.pig.impl.util.MultiMap<Operator,Operator>
      extended by org.apache.pig.newplan.PlanEdge
All Implemented Interfaces:
Serializable

public class PlanEdge
extends MultiMap<Operator,Operator>

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.pig.impl.util.MultiMap
mMap
 
Constructor Summary
PlanEdge()
           
PlanEdge(int size)
           
 
Method Summary
 void put(Operator key, Operator value, int pos)
          Add an element to the map.
 Pair<Operator,Integer> removeWithPosition(Operator key, Operator value)
          Remove one value from an existing key and return which position in the arraylist the value was at..
 PlanEdge shallowClone()
           
 
Methods inherited from class org.apache.pig.impl.util.MultiMap
clear, containsKey, containsValue, get, isEmpty, keySet, put, put, remove, removeKey, size, toString, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PlanEdge

public PlanEdge()

PlanEdge

public PlanEdge(int size)
Parameters:
size - Initial size of the map
Method Detail

put

public void put(Operator key,
                Operator value,
                int pos)
Add an element to the map.

Parameters:
key - The key to store the value under. If the key already exists the value will be added to the collection for that key, it will not replace the existing value (as in a standard map).
value - value to store.
pos - position in the arraylist to store the new value at. Positions are zero based.

removeWithPosition

public Pair<Operator,Integer> removeWithPosition(Operator key,
                                                 Operator value)
Remove one value from an existing key and return which position in the arraylist the value was at.. If that is the last value for the key, then remove the key too.

Parameters:
key - Key to remove the value from.
value - Value to remove.
Returns:
A pair containing the value being removed and an integer indicating the position, or null if the key or value does not exist. Positions are zero based.

shallowClone

public PlanEdge shallowClone()


Copyright © 2007-2012 The Apache Software Foundation