Package net.minecraft.util.org.apache.commons.lang3.tuple

Examples of net.minecraft.util.org.apache.commons.lang3.tuple.ImmutablePair


  /**
   * returns the edge type connecting work a and b
   */
  public TezEdgeProperty getEdgeProperty(BaseWork a, BaseWork b) {
    return edgeProperties.get(new ImmutablePair(a,b));
  }
View Full Code Here


      TezEdgeProperty edgeProp) {
    workGraph.get(a).add(b);
    invertedWorkGraph.get(b).add(a);
    roots.remove(b);
    leaves.remove(a);
    ImmutablePair workPair = new ImmutablePair(a, b);
    edgeProperties.put(workPair, edgeProp);
  }
View Full Code Here

    verify(mockedAuthorizer).checkPrivileges(any(HiveOperationType.class),
        inputsCapturer.capture(), outputsCapturer.capture(),
        any(HiveAuthzContext.class));

    return new ImmutablePair(inputsCapturer.getValue(), outputsCapturer.getValue());
  }
View Full Code Here

            System.out.print(rev);
            System.out.print(" |");
           
            for (Integer classID : classIDs) {
                System.out.print("  ");
                if (ftm.containsKey(new ImmutablePair(classID, rev))) {
                    System.out.print("x");
                } else {
                    System.out.print(" ");
                }
                System.out.print("  |");
View Full Code Here

        int assets = in.readInt();
       
        assert unknown1 == assets || unknown1 == 1;
       
        for (int i = 0; i < assets; i++) {
            offsetMap.add(new ImmutablePair(in.readInt(), in.readInt()));
        }
       
        if (format >= 2) {
            fileSize2 = in.readInt();
            assert fileSize1 <= fileSize2;
View Full Code Here

   * If the file doesn't exists locally, it will copy the file to the temp directory.
   */
  public FutureTask<Path> createTmpFile(String name, String filePath, JobID jobID) {

    synchronized (count) {
      Pair<JobID, String> key = new ImmutablePair(jobID,name);
      if (count.containsKey(key)) {
        count.put(key, count.get(key) + 1);
      } else {
        count.put(key, 1);
      }
View Full Code Here

  /**
   * Leave a 5 seconds delay to clear the local file.
   */
  public void deleteTmpFile(String name, JobID jobID) {
    DeleteProcess dp = new DeleteProcess(name, jobID, count.get(new ImmutablePair(jobID,name)));
    executorService.schedule(dp, 5000L, TimeUnit.MILLISECONDS);
  }
View Full Code Here

      this.oldCount = c;
    }

    public void run() {
      synchronized (count) {
        if (count.get(new ImmutablePair(jobID, name)) != oldCount) {
          return;
        }
      }
      Path tmp = getTempDir(jobID, name);
      try {
View Full Code Here

    @Override
    public List<Pair<ForgeDirection, IPneumaticMachine>> getConnectedPneumatics(){
        List<Pair<ForgeDirection, IPneumaticMachine>> teList = super.getConnectedPneumatics();
        if(accessoryValves != null) {
            for(TileEntityPressureChamberValve valve : accessoryValves) {
                if(valve != this) teList.add(new ImmutablePair(ForgeDirection.UNKNOWN, valve));
            }
        }

        return teList;
    }
View Full Code Here

        List<Pair<ForgeDirection, IPneumaticMachine>> teList = new ArrayList<Pair<ForgeDirection, IPneumaticMachine>>();
        ForgeDirection direction = getInputSide();
        TileEntity te = getTileCache()[direction.ordinal()].getTileEntity();
        IPneumaticMachine machine = ModInteractionUtils.getInstance().getMachine(te);
        if(machine != null && isConnectedTo(direction) && machine.isConnectedTo(direction.getOpposite())) {
            teList.add(new ImmutablePair(direction, machine));
        }
        return teList;
    }
View Full Code Here

TOP

Related Classes of net.minecraft.util.org.apache.commons.lang3.tuple.ImmutablePair

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.