Examples of clone()


Examples of org.spout.api.inventory.ItemStack.clone()

      Slot selected = inventory.getQuickbar().getSelectedSlot();
      ItemStack drop = selected.get();
      if (drop == null) {
        return;
      } else {
        drop = drop.clone().setAmount(1);
      }
      selected.addAmount(-1);
      dropItem(drop);
    }
  }
View Full Code Here

Examples of org.spoutcraft.api.inventory.ItemStack.clone()

        int amountCursor = stackInSlot.getAmount() - amountSlot;
        if (stackInSlot.getAmount() == 1) {
          amountSlot = 0;
          amountCursor = 1;
        }
        stackOnCursor = stackInSlot.clone();
        stackOnCursor.setAmount(amountCursor);
        stackInSlot.setAmount(amountSlot);
        if (amountSlot == 0) {
          stackInSlot = new ItemStack(0);
        }
View Full Code Here

Examples of org.takadb.editor.database.entities.CategoryEntity.clone()

   */
  public CategoryEntity getCategory (Integer categoryId) {
   
    CategoryEntity category = (CategoryEntity)categories.get (categoryId);
   
    return (CategoryEntity)category.clone();

  }

  /*
   * Retrieve an ArrayList of all DBSQLCategories' IDs from the local database
View Full Code Here

Examples of org.takadb.editor.database.entities.CharacterEntity.clone()

   */
  public CharacterEntity getCharacter (Integer characterId) {
   
    CharacterEntity character = (CharacterEntity)characters.get (characterId);
   
    return (CharacterEntity)character.clone();

  }

  /*
   * Retrieve an ArrayList of all DBSQLCharacters' IDs from the local database
View Full Code Here

Examples of org.takadb.editor.database.entities.ElementEntity.clone()

  public ElementEntity getElement (ElementEntity.Identifier identifier) {

    ElementEntity element = (ElementEntity)elements.get (new Integer (identifier.elementId));

    if (element != null)
      return (ElementEntity)element.clone();
    return null;

  }

 
View Full Code Here

Examples of org.takadb.editor.database.entities.RadicalEntity.clone()

   */
  public RadicalEntity getRadical (Integer radicalNumber) {
   
    RadicalEntity radical = (RadicalEntity)radicals.get (radicalNumber);
   
    return (RadicalEntity)radical.clone();

  }

  /*
   * Retrieve an ArrayList of all DBSQLRadicals' IDs from the local database
View Full Code Here

Examples of org.teiid.query.mapping.xml.MappingDocument.clone()

        // lookup mapping node for the user command
        GroupSymbol group = xmlQuery.getFrom().getGroups().iterator().next();

        MappingDocument doc = (MappingDocument)metadata.getMappingNode(group.getMetadataID());
        doc = (MappingDocument)doc.clone();
       
        // make a copy of the document
        planEnv.mappingDoc = doc;
    planEnv.documentGroup = group;
        planEnv.xmlCommand = (Query) command;
View Full Code Here

Examples of org.teiid.query.processor.ProcessorPlan.clone()

   
        // cloning the plan inside the resultset is not possible
        // because of the dependencies.
        ResultSetInfo clone = (ResultSetInfo)info.clone();
        ProcessorPlan plan = clone.getPlan();
        plan = plan.clone();
        clone.setPlan(plan);
       
        return new RelationalPlanExecutor(clone, this.commandContext, this.dataMgr, this.bufferMgr);
    }
   
View Full Code Here

Examples of org.teiid.query.resolver.util.AccessPattern.clone()

                        continue;
                    }
                   
                    joinSources.remove();
                    satisfiedAP = true;
                    joinSource.setProperty(NodeConstants.Info.ACCESS_PATTERN_USED, ap.clone());
                    joinSource.setProperty(NodeConstants.Info.REQUIRED_ACCESS_PATTERN_GROUPS, allRequiredGroups);
                    break;
                }
            }
        }
View Full Code Here

Examples of org.teiid.query.sql.lang.Command.clone()

        throw new RuntimeException(e);
    }

    assertEquals("Parse string does not match: ", expectedString, actualString); //$NON-NLS-1$
    assertEquals("Command objects do not match: ", expectedCommand, actualCommand);         //$NON-NLS-1$
    assertEquals("Cloned command objects do not match: ", expectedCommand, actualCommand.clone());         //$NON-NLS-1$
  }

  static void helpTestExpression(String sql, String expectedString, Expression expected) throws QueryParserException {
    Expression  actual = QueryParser.getQueryParser().parseExpression(sql);
    String actualString = actual.toString();
View Full Code Here
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.