Package Core

Examples of Core.Pair


    return newContext;
  }


  public String getValue(String key){
    return getAbsoluteContext(new Pair(key,null)).getElem2();
  }
View Full Code Here


    return null;
  }
  public Pair<String,String> popContext(String key){
    if(myContext.containsKey(key)){
      List<String> s = myContext.get(key);
      Pair<String,String> poppedPair = new Pair(key, s.get(s.size()-1));
      myContext.get(key).remove(s.size()-1);
      return poppedPair;
    }
    return null;
  }
View Full Code Here

  public Pair<Integer, Integer> getAbsoluteContext(
      Pair<Integer, Integer> relativeContext) {
    // TODO Auto-generated method stub
    if(positionContext.size() == 0) return relativeContext;
    Pair<Integer,Integer> absPos =  positionContext.get(positionContext.size()-1);
    return new Pair(absPos.getElem1()+relativeContext.getElem1(),
            absPos.getElem2() + relativeContext.getElem2());
  }
View Full Code Here

TOP

Related Classes of Core.Pair

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.