query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
listlengths 3
101
| negative_scores
listlengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
TODO Autogenerated method stub | @Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if (outState != null) {
outState.putParcelableArrayList(NewsBean.KEY_NEWS, news);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
TODO all this logic to find/search boundary has to move to separate class say BoundaryRepository and just call the api/method here | public Boolean isBoundaryExists(Property property,RequestInfo requestInfo,Long id){
StringBuffer BoundaryURI = new StringBuffer();
BoundaryURI.append(env.getProperty("egov.services.egov_location.hostname"))
.append(env.getProperty("egov.services.egov_location.searchpath"));
URI uri = UriComponentsBuilder.fromUriString(BoundaryURI.toString())
.queryParam("Boundary.tenantId", property.getTenantId()).queryParam("Boundary.id", id).build(true)
.encode().toUri();
logger.info("BoundaryRepository BoundaryURI ---->> "+BoundaryURI.toString()+" \n request uri ---->> "+uri);
try {
BoundaryResponseInfo boundaryResponseInfo = restTemplate.getForObject(uri, BoundaryResponseInfo.class);
logger.info("BoundaryRepository BoundaryResponseInfo ---->> "+boundaryResponseInfo);
if (boundaryResponseInfo.getResponseInfo() != null && boundaryResponseInfo.getBoundary().size() != 0) {
return true;
} else {
throw new InvalidPropertyBoundaryException(env.getProperty("invalid.property.boundary"),
env.getProperty("invalid.property.boundary.message").replace("{boundaryId}", "" + id),
requestInfo);
}
} catch (HttpClientErrorException ex) {
throw new ValidationUrlNotFoundException(env.getProperty("invalid.property.boundary.validation.url"),
uri.toString(), requestInfo);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<Integer, Geometry> getBoundary() throws SQLException {\n return retrieveExpected(createNativeBoundaryStatement(), GEOMETRY);\n }",
"Collection<? extends Boundary> getIsBoundaryNodeOf();",
"public int getBoundary() {\n return boundary;\n }",
"public void computeStoredBounds()\n {\n computeSRectangleBound();\n computeCircleBound();\n }",
"public ReferencedEnvelope getBounds(){\n if(bounds==null){\n // Create Null envelope\n this.bounds = new ReferencedEnvelope(getCRS());\n // First try to find the BBOX definition in the gisNode directly\n try{\n if(gisNode.hasProperty(INeoConstants.PROPERTY_BBOX_NAME)){\n double[] bbox = (double[])gisNode.getProperty(INeoConstants.PROPERTY_BBOX_NAME);\n this.bounds = new ReferencedEnvelope(bbox[0],bbox[1],bbox[2],bbox[3],crs);\n }else{\n System.err.println(\"No BBox defined in the GeoNeo object\");\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n // Secondly, if bounds is still empty, try find all feature geometries and calculate bounds\n try{\n if(this.bounds.isNull()){\n // Try to create envelope from any data referenced by the gisNode\n for(GeoNode node:getGeoNodes()){\n //TODO: support high dimensions\n this.bounds.expandToInclude(node.getCoords()[0], node.getCoords()[1]);\n }\n }\n }catch(Exception bbox_e){\n System.err.println(\"Failed to interpret BBOX: \"+bbox_e.getMessage());\n bbox_e.printStackTrace(System.err);\n }\n }\n return bounds;\n }",
"@Override\n\tpublic Rectangle getBound() {\n\t\trectBound.setX(posX+20);\n\t\trectBound.setY(Y_LAND - image.getHeight() +10);\n\t\trectBound.setWidth(image.getWidth()-10);\n\t\trectBound.setHeight(image.getHeight());\n\t\treturn rectBound;\n\t}",
"public BoundaryCheck(String id) {\n this.id = id;\n }",
"public int getBound();",
"@SuppressWarnings(\"unused\")\npublic interface ExerciseFacilityRepository extends MongoRepository<ExerciseFacility,String> {\n\n List<ExerciseFacility> findByCoordinatesWithin(Circle c);\n\n List<ExerciseFacility> findByCoordinatesWithin(Box c);\n\n List<ExerciseFacility> findByCoordinatesWithin(Point p, Distance d);\n}",
"public void computeCircleBound()\n {\n this.savedCircleBound = getCircleBound();\n }",
"public interface RefZoneGeoService {\n\n /**\n * Save a refZoneGeo.\n *\n * @param refZoneGeoDTO the entity to save\n * @return the persisted entity\n */\n RefZoneGeoDTO save(RefZoneGeoDTO refZoneGeoDTO);\n\n /**\n * Get all the refZoneGeos.\n *\n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<RefZoneGeoDTO> findAll(Pageable pageable);\n\n /**\n * Get the \"id\" refZoneGeo.\n *\n * @param id the id of the entity\n * @return the entity\n */\n RefZoneGeoDTO findOne(Long id);\n\n /**\n * Delete the \"id\" refZoneGeo.\n *\n * @param id the id of the entity\n */\n void delete(Long id);\n\n /**\n * Search for the refZoneGeo corresponding to the query.\n *\n * @param query the query of the search\n * \n * @param pageable the pagination information\n * @return the list of entities\n */\n Page<RefZoneGeoDTO> search(String query, Pageable pageable);\n}",
"public Rectangle getBound(){\n \tint x = (int)location.getX();\n \tint y = (int)location.getY();\n \t\n \tif(isExploded == false)\n \t\treturn new Rectangle(x, y, image.getWidth(null), image.getHeight(null));\n \telse\n \t\treturn new Rectangle(x,y, 1,1);\n }",
"ObstacleQuery createObstacleQuery();",
"public void buildInitialBand()\r\n\t{\n\t\r\n\tint bl = boundary.size();\r\n\tfor(int i=0; i<bl; i++) \r\n\t\t{\r\n\t\tInt2d bCur = boundary.get(i);\r\n\t\t//System.out.println(bCur.x + \", \" + bCur.y + \": size = \" + heap.size());\r\n\t\t\r\n\t\ttestPointsAround(bCur.x,bCur.y);\r\n\t\t}\r\n\t\r\n\t}",
"public void setBoundary(int value) {\n this.boundary = value;\n }",
"public void validatePropertyBoundary(Property property, RequestInfo requestInfo)\n\t\t\tthrows InvalidPropertyBoundaryException {\n\n\t\tList<String> fields = getAllBoundaries();\n\t\t//TODO location service gives provision to search by multiple ids, no need to do multiple calls for each boundary id\n\t\tfor (String field : fields) {\n\t\t\tvalidateBoundaryFields(property, field, requestInfo);\n\t\t}\n\t}",
"public interface BuildingBlockService {\n\n\t/**\n\t * Retrieves the building block by id.\n\t * \n\t * @param id\n\t * the id of building block to be retrieved.\n\t * @return building block.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tBuildingBlock findBuildingBlockById(Long id) throws BusinessException;\n\n\t/**\n\t * Retrieves all building blocks available.\n\t * \n\t * @return all building blocks available.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tCollection<BuildingBlock> findAllBuildingBlocks() throws BusinessException;\n\n\t/**\n\t * Saves the building block.\n\t * \n\t * @return the persisted building block.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tBuildingBlock saveBuildingBlock(BuildingBlock buildingBlock) throws BusinessException;\n\n\t/**\n\t * Removes the building block.\n\t * \n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tvoid removeBuildingBlock(BuildingBlock buildingBlock) throws BusinessException;\n\n\t/**\n\t * Retrieves all building blocks by building block type.\n\t * \n\t * @return all building blocks by building block type.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tCollection<BuildingBlock> findBuildingBlocksByType(BuildingBlockConstant buildingBlockType) throws BusinessException;\n\n\t/**\n\t * Retrieves all building blocks for branch id.\n\t * \n\t * @param branchId\n\t * branch object id for which all building blocks have to be\n\t * retrieved.\n\t * @return all building blocks for branch id.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tCollection<BuildingBlock> findBuildingBlocksbyBranchId(Long branchId) throws BusinessException;\n\n\t/**\n\t * Retrieves all building blocks for branch id and building block type.\n\t * \n\t * @param branchId\n\t * branch object id.\n\t * @param buildingBlockType\n\t * building block type.\n\t * @return all building blocks for branch id and building block type.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tCollection<BuildingBlock> findBuildingBlocksbyBranchIdAndBuildingBlockType(Long branchId, BuildingBlockConstant buildingBlockType) throws BusinessException;\n\n\t/**\n\t * Retrieves building block by building block type and code.\n\t * \n\t * @param buildingBlockType\n\t * building block type.\n\t * \n\t * @param code\n\t * building block code.\n\t * @return all building blocks by building block type.\n\t * @throws BusinessException\n\t * In case of exception.\n\t */\n\tBuildingBlock findBuildingBlockByTypeAndCode(BuildingBlockConstant buildingBlockType, String code) throws BusinessException;\n\n\t/**\n\t * Retrieve all mandatory building blocks.\n\t * \n\t * @return collection of all mandatory building blocks.\n\t */\n\tCollection<BuildingBlock> findAllMandatoryBuildingBlocks() throws SystemException;\n\n\t/**\n\t * Retrieve all fee Type building blocks for a branch by fee classification.\n\t * \n\t * @param branchId\n\t * the branch id.\n\t * @param feeClassificationLevel\n\t * the fee classification level constant.\n\t * @return\n\t * @throws BusinessException\n\t * in case of any business exceptions.\n\t */\n\tCollection<BuildingBlock> findFeeTypeBuildingBlocksbyBranchIdAndFeeClassificationLevel(final Long branchId,\n\t\t\tFeeClassificationLevelConstant feeClassificationLevel) throws BusinessException, SystemException;\n\n\t/**\n\t * Retrieve all fee Type building block for a branch by fee type.\n\t * \n\t * @param branchId\n\t * the branch id.\n\t * @param feeClassificationLevel\n\t * the fee classification level constant.\n\t * @return\n\t * @throws BusinessException\n\t * in case of any business exceptions.\n\t */\n\tCollection<BuildingBlock> findFeeTypeBuildingBlocksbyBranchIdAndFeeType(Long branchId, final FeeTypeConstant feeTypeConstant) throws BusinessException,\n\t\t\tSystemException;\n}",
"public abstract List<LocationDto> searchBuilding(int Building_id);",
"@Dimensional(designDocument = \"userGeo\", spatialViewName = \"byLocation\")\n List<User> findByLocationWithin(Box cityBoundingBox);",
"public void computeSRectangleBound()\n {\n this.savedSRectangleBound = getSRectangleBound();\n }",
"private HashMap setupBoundBoxes(BioMightBoundBox bioMightBoundBoxIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxMap = new HashMap();\r\n\t\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\r\n\t\t// Initialize the BoundBoxes. This is used for\r\n\t\t// collections such as arms, legs,lungs,etc\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\t\r\n\t\t// Use the information in the incomiing Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxIn != null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Arm - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxIn.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxIn.getZPos());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Arm\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-12.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\t\r\n\t\txVector= new BigDecimal(9.0);\r\n\t\tyVector= new BigDecimal(8.0); \r\n\t\tzVector= new BigDecimal(4.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Arm Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -9.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, \"ArmEpithelialCell\",\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(\"ArmEpithelialCell\", bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\tboundingBoxMap.put(Constants.ArmEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// ARMS BOUND BOXES\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Left Arm\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftArmRef, bioBoundBox);\t\r\n\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT ARMS BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Bronchi\r\n\t\t// On a porportioned human, the Bronchi are located in the --- \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-1.0);\r\n\t\tyPos = new BigDecimal(-11.0);\r\n\t\tzPos= new BigDecimal(-3.5);\r\n\t\t\r\n\t\txVector= new BigDecimal(2.0);\r\n\t\tyVector= new BigDecimal(2.0); \r\n\t\tzVector= new BigDecimal(2.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\t\r\n\t\t// ArmEpithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(0.0, -8.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.ArmEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.ArmEpitheliumRef, bioMightConnector);\r\n\t\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightArmRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Bronchi \r\n\t\t// into the BoundingBoxMap \r\n\t\tboundingBoxMap.put(Constants.BronchiRef, bioBoundBoxes);\t\t\r\n\t\t\r\n\t\t\r\n\t\treturn (boundingBoxMap);\r\n\t}",
"@Override\r\n\tpublic Rectangle getBound() {\n\t\treturn new Rectangle((int)x, (int)y, (int)width, (int)height);\r\n\t}",
"public Rect getBound() {\n return new Rect((int) (x - radius), (int) (y - radius), (int) (x + radius), (int) (y + radius));\n }",
"@PostMapping(\"/by/rectangle\")\n public List<VehicleGeo> findByRectangle(@RequestBody Rectangle rectangle) {\n return vehService.findByRectangle(rectangle).stream().map(VehicleGeo::from).collect(Collectors.toList());\n }",
"public Bounds getBounds () { return (bounds); }",
"private BioMightBoundBoxes setupDefaultBoundBoxes() \r\n\t{\r\n\t\t// Set up the collection to hold the Bounding Boxes\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize a BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize a Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.LeftFootRef, bioBoundBox);\r\n\t\r\n\t\r\n\t\t//********************************************************************* er\r\n\t\t// RIGHT CNEMES BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Foot\r\n\t\t// On a porportioned human, the \r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(0.0);\r\n\t\tyPos = new BigDecimal(-14.0);\r\n\t\tzPos= new BigDecimal(-3.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\t\r\n\t\t// Foot Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(2.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\r\n\t\t// Associate the connector on the Box\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box in the collection\r\n\t\tbioBoundBoxes.setBoundingBox(Constants.RightFootRef, bioBoundBox);\r\n\t\r\n\t\t// return the collection that holds both foot bound boxes\r\n\t\treturn (bioBoundBoxes);\r\n\t}",
"public String getBoundary()\n {\n return _rawBoundary;\n }",
"Rectangle getBoundingBox(Rectangle rect);",
"public void initializeBoundary() {\n\n\t\tthis.subNetGenes = getSubNetGenes(species, xmlFile);\n\t\tthis.subNetwork = getSubNetwork(subNetGenes, oriGraphFile);\n\t\t\n\t\tSet<String> comSubNetGenes = Sets.newHashSet();\n\t\tcomSubNetGenes.addAll(this.subNetwork.keySet());\n\t\tcomSubNetGenes.addAll(this.subNetwork.values());\n\t\t\n\t\ttotalSubGeneCount = comSubNetGenes.size();\n\t\t\n\t\tcountBoundaryEdges(comSubNetGenes, oriGraphFile);\n\t\t\n\t\t\n\n\t}",
"@Test (expected=AssertionError.class)\n\tpublic final void testCurrentBoundaryNeighbor() {\n\t\tint boundarySize = totalSize/elementsPerDim;\n\t\tBoundaryIterator bdIterator = block.getBoundaryIterator();\n\t\tbdIterator.setBoundaryToIterate(new BoundaryId(0, false));\n\t\t// Step to middle of the boundary\n\t\tfor (int i=0; i< boundarySize/2; i++) {\n\t\t\tbdIterator.next();\n\t\t}\n\t\tbdIterator.currentNeighbor(0, extent + 1);\n\t}",
"public interface ShipmentTaskBoundaryService {\n /**\n * Retrieves all tasks.\n *\n * @return a collection of all tasks\n */\n List<ShipmentTaskDS> findAllActive();\n /**\n * Retrieves all enabled plan items for a particular trackingId.\n *\n * @return a collection of all enabled plan items\n */\n List<ShipmentPlanItemDS> findAllEnabled(String trackingId);\n /**\n * Retrieves all completed tasks for a particular trackingId.\n * @return a collection of all completed tasks\n */\n List<ShipmentHistoricTaskInstanceDS> findAllCompleted(String trackingId);\n}",
"interface BuildingRepositoryCustom {\n\n /**\n * The constant ALL_RESULTS.\n */\n int ALL_RESULTS = 0;\n\n /**\n * Find by filter text list.\n *\n * @param words the words\n * @param justIds the just ids\n * @return the list\n */\n List findByFilterText(Set<String> words, boolean justIds);\n\n /**\n * Find building coordinates by type list.\n *\n * @param type the type\n * @return the list\n */\n List<Building> findBuildingCoordinatesByType(String type);\n\n /**\n * Find by distance list.\n *\n * @param latitude the latitude\n * @param longitude the longitude\n * @param maxDistance the max distance\n * @param maxResults the max results\n * @return the list\n */\n List findByDistance(Double latitude, Double longitude, int maxDistance, int maxResults);\n}",
"public List<String> getAllBoundaries() {\n\t\treturn getFieldsOfType(PropertyLocation.class, Boundary.class);\n\t}",
"public void FindImgBoundaries (int PixLevel)\n\t{\n\t\t// find the boundaries\n\t\tWAT = new Watershed(ipWallSegment);\n\t\tWAT.Flow_bound(PixLevel);\n\t\t// output results\n\t\tint IMB[][][] = new int[WAT.sx][WAT.sy][3];\n\t\tIMB = WAT.IMB;\n\t\tpop.set_boundaries(IMB);\n\t}",
"public Region getSiteRegionBounds() {\n int numSources = eqkRupForecast.getNumSources();\n\n double minLat = Double.POSITIVE_INFINITY;\n double maxLat = Double.NEGATIVE_INFINITY;\n double minLon = Double.POSITIVE_INFINITY;\n double maxLon = Double.NEGATIVE_INFINITY;\n\n\n //Going over each and every source in the forecast\n for (int sourceIndex = 0; sourceIndex < numSources; ++sourceIndex) {\n // get the ith source\n ProbEqkSource source = eqkRupForecast.getSource(sourceIndex);\n int numRuptures = source.getNumRuptures();\n\n //going over all the ruptures in the source\n for (int rupIndex = 0; rupIndex < numRuptures; ++rupIndex) {\n ProbEqkRupture rupture = source.getRupture(rupIndex);\n\n RuptureSurface rupSurface = rupture.getRuptureSurface();\n\n //getting the iterator for all points on the rupture\n ListIterator it = rupSurface.getLocationsIterator();\n boolean rupInside = false;\n //looping over all the rupture pt locations and if any of those lies\n //within the provided distance range then include the rupture in the list.\n while (it.hasNext()) {\n Location ptLoc = (Location) it.next();\n if (region.contains(ptLoc)) {\n rupInside = true;\n break;\n }\n }\n it = rupSurface.getLocationsIterator();\n while (it.hasNext() && rupInside) {\n Location ptLoc = (Location) it.next();\n double lat = ptLoc.getLatitude();\n double lon = ptLoc.getLongitude();\n double depth = ptLoc.getDepth();\n if (lat < minLat)\n minLat = lat;\n if (lat > maxLat)\n maxLat = lat;\n if (lon < minLon)\n minLon = lon;\n if (lon > maxLon)\n maxLon = lon;\n if (depth > maxDepth)\n maxDepth = depth;\n }\n }\n }\n return new Region(\n \t\tnew Location(minLat, minLon),\n \t\tnew Location(maxLat, maxLon));\n }",
"protected Rectangle determineBounds() {\n return getNetTransform().createTransformedShape( _bounds ).getBounds();\n }",
"public void computeBoundingBox() {\n\taveragePosition = new Point3(center);\n tMat.rightMultiply(averagePosition);\n \n minBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n maxBound = new Point3(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY);\n // Initialize\n Point3[] v = new Point3[8];\n for (int i = 0; i < 8; i++)\n \tv[i] = new Point3(center);\n // Vertices of the box\n v[0].add(new Vector3(-radius, -radius, -height/2.0));\n v[1].add(new Vector3(-radius, radius, -height/2.0));\n v[2].add(new Vector3(radius, -radius, -height/2.0));\n v[3].add(new Vector3(radius, radius, -height/2.0));\n v[4].add(new Vector3(-radius, -radius, height/2.0));\n v[5].add(new Vector3(-radius, radius, height/2.0));\n v[6].add(new Vector3(radius, -radius, height/2.0));\n v[7].add(new Vector3(radius, radius, height/2.0));\n // Update minBound and maxBound\n for (int i = 0; i < 8; i++)\n {\n \ttMat.rightMultiply(v[i]);\n \tif (v[i].x < minBound.x)\n \t\tminBound.x = v[i].x;\n \tif (v[i].x > maxBound.x)\n \t\tmaxBound.x = v[i].x;\n \tif (v[i].y < minBound.y)\n \t\tminBound.y = v[i].y;\n \tif (v[i].y > maxBound.y)\n \t\tmaxBound.y = v[i].y;\n \tif (v[i].z < minBound.z)\n \t\tminBound.z = v[i].z;\n \tif (v[i].z > maxBound.z)\n \t\tmaxBound.z = v[i].z;\n }\n \n }",
"public Rectangle2D getBoundary() {\n return new Rectangle2D(x, y, width, height);\n }",
"public interface IImageInputBoundary {\n\n List<ImageResponseModel> GetImagesByCategory(ImageRequestModel requestModel);\n List<ImageResponseModel> GetImagesByComposition(ImageRequestModel requestModel);\n}",
"public Position[] getBoundary() {\n\t\treturn boundary.clone();\n\t}",
"public GJBox2D boundingBox() {\n\t\tdouble xmin = Double.MAX_VALUE;\n\t\tdouble ymin = Double.MAX_VALUE;\n\t\tdouble xmax = Double.MIN_VALUE;\n\t\tdouble ymax = Double.MIN_VALUE;\n\n\t\t// coordinates of current point\n\t\tdouble x, y;\n\t\t\n\t\t// Iterate on each control point of each segment\n\t\tfor (Segment seg : this.segments) {\n\t\t\tfor (GJPoint2D p : seg.controlPoints()) {\n\t\t\t\t// get current coordinates\n\t\t\t\tx = p.x();\n\t\t\t\ty = p.y();\n\t\t\t\t\n\t\t\t\t// update bounds\n\t\t\t\txmin = Math.min(xmin, x);\n\t\t\t\tymin = Math.min(ymin, y);\n\t\t\t\txmax = Math.max(xmax, x);\n\t\t\t\tymax = Math.max(ymax, y);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// createFromCollection a new GJBox2D with the bounds\n\t\treturn new GJBox2D(xmin, xmax, ymin, ymax);\n\t}",
"private int[] getBoundaryPositions(ByteBuffer b, byte[] boundary) {\n\t\t\tint[] res = new int[0];\n\t\t\tif (b.remaining() < boundary.length) {\n\t\t\t\treturn res;\n\t\t\t}\n\n\t\t\tint search_window_pos = 0;\n\t\t\tbyte[] search_window = new byte[4 * 1024 + boundary.length];\n\n\t\t\tint first_fill = (b.remaining() < search_window.length) ? b.remaining()\n\t\t\t\t\t: search_window.length;\n\t\t\tb.get(search_window, 0, first_fill);\n\t\t\tint new_bytes = first_fill - boundary.length;\n\n\t\t\tdo {\n\t\t\t\t// Search the search_window\n\t\t\t\tfor (int j = 0; j < new_bytes; j++) {\n\t\t\t\t\tfor (int i = 0; i < boundary.length; i++) {\n\t\t\t\t\t\tif (search_window[j + i] != boundary[i])\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tif (i == boundary.length - 1) {\n\t\t\t\t\t\t\t// Match found, add it to results\n\t\t\t\t\t\t\tint[] new_res = new int[res.length + 1];\n\t\t\t\t\t\t\tSystem.arraycopy(res, 0, new_res, 0, res.length);\n\t\t\t\t\t\t\tnew_res[res.length] = search_window_pos + j;\n\t\t\t\t\t\t\tres = new_res;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsearch_window_pos += new_bytes;\n\n\t\t\t\t// Copy the end of the buffer to the start\n\t\t\t\tSystem.arraycopy(search_window, search_window.length - boundary.length,\n\t\t\t\t\t\tsearch_window, 0, boundary.length);\n\n\t\t\t\t// Refill search_window\n\t\t\t\tnew_bytes = search_window.length - boundary.length;\n\t\t\t\tnew_bytes = (b.remaining() < new_bytes) ? b.remaining() : new_bytes;\n\t\t\t\tb.get(search_window, boundary.length, new_bytes);\n\t\t\t} while (new_bytes > 0);\n\t\t\treturn res;\n\t\t}",
"public static BsonDocument createPartitionBounds(final BsonValue lower, final BsonValue upper) {\n BsonDocument partitionBoundary = new BsonDocument();\n if (lower.getBsonType() != BsonType.MIN_KEY) {\n partitionBoundary.append(\"$gte\", lower);\n }\n if (upper.getBsonType() != BsonType.MAX_KEY) {\n partitionBoundary.append(\"$lt\", upper);\n }\n return partitionBoundary;\n }",
"@Test\n public void testBoundsAsCompositesWithEqAndInRestrictions()\n {\n CFMetaData cfMetaData = newCFMetaData(Sort.ASC, Sort.ASC);\n\n ByteBuffer value1 = ByteBufferUtil.bytes(1);\n ByteBuffer value2 = ByteBufferUtil.bytes(2);\n ByteBuffer value3 = ByteBufferUtil.bytes(3);\n Restriction eq = newSingleEq(cfMetaData, 0, value1);\n Restriction in = newSingleIN(cfMetaData, 1, value1, value2, value3);\n PrimaryKeyRestrictions restrictions = new PrimaryKeyRestrictionSet(cfMetaData.comparator);\n restrictions = restrictions.mergeWith(eq).mergeWith(in);\n\n List<Composite> bounds = restrictions.boundsAsComposites(cfMetaData, Bound.START, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, value1, EOC.START);\n assertComposite(bounds.get(1), value1, value2, EOC.START);\n assertComposite(bounds.get(2), value1, value3, EOC.START);\n\n bounds = restrictions.boundsAsComposites(cfMetaData, Bound.END, QueryOptions.DEFAULT);\n assertEquals(3, bounds.size());\n assertComposite(bounds.get(0), value1, value1, EOC.END);\n assertComposite(bounds.get(1), value1, value2, EOC.END);\n assertComposite(bounds.get(2), value1, value3, EOC.END);\n }",
"public final BoundingBox getBounds() {\n\t\tif (bounds==null) {\n\t\t\tint srsID =( (Geometry)this.get(0).getDefaultGeometry()).getSRID();\n\t\t\tBoundingBox re = new BoundingBoxImpl(\"\"+srsID);\n\t\t\tfor (SimpleFeature f : this) {\n\t\t\t\tre.include(f.getBounds());\n\t\t\t}\n\t\t\tbounds = re;\n\t\t}\n\t\treturn bounds;\n\t}",
"void provideBounds(DiagramDescription diagram);",
"public boolean detectBound(){\n if(posX < 10){\n posX = 10;\n velX = 0;\n accX = 0;\n return true;\n }\n else if(posX > width - 10){\n posX = width - 10;\n velX = 0;\n accX = 0;\n return true;\n }\n if(posY < 10){\n posY = 10;\n velY = 0;\n accY = 0;\n return true;\n }\n else if(posY > height - 10){\n posY = height - 10;\n velY = 0;\n accY = 0;\n return true;\n }\n return false;\n }",
"private HashMap setupBoundBoxes(BioMightBoundBoxes bioMightBoundBoxesIn) \r\n\t{\r\n\t\t// Set up the bounding boxes for the various components\r\n\t\t// The various components locations will be driven by the\r\n\t\t// bounding boxes\r\n\t\tHashMap boundingBoxesMap = new HashMap();\r\n\t\r\n\t\t// Initialize the position of the bounding box vars\r\n\t\tBigDecimal xPos = new BigDecimal(0.0);\r\n\t\tBigDecimal yPos = new BigDecimal(0.0);\r\n\t\tBigDecimal zPos= new BigDecimal(0.0);\r\n\t\t\r\n\t\t// Set to base 1x1x1 cube\r\n\t\tBigDecimal xVector= new BigDecimal(1.0);\r\n\t\tBigDecimal yVector= new BigDecimal(1.0); \r\n\t\tBigDecimal zVector= new BigDecimal(1.0);\r\n\t\r\n\t\t// Initialize the BoundBoxes. These will have a bound\r\n\t\t// box for each foot by default\r\n\t\tBioMightBoundBoxes bioBoundBoxes = null;\r\n\t\r\n\t\t// Initialize the BoundBox\r\n\t\tBioMightBoundBox bioBoundBox = null;\r\n\t\r\n\t\t// Initialize the Connectors \r\n\t\tBioMightConnectors bioMightConnectors = null; \r\n\r\n\t\t// Initialize the Connector \r\n\t\tBioMightConnector bioMightConnector= null;\r\n\t\r\n\t\tdouble circumference = 0.0;\r\n\t\tdouble[] startPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] startPoints = null;\r\n\t\tdouble[] endPos = {0.0, 0.0, 0.0};\r\n\t\tdouble[][] endPoints = null;\r\n\t\r\n\t\t// Use the information in the incoming Bound Box\r\n\t\t// to orientate the inner bound boxes\r\n\t\tif (bioMightBoundBoxesIn != null)\r\n\t\t{\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tBioMightBoundBox bioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.LeftFootRef);\r\n\t\t\tSystem.out.println(\"LeftFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\r\n\r\n\t\t\t// In the default instance,there will be two bound boxes\r\n\t\t\tbioMightBoundBoxTemp = bioMightBoundBoxesIn.getBoundingBox(Constants.RightFootRef);\r\n\t\t\tSystem.out.println(\"RightFoot - SetupBoundBoxes - Incoming BoundBox: \" + \r\n\t\t\t\t\tbioMightBoundBoxTemp.getXPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getYPos() + \" \" +\r\n\t\t\t\t\tbioMightBoundBoxTemp.getZPos());\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Feet SetupBoundBoxes - Incoming BoundBoxes are Null\");\r\n\t\t}\r\n\t\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// LEFT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(1.0);\r\n\t\tyPos = new BigDecimal(-48.0);\r\n\t\tzPos= new BigDecimal(0.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - LeftBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\r\n\t\t\r\n\t\t// Put the BioMight BoundBoxes for the Left Foot into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.LeftFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Left Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\r\n\t\tbioBoundBoxes = new BioMightBoundBoxes();\r\n\t\t\t\r\n\t\t//********************************************************************* \r\n\t\t// RIGHT FOOT EPITHELIUM BOUNDBOX\r\n\t\t// Set up the Bounding Box for the Feet\r\n\t\t// The connector for this will come from the incoming Bound Box\r\n\t\t// Both are defined like and bolt and they lock into position at the\r\n\t\t// interestion of both connectors\r\n\t\t//**********************************************************************\r\n\t\txPos = new BigDecimal(-8.0);\r\n\t\tyPos = new BigDecimal(-65.0);\r\n\t\tzPos= new BigDecimal(-1.0);\r\n\t\r\n\t\txVector= new BigDecimal(1.0);\r\n\t\tyVector= new BigDecimal(4.0); \r\n\t\tzVector= new BigDecimal(1.0);\r\n\r\n\t\tbioBoundBox = new BioMightBoundBox(xPos, yPos, zPos, xVector, yVector, zVector);\r\n\t\tbioMightConnectors = new BioMightConnectors();\r\n\t\r\n\t\t// Feet Epithelium Connector\r\n\t\tcircumference = 0.3;\r\n\t\tstartPos = getStartPoints(-1.0, -65.0, -1.0);\r\n\t\tstartPoints = BioGraphics.octogonYPlane(startPos, circumference);\r\n\t\tendPos = getEndPoints(-1.0, -67.50, -1.0);\r\n\t\tendPoints = BioGraphics.octogonYPlane(endPos, circumference);\r\n\t\t\r\n\t\tbioMightConnector = new BioMightConnector(startPoints, endPoints, Constants.FootEpitheliumRef,\"connType\");\r\n\t\tbioMightConnectors.setBioMightConnector(Constants.FootEpitheliumRef, bioMightConnector);\r\n\t\t\r\n\t\tbioBoundBox.setBioMightConnectors(bioMightConnectors);\t\t\r\n\t\t\r\n\t\t// Put the Bounding Box into the Collection of Bounding Boxes \r\n\t\tSystem.out.println(\"Adding - RightBoundBox to bioBoundBoxes\"); \r\n\t\tbioBoundBoxes.setBoundingBox(Constants.FootEpitheliumRef, bioBoundBox);\t\t\r\n\r\n\t\t// Put the BioMight BoundBoxes for the Left Shoulder into the BoundingBoxMap \r\n\t\tboundingBoxesMap.put(Constants.RightFootRef, bioBoundBoxes);\r\n\t\tSystem.out.println(\"Adding - Right Foot bioBoundBoxes into BoxesMap\"); \r\n\r\n\t\treturn (boundingBoxesMap);\r\n\t}",
"public interface WorldQueryService {\n\n /**\n * @param type The type of world.\n * @return The world of this type.\n */\n World getWorld(WorldType type);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param y The Y coordinate.\n * @param z The Z coordinate.\n * @return The block in the given world at the specified coordinates.\n */\n Block getBlockAt(WorldType world, int x, int y, int z);\n\n /**\n * @param world The world.\n * @param vector The vector.\n * @return The block at the given vector.\n */\n Block getBlockAt(WorldType world, Vector3ic vector);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(BlockLocation location);\n\n /**\n * @param location The location.\n * @return The block at the location.\n */\n Block getBlockAt(Location location);\n\n /**\n * @param world The world.\n * @param x The X coordinate.\n * @param z The Y coordinate.\n * @return The highest non-air block in the given world at the specified coordinates.\n */\n Block getHighestBlockAt(WorldType world, int x, int z);\n\n /**\n * @param location The location.\n * @return The highest non-air block at the specified location.\n */\n Block getHighestBlockAt(BlockLocation location);\n\n\n}",
"abstract void findArea();",
"abstract void findArea();",
"public abstract BoundType b();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"public abstract Rectangle getBounds();",
"private void updateBoundary() {\n //pos = _newPos ;\n heading = myRoute.getCurrentHeading() ;\n //System.out.println(\"heading=\"+heading);\n Point vertex = new Point(0,0) ;\n vertex.x = length/2 ;\n vertex.y = width/2 ;\n boundary[0] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = width/2 ;\n boundary[1] = transform(vertex) ;\n \n vertex.x = -length/2 ;\n vertex.y = -width/2 ;\n boundary[2] = transform(vertex) ;\n \n vertex.x = length/2 ;\n vertex.y = -width/2 ;\n boundary[3] = transform(vertex) ;\n for (int i=0; i<4; i++) {\n xpoints[i] = boundary[i].x ;\n ypoints[i] = boundary[i].y ;\n }\n }",
"public interface AreaService {\n /**\n * 根据id查询地区信息\n * @param id\n * @return\n */\n Area findById(Integer id);\n\n\n /**\n * 根据bn查询地区信息\n * @param bn\n * @return\n */\n public Area findByBn(String bn) ;\n}",
"@Repository\npublic interface AreaRelationMapper {\n\n /**\n * 查询--达成率权重\n * @return\n */\n Page<AreaRelation> queryAreaRelations(Map params);\n /**\n * 更新--公司大区关系\n * @param areaRelation\n * @return\n */\n int updateAreaRelation(AreaRelation areaRelation);\n /**\n * 新增--公司大区关系\n * @param areaRelation\n * @return\n */\n int insertAreaRelation(AreaRelation areaRelation);\n /**\n * 查询不重复的消金大区\n * @return\n */\n List<Map> queryDistinctAreaRelations();\n\n}",
"Page<RefZoneGeoDTO> search(String query, Pageable pageable);",
"public interface BusNodeRepository extends JpaRepository<BusNode, String> {\n List<BusNode> findTop1ByLatitude(double latitude);\n List<BusNode> findTop1ByLongitude(double longitude);\n}",
"@Repository\npublic interface HotelRepository extends JpaRepository<Hotel, Integer> {\n\t//query methods: findByPropertyName . . . (parses method name)\n\tpublic List<Hotel> findByPriceBetween(double low, double high);\n}",
"public void annotationBoundary(AnnotationBoundaryMap arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void annotationBoundary(AnnotationBoundaryMap arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"public void collideBoundary() {\n\t\tif (getWorld() == null) return;\n\t\tif (getXCoordinate() < 1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getXCoordinate() > getWorld().getWidth()-1.01*getRadius())\n\t\t\tsetXVelocity(-getXVelocity());\n\t\tif (getYCoordinate() < 1.01 * getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t\tif (getYCoordinate() > getWorld().getHeight()-1.01*getRadius())\n\t\t\tsetYVelocity(-getYVelocity());\n\t}",
"public interface LandmarkRepository extends ElasticsearchRepository<Landmark, String> {\n\n List<Landmark> findByName(String name);\n\n}",
"public interface LookupsRepository extends MongoRepository<Lookup,String> {\n\n public Lookup findByTitle(String Guard);\n}",
"List<BranchDto> getByRegion(int regionId) throws ServiceException;",
"public void findBoundaryGivenPhi() {\n \r\n boundary.removeAllElements();\r\n \r\n \tfor(int i=0; i<pixelsWide-1; i++)\r\n \t\tfor(int j=0; j<pixelsHigh-1; j++) {\r\n Int2d pi = new Int2d(i,j);\r\n \r\n double sgnIJ = Math.signum( phi[i][j] );\r\n if( sgnIJ != Math.signum( phi[i+1][j] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i+1,j);\r\n if(!boundary.contains(p2)) boundary.add(p2);\r\n }\r\n if( sgnIJ != Math.signum( phi[i][j+1] ) ) {\r\n if(!boundary.contains(pi)) boundary.add(pi);\r\n Int2d p2 = new Int2d(i,j+1);\r\n if(!boundary.contains(p2)) boundary.add(p2); \r\n }\r\n \r\n }\r\n \r\n \r\n }",
"public void checkBounds(Scope scope) {\n}",
"private List<BusinessVO> searchBusiness(String search, String sendingId) {\n\t\tString searchTerm = \"%\"+StringUtil.checkVal(search).toLowerCase()+\"%\";\n\t\tlog.debug(\"searching businesses for \" + searchTerm);\n\t\tStringBuilder sql = new StringBuilder(250);\n\t\tString schema = getCustomSchema();\n\t\tList<Object> params = new ArrayList<>();\n\t\tString[] idParts = sendingId.split(\"_\");\n\n\t\tsql.append(\"select * from \").append(schema).append(\"rezdox_business b \");\n\t\tsql.append(DBUtil.INNER_JOIN).append(\"(select business_id from \").append(schema).append(\"rezdox_business_member_xr where status_flg = 1 group by business_id) bmxa on b.business_id = bmxa.business_id \");\n\t\t//omit business over their connection quota\n\t\tsql.append(DBUtil.INNER_JOIN).append(schema).append(\"rezdox_connection_quota_view q on b.business_id=q.business_id and q.quota_no > 0 \");\n\n\t\tsql.append(\"where (lower(b.business_nm) like ? or lower(b.email_address_txt) like ? or lower(b.address_txt) like ?) \");\n\t\tparams.add(searchTerm);\n\t\tparams.add(searchTerm);\n\t\tparams.add(searchTerm);\n\n\t\tsql.append(\"and b.business_id != ? and b.business_id not in ( select case \");\n\t\tparams.add(idParts[1]);\n\n\t\tif(\"m\".equalsIgnoreCase(idParts[0])) {\n\t\t\t//member looking for business\n\t\t\tsql.append(\"when sndr_member_id is not null and sndr_member_id=? and rcpt_business_id is not null then rcpt_business_id \");\n\t\t\tsql.append(\"when rcpt_member_id is not null and rcpt_member_id=? and sndr_business_id is not null then sndr_business_id \");\t\t\n\t\t\tparams.add(idParts[1]);\n\t\t\tparams.add(idParts[1]);\n\t\t}else {\n\t\t\t//business looking for business\n\t\t\tsql.append(\"when sndr_business_id is not null and sndr_business_id=? and rcpt_business_id is not null then rcpt_business_id \");\n\t\t\tsql.append(\"when rcpt_business_id is not null and rcpt_business_id=? and sndr_business_id is not null then sndr_business_id \");\n\t\t\tparams.add(idParts[1]);\n\t\t\tparams.add(idParts[1]);\n\t\t}\n\t\tsql.append(\"else '-1' end as business_id from \").append(schema).append(\"rezdox_connection group by business_id)\");\n\t\tsql.append(\" order by business_nm asc\");\n\n\t\t//run the query & return the results\n\t\tDBProcessor dbp = new DBProcessor(dbConn, schema);\n\t\tdbp.setGenerateExecutedSQL(log.isDebugEnabled());\n\t\tList<BusinessVO> data = dbp.executeSelect(sql.toString(), params, new BusinessVO());\n\t\tlog.debug(\"number of businesses found \" + data.size());\n\t\treturn data;\n\t}",
"public Rectangle2D getBoundary()\n {\n \tRectangle2D shape = new Rectangle2D.Float();\n shape.setFrame(location.getX(),location.getY(),12,length);\n return shape;\n }",
"private Boundaries buildBoundaries(Graph graph, Graph clusterPlacement) {\n Boundaries boundaries = new Boundaries();\n NodeAttribute<Coordinates> clusterPositions = clusterPlacement.nodeAttribute(StdAttribute.nodePosition);\n NodeAttribute<Coordinates> clusterSizes = clusterPlacement.nodeAttribute(StdAttribute.nodeSize);\n NodeAttribute<Coordinates> positions = graph.nodeAttribute(StdAttribute.nodePosition);\n EdgeAttribute<ControlPoints> edgePoints = graph.edgeAttribute(StdAttribute.edgePoints);\n\n for (Graph cluster : graph.subGraphs()) {\n String clusterLabel = cluster.<String>graphAttribute(StdAttribute.label).get();\n Node clusterPlaceholder = clusterPlacement.getNode(clusterLabel);\n Coordinates clusterCenter = clusterPositions.get(clusterPlaceholder);\n Coordinates clusterSize = clusterSizes.get(clusterPlaceholder);\n Coordinates clusterBottomLeft = clusterCenter.minus(clusterSize.divide(2));\n\n Node boundaryNode = graph.newNode();\n Edge boundaryEdge = graph.newEdge(boundaryNode, boundaryNode);\n positions.set(boundaryNode, clusterBottomLeft);\n ControlPoints edgeBends = new ControlPoints();\n edgeBends.add(clusterBottomLeft.plus(new Coordinates(clusterSize.x(), 0)));\n edgeBends.add(clusterBottomLeft.plus(clusterSize));\n edgeBends.add(clusterBottomLeft.plus(new Coordinates(0, clusterSize.y())));\n edgePoints.set(boundaryEdge, edgeBends);\n\n boundaries.nodes.add(boundaryNode);\n boundaries.edges.add(boundaryEdge);\n Collection<Edge> surroundingEdge = new HashSet<>();\n surroundingEdge.add(boundaryEdge);\n for (Node node : cluster.nodes()) {\n boundaries.surroundingEdges.set(node, surroundingEdge);\n }\n }\n boundaries.surroundingEdges.setDefault(boundaries.edges);\n return boundaries;\n }",
"private void checkBoundaries() {\n if (!isDestroyed()) {\n float upperEdge = screen.getGameCam().position.y + screen.getGameViewPort().getWorldHeight() / 2;\n float bottomEdge = screen.getGameCam().position.y - screen.getGameViewPort().getWorldHeight() / 2;\n if (bottomEdge <= getY() + getHeight() && getY() <= upperEdge) {\n b2body.setActive(true);\n currentState = b2body.getLinearVelocity().x > 0 ? State.MOVING_RIGHT : State.MOVING_LEFT;\n } else {\n if (b2body.isActive()) { // Was on camera...\n // It's outside bottom edge\n if (bottomEdge > getY() + getHeight()) {\n if(!world.isLocked()) {\n world.destroyBody(b2body);\n }\n currentState = State.FINISHED;\n }\n }\n }\n }\n }",
"RectangleLatLng getBounds();",
"boolean isBound();",
"@Override\n\tpublic BoundaryRectangle getBoundingBox() {\n\t\treturn new BoundaryRectangle(0, 0, drawView.getWidth(), drawView.getHeight());\n\t}",
"public void checkBoundaries(Player pl) {\n\t\tPoint loc = gameMap.toGridLocation(pl.getLocation());\n\t\tint locationX = loc.x;\n\t\tint locationY = loc.y;\n\t\t\n\t\tif(gameMap.getType(loc.x, loc.y) == GameMap.WALL)\n\t\t{\n\t\t\tif(loc.x > 0)\n\t\t\t\tpl.getLocation().x -= 1f;\n\t\t\telse\n\t\t\t\tpl.getLocation().x += 1f;\n\t\t}\n\t\t\n\t\tPoint[] surrounding = gameMap.getSurrounding((int) locationX, (int) locationY);\n\t\t\n\t\tRectangle2D.Float player = pl.getLocationAsRect();\n\t\tfor(Point p : surrounding)\n\t\t{\n\t\t\tRectangle2D.Float rect = new Rectangle2D.Float(p.x * 16 + 112, p.y * 16 + 32, 16, 16);\n\t\t\tif(rect.intersects(player))\n\t\t\t{\n\t\t\t\tbyte type = gameMap.getType(p.x, p.y);\n\t\t\t\tif(isSpecial(pl, type))\n\t\t\t\t{\n\t\t\t\t\tspecialMovement(pl, type);\n//\t\t\t\t\tSystem.out.println(pl.getClass().getSimpleName() + \" hit a boundary\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(type == GameMap.ORB)\n\t\t\t\t{\n\t\t\t\t\tgameMap.setType(p.x, p.y, GameMap.EATEN_ORB);\n\t\t\t\t\t\n\t\t\t\t\tonOrbCollect(pl);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void collideBoundary(){\n\t \tint bulletBouncer = 0;\n\t \tif ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1);\n\t \t}\n\t \tif ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){\n\t \t\tif (this instanceof Bullet){\n\t \t\tbulletBouncer++;\n\t \t}\n\t \t\tthis.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1);\n\t \t} \t\n\t \tif (this instanceof Bullet){\n\t \tBullet bullet = (Bullet) this;\n\t \tfor (int i = 0; i < bulletBouncer; i++){\n\t \t\tif (!bullet.isTerminated())\n\t \t\tbullet.bouncesCounter();\n\t \t}\n\t \t}\n\t }",
"private void calculateChunkBounds()\n\t{\n\t\tchunkBounds[BOUND_LEFT] = ChunkUtils.convertXCoord((int) (cameraX - (viewportWidth / zoom) / ChunkUtils.LOADING_DISTANCE_FACTOR));\n\t\tchunkBounds[BOUND_RIGHT] = ChunkUtils.convertXCoord((int) (cameraX + (viewportWidth/zoom)/ChunkUtils.LOADING_DISTANCE_FACTOR));\n\t\tchunkBounds[BOUND_BOTTOM] = ChunkUtils.convertYCoord((int) (cameraY - (viewportHeight/zoom)/ChunkUtils.LOADING_DISTANCE_FACTOR));\n\t\tchunkBounds[BOUND_TOP] = ChunkUtils.convertYCoord((int) (cameraY + (viewportHeight/zoom)/ChunkUtils.LOADING_DISTANCE_FACTOR));\n\t}",
"public GeographicBoundingBox getBoundingBox()\r\n {\r\n return myBoundingBox;\r\n }",
"public BranchAndBound() {\n this.timeFi = Long.parseLong(\"2000000000000\");;\n this.numSoluciones = 0;\n }",
"public boolean detectBound(){\n if(posX < 0 || posX > width || posY < 0 || posY > height){\n return true;\n }\n else{\n return false;\n }\n }",
"public Bounds get() {\n\treturn bounds;\n }",
"@Override\n public STRegion getBoundingBox() {\n\n SQLiteDatabase db = this.getReadableDatabase();\n\n String query = \"SELECT minX FROM \" + this.table_identifier + \" ORDER BY minX ASC LIMIT 1;\";\n float minX = getRowValueHelper(db, query, 0);\n query = \"SELECT minY FROM \" + this.table_identifier + \" ORDER BY minY ASC Limit 1;\";\n float minY = getRowValueHelper(db, query, 0);\n query = \"SELECT minT FROM \" + this.table_identifier + \" ORDER BY minT ASC Limit 1;\";\n float minT = getRowValueHelper(db, query, 0);\n query = \"SELECT maxX FROM \" + this.table_identifier + \" ORDER BY maxX DESC Limit 1;\";\n float maxX = getRowValueHelper(db, query, 0);\n query = \"SELECT maxY FROM \" + this.table_identifier + \" ORDER BY maxY DESC Limit 1;\";\n float maxY = getRowValueHelper(db, query, 0);\n query = \"SELECT maxT FROM \" + this.table_identifier + \" ORDER BY maxT DESC Limit 1;\";\n float maxT = getRowValueHelper(db, query, 0);\n\n return new STRegion(new STPoint(minX, minY, minT), new STPoint(maxX, maxY, maxT));\n }",
"@Override\n public List<Bound> getBounds() {\n return Collections.unmodifiableList(bounds);\n }",
"private Bounds getBounds(final Value value, final DebugContext context)\r\n throws ViewerException {\r\n Bounds b = new Bounds();\r\n Method getBoundsMethod = value.getMethod(context,\r\n \"getBounds\", \"java.awt.Rectangle\", null);\r\n Value bounds = value.invokeMethod(context, getBoundsMethod,\r\n null);\r\n String type = value.getType(context).getName(context);\r\n int dot = type.lastIndexOf('.');\r\n if (dot >= 0) {\r\n type = type.substring(dot + 1);\r\n }\r\n b.type = type;\r\n \r\n try {\r\n Method getTextMethod = value.getMethod(context, \"getText\",\r\n \"java.lang.String\", null);\r\n Value result = value.invokeMethod(context, getTextMethod,\r\n null);\r\n if (!result.isNull()) {\r\n String str = result.toString(context);\r\n if (str.length() > 10) {\r\n str = str.substring(0, 7) + \"...\";\r\n }\r\n b.type += \" \\\"\" + str + \"\\\"\";\r\n }\r\n }\r\n catch (ViewerException e) {\r\n }\r\n \r\n b.bounds.x = bounds.getFieldValue(context, \"x\").toInt(context);\r\n b.bounds.y = bounds.getFieldValue(context, \"y\").toInt(context);\r\n b.bounds.width = bounds.getFieldValue(context, \"width\").\r\n toInt(context);\r\n b.bounds.height = bounds.getFieldValue(context, \"height\").\r\n toInt(context);\r\n if (value.isInstanceOf(context, \"java.awt.Container\")) {\r\n Method getComponentsMethod = value.getMethod(context,\r\n \"getComponents\", \"java.awt.Component[]\", null);\r\n Value children;\r\n try {\r\n children = value.invokeMethod(context,\r\n getComponentsMethod, null);\r\n }\r\n catch (ViewerException e) {\r\n b.children = new Bounds[0];\r\n return b;\r\n }\r\n b.children = new Bounds[children.getArrayLength(context)];\r\n for (int c = 0; c < b.children.length; c++) {\r\n b.children[c] = getBounds(children.getArrayElement(context,\r\n c), context);\r\n }\r\n }\r\n return b; \r\n }",
"public void determineNodeBoundary(boolean drivable) {\r\n \t\t//System.out.println(\"Determine node boundary of \" + name);\r\n \t\tArrayList<Point2D.Double> pointCloud = new ArrayList<Point2D.Double>(); \r\n \t\t// Add all end points of (drive-able) crossSectionElements to the pointCloud\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"selecting crosssection %s %s %s\", cs.toString(), dl.incoming ? \"from\" : \"to\", dl.incoming ? dl.link.getFromNode_r().getName_r() : dl.link.getToNode_r().getName_r());\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif ((! drivable) || cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double dlLine = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == dlLine)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tpointCloud.add((Point2D.Double) dlLine.getP1());\r\n \t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added endpoint %d %.3f,%.3f\", index, dlLine.x1, dlLine.y1);\r\n \t\t\t\t\t// Add the intersections of the boundaries of different (drive-able) crossSectionElements\r\n \t\t\t\t\tfor (DirectionalLink otherDL : links) {\r\n \t\t\t\t\t\tif (otherDL.angle >= dl.angle) // only search up to dl (and NEVER include dl itself)\r\n \t\t\t\t\t\t\tbreak;\t// this way we'll find each intersection only ONCE\r\n \t\t\t\t\t\tCrossSection otherCS = otherDL.link.getCrossSectionAtNode(otherDL.incoming);\r\n \t\t\t\t\t\tfor (int otherIndex = 2 * otherCS.getCrossSectionElementList_r().size(); --otherIndex >= 0; )\r\n \t\t\t\t\t\t\tif ((! drivable) || (otherCS.elementFromNode(otherDL.incoming, true, otherIndex).getCrossSectionElementTypology().getDrivable())) {\r\n \t\t\t\t\t\t\t\tLine2D.Double otherDLLine = otherCS.vectorAtNode(otherDL.incoming, true, otherIndex, false);\r\n \t\t\t\t\t\t\t\tif (null == otherDLLine)\r\n \t\t\t\t\t\t\t\t\tcontinue;\r\n \t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"checking intersection between %s and %s\", GeometryTools.Line2DToString(dlLine), GeometryTools.Line2DToString(otherDLLine));\r\n \t\t\t\t\t\t\t\tif (Planar.lineIntersectsLine(dlLine, otherDLLine)) {\r\n \t\t\t\t\t\t\t\t\tPoint2D.Double intersection = Planar.intersection(dlLine, otherDLLine);\r\n \t\t\t\t\t\t\t\t\t//System.out.println(\"Adding boundary intersection \" + intersection);\r\n \t\t\t\t\t\t\t\t\tpointCloud.add(intersection);\r\n \t\t\t\t\t\t\t\t\t//if (name.equals(\"node_een\"))\r\n \t\t\t\t\t\t\t\t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"added boundary intersection %.3f,%.3f\", intersection.x, intersection.y);\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \r\n \t\t//System.out.println(\"pointCloud of \" + name + \" contains these points: \" + pointCloud.toString());\r\n \t\tif (0 == pointCloud.size())\r\n \t\t\tpointCloud.add(getPoint());\t// add design point of this node\r\n \t\tcircle = Planar.circleCoveringPoints(pointCloud);\r\n \t\t//ArrayList<Point2D.Double> ppp = new ArrayList<Point2D.Double>();\r\n \t\t//ppp.add(new Point2D.Double(this.x, this.y));\r\n \t\t//circle = GeometryTools.circleCoveringPoints(ppp);\r\n \t\t//System.out.format(Main.Locale, \"covering circle is %s\\r\\n\", circle.toString());\r\n \t\t// Create the convex hull consisting of the points where the drive-able parts of the links enter the covering circle\r\n \t\tArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>();\r\n \t\tfor (DirectionalLink dl : links) {\r\n \t\t\tCrossSection cs = dl.link.getCrossSectionAtNode(dl.incoming);\r\n \t\t\tfor (int index = 2 * cs.getCrossSectionElementList_r().size(); --index >= 0; )\r\n \t\t\t\tif (cs.elementFromNode(dl.incoming, true, index).getCrossSectionElementTypology().getDrivable()) {\r\n \t\t\t\t\tLine2D.Double line = cs.vectorAtNode(dl.incoming, true, index, false);\r\n \t\t\t\t\tif (null == line)\r\n \t\t\t\t\t\tcontinue;\r\n \t\t\t\t\tPoint2D.Double intersections[] = Planar.intersectRayAndCircle(line, circle);\r\n \t\t\t\t\t//System.out.format(Main.Locale, \"line %s intersects circle %s at %d point(s)\\r\\n\", GeometryTools.Line2DToString(line), circle.toString(), intersections.length);\r\n \t\t\t\t\tif (intersections.length > 1) {\r\n \t\t\t\t\t\tSystem.err.println(\"Peter thinks this never happens...\");\r\n \t\t\t\t\t\t// use the one that is closest to the far end of the line\r\n \t\t\t\t\t\tif (intersections[0].distance(line.getP2()) < intersections[1].distance(line.getP2()))\r\n \t\t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tpoints.add(intersections[1]);\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (intersections.length > 0)\r\n \t\t\t\t\t\tpoints.add(intersections[0]);\r\n \t\t\t\t\telse {\r\n \t\t\t\t\t\tSystem.out.println(\"line \" + Planar.Line2DToString(line) + \" does not intersect the circle \" + circle.toString());\r\n \t\t\t\t\t\t// probably a very near miss\r\n \t\t\t\t\t\tdouble ratio = circle.radius() / line.getP1().distance(circle.center());\r\n \t\t\t\t\t\tif ((ratio > 0.99) && (ratio < 1.01))\r\n \t\t\t\t\t\t\tpoints.add(Planar.logPoint(\"adding almost intersection\", (Point2D.Double)(line.getP1())));\r\n \t\t\t\t\t\telse\r\n \t\t\t\t\t\t\tSystem.err.println(\"Total miss: ratio is \" + ratio + \" (\" + circle.radius() / line.getP2().distance(circle.center()) + \")\");\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t}\r\n \t\tif (points.size() == 0)\r\n \t\t\treturn;\r\n \t\t// Compute the convex hull (in 2D) and convert that into an ArrayList<Vertex>\r\n \t\t//System.out.println(\"Computing convex hull of \" + points.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"points is %s\", points.toString());\r\n \t\tconflictArea = new ArrayList<Vertex>();\r\n \t\tfor (Point2D.Double p : Planar.convexHull(points))\r\n \t\t\tconflictArea.add(new Vertex(p, z));\t// use Z-component of this node\r\n \t\tconflictArea.add(conflictArea.get(0));\t// close the polygon\r\n \t\t//System.out.println(\"convex hull is \" + conflictArea.toString());\r\n \t\t//if (name.equals(\"node_een\"))\r\n \t\t//\tLog.logToFile(\"d:/hull.txt\", false, \"hull is %s\", conflictArea.toString());\r\n \t}",
"Rectangle getBounds();",
"protected static Bbox filterToBbox(BinarySpatialOperator spatialFilter)\n {\n Bbox bbox = new Bbox();\n \n if (spatialFilter instanceof BBOX)\n {\n BBOX ogcBbox = (BBOX)spatialFilter;\n bbox.setCrs(ogcBbox.getSRS());\n bbox.setMinX(ogcBbox.getMinX());\n bbox.setMinY(ogcBbox.getMinY());\n bbox.setMaxX(ogcBbox.getMaxX());\n bbox.setMaxY(ogcBbox.getMaxY());\n }\n \n return bbox;\n }",
"public PickBounds(Bounds boundsObject) {\n\tbounds = boundsObject;\n }",
"public interface StaticsBoundaryInterface {\n void initSafeBrowsing(Context context, ValueCallback<Boolean> callback);\n void setSafeBrowsingAllowlist(Set<String> hosts, ValueCallback<Boolean> callback);\n void setSafeBrowsingWhitelist(List<String> hosts, ValueCallback<Boolean> callback);\n Uri getSafeBrowsingPrivacyPolicyUrl();\n boolean isMultiProcessEnabled();\n String getVariationsHeader();\n}",
"public interface RestService {\n void findNearbyPlaces(double latitude, double longitude, String category);\n}",
"@Test\r\n\tpublic void testGeoInBidRequest() throws Exception {\r\n\t\tInputStream is = Configuration.getInputStream(\"SampleBids/smaato.json\");\r\n\t\tBidRequest br = new BidRequest(is);\r\n\t\tassertEquals(br.getId(),\"K6t8sXXYdM\");\r\n\t\t\r\n\t\tMap m = new HashMap();\r\n\t\tm.put(\"lat\", 34.05);\r\n\t\tm.put(\"lon\",-118.25);\r\n\t\tm.put(\"range\",600000.0);\r\n\t\tList list = new ArrayList();\r\n\t\tlist.add(m);\r\n\t\t\r\n\t\tNode node = new Node(\"LATLON\",\"device.geo\", Node.INRANGE, list);\r\n \tnode.test(br);\r\n\t\tObjectNode map = (ObjectNode)node.getBRvalue();\r\n\t\tassertTrue((Double)map.get(\"lat\").doubleValue()==37.62);\r\n\t\tassertTrue((Double)map.get(\"lon\").doubleValue()==-122.38);\r\n\t\tassertTrue((Double)map.get(\"type\").doubleValue()==3);\r\n\t\t\r\n\t\tList<Map>test = new ArrayList();\r\n\t\ttest.add(m);\r\n\t\tnode = new Node(\"LATLON\",\"device.geo\", Node.INRANGE, test);\r\n\t\tnode.test(br);\r\n\r\n\t}",
"public List<Hotel> findByPriceBetween(double low, double high);",
"public interface AreaSearchRepository extends ElasticsearchRepository<Area, Long> {\n}",
"List<Building> findBuildingCoordinatesByType(String type);",
"public abstract Regionlike getGridBounds();",
"private void updateBoundingBox()\n\t{\n\t\tif (this.facingDirection != null)\n\t\t{\n\t\t\tdouble d0 = (double) this.hangingPosition.getX() + 0.5D;\n\t\t\tdouble d1 = (double) this.hangingPosition.getY() + 0.5D;\n\t\t\tdouble d2 = (double) this.hangingPosition.getZ() + 0.5D;\n\t\t\tdouble d3 = 0.46875D;\n\t\t\tdouble d4 = this.someFunc(this.getWidthPixels());\n\t\t\tdouble d5 = this.someFunc(this.getHeightPixels());\n\t\t\td0 = d0 - (double) this.facingDirection.getFrontOffsetX() * 0.46875D;\n\t\t\td2 = d2 - (double) this.facingDirection.getFrontOffsetZ() * 0.46875D;\n\t\t\td1 = d1 + d5;\n\t\t\tEnumFacing enumfacing = this.facingDirection.rotateYCCW();\n\t\t\td0 = d0 + d4 * (double) enumfacing.getFrontOffsetX();\n\t\t\td2 = d2 + d4 * (double) enumfacing.getFrontOffsetZ();\n\t\t\tthis.posX = d0;\n\t\t\tthis.posY = d1;\n\t\t\tthis.posZ = d2;\n\t\t\tdouble d6 = (double) this.getWidthPixels();\n\t\t\tdouble d7 = (double) this.getHeightPixels();\n\t\t\tdouble d8 = (double) this.getWidthPixels();\n\n\t\t\tif (this.facingDirection.getAxis() == EnumFacing.Axis.Z)\n\t\t\t{\n\t\t\t\td8 = 1.0D;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\td6 = 1.0D;\n\t\t\t}\n\n\t\t\t// ???\n\n\t\t\td6 = d6 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td7 = d7 / (this.getHeightPixels() / this.blocksToTakeUp() * 2D);\n\t\t\td8 = d8 / (this.getWidthPixels() / this.blocksToTakeUp() * 2D);\n\t\t\tthis.setEntityBoundingBox(new AxisAlignedBB(d0 - d6, d1 - d7, d2 - d8, d0 + d6, d1 + d7, d2 + d8));\n\t\t}\n\t}",
"public interface DistrictRepository extends CrudRepository<District,Integer>{\n public List<District> findByCode(String name);\n public List<District> findByCity(City city);\n public Page<District> findByCity(City city, Pageable pageable);\n}",
"public static ContainerBoundary prepare() {\n return new ContainerBoundary();\n }"
]
| [
"0.5780093",
"0.5687098",
"0.56201917",
"0.5517563",
"0.55118656",
"0.5472107",
"0.54051304",
"0.53573126",
"0.5350498",
"0.53294873",
"0.5312649",
"0.53028417",
"0.5298494",
"0.5295584",
"0.52856123",
"0.52598906",
"0.5240829",
"0.52121484",
"0.51923835",
"0.5158059",
"0.5152629",
"0.5137709",
"0.5135891",
"0.5132574",
"0.5130812",
"0.51289386",
"0.51171714",
"0.51154745",
"0.5113707",
"0.50926",
"0.50851655",
"0.50735646",
"0.50606036",
"0.5029832",
"0.5029463",
"0.5028001",
"0.5023295",
"0.49969584",
"0.4994445",
"0.49904498",
"0.49898776",
"0.49804705",
"0.49704316",
"0.49678648",
"0.49676105",
"0.4966935",
"0.49644974",
"0.4950774",
"0.49470213",
"0.4946618",
"0.4946618",
"0.4937765",
"0.49339488",
"0.49339488",
"0.49339488",
"0.49274606",
"0.49250242",
"0.4924196",
"0.49192184",
"0.49191147",
"0.49078208",
"0.49026898",
"0.49026898",
"0.4896627",
"0.48918754",
"0.4890702",
"0.48813123",
"0.4880468",
"0.48771018",
"0.48726377",
"0.48644623",
"0.48641568",
"0.4858061",
"0.48450553",
"0.48438248",
"0.48399743",
"0.48328286",
"0.48309398",
"0.4823298",
"0.48191378",
"0.48060605",
"0.4803821",
"0.48028252",
"0.48015147",
"0.47924194",
"0.4788336",
"0.47687012",
"0.47595197",
"0.47585255",
"0.47562492",
"0.47560105",
"0.47553337",
"0.4741639",
"0.47352853",
"0.4733718",
"0.47254422",
"0.4722862",
"0.4722709",
"0.47221172",
"0.47196308"
]
| 0.5811683 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) throws IOException {
String path = System.getProperty("user.dir") + "\\src\\excelFileHandling\\TestData1.xls";
FileInputStream file = new FileInputStream(path);
HSSFWorkbook wb = new HSSFWorkbook(file);
HSSFSheet sheet = wb.createSheet("Sheet2");
String[][] data= {{"Name","Surname","Address"},
{"Vishal","Shinde","Pune"},
{"Satya","Shinde","Pune"}
};
for (int i=0; i<data.length; i++)
{
HSSFRow row =sheet.getRow(i);
if(row==null)
row= sheet.createRow(i);
for (int j=0; j<data[0].length; j++)
{
HSSFCell cell = row.getCell(j);
if(cell == null)
cell = row.createCell(j);
cell.setCellValue(data[i][j]);
}
}
FileOutputStream fileout = new FileOutputStream(path);
wb.write(fileout);
fileout.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Start method which sets the scene. | public void start(Stage primaryStage, MainMenuGUI mainMenuGUI, Socket socket) {
stage = primaryStage;
this.mainMenuGUI = mainMenuGUI;
this.socket = socket;
BorderPane borderPane = new BorderPane();
ToolBar toolBar = new ToolBar();
Button backButton = new Button("Back");
backButton.setOnAction(event -> mainMenuGUI.start());
toolBar.getItems().add(backButton);
Separator separator = new Separator();
separator.setOrientation(Orientation.VERTICAL);
VBox vBox = new VBox();
vBox.setAlignment(Pos.CENTER);
HBox hBox = new HBox();
hBox.setPadding(new Insets(0, 0, 0, 13));
hBox.prefWidthProperty().bind(toolBar.widthProperty().subtract(60));
Label roomCodeLabel = new Label("Game code: ");
roomCodeLabel.setAlignment(Pos.CENTER);
roomCodeLabel.setFont(Font.font("Arial", FontWeight.LIGHT, 20));
TextField textField = new TextField();
textField.setPrefWidth(92);
Button buttonJoinGame = new Button("Join game");
buttonJoinGame.setAlignment(Pos.CENTER);
buttonJoinGame.setOnAction(event -> joinGameRoom(textField.getText()));
Separator separator2 = new Separator();
separator2.setOrientation(Orientation.VERTICAL);
Button buttonRefreshGames = new Button("Refresh games ");
buttonRefreshGames.setOnAction(event -> setAvailableGames());
hBox.getChildren().addAll(separator, roomCodeLabel, textField, buttonJoinGame, separator2, buttonRefreshGames);
hBox.setSpacing(8);
borderPane.setTop(toolBar);
Label joinPublicGame = new Label("Public games");
joinPublicGame.setTextAlignment(TextAlignment.CENTER);
joinPublicGame.setFont(Font.font("Arial", FontWeight.BOLD, 30));
listView = new ListView<>();
setAvailableGames();
toolBar.getItems().add(hBox);
vBox.getChildren().addAll(joinPublicGame, listView);
vBox.setPadding(new Insets(10));
borderPane.setCenter(vBox);
Scene scene = new Scene(borderPane, 500, 490);
stage.setTitle("Join game");
stage.setScene(scene);
stage.show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void startScene()\r\n\t{\r\n\t\tthis.start();\r\n\t}",
"public void setupScene() {\n\t\tplayScene = new Scene(new Group());\n\t\tupdateScene(playScene);\n\t\twindow.setScene(playScene);\n\t\twindow.show();\n\t}",
"public void Scene() {\n Scene scene = new Scene(this.root);\n this.stage.setScene(scene);\n this.stage.show();\n }",
"private void setTheScene()\n {\n board.setLocalRotation(Quaternion.IDENTITY);\n board.rotate(-FastMath.HALF_PI, -FastMath.HALF_PI, 0);\n board.setLocalTranslation(0, 0, -3);\n\n cam.setLocation(new Vector3f(0, 0, 10));\n cam.lookAt(Vector3f.ZERO, Vector3f.UNIT_Y);\n }",
"public void start() {\n\n\t\t// There will be no established screen at startup.\n\t\tif (screen != null)\n\t\t\tthrow new RuntimeException(\"Multiple instances of the game cannot be run.\");\n\n\t\t// Fire up the main menu screen.\n\t\tsetCurrentScreen(new MainMenuScreen());\n\t}",
"public void setScene(Scene scene){\n this.scene = scene;\n }",
"@Override\r\n\tpublic void start(Stage stage) {\n\r\n scenes.put(SceneName.MAIN, new MainView(stage).getScene());\r\n scenes.put(SceneName.SCENE1, new ViewOne(stage).getScene());\r\n/*\t\tscenes.put(SceneName.SCENE2, new ViewTwo(stage).getScene());\r\n\t\tscenes.put(SceneName.SCENE3, new ViewThree(stage).getScene());\r\n*/\r\n\r\n\t\t// Start with the main scene\r\n\t\tstage.setScene(scenes.get(SceneName.MAIN));\r\n\t\tstage.setTitle(\"Multi-Scene Demo\");\r\n\t\tstage.show();\r\n\t}",
"public void start(Mainwindow scene) {\n //绑定controller\n view = scene;\n\n //初始化Log文件和Logger\n File logFile = new File(logPath + System.currentTimeMillis() + \".log\");\n try {\n logFile.createNewFile();\n System.out.println(\"Game record is saved in \" + logFile.getAbsolutePath());\n }\n catch (IOException ioe) {\n System.err.println(\"Cannot create log file\");\n ioe.printStackTrace();\n }\n gameLogger.initialize(GameLogger.WRITE_LOG, logFile);\n\n //初始化葫芦娃\n CalabashBrother[] huluwa = {\n new CalabashBrother(this, background, 6),\n new CalabashBrother(this, background, 3),\n new CalabashBrother(this, background, 0),\n new CalabashBrother(this, background, 2),\n new CalabashBrother(this, background, 4),\n new CalabashBrother(this, background, 1),\n new CalabashBrother(this, background, 5),\n };\n SortController.sort(huluwa);\n for (int i = 0; i < huluwa.length; ++i) {\n huluwa[i].setCampId(Camp.GOOD);\n huluwa[i].setLife(120);\n huluwa[i].setAtk(30 + i);\n String iconPath = getClass().getResource(resourcesPath + Integer.toString(huluwa[i].getNum() + 1) + \".png\").toString();\n huluwa[i].setIcon(iconPath);\n }\n\n //初始化反派战斗人员\n Monster[] evils = {\n new Monster(this, background, \"蝎子精\"),\n new Monster(this, background, \"小喽啰1\"),\n new Monster(this, background, \"小喽啰2\"),\n new Monster(this, background, \"小喽啰3\"),\n new Monster(this, background, \"小喽啰4\"),\n new Monster(this, background, \"小喽啰5\"),\n new Monster(this, background, \"小喽啰6\"),\n };\n //单独设置蝎子精\n evils[0].setCampId(Camp.BAD);\n evils[0].setLife(150);\n evils[0].setAtk(40);\n evils[0].setIcon(getClass().getResource( resourcesPath + \"scorpion.png\").toString());\n //设置小喽啰\n for (int i = 1; i < evils.length; ++i) {\n evils[i].setCampId(Camp.BAD);\n evils[i].setLife(100);\n evils[i].setAtk(20);\n evils[i].setIcon(getClass().getResource(resourcesPath + \"monster.png\").toString());\n }\n\n //初始化爷爷:技能-加血\n Leader grandpa = Leader.getInstance(this, background, \"爷爷\");\n grandpa.setCampId(Camp.GOOD);\n grandpa.setLife(100);\n grandpa.setIcon(getClass().getResource( resourcesPath +\"grandpa.png\").toString());\n grandpa.setBuff(obj -> { obj.setLife(obj.getLife() + 20); });\n grandpa.setBuffSign(new Image(getClass().getResource(resourcesPath + \"lifeup.png\").toString()));\n\n //初始化蛇精:技能-加攻击力\n Leader snaker = Leader.getInstance(this, background, \"蛇精\");\n snaker.setCampId(Camp.BAD);\n snaker.setLife(120);\n snaker.setIcon(getClass().getResource(resourcesPath + \"snaker.png\").toString());\n snaker.setBuff(obj -> { obj.setAtk(obj.getAtk() + 20); });\n snaker.setBuffSign(new Image(getClass().getResource(resourcesPath + \"atkup.png\").toString()));\n\n numOfGood = huluwa.length + 1;\n numOfBad = evils.length + 1;\n\n initializeFormation(background, snaker, evils, grandpa, huluwa);\n updateView();\n\n //启动所有线程,开始战斗\n System.out.println(\"Game start!\");\n exec = Executors.newCachedThreadPool();\n exec.execute(grandpa);\n exec.execute(snaker);\n for (int i = 0; i < huluwa.length; ++i) {\n exec.execute(huluwa[i]);\n }\n for (int i = 0; i < evils.length; ++i) {\n exec.execute(evils[i]);\n }\n exec.shutdown();\n }",
"@Override\n public void start (Stage stage) throws IOException {\n init.start(stage);\n myScene = view.makeScene(50,50);\n stage.setScene(myScene);\n stage.show();\n }",
"@Override\n public void start( Stage primaryStage ) throws Exception {\n primaryStage.setTitle(\"Battleship\");\n primaryStage.setScene(createScene());\n primaryStage.show();\n }",
"public void start(Stage stage){\n //set the class fields for the stage and app controller\n this.stage = stage;\n this.appController = AppController.getInstance();\n appController.setStage(stage);\n //load FXML\n //each screen requires the following\n //a \"Parent screenNameRoot\" object to hold the controller for each screen\n //a \"ScreenName screenName\" object of the ScreenName class for each screen that exists\n //a \"FXMLLoader screenNameLoader = new FXMLLoader(this.getClass().getResource(\"fxml/fxmlFileName.fxml\"));\" object to load the controller from FXML\n //an entry in the try/catch block that does the following (should catch IOException)\n //sets the screenNameRoot object to screenNameLoader.load()\n //sets the screenName object to screenNameLoader.getController()\n Parent whoAmIScreenRoot = null;\n FXMLLoader whoAmIScreenLoader = new FXMLLoader(this.getClass().getResource(\"fxml/whoAreYouScene.fxml\"));\n WhoAmIScreen whoAmIScreen = null;\n\n try{ \n whoAmIScreenRoot = whoAmIScreenLoader.load();\n whoAmIScreen = whoAmIScreenLoader.getController();\n }\n catch(IOException e){\n System.out.println(e.getMessage());\n System.out.println(\"Failed to load FXML\");\n System.exit(1);\n }\n\n //set the title for the window (not super important since this application would be embedded in a web page where this wouldn't be visible, but done anyway for posterity)\n stage.setTitle(\"Potluck Main Menu\");\n\n //create scenes for each screen\n Scene whoAmIScreenScene = new Scene(whoAmIScreenRoot);\n\n\n //give AppController references to scenes and objects\n appController.setWhoAmIScreen(whoAmIScreen);\n appController.setWhoAmIScreenScene(whoAmIScreenScene);\n\n //set stage's current scene to the WhoAmIScreenScene cause that's the default\n stage.setScene(whoAmIScreenScene);\n\n //must be final call in the function, tells JavaFX to start the app\n stage.show();\n }",
"@Override\n public void start(Stage primaryStage) {\n this.mainStage = primaryStage;\n mainStage.setTitle(\"Art Sorter\");\n changeScreen( new MainScreen() );\n }",
"@Override\n public void start(Stage stage){\n // set the stage\n this.stage = stage;\n\n // set the scenes\n mainScene();\n inputScene();\n\n // set the stage attributes\n stage.setTitle(\"Maze solver\");\n stage.setWidth(VisualMaze.DISPLAY_WIDTH);\n stage.setHeight(VisualMaze.DISPLAY_HEIGHT + 200);\n stage.setScene(main);\n\n // display the app\n stage.show();\n }",
"@Override\n\tpublic void start(Stage stage) throws Exception {\n\t\tMain.stg = stage;\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"/stylesheets/MainMenu.fxml\"));\n\t\tstage.setTitle(BowmanConstants.GAME_TITLE);\n\t\tstage.setScene(new Scene(root, BowmanConstants.MENU_WIDTH, BowmanConstants.MENU_HEIGHT));\n\t\tstage.show();\n\t\tinit_settings();\n\t}",
"@Override\n protected void initScene() {\n setupCamera(0xff888888);\n\n /*\n * Create a Cube and display next to the cube\n * */\n setupCube();\n\n\n /*\n * Create a Sphere and place it initially 4 meters next to the cube\n * */\n setupSphere();\n\n\n /*\n * Create a Plane and place it initially 2 meters next to the cube\n * */\n setupPlane();\n setupImage();\n setupText();\n\n }",
"@Override\n public void start(Stage primaryStage) {\n try {\n Parent root = FXMLLoader.load(getClass().getResource(\"scenes/main_menu.fxml\"));\n primaryStage.setTitle(\"Führerschein Theorieprüfung\");\n primaryStage.setScene(new Scene(root));\n primaryStage.setResizable(false);\n\n primaryStage.show();\n\n new FadeIn(root).play();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\r\n\tpublic void start(Stage s) throws Exception {\n\t\tc=new Container();\r\n\t\tthis.st=s;\r\n\t\tc.setFs(new FirstScreen(st,c));\r\n\t\tthis.sc=new Scene(c.getFs(), 800,600);\r\n\t\tst.setScene(sc);\r\n\t\tst.setTitle(\"Main Window\");\r\n\t\tst.show();\r\n\t}",
"public void start(Stage stage) {\r\n // Setting our primaryStage variable to the stage given to us by init()\r\n primaryStage = stage;\r\n // Retrieving the primary scene (the first thing we want the user to see)\r\n Scene primaryScene = getPrimaryScene();\r\n // Setting the title of the stage, basically what the window says on the top left\r\n primaryStage.setTitle(\"SeinfeldMemeCycler\");\r\n // Setting the scene\r\n primaryStage.setScene(primaryScene);\r\n // Displaying the stage\r\n primaryStage.show();\r\n }",
"protected void displayInitialScene() {\n stageManager.switchScene(FxmlView.SPLASH, StageStyle.UNDECORATED);\n }",
"private void setStage() {\n\t\tstage = new Stage();\n\t\tstage.setScene(myScene);\n\t\tstage.setTitle(title);\n\t\tstage.show();\n\t\tstage.setResizable(false);\n//\t\tstage.setOnCloseRequest(e -> {\n//\t\t\te.consume();\n//\t\t});\n\t}",
"@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"Scene.fxml\"));\n primaryStage.setTitle(\"Project 3\");\n primaryStage.setScene(new Scene(root, 600, 600));\n primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n\n Music.playBackGroundMusic();\n\n try {\n SpellingListData.getInstance();\n _revisionData.loadFailed();\n _overallStats.loadStats();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n _primaryStage = primaryStage;\n\n Parent root = FXMLLoader.load(getClass().getResource(\"MainMenuV2.fxml\"));\n primaryStage.setTitle(\"VOXSPELL\");\n primaryStage.setScene(new Scene(root, 1200, 800));\n primaryStage.setResizable(false);\n primaryStage.show();\n\n\n }",
"public void start(Stage s) {\n\t\ts.setTitle(\"SpaceY | Menu principal\");\n\t\ts.setScene(scene);\n\t\ts.setResizable(true);\n//\t\ts.setMaximized(true);\n\t\ts.getIcons().add(Sprite.LOGO.getImage());\n\t\ts.show();\n\t}",
"public void mainMenu() {\n Game.stage.setScene(mainMenuScene);\n Game.stage.show();\n }",
"public void goToMainScene() {\n\n scenesSeen.clear();\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n // set up window.\n primaryStage.setWidth(600);\n primaryStage.setHeight(400);\n primaryStage.setResizable(false);\n\n // set up scenes.\n FXMLLoader mainMenuLoader = new FXMLLoader(getClass().getResource(\"FXML/mainMenuLayout.fxml\"));\n Scene mainMenuScene = new Scene(mainMenuLoader.load());\n FXMLLoader gameLoader = new FXMLLoader(getClass().getResource(\"FXML/gameLayout.fxml\"));\n Scene gameScene = new Scene(gameLoader.load());\n\n // set the main menu to load into the game.\n MainMenuController mainMenuController = (MainMenuController) mainMenuLoader.getController();\n mainMenuController.setGameScene(gameScene);\n\n primaryStage.setScene(mainMenuScene);\n\n primaryStage.show();\n\n }",
"@Override\n public void start(Stage primaryStage) {\n\n pStage = primaryStage;\n\n try {\n\n\n Parent root = FXMLLoader.load(getClass().getResource(\"/GUI.fxml\"));\n\n Scene scene = new Scene(root, 600, 400);\n\n primaryStage.setTitle(\"Shopper 5000 Ultimate\");\n\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.show();\n\n } catch(Exception e) {\n e.printStackTrace();\n }\n }",
"public void start_game() throws IOException, JAXBException {\n savetoxml();\n logger.trace(\"starting the game now...\");\n primarystage.setResizable(false);\n primarystage.setScene(game_scene);\n primarystage.show();\n\n }",
"public void start() {\n BorderPane borderPane = new BorderPane();\n VBox centerPane = new VBox();\n\n borderPane.setTop(lobbyMenu());\n\n String TITLE = \"Connect 4\";\n Text title = new Text(TITLE);\n title.setFont(Font.font(\"Arial\", FontWeight.BOLD, 30));\n centerPane.getChildren().add(title);\n centerPane.getChildren().add(lobbyButtons());\n centerPane.setAlignment(Pos.CENTER);\n\n borderPane.setCenter(centerPane);\n\n Scene scene = new Scene(borderPane, 520, 360);\n\n stage.setTitle(TITLE);\n stage.setScene(scene);\n }",
"@Override\r\n public void start(Stage primaryStage) {\r\n System.loadLibrary(Core.NATIVE_LIBRARY_NAME);\r\n btnCam = new Button(\"Start camera\");\r\n btnManAut = new Button(\"Manual\");\r\n manualMode = true;\r\n camRunning = false;\r\n this.primaryStage = primaryStage;\r\n root = new BorderPane();\r\n\r\n loadImage();\r\n createScene();\r\n handleUI();\r\n updateGUIStatus();\r\n }",
"public void Start() \r\n {\r\n // Set the canvas as the current phone's screen\r\n mDisplay.setCurrent(this);\r\n\r\n // we call our own initialize function to setup all game objects\r\n GameInitialize();\r\n\r\n // Here we setup the thread and start it\r\n Thread thread = new Thread(this);\r\n thread.start();\r\n }",
"public void start(Stage myStage) { \n \n System.out.println(\"Inside the start() method.\"); \n \n // Give the stage a title. \n myStage.setTitle(\"JavaFX Skeleton.\"); \n \n // Create a root node. In this case, a flow layout \n // is used, but several alternatives exist. \n FlowPane rootNode = new FlowPane(); \n \n // Create a scene. \n Scene myScene = new Scene(rootNode, 300, 200); \n \n // Set the scene on the stage. \n myStage.setScene(myScene); \n \n // Show the stage and its scene. \n myStage.show(); \n }",
"public void setHomeScene(Scene scene) {\r\n scene1 = scene;\r\n }",
"public void start()\n\t{\n\t\tview.showWindow();\n\t\taddListeners();\n\t}",
"@Override\n public final void start(final Stage primaryStage) {\n Scene scene = new Scene(getPane(), PANE_WIDTH, PANE_HEIGHT);\n primaryStage.setTitle(\"Tic-Tak-Toe\"); // Set the stage title.\n primaryStage.setScene(scene); // Place the scene in the stage.\n primaryStage.show(); // Display the stage.\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws IOException {\n\t Parent root = FXMLLoader.load(getClass().getResource(\"WeatherView.fxml\"));\r\n\t \r\n\t //setting the title of the stage\r\n\t primaryStage.setTitle(\"Weather Forecast\");\r\n\t \r\n\t //Setting the scene in the stage\r\n\t primaryStage.setScene(new Scene(root));\r\n\t \r\n\t //this method shows the stage\r\n\t primaryStage.show();\r\n\t \r\n\t \r\n\t \r\n\t \r\n\t}",
"public void setCurrentScene(Scene scene)\r\n\t{\r\n\t\t// If the scene has not been added yet, do so.\r\n\t\tif (!_Scenes.contains(scene))\r\n\t\t{\r\n\t\t\taddScene(scene);\r\n\t\t}\r\n\r\n\t\t// Switch to the scene.\r\n\t\t_CurrentScene = scene;\r\n\t\tDebugManager.getInstance().setPhysicsSimulator(_CurrentScene.getPhysicsSimulator());\r\n\t}",
"@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }",
"public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}",
"public void setScene(Node scene) {\r\n\t\tthis.scene = scene;\r\n\t}",
"public void start(Stage stage) {\n game = new Game();\n\n Scene gameScene = new Scene(game.getVisual().getRoot(), MainGUI.WIDTH, MainGUI.HEIGHT);\n gameScene.setOnKeyPressed(new PressHandler());\n gameScene.setOnKeyReleased(new ReleaseHandler());\n\n createMenu(stage, gameScene);\n Scene menuScene = new Scene(root, MainGUI.WIDTH, MainGUI.HEIGHT);\n stage.setScene(menuScene);\n\n }",
"@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tBattleStage.startBattleStage();\n\t\t\t\t\t\tPRIMARY.setScene(BATTLESCENE);\n\t\t\t\t\t\t//BattleStage.startMonster();\n\t\t\t\t\t}",
"@Override\n public void start(Stage primaryStage) throws Exception{\n // Loads the Home view\n Parent root = FXMLLoader.load(getClass().getResource(\"fxml/Home.fxml\"));\n\n primaryStage.setTitle(\"To-Do Manager\"); // Sets the title of the window\n\n // Sets the Home view as the first scene\n Scene scene = new Scene(root, 854, 480);\n\n // Sets the window's scene\n primaryStage.setScene(scene);\n\n // Prevents user from resizing window ( because of UI reasons )\n primaryStage.setResizable(false);\n\n // Displays the window\n primaryStage.show();\n }",
"@Override\r\n public void start(Stage primaryStage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"ui/main.fxml\")); //FXMLLoader.load(Utilities.getResourceURL(\"ui/main.fxml\"));\r\n primaryStage.setTitle(\"Custom Groovy Game Engine\");\r\n primaryStage.setScene(new Scene(root, 960, 480));\r\n primaryStage.show();\r\n }",
"@FXML\r\n public void moveToMainScene(ActionEvent event) throws IOException {\r\n isRunning = false;\r\n cv.changeScene(\"/start/start.fxml\", event);\r\n }",
"@Override\n public void start(Stage primaryStage) {\n\n // Creates the scene and displays it to the main window\n Scene withDrawPaneSetup = new Scene(withDrawPaneSetup(primaryStage), 1024, 768);\n primaryStage.setScene(withDrawPaneSetup);\n }",
"@Override\n public void start(Stage stage) throws Exception {\n Parent root = FXMLLoader.load(getClass().getResource(\"Lesson3.fxml\"));\n \n \n // Create Scene with background Color\n Scene scene = new Scene(root, 700, 350, Color.LIGHTYELLOW);\n \n // set scene on stage with title\n stage.setTitle(\"Lesson 3 FXML\");\n stage.setScene(scene);\n stage.show();\n }",
"public void createScene();",
"@Override // Override the start method in the Application class\r\n /**\r\n * Start method for layout building\r\n */\r\n public void start(Stage primaryStage)\r\n {\n Scene scene = new Scene(pane, 370, 200);\r\n primaryStage.setTitle(\"Sales Conversion\"); // Set the stage title\r\n primaryStage.setScene(scene); // Place the scene in the stage\r\n primaryStage.show(); // Display the stage\r\n }",
"public void setCurrentScene(Scene scene) {\n\t mCurrentScene = scene;\n\t getEngine().setScene(mCurrentScene);\n\t}",
"@Override\n public void start(Stage stage) throws IOException {\n logInfo();\n\n scene = new Scene(loadFXML(\"mainView\"));\n stage.setScene(scene);\n stage.setTitle(\"OzoMorph\");\n stage.show();\n }",
"@Override\n public void start(Stage primaryStage) {\n primaryStage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n @Override\n public void handle(WindowEvent t) {\n Platform.exit();\n System.exit(0);\n }\n });\n\n // Set up the Stage.\n Group root = new Group();\n Scene scene = new Scene(root, SCENE_WIDTH, SCENE_HEIGHT);\n\n this.spriteList = new ArrayList<Sprite>();\n\n Sprite sprite = new hoffmanm2();\n sprite.setName(\"Geralt\");\n sprite.setSize(76, 77);\n sprite.setPosition(74, 51);\n sprite.setVelocity(10, 7);\n root.getChildren().add(sprite);\n this.spriteList.add(sprite);\n\n // Show the UI.\n primaryStage.setScene(scene);\n primaryStage.show();\n\n // Set up the timer to run the animation. Note that there are\n // more standard ways to run an animation with JavaFX, but this one\n // is extremely explicit, and easiest to understand and control at first.\n this.setUpAnimationTimer();\n }",
"@Override\n public void start(Stage primaryStage)\n throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException {\n makeMainGrid();\n Scene myHomeScene = new Scene(myMainGrid, WINDOW_WIDTH, WINDOW_HEIGHT);\n primaryStage.setScene(myHomeScene);\n primaryStage.show();\n }",
"@Override\n\tpublic void start(Stage mainStage) throws Exception {\n\t\twindow = mainStage;\n\n\t\tFXMLLoader loader = new FXMLLoader();\n\t\tloader.setLocation(getClass().getResource(\"/view/logInScreen.fxml\"));\n\t\t\n\t\tParent root = loader.load();\n\n\t\tmainStage.setTitle(\"Photos\");\n\n\t\tScene logIn = new Scene (root);\n\n\t\tmainStage.setResizable(false);\n\t\tmainStage.setScene(logIn);\n\t\tmainStage.show();\n\t\t\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\n\t\tprimaryStage.setTitle(\"News from The Guardian\");\n\t\t\n\t\tNewsReader reader = new NewsReader();\n\n\t\tView view = new View(reader);\n\t\t\n\t\tScene scene = new Scene(view.getRoot(), WIDTH, HEIGHT);\n\t\t\n\t\tprimaryStage.setScene(scene);\n\t\ttry{\n\t\t\tscene.getStylesheets().add(News.class.getResource(\"app.css\").toExternalForm());\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"boop\");\n//\t\t\te.printStackTrace();\n\t\t}\n\t\tprimaryStage.setResizable(false);\n\t\tprimaryStage.show();\n\t\t\n\t}",
"public void setCurrentScene(Scene scene)\n\t{\n\t mCurrentScene = scene;\n\t getEngine().setScene(mCurrentScene);\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\n\t\tSystem.out.println(\"The game begins now...\");\n\t\tBoardConfig boardConfig = new BoardConfig(new XY(25, 25));\n\n\t\tBoard board = new Board(boardConfig);\n\n\t\tState state = new State(board);\n\n\t\tFxUI fxUI = FxUI.createInstance(boardConfig.getSize());\n\n\t\tfinal Game game = new GameImpl(state);\n\n\t\tgame.setUi(fxUI);\n\n\t\tfxUI.setGameImpl((GameImpl) game);\n\n\t\tprimaryStage.setScene(fxUI);\n\t\tprimaryStage.setTitle(\"Welcome to the virtual world of Squirrels.\");\n\t\tprimaryStage.setAlwaysOnTop(true);\n\t\tfxUI.getWindow().setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent evt) {\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\n\t\t});\n\t\tprimaryStage.show();\n\n\t\tstartGame(game);\n\t}",
"public void setScene(String scene) {\n\t\tthis.scene = scene;\n\t}",
"@Override\n public void start(Stage primaryStage) throws IOException {\n Main.primaryStage = primaryStage;\n Main.primaryStage.setTitle(\"American Travel Bucketlist\");\n\n //Call the extension of the FXMLLoader for the MainView.\n showMainView();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception\n {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(\"/main/mainMenu.fxml\"));\n Pane root = loader.load();\n\n MainMenuController controller = loader.getController();\n controller.start(primaryStage);\n\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.setTitle(\"RU Cafe: Main Menu\");\n primaryStage.setResizable(false);\n primaryStage.show();\n }",
"@Override\n public void start(Stage stage) throws IOException {\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(MainScreen.class.getResource(\"MainScreen.fxml\"));\n\n\n Parent root = fxmlLoader.load();\n MainScreen mainScreen = fxmlLoader.getController();\n Scene scene = new Scene(root);\n\n stage.setTitle(\"Inventory Management System\");\n stage.setScene(scene);\n stage.show();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws IOException {\n\t\t// Create the root of the graph scene. It is mainly used in the updateScene() method.\n\t\troot = new Group();\n\n\t\t// Create a simulation with N elements\n\t\tsimulation = new Simulation();\n\n\t\t// Configure and start periodic scene update: after PERIOD_MS ms, updateScene() is called.\n\t\ttimeline = new Timeline(new KeyFrame(PERIOD_MS, ae -> {\n\t\t\tupdateScene();\n\t\t})); // \"->\" is a Java 8 specific construction\n\t\ttimeline.setCycleCount(Animation.INDEFINITE);\n\t\ttimeline.play();\n\n\n\t\t/** Allows the window to be dragged by the mouse */\n\t root.setOnMousePressed(new EventHandler<MouseEvent>() {\n\t \t@Override\n\t public void handle(MouseEvent event) {\n\t xOffset = primaryStage.getX() - event.getScreenX();\n\t yOffset = primaryStage.getY() - event.getScreenY();\n\t }\n\t });\t \n\t root.setOnMouseDragged(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n \tprimaryStage.setX(event.getScreenX() + xOffset);\n\t primaryStage.setY(event.getScreenY() + yOffset);\n\t }\n\t });\n\t \n\t \n\t /** Adds the stylesheet for visual effect */\n\t root.getStylesheets().add(\"/stylesheet.css\");\n\t root.getStyleClass().add(\"rootPane\");\n\t \n\t /** Adds icon */\n\t primaryStage.getIcons().add(new Image(\"/icon.png\"));\n\t \n\t Scene scene = new Scene(root, Simulation.SPACE_SIZE, Simulation.SPACE_SIZE, Simulation.BACKGROUND); \n\t primaryStage.setScene(scene);\n \tprimaryStage.setTitle(\"Gabriel's Land\");\n \tprimaryStage.setResizable(false);\n\t primaryStage.getScene().setCursor(Cursor.HAND);\n\t primaryStage.show();\n\n\t}",
"public Scene scene() {\n AnchorPane anchorPane = new AnchorPane();\n\n Pane track = raceTrack.trackpainting();\n\n AnchorPane.setTopAnchor(track, 40.0);\n AnchorPane.setLeftAnchor(track, 40.0);\n\n determineStartingLocation(carOne, carTwo, carThree);\n\n carPosition(carOne);\n carPosition(carTwo);\n carPosition(carThree);\n\n AnchorPane.setTopAnchor(btnStartRace, 480.0);\n AnchorPane.setLeftAnchor(btnStartRace, 740.0);\n\n AnchorPane.setTopAnchor(btnEndRace, 480.0);\n AnchorPane.setLeftAnchor(btnEndRace, 730.0);\n\n AnchorPane.setTopAnchor(txtWarning, 600.0);\n AnchorPane.setLeftAnchor(txtWarning, 610.0);\n\n anchorPane.setBackground(\n new Background(new BackgroundFill(Color.rgb(0, 132, 0),\n CornerRadii.EMPTY, Insets.EMPTY)));\n\n anchorPane.getChildren().addAll(track, carOne, carTwo, carThree, btnStartRace, btnEndRace, txtWarning);\n\n Scene scene = new Scene(anchorPane, 1580, 1030);\n return scene;\n }",
"public void startGame() {\r\n this.setupGame();\r\n }",
"public void startGame() {\n\t\t//Start the rendering first\n\t\tgetRenderer().startRendering();\n\t\t\n\t\t//Start the game thread after that.\n\t\tgetGameThread().start();\n\t}",
"@FXML\n private void startGame(){\n AnchorPane anchorPane = new AnchorPane();\n Scene gameScene = new Scene(anchorPane, 800, 600);\n Stage gameStage = new Stage();\n GameView gameView = new GameView(anchorPane, gameScene, gameStage);\n gameView.gameStart();\n }",
"private void setup() {\n this.primaryStage.setTitle(Constants.APP_NAME);\n\n this.root = new VBox();\n root.setAlignment(Pos.TOP_CENTER);\n root.getChildren().addAll(getMenuBar());\n\n Scene scene = new Scene(root);\n this.primaryStage.setScene(scene);\n\n // set the default game level.\n setGameLevel(GameLevel.BEGINNER);\n\n // fix the size of the game window.\n this.primaryStage.setResizable(false);\n this.primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n primaryStage.setScene(ClientPort(primaryStage));\n primaryStage.show();\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) {\r\n\t\tthis.primaryStage=primaryStage;\r\n\t\tthis.primaryStage.setTitle(\"AmwayWinston\");\r\n\t\t\r\n\t\tinitRootLayout();\r\n\t\t\r\n\t\tshowPersonOverview();\r\n\t\t\r\n\t}",
"protected void buildScene() {\n Geometry cube1 = buildCube(ColorRGBA.Red);\n cube1.setLocalTranslation(-1f, 0f, 0f);\n Geometry cube2 = buildCube(ColorRGBA.Green);\n cube2.setLocalTranslation(0f, 0f, 0f);\n Geometry cube3 = buildCube(ColorRGBA.Blue);\n cube3.setLocalTranslation(1f, 0f, 0f);\n\n Geometry cube4 = buildCube(ColorRGBA.randomColor());\n cube4.setLocalTranslation(-0.5f, 1f, 0f);\n Geometry cube5 = buildCube(ColorRGBA.randomColor());\n cube5.setLocalTranslation(0.5f, 1f, 0f);\n\n rootNode.attachChild(cube1);\n rootNode.attachChild(cube2);\n rootNode.attachChild(cube3);\n rootNode.attachChild(cube4);\n rootNode.attachChild(cube5);\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tthis.stage = primaryStage;\r\n\t\tprimaryStage.setResizable(false);\r\n\t\tthis.stage.setTitle(\"Forza 4\");\r\n\t\t\r\n\t\tstartWindow();\r\n\t\thomeStage();\r\n\t\t\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tLabel label1 = new Label(\"Welcome to scene 1\");\n\t\tButton button1 = new Button(\"Go to scene 2\");\n\t\tbutton1.setOnAction(e -> primaryStage.setScene(scene2));\n\t\t\n\t\t// Layout for scene 1\n\t\tVBox layout1 = new VBox(20);\n\t\tlayout1.getChildren().addAll(label1, button1);\n\t\tscene1 = new Scene(layout1, 200, 200);\n\t\t\n\t\t// Content of scene 2\n\t\tButton button2 = new Button(\"Let's go back to scene 1\");\n\t\tbutton2.setOnAction(e -> primaryStage.setScene(scene1));\n\t\t\n\t\t// Layout for scene 2\n\t\tStackPane layout2 = new StackPane();\n\t\tlayout2.getChildren().add(button2);\n\t\tscene2 = new Scene(layout2, 600, 300);\n\t\t\n\t\t// Set first scene\n\t\tprimaryStage.setScene(scene1);\n\t\tprimaryStage.setTitle(\"Switching scenes\");\n\t\tprimaryStage.show();\n\t}",
"public void start() {\r\n setupCenter();\r\n setupEast();\r\n\r\n myFrame.setTitle(\"TCSS 305 Tetris\");\r\n myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n myFrame.setLocationByPlatform(true);\r\n myFrame.pack();\r\n myFrame.setMinimumSize(MINIMUM_SIZE);\r\n myFrame.setSize(DEFAULT_SIZE);\r\n myFrame.setVisible(true);\r\n\r\n myTimer.start();\r\n startMusic();\r\n }",
"public Start() {\n super();\n setTitle(\"Monopoly\");\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n\n mainPanel = new JPanel();\n mainPanel.setLayout(new BorderLayout());\n _gameWindow = new GameWindow();\n _welcome = new WelcomeWindow();\n _gameLoop = new PlayersLoop();\n\n changeGameState(GameState.START_STATE);\n\n setContentPane(mainPanel);\n\n pack();\n setVisible(true);\n setSize(new Dimension(800, 600));\n }",
"public void start() {\n\t\tthis.controller.run();\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/sample.fxml\"));\n Parent root = loader.load();\n primaryStage.setTitle(\"Tower Defence\");\n s = new Scene(root, 600, 480);\n primaryStage.setScene(s);\n primaryStage.show();\n MyController appController = (MyController)loader.getController();\n appController.createArena(); \t\t\n\t}",
"public void start (Stage primaryStage) throws Exception{\r\n\t\t\r\n\t\tfrogScenemanager scenemanager = new frogScenemanager(primaryStage);\r\n\t\tscenemanager.startMainMenu();\r\n\t}",
"public static void start(){\n new Light(new Vector3f(getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2,getSIZE()*Chunk.getCHUNKSIZE()/2));\n Keyboard.enableRepeatEvents(true);\n createWindow();\n initGL();\n generateWorld();\n Game.gameLoop();\n }",
"public void start() {\n\t\t// initialize stuff\n\t\tinitGL();\n\t\tinit();\n\t\t\n\t\t// main game loop\n\t\twhile (true) {\n\t\t\t// display the title screen\n\t\t\tshowTitleScreen();\n\t\t\t\n\t\t\twhile (!gameOver) {\n\t\t\t\tupdateDelta();\n\t\t\t\trender();\n\t\t\t\tpollInput();\n\t\t\t\tupdate();\n\t\t\t\tupdateDisplay();\n\t\t\t}\n\t\t\t// Game Over\n\t\t\ttry {\n\t\t\t\tThread.sleep(2500);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void initScenes()\n {\n CCSize s = CCDirector.sharedDirector().getWinSize();\n m_pInScene.setPosition(new CCPoint(-(s.width - 0.5f), 0));\n }",
"public void start(Stage primaryStage) {\n this.primaryStage = primaryStage;\n\n setup();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n console(\"start...\");\n\n Parent root = FXMLLoader.load(getClass().getResource(\"AutoGraderApp.fxml\"));\n\n primaryStage.setTitle(appName);\n primaryStage.setScene(new Scene(root, MIN_STAGE_WIDTH, MIN_STAGE_HEIGHT));\n primaryStage.setMinWidth(MIN_STAGE_WIDTH);\n primaryStage.setMinHeight(MIN_STAGE_HEIGHT);\n\n primaryStage.show();\n }",
"public void setCurrentScene(int index)\r\n\t{\r\n\t\tsetCurrentScene(_Scenes.get(index));\r\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception {\n\n stage = primaryStage;\n stage.setOnCloseRequest(e -> exitProgram());\n Parent root;\n\n// if (!ManagerAccount.isThereAChiefManager()) {\n// root = FXMLLoader.load(new File((RegisterManager.FXML_PATH)).toURI().toURL());\n//\n// FXMLLoader loginPageLoader = new FXMLLoader(new File(LoginSignUpPage.FXML_PATH).toURI().toURL());\n// loginPageLoader.load();\n// //LoginSignUpPage.mediaPlayer.play();\n//\n// stage.setTitle(RegisterManager.TITLE);\n// sceneTrace.add(RegisterManager.FXML_PATH);\n// } else {\n\n\n //this scope\n String response = DataRequestBuilder.buildProgramStartModeRequest();\n if (response.equals(\"1\")) {\n root = FXMLLoader.load(new File(RegisterManager.FXML_PATH).toURI().toURL());\n stage.setTitle(RegisterManager.TITLE);\n sceneTrace.add(RegisterManager.FXML_PATH);\n } else {\n root = FXMLLoader.load(new File(MainMenuController.FXML_PATH).toURI().toURL());\n stage.setTitle(MainMenuController.TITLE);\n sceneTrace.add(MainMenuController.FXML_PATH);\n }\n\n\n// root = FXMLLoader.load(new File(ChatPageController.FXML_PATH).toURI().toURL());\n// stage.setTitle(RegisterManager.TITLE);\n// sceneTrace.add(RegisterManager.FXML_PATH);\n\n //audioClip.play();\n // }\n\n titleTrace.add(stage.getTitle());\n\n Scene scene = new Scene(root);\n stage.setScene(scene);\n primaryStage.show();\n }",
"void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}",
"@Override\r\n public void start(Stage primaryStage) throws Exception{\n primaryStage.setTitle(\"Color switch\");\r\n Gameplay obj1 = new Gameplay();\r\n obj1.mainmenu(primaryStage);\r\n// pane.getChildren().add(new Polygon(10,20,30,10,20,30));\r\n\r\n }",
"public void backToStartScene(ActionEvent event) throws IOException {\r\n Parent startView = FXMLLoader.load(Main.class.getResource(\"fxml/StartScene.fxml\"));\r\n Scene startViewScene = new Scene(startView);\r\n\r\n // This line gets the Stage information (no Stage is passed in)\r\n Stage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\r\n\r\n window.setScene(startViewScene);\r\n window.show();\r\n }",
"@Override\r\n public void start(Stage primaryStage) throws IOException {\r\n this.primaryStage = primaryStage;\r\n this.primaryStage.setTitle(\"HidatoTheGame\");\r\n initializeLayout(primaryStage);\r\n swapLoginFX();\r\n }",
"public void start(Stage primaryStage2) throws FileNotFoundException, NoSuchObjectException {\n primaryStage = primaryStage2;\n myGameOverView = new GameOverView(language, primaryStage);\n primaryStage2.setScene(buildScene());\n }",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"Splash.fxml\"));\r\n\t\t//Scene scene = new Scene(root,1200,800);\r\n\t\tScene scene = new Scene(root,800,400);\r\n\t\t\r\n\t\tprimaryStage.setResizable(false);\r\n\t\tprimaryStage.setScene(scene);\r\n\t\tprimaryStage.initStyle(StageStyle.UNDECORATED);\t\r\n\t\tprimaryStage.show();\r\n\t}",
"@Override\n public void start(Stage stage) throws Exception {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(player.class.getResource(\"resources/audio-menu.fxml\"));\n Parent root = loader.load();\n\n //Now we have access to getController() through the instance... don't forget the type cast\n controller = loader.getController();\n\n mainStage = stage;\n Scene scene = new Scene(root);\n\n\n Platform.setImplicitExit(false);\n stage.setScene(scene);\n controller.initialize();\n }",
"public void startGameEventHandler(ActionEvent e) throws IOException {\n appWindow=(Stage)((Node)e.getSource()).getScene().getWindow();\n// appWindow.setScene(gameLevelScene);\n// appWindow.show();\n\n playLevel(1,0,null);\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tprimaryStage.setTitle(\"MyMoney Application\");\n\t\t// Set the scene of the application to the new Scene\n\t\tprimaryStage.setScene(createScene());\n\t\tprimaryStage.setResizable(true);\n\t\t// Display the Stage\n\t\tprimaryStage.show();\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) {\n\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"/view/History.fxml\"));\n\t\t\tScene window = new Scene(root);\n\t\t\tprimaryStage.setScene(window);\n\t\t\tprimaryStage.show();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"mainMenu/mainMenu.fxml\"));\n primaryStage.setTitle(\"Hello World\");\n Scene s =new Scene(root, defaultWindowWidth, defaultWindowHight);\n s.getStylesheets().add(getClass().getResource(\"css/main.css\").toExternalForm());\n primaryStage.setScene(s);\n primaryStage.setMinHeight(480);\n primaryStage.setMinWidth(480);\n primaryStage.show();\n }",
"public void start()\n {\n mover.start();\n }",
"@Override\n public void start(Stage stage) throws Exception \n {\n Database.connectDatabase();\n // accessing the FXML File from project directory\n Parent root = FXMLLoader.load(getClass().getResource(\"StartPage.fxml\"));\n // Creating a new Secene with the pointer\n Scene scene = new Scene(root);\n //Setting the scene as default\n stage.setScene(scene);\n // Setting the title of the window\n stage.setTitle(\"Online Judge\");\n // The Window can not be resized like make it small or big\n // This will break the design\n stage.setResizable(false);\n stage.show();\n // keeping the previous page tracked so the it can be disabled \n // when movved to the next page\n Indicator.setCurrentPage(stage);\n \n \n }",
"private void initScene() {\n scene = new idx3d_Scene() {\n\n @Override\n public boolean isAdjusting() {\n return super.isAdjusting() || isAnimating() || isInStartedPlayer() || AbstractCube7Idx3D.this.isAdjusting();\n }\n\n @Override\n public void prepareForRendering() {\n validateAlphaBeta();\n validateScaleFactor();\n validateCube();\n validateStickersImage();\n validateAttributes(); // must be done after validateStickersImage!\n super.prepareForRendering();\n }\n @Override\n\t\tpublic /*final*/ void rotate(float dx, float dy, float dz) {\n super.rotate(dx, dy, dz);\n fireStateChanged();\n }\n };\n scene.setBackgroundColor(0xffffff);\n\n scaleTransform = new idx3d_Group();\n scaleTransform.scale(0.018f);\n\n for (int i = 0; i < locationTransforms.length; i++) {\n scaleTransform.addChild(locationTransforms[i]);\n }\n alphaBetaTransform = new idx3d_Group();\n alphaBetaTransform.addChild(scaleTransform);\n scene.addChild(alphaBetaTransform);\n\n scene.addCamera(\"Front\", idx3d_Camera.FRONT());\n scene.camera(\"Front\").setPos(0, 0, -4.9f);\n scene.camera(\"Front\").setFov(40f);\n\n scene.addCamera(\"Rear\", idx3d_Camera.FRONT());\n scene.camera(\"Rear\").setPos(0, 0, 4.9f);\n scene.camera(\"Rear\").setFov(40f);\n scene.camera(\"Rear\").roll((float) Math.PI);\n\n //scene.environment.ambient = 0x0;\n //scene.environment.ambient = 0xcccccc;\n scene.environment.ambient = 0x777777;\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(0.2f,-0.5f,1f),0x888888,144,120));\n //scene.addLight(\"Light1\",new idx3d_Light(new idx3d_Vector(1f,-1f,1f),0x888888,144,120));\n // scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(1f,1f,1f),0x222222,100,40));\n //scene.addLight(\"Light2\",new idx3d_Light(new idx3d_Vector(-1f,1f,1f),0x222222,100,40));\n // scene.addLight(\"Light3\",new idx3d_Light(new idx3d_Vector(-1f,2f,1f),0x444444,200,120));\n scene.addLight(\"KeyLight\", new idx3d_Light(new idx3d_Vector(1f, -1f, 1f), 0xffffff, 0xffffff, 100, 100));\n scene.addLight(\"FillLightRight\", new idx3d_Light(new idx3d_Vector(-1f, 0f, 1f), 0x888888, 50, 50));\n scene.addLight(\"FillLightDown\", new idx3d_Light(new idx3d_Vector(0f, 1f, 1f), 0x666666, 50, 50));\n\n if (sharedLightmap == null) {\n sharedLightmap = scene.getLightmap();\n } else {\n scene.setLightmap(sharedLightmap);\n }\n }",
"public void setCurrentScene(String name)\r\n\t{\r\n\t\t// Get the scene with the given name.\r\n\t\tScene scene = getScene(name);\r\n\r\n\t\t// Switch scenes, but only if the new scene is not null.\r\n\t\tsetCurrentScene(scene != null ? scene : _CurrentScene);\r\n\t}",
"public void startActivity(Stage primaryStage) {\n\n this.window = primaryStage;\n\n this.window.setTitle(\"TAGGER\");\n\n firstScene = new LauncherWindow(this);\n\n this.window.setScene(firstScene.createAndReturnScene());\n scenesSeen.add(firstScene);\n\n this.window.show();\n }"
]
| [
"0.8434001",
"0.75694966",
"0.7500863",
"0.7021536",
"0.69439274",
"0.6922905",
"0.6899865",
"0.68977827",
"0.6872944",
"0.68511623",
"0.6807696",
"0.678296",
"0.676285",
"0.67599225",
"0.6747026",
"0.66947585",
"0.66910726",
"0.66788214",
"0.6666594",
"0.66658676",
"0.6663529",
"0.66449034",
"0.6643872",
"0.66286993",
"0.6623",
"0.65978926",
"0.6571532",
"0.6566029",
"0.65563184",
"0.65512663",
"0.65510905",
"0.6543083",
"0.65327626",
"0.6517704",
"0.6517308",
"0.6512656",
"0.6512112",
"0.6501411",
"0.6499587",
"0.64986074",
"0.64828056",
"0.64826035",
"0.64766824",
"0.6476101",
"0.64743155",
"0.6457652",
"0.6443195",
"0.64369565",
"0.643093",
"0.6424886",
"0.642152",
"0.6408804",
"0.6399092",
"0.6388002",
"0.6387443",
"0.6383171",
"0.6376704",
"0.63647133",
"0.6363581",
"0.63446593",
"0.6339993",
"0.63382465",
"0.6337158",
"0.63369864",
"0.6332372",
"0.6332297",
"0.63234025",
"0.6320314",
"0.6319171",
"0.63113487",
"0.6310845",
"0.63105553",
"0.6305259",
"0.6303405",
"0.6295916",
"0.62919456",
"0.62862194",
"0.62731504",
"0.62725234",
"0.62521464",
"0.6249411",
"0.624838",
"0.62442106",
"0.6242805",
"0.6237309",
"0.6232142",
"0.62299395",
"0.6226531",
"0.62263227",
"0.62234855",
"0.6213257",
"0.6203703",
"0.6202326",
"0.6201545",
"0.61964035",
"0.6190821",
"0.6184856",
"0.61803937",
"0.6177467",
"0.6172278",
"0.6171107"
]
| 0.0 | -1 |
Sets the list of available public games. | private void setAvailableGames() {
try {
listView.getItems().clear();
DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream());
dataOutputStream.writeUTF("GLst");
ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());
HashMap<String, String> list = (HashMap<String, String>) objectInputStream.readObject();
for (String roomCode : list.keySet()) {
HBox hboxList = new HBox();
hboxList.setSpacing(8);
Button buttonJoin = new Button("Join");
buttonJoin.setOnAction(event -> joinGameRoom(roomCode));
Separator separator = new Separator();
separator.setOrientation(Orientation.VERTICAL);
Label roomName = new Label(list.get(roomCode));
roomName.setFont(Font.font("Arial", 20));
hboxList.getChildren().add(buttonJoin);
hboxList.getChildren().add(separator);
hboxList.getChildren().add(roomName);
listView.getItems().add(hboxList);
}
} catch (IOException | ClassNotFoundException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setAvailableGames(Set<Integer> gameIds);",
"public void setGames() {\n\n games = new HashMap<String, Game>();\n\n for(Game g : jsonManager.getGamesFromJson())\n games.put(g.getTitle(), g);\n\n }",
"public static void updateGamesList(Set<Game> games) {\n\t\tgameSet = games;\n\t}",
"public void setGames(final List<Discovery.GameDetails> games) {\n\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\tlblLoading.setText(\"\");\n\t\t\t\tlist.setListData(games.toArray(new Discovery.GameDetails[] {}));\n\t\t\t}\n\t\t});\n\t}",
"@Override public void setGameAvailabilityTrue(Game game)\r\n throws RemoteException, SQLException {\r\n gameListClientModel.setGameAvailableTrue(game);\r\n }",
"public static void requestGames() {\n\t\tarcade.requestGames();\n\t}",
"private Set<SteamUserNode> bindGames(Set<SteamUserNode> players) {\n\t\tString dest = \"http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/?\" +\r\n\t\t\t\t\"key=%s&steamid=%d&include_appinfo=1&include_played_free_games=1&format=json\";\r\n\t\tString response = \"\";\r\n\t\tfor (SteamUserNode p : players) {\r\n\t\t\ttry {\r\n\t\t\t\tthis.apiCalls += 1;\r\n\t\t\t\tString query = String.format(dest, key, p.getId());\r\n\t\t\t\tURL url = new URL(query);\r\n\t\t\t\tHttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n\t\t\t\tcon.setRequestMethod(\"GET\");\r\n\t\t\t\tcon.setConnectTimeout(3000);\r\n\t\t\t\tcon.connect();\r\n\t\t\t\tint respCode = con.getResponseCode();\r\n\t\t\t\tif (respCode != 200)\r\n\t\t\t\t\tSystem.out.println(\"Status code: \" + respCode + \"\\nFor request: \" + query);\r\n\t\t\t\telse {\r\n\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n\t\t\t\t\tresponse = reader.lines().collect(Collectors.joining());\r\n\t\t\t\t\tint numGames = new JSONObject(response).getJSONObject(\"response\").getInt(\"game_count\");\r\n\t\t\t\t\tif (numGames > 0) {\r\n\t\t\t\t\t\tJSONArray ownedGames = new JSONObject(response).getJSONObject(\"response\").getJSONArray(\"games\");\r\n\t\t\t\t\t\tfor (int i=0;i<ownedGames.length();++i) {\r\n\t\t\t\t\t\t\tJSONObject g = ownedGames.getJSONObject(i);\r\n\t\t\t\t\t\t\tlong appId = g.getLong(\"appid\");\r\n\t\t\t\t\t\t\tString name = g.getString(\"name\");\r\n\t\t\t\t\t\t\tString logoHash = g.getString(\"img_logo_url\");\r\n\t\t\t\t\t\t\tint playForever = g.getInt(\"playtime_forever\");\r\n\t\t\t\t\t\t\tint play2Wks = g.has(\"playtime_2weeks\") ? g.getInt(\"playtime_2weeks\") : 0;\r\n\t\t\t\t\t\t\tPlayedGame game = new PlayedGame(appId, name, logoHash, play2Wks, playForever);\r\n\t\t\t\t\t\t\tp.addPlayedGame(game);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif (!knownGames.contains(game)) {\r\n\t\t\t\t\t\t\t\tknownGames.add((SteamGame) game);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (localWrite) {\r\n\t\t\t\t\t\t\tjsonWriter.writeOwnedGames(response, p);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (JSONException jse) {\r\n\t\t\t\tSystem.err.println(jse.getMessage());\r\n\t\t\t\tSystem.out.println(response);\r\n\t\t\t} catch (MalformedURLException mue) {\r\n\t\t\t\t//once again, this better not happen...\r\n\t\t\t\tSystem.err.println(mue.getMessage());\r\n\t\t\t} catch (IOException ioe) {\r\n\t\t\t\tSystem.err.println(ioe.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn players;\r\n\t}",
"public void setPlayers(ArrayList<Integer> players) {\n this.players= new ArrayList<>(players);\n }",
"@NoProxy\n public void setAvailableUids(final Set<String> val) {\n availableUids = val;\n }",
"public void setPlayersAtGo()\n {\n for(int i = 0; i < m_numPlayers; i++)\n {\n m_gameBoard.addPlayerToSpace(i + 1, 0);\n }\n }",
"Map<String, String> getAvailableGames();",
"public void setPlayers(ArrayList<Player> players) {\n this.players = players;\n }",
"public void refreshGameSearchList() {\n gamesSearchListModel.clear();\n List<String> games = dbMgr.getAllGameTitles(username);\n List<String> gamesOwned = dbMgr.getGameTitles(username);\n\n // fill list with games user does not own\n for (int i = 0; i < games.size(); i++) {\n if(!gamesOwned.contains(games.get(i)))\n gamesSearchListModel.addElement(games.get(i)); \n }\n\n gamesSearchList.setModel(gamesSearchListModel);\n\n }",
"public void getGameList() {\n try {\n write(\"get gamelist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:getGameList\");\n }\n }",
"@Override public GameList getAllGamesFromServer() throws RemoteException, SQLException {\r\n return gameListClientModel.getGamesFromServer();\r\n }",
"@RequestMapping(\"/games/availableGamesByServiceProvider\")\n\tpublic @ResponseBody List<Game> games(\n\t\t\tHttpServletResponse response) {\n\t\t System.out.println(\"****** /games/availableGamesByServiceProvider ***********\");\n\t\treturn gameService.retrieveGames();\n\t}",
"private void listGames(){\n\n }",
"public static void set_players(){\n\t\tif(TossBrain.compselect.equals(\"bat\")){\n\t\t\tbat1=PlayBrain1.myteam[0];\n\t\t\tbat2=PlayBrain1.myteam[1];\n\t\t\tStriker=bat1;\n\t\t\tNonStriker=bat2;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\n\t\t\t\tbat1=PlayBrain1.oppteam[0];\n\t\t\t\tbat2=PlayBrain1.oppteam[1];\n\t\t\t\tStriker=bat1;\n\t\t\t\tNonStriker=bat2;\n\n\t\t\t\t}\n\t}",
"public List_Result listGames() throws ClientException {\n\t\t// START -- DUMMY INFORMATION\n\t\tGameInfo[] games = getCurrentGames();\n\n\t\t// END -- DUMMY INFORMATION\n\t\tList_Result result = new List_Result(games);\n\t\treturn result;\n\t}",
"public void setPlayers(ArrayList<Player> players) {\n\t\tthis.players = players;\n\t}",
"@Override\n\tpublic List<Games> allGamesView() {\n\t\treturn gameDAO.viewAllGame();\n\t}",
"public void setVisible(boolean visibile) {\n\t\tthis.visible = visibile;\n\t\tfor (GameObject gameObject : objects) {\n\t\t\tgameObject.setVisible(visibile);\n\t\t}\n\t}",
"private void linkPlayersToDB(@Nullable Game game) {\n if (game == null) {\n throw new IllegalArgumentException(\"game should not be null.\");\n }\n\n gamesRef.child(game.getId())\n .child(DATABASE_GAME_PLAYERS)\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n List<Player> newData = snapshot.getValue(new GenericTypeIndicator<List<Player>>() {\n });\n if (newData != null) {\n game.setPlayers(newData, true);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n Log.e(TAG, \"failed \" + error.getMessage());\n }\n });\n }",
"public synchronized List<Game> getGameList() {\n return games;\n }",
"public static Set<String> getGamesList() {\n\t\treturn arcade.findPlayableIds();\n\t}",
"public List<Game> getGameList() {\n return this.games;\n }",
"public static ArrayList<ArrayList<Object>> requestActiveGames() {\n\t\tarcade.requestActiveGames();\n\t\treturn arcade.getActiveGames();\n\t}",
"public void refreshGameList() {\n gamesListModel.clear();\n List<String> userGames = dbMgr.getGameTitles(username);\n\n // fill list with user games\n for (int i = 0; i < userGames.size(); i++) {\n gamesListModel.addElement(userGames.get(i)); \n }\n\n gamesList.setModel(gamesListModel);\n }",
"void setVisiblePlayers() {\n\n switch (team1Players) {\n\n case 6:\n\n tvt1p6.setVisibility(View.VISIBLE);\n\n spnPlayer6.setVisibility(View.VISIBLE);\n\n case 5:\n\n tvt1p5.setVisibility(View.VISIBLE);\n\n spnPlayer5.setVisibility(View.VISIBLE);\n\n case 4:\n\n tvt1p4.setVisibility(View.VISIBLE);\n\n spnPlayer4.setVisibility(View.VISIBLE);\n\n case 3:\n\n tvt1p3.setVisibility(View.VISIBLE);\n\n spnPlayer3.setVisibility(View.VISIBLE);\n\n case 2:\n\n tvt1p2.setVisibility(View.VISIBLE);\n\n spnPlayer2.setVisibility(View.VISIBLE);\n\n case 1:\n\n tvt1p1.setVisibility(View.VISIBLE);\n\n spnPlayer1.setVisibility(View.VISIBLE);\n\n break;\n\n }\n\n }",
"public static void setInstance(GameObjectList gameObjects) {\n _instance = gameObjects;\n }",
"public void setPlayers(ArrayList<String> players) {\n this.players = new ArrayList<>();\n this.nicknames = new ArrayList<>();\n for (int i = 0; i < players.size(); i++) {\n if (!players.get(i).equals(gui.getViewController().getNickName())){\n JMenuItem newPlayerItem = new JMenuItem(players.get(i));\n newPlayerItem.addActionListener(new OpponentItemListener(gui.getViewController(),i));\n this.players.add(newPlayerItem);\n }\n this.nicknames.add(new JLabel(players.get(i)));\n this.nicknames.get(i).setHorizontalAlignment(SwingConstants.CENTER);\n this.nicknames.get(i).setVerticalAlignment(SwingConstants.CENTER);\n }\n for(int i = 0; i<this.players.size();i++){\n this.playerMenu.add(this.players.get(i));\n }\n initTurnPanel();\n }",
"public void setGame(Game g)\r\n\t{\r\n\t\tgame = g;\r\n\t}",
"public static Set<Game> getArcadeGames() {\n\t\treturn gameSet;\n\t}",
"public void addGames(String game) {\n this.games.add(game);\n }",
"public void setPlayers(Player[] players) {\n this.players = players;\n }",
"@Override\n\tpublic void start() \n\t{\n\t\tServerPoller.getServerPoller().setObserver(this);\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\n\t\tif (Reference.GET_SINGLETON().getPlayer_color() != null) return;\n\t\tif (!hasChanged(games, oldGames)) return;\n\t\toldGames = games;\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\t\n\t\tgetJoinGameView().setGames(games, ourguy);\n\n\t\tif (getJoinGameView().isModalShowing()) getJoinGameView().closeModal();\n\t\tif(!getJoinGameView().isModalShowing())\n\t\t{\n\t\t\tgetJoinGameView().showModal();\n\t\t}\n\t}",
"@Override\n\tpublic List<Game> getGameList() {\n\t\treturn null;\n\t}",
"public void setGame(int numPlayers) {\r\n\t\tif (numPlayers > MAX_PLAYERS || numPlayers < 1) {\r\n\t\t\tSystem.out.println(\"Too many players. Please choose a number 1-8.\");\r\n\t\t}\r\n\t\t//Set up gameDeck\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tthis.gameDeck = new Deck();\r\n\t\tgameDeck.shuffle();\r\n\t\t//Set up players and empty board\r\n\t\tthis.numPlayers = numPlayers;\r\n\t\tboard = new ArrayList<Card>();\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < numPlayers; i++) {\r\n\t\t\tSystem.out.println(\"Please enter player name: \");\r\n\t\t\tString name = scanner.nextLine();\r\n\t\t\tplayers.add(new Player(name));\r\n\t\t}\r\n\t\tscanner.close();\r\n\t}",
"public void setPlayers(Hashtable<Integer, Player> players) {\r\n\t\tthis.players = players;\r\n\t}",
"public Game populateGames(String name);",
"public List<Game> listGames(String campusSession, int idOrderer, int idFilterer, List<String> fields, List<String> values);",
"public SmallGameBoard[] getAllGames(){return games;}",
"@Override\n\tpublic void moverob(game_service game) throws JSONException {\n\t\tthis.rob = new ArrayList<robot>();\n\t\tfor (String ro : game.getRobots()) {\n\t\t\trob.add(new robot(ro));\n\t\t}\n\t}",
"public void setAllPokemon()\n {\n PokemonFactory pFactory = new PokemonFactory();\n this.allPokemon = pFactory.getRandomPokemon();\n\n }",
"public void setPlayers(Player a_players[], int a_numPlayers)\n {\n m_numPlayers = a_numPlayers;\n \n for(int i = 0; i < m_numPlayers; i++)\n {\n m_currentPlayers.add(a_players[i]);\n m_players.add(a_players[i]);\n }\n }",
"@Override\n\tpublic void setHomeTeam() {\n\t\t\n\t}",
"@Override\r\n public void gameAvailabilityUpdate(Game game) throws RemoteException, SQLException {\r\n property.firePropertyChange(\"gameAvailabilityChange\", null, game);\r\n }",
"public void setGame(Game game) {\n this.game = game;\n }",
"public void sendGameInfoToAll(){\r\n\t\t\r\n\t\tVector<Player> players = lobby.getLobbyPlayers();\t\r\n\t\tString message = \"UDGM\" + lobby.getGameString();\r\n\t\t\r\n\t\tif(!players.isEmpty()){\r\n\t \tfor(int i=0; i<players.size(); i++){\t \t\t\r\n\t \t\tsendOnePlayer(players.get(i), message);\t \t\t\r\n\t \t}\r\n\t\t}\r\n\t}",
"public abstract void setGame(Gyges game);",
"private void refreshGameList() {\n ((DefaultListModel) gameJList.getModel()).removeAllElements();\n client.joinServer(connectedServerName, connectedServerIP, connectedServerPort);\n }",
"public void setBoardBuildings(List<Building> buildings){\n mPersonalBoardCards.setBoardBuildings(buildings);\n }",
"public void initializePlayers(){\r\n allPlayers = new ArrayList<Player>();\r\n currentPlayerIndex = 0;\r\n Player redPlayer = new Player(1, new Location(2, 2), Color.RED);\r\n Player bluePlayer = new Player(2, new Location(4, 2), Color.BLUE);\r\n Player whitePlayer = new Player(3, new Location(2, 4), Color.WHITE);\r\n Player yellowPlayer = new Player(4, new Location(4, 4), Color.YELLOW);\r\n allPlayers.add(redPlayer);\r\n allPlayers.add(bluePlayer);\r\n allPlayers.add(whitePlayer);\r\n allPlayers.add(yellowPlayer);\r\n }",
"public ArrayList<Game> getGames() {\n\n if (games != null)\n return new ArrayList<>(games.values());\n else\n return new ArrayList<>();\n\n }",
"void setGame (Game game) {\n this.game = game;\n }",
"public Game()\r\n\t{\r\n\t\tthis.players = new Player[Config.PlayerLimit];\r\n\t\tthis.resetGame();\r\n\t}",
"protected void setGame(Game game) {\n this.game = game;\n }",
"public void setPowerups(ArrayList<PowerupClient> powerups) {\n this.powerups = powerups;\n }",
"private void addDefaultUsersAndPlayers(Game game) {\n String[] users = { \"User1\", \"User2\", \"User3\", \"User4\" };\n for (int i = 0; i < users.length; i++) {\n game.getKingdomino().addUser(users[i]);\n Player player = new Player(game);\n player.setColor(Player.PlayerColor.values()[i]);\n Kingdom kingdom = new Kingdom(player);\n new Castle(0, 0, kingdom, player);\n }\n }",
"public void addGames(SoccerGames game) throws TeamNotFoundException {\n if (!teams.contains(game.getHostTeam())){\n throw new TeamNotFoundException(\"Host team not registered in the tournament\");\n } else if (!teams.contains(game.getOpponentTeam())){\n throw new TeamNotFoundException(\"Opponent team not registered in the tournament\");\n }\n int host = teams.indexOf(game.getHostTeam());\n teams.get(host).addGame(game);\n int opponent = teams.indexOf(game.getOpponentTeam());\n game.turnOpponent();\n teams.get(opponent).addGame(game);\n\n this.games.addFirst(game);\n }",
"public List<Game> getGameList() {\n return gameList;\n }",
"public void setUpPlayers() {\n this.players.add(new Player(\"Diogo\"));\n this.players.add(new Player(\"Hayden\"));\n this.players.add(new Player(\"Gogo\"));\n }",
"private void startMultiPlayerGame() {\n Intent intent = Games.RealTimeMultiplayer.getSelectOpponentsIntent(getApiClient(), 1, 1);\n startActivityForResult(intent, RC_SELECT_PLAYERS);\n }",
"public void setPlayers(){\n System.out.println();\n System.out.println(\"First, please enter the number of players:\");\n Scanner sc = new Scanner(System.in);\n int number;\n\n while(true){\n try {\n number = sc.nextInt();\n if(number > maxPlayer || number < minPlayer){\n System.out.println(\"Please enter a number between \" + minPlayer + \" and \" + maxPlayer+ \":\");\n continue;\n }\n } catch (InputMismatchException e){\n System.out.println(\"Invalid input! Please enter a number between \" + minPlayer + \" and \" + maxPlayer + \":\");\n sc.next();\n continue;\n }\n players = new ArrayList<>(number);\n for(int i = 0; i < number; i ++){\n players.add(new Player(\"Player \" + (i + 1)));\n }\n setNames();\n return;\n }\n }",
"Collection<GameEnvironment> getPendingGames();",
"public LinkedList<SoccerGames> getGames() {\n return this.games;\n }",
"public void setGameDisplay(GameList gameList){\n String[][] m_data = new String[gameList.getLength()][3];\n int m_counter = 0;\n //iterates through the game list and sets the information at each column to the current games information\n for (Game g : (Iterable<Game>)gameList) {\n m_data[m_counter][0] = g.getTitle();\n m_data[m_counter][1] = g.getGenre();\n m_data[m_counter++][2] = g.getPublisher();\n\n Game m_tmpGame = new Game();\n m_tmpGame = g;\n m_searchResult.addGame(g); // adds the game to the searchResults List\n }\n //sets the table with basic information\n m_gameTable.setModel( new DefaultTableModel(\n m_data,\n new String[]{\"Title\", \"Genre\", \"Publisher\"}\n ));\n TableColumnModel columns = m_gameTable.getColumnModel();\n columns.getColumn(0).setMinWidth(0);\n m_gameTable.setAutoCreateRowSorter(true);\n }",
"@External(readonly = true)\n\tpublic List<Address> get_approved_games() {\n\t\t\n\t\t Address[] _proposal_list = new Address[this.proposal_list.size()];\n\t\t int j = 0;\n\t\t for (int i = 0; i< this.proposal_list.size();i++ ) {\n\t\t\t Address address = this.proposal_list.get(i);\n\t\t\t String gameApproved = this.status_data.get(address);\n\t\t\t if (gameApproved!=null && gameApproved.equals(\"gameApproved\") ) {\n\t\t\t\t _proposal_list[j] = address;\n\t\t\t\t j++;\n\t\t\t }\n\t\t }\n\t\t Address[] tmp = new Address[j];\n\t\t System.arraycopy(_proposal_list, 0, tmp, 0, j);\n\t\t return List.of(tmp);\n\t}",
"private void addDefaultUsersAndPlayers(Game game) {\n\t\tString[] userNames = { \"User1\", \"User2\", \"User3\", \"User4\" };\n\t\tfor (int i = 0; i < userNames.length; i++) {\n\t\t\tUser user = game.getKingdomino().addUser(userNames[i]);\n\t\t\tPlayer player = new Player(game);\n\t\t\tplayer.setUser(user);\n\t\t\tplayer.setColor(PlayerColor.values()[i]);\n\t\t\tKingdom kingdom = new Kingdom(player);\n\t\t\tnew Castle(0, 0, kingdom, player);\n\t\t}\n\t}",
"public void setGame() {\n }",
"private static void initializeAllGenresList(){\n\t\tfor(int i = 0; i < 13; i ++){\n\t\t\tALL_GENRES.add(new HashSet<String>());\n\t\t}\n\t}",
"public void updateLobby(Set<String> players) {\r\n lobbyFrame.updateList(players);\r\n }",
"public Collection<Game> getAllActiveGames() {\n return gameRepository.findAllActive();\n }",
"private void getTeam() {\n Set<Integer> set = getRandomNumberSet();\n // clear new team list each time to allow for serial clicks on \"Generate New Random Team\"\n team.clear();\n for (Integer i : set) {\n getPokemon(i);\n }\n }",
"@SuppressLint(\"NotifyDataSetChanged\")\n public void setGame(QuizGame game) {\n this.game = game;\n notifyDataSetChanged();\n }",
"private void setNextGame() {\n Persistence db = Persistence.getInstance();\n game = db.getNextGame();\n\n // set the initial grid in the model\n grid = game.getInitial();\n\n // get rid of everything on the view grid\n view.clearGrid(true);\n\n // put givens for new game into view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n } // if given\n } // for j\n } // for i\n\n }",
"public HashMap<String, Game> getGames() {\n return games;\n }",
"public HashMap<String, Game> getGames() {\n return games;\n }",
"public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\n }",
"public static void InitGame(ArrayList<Player> players) {\n PlayersLoop.setPlayers(players);\n _gameWindow.getBoard().makePlayersLayer();\n PlayersLoop.setCurrentPlayer(players.get(0));\n Dice.Reset();\n // todo Dice player order \n\n }",
"void setPermittedModules(ArrayList<Integer> permittedModules);",
"public static void overridePlayers(Player... players)\n {\n getBackgammonTournamentData().setPlayers(players);\n\n storeTournamentData();\n }",
"@Test\n public void testSetPlayers() {\n List<Player> emptyPlayerList = new ArrayList<>();\n mTournament.setPlayerCollection(emptyPlayerList);\n assertTrue(\"Players list must be empty\", mTournament.getPlayerCollection().size() == 0);\n\n mTournament.setPlayerCollection(null);\n assertTrue(\"Players list is not null\", mTournament.getPlayerCollection().size() == 0);\n }",
"public void startGameSession() {\n\t\tfor (GamePlayer player : listOfPlayers) {\n\t\t\tif (player != null) {\n\t\t\t\t// set to first lap\n\t\t\t\tplayer.currentLap = 1;\n\t\t\t}\n\t\t}\n\t}",
"@Transactional\n public DevStudio setGames(DevStudio devStudio, Iterable<Long> games) {\n List<Game> items = getGameService().findAll(games);\n Set<Game> currents = devStudio.getGames();\n Set<Game> toRemove = new HashSet<Game>();\n for (Iterator<Game> iterator = currents.iterator(); iterator.hasNext(); ) {\n Game nextGame = iterator.next();\n if (items.contains(nextGame)) {\n items.remove(nextGame);\n } else {\n toRemove.add(nextGame);\n }\n }\n devStudio.removeFromGames(toRemove);\n devStudio.addToGames(items);\n // Force the version update of the parent side to know that the parent has changed\n // because it has new books assigned\n devStudio.setVersion(devStudio.getVersion() + 1);\n return getDevStudioRepository().save(devStudio);\n }",
"void gameSelected(boolean isAdmin, boolean isRunning);",
"public void setData(List<Player> players, Player owningPlayer) {\n this.players = players;\n thisPlayer = owningPlayer;\n }",
"public void setHasPlayers(boolean hasPlayers) {\n\t\tHasPlayers = hasPlayers;\n\t}",
"private void setUpGame() {\n DotCom one = new DotCom();\n one.setName(\"Pets.com\");\n DotCom two = new DotCom();\n two.setName(\"eToys.com\");\n DotCom three = new DotCom();\n three.setName(\"Go2.com\");\n dotComList.add(one);\n dotComList.add(two);\n dotComList.add(three);\n\n //display brief instructions for the user//Выводим краткие инструкции для пользователя\n System.out.println(\"Ваша цель - потопить 3 сайта\");\n System.out.println(\"Pets.com, eToys.com,Go2.com\");\n System.out.println(\"Потытайтесь потопить их за минимальное количество ходов\");\n\n for (DotCom dotComToSet : dotComList) {// Повторяем с каждым объектом DotCom в списке\n ArrayList<String> newLocation = helper.placeDotCom(3);//Запрашиваем у вспомогательного объекта адрес \"сайта\"\n dotComToSet.setLocationCells(newLocation); // Вызываем сеттре из объекта DotCom чтобы передать ему\n // местоположение которое только что получилии от вспомогательного объекта\n }\n }",
"private void initializePlayers()\n\t{\n\t\tfor(Player player : playerList)\n\t\t{\n\t\t\t// Distribute personality cards\n\t\t\tplayer.setPersonalityCard(board.getPersonalityCardDeck().pickTopCard());\n\t\t\t\n\t\t\t// Distribute money\n\t\t\tboard.getBankAccount().transfertAmountTo(player, nbGoldStartPerPlayer, false);\n\t\t\t\n\t\t\t// Distribute minions\n\t\t\tfor(int i = 0; i < nbMinionsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addMinion(new Minion());\n\t\t\t}\n\t\t\t\n\t\t\t// Distribute buildings\n\t\t\tfor(int i = 0; i < nbBuildingsPerPlayer; i++)\n\t\t\t{\n\t\t\t\tplayer.addBuilding(new Building());\n\t\t\t}\n\t\t}\n\n\t\t// Distribute player cards\n\t\tfor(int i = 0; i < nbInitCards; i++)\n\t\t{\n\t\t\tfor(Player player : playerList)\n\t\t\t{\n\t\t\t\tplayer.getPlayerCardDeck().addCard(board.getPlayerCardDeck().pickTopCard());\n\t\t\t}\n\t\t}\n\t}",
"public void games(Parameters parameters, final onSuccessCallback callback){\n getJSONArray(parameters.buildQuery(Endpoint.GAMES), new onSuccessCallback() {\n @Override\n public void onSuccess(JSONArray result) {\n callback.onSuccess(result);\n }\n\n @Override\n public void onError(VolleyError error) {\n callback.onError(error);\n }\n });\n }",
"private void createAllGames() {\n\t\t// Create a melee game for each melee arena\n\t\tmeleeArenaManager.loadArenas();\n\t\tmeleeArenaManager.getArenas().forEach(meleeArena -> {\n\t\t\tMeleeGame game = new MeleeGame(meleeArena);\n\t\t\tmeleeGameManager.addGame(meleeArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.MELEE_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Create a rabbit game for each rabbit arena\n\t\trabbitArenaManager.loadArenas();\n\t\trabbitArenaManager.getArenas().forEach(rabbitArena -> {\n\t\t\tRabbitGame game = new RabbitGame(rabbitArena);\n\t\t\trabbitGameManager.addGame(rabbitArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.RABBIT_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Log out what games were created\n\t\tString meleeGamesList = meleeGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Melee Games for arenas : \" + meleeGamesList);\n\n\t\tString rabbitGamesList = rabbitGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Rabbit Games for arenas : \" + rabbitGamesList);\n\t}",
"public void setAvailable(boolean x){\n availabile = x;\n }",
"private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }",
"@Override\n\tpublic List<Game> listGames(Player player) {\n\t\treturn iGameRepository.findAllByPlayer(player);\n\t}",
"public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }",
"private void updatePlayersOptions(){\n\t\tfor(Player player : players.keySet()){\n\t\t\tif(player != null) {\n\t\t\t\tBlackjackHand hand = players.get(player).get(0);\n\t\t\t\tList<GameOptionsEnumeration> options = getGameOptions(player);\n\t\t\t\tupdateHandOptions(player, hand, options);\n\t\t\t}\n\t\t}\n\t}",
"public void setHaveGame()\n\t{\n\t\tthis.haveGame = true;\n\t\tthis.isTurn = true;\n\t\tSystem.out.println(\"Setting have game\");\n\t}",
"public void multiplayerSelected()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyDiscoveryState()\n clientController.searchForGames();\n\n //populate the GameSelectScreen's text box with the lobbies from the\n //state\n gameSelectScreen.clearGames();\n\n //set state to GAMESELECT\n state = CurrentWindow.GAMESELECT;\n\n //hide the intro screen and show the game select screen\n introScreen.setVisible(false);\n gameSelectScreen.setVisible(true);\n }",
"public void setPlaylists(ArrayList<Playlist> p)\n\t{\n\t\tplaylists = p;\n\t}"
]
| [
"0.72747415",
"0.6687553",
"0.63213134",
"0.62442034",
"0.6150924",
"0.5688479",
"0.5672762",
"0.5654856",
"0.5643196",
"0.5615947",
"0.56036955",
"0.5601746",
"0.5589857",
"0.5584852",
"0.5568003",
"0.55241424",
"0.5518919",
"0.5515153",
"0.5507975",
"0.5464673",
"0.541239",
"0.5389201",
"0.53791094",
"0.5377027",
"0.53664875",
"0.5345159",
"0.5298906",
"0.52835345",
"0.5249853",
"0.5248993",
"0.524693",
"0.52443534",
"0.5240309",
"0.5187713",
"0.51798373",
"0.5158288",
"0.5155038",
"0.51533335",
"0.5152481",
"0.5144877",
"0.5129645",
"0.5113205",
"0.51126057",
"0.51053005",
"0.50959235",
"0.50746286",
"0.50738764",
"0.5061131",
"0.50601935",
"0.50342935",
"0.50303954",
"0.5027308",
"0.5026955",
"0.50032306",
"0.4994117",
"0.49844033",
"0.49813676",
"0.49780086",
"0.4974069",
"0.49675623",
"0.49624804",
"0.49592072",
"0.4943504",
"0.49341127",
"0.49291265",
"0.49249452",
"0.49179965",
"0.49073735",
"0.49045324",
"0.48989743",
"0.4897562",
"0.4892646",
"0.48908505",
"0.48902002",
"0.48872185",
"0.48842338",
"0.4879749",
"0.4879749",
"0.48766473",
"0.4866563",
"0.48552695",
"0.48539644",
"0.48527604",
"0.48479527",
"0.48455748",
"0.48335016",
"0.483006",
"0.4824812",
"0.4822905",
"0.4820838",
"0.4820261",
"0.48178494",
"0.48173392",
"0.4800606",
"0.4798822",
"0.47974932",
"0.47909483",
"0.4789515",
"0.47840557",
"0.4783052"
]
| 0.58622515 | 5 |
Used to join a game room on the basis of the room code. For public games their is no need to type a room code since the 'join' button is already bound to the button. | public void joinGameRoom(String roomCode) {
try {
roomCode = roomCode.toLowerCase();
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
DataInputStream in = new DataInputStream(socket.getInputStream());
out.writeUTF("Conn" + roomCode);
String response = in.readUTF();
switch (response.substring(0, 4)) {
case "Conf":
String start = "YELLOW";
String you = "YELLOW";
if (response.charAt(4) == 'R')
start = "RED";
if (response.charAt(5) == 'R')
you = "RED";
ObjectInputStream inObj = new ObjectInputStream(socket.getInputStream());
ArrayList<String> gameChat = new ArrayList<>((ArrayList<String>) inObj.readObject());
inObj = new ObjectInputStream(socket.getInputStream());
ArrayList<String> mainChat = new ArrayList<>((ArrayList<String>) inObj.readObject());
new GameGUI().start(stage, mainMenuGUI, socket, roomCode, gameChat, mainChat, start, you);
break;
case "Full":
AlertHandler.show(Alert.AlertType.ERROR, "Room Full", "Room Full", "The room you tried to join is full.");
break;
case "Invl":
AlertHandler.show(Alert.AlertType.ERROR, "Invalid Code", "Invalid Code", "The selected room does not exist");
break;
}
} catch (IOException | ClassNotFoundException e) {
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void joinRoom(int roomId) throws RoomNotFoundException, RoomPermissionException, IOException;",
"@Override\n\tpublic SocketIOSocket join(String room) {\n\t\tString roomName = namespace.getName() + \"/\" + room;\n\t\tthis.manager.onJoin(this.id, roomName);\n//\t\tthis.manager.store.publish('join', this.id, name);\n\t\treturn this;\n\t}",
"public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }",
"public void joinChatRoom(IChatroom room) {\n\t\tview.append(\"Join ChatRoom\" + room.getName());\n\t\tcountRoom++;\n\t\tIChatroom chatroom = new Chatroom(\"Chatroom\" + countRoom);\n\t\tIChatServer chatServer = new ChatServer(user, chatroom);\n\t\ttry {\n\t\t\tview.append(\"Start joining..\");\n\t\t\tIChatServer chatStub = (IChatServer) UnicastRemoteObject.exportObject(chatServer,\n\t\t\t\t\tIChatServer.BOUND_PORT + countRoom);\n\t\t\tfor (IChatServer members : room.getChatServers()) {\n\t\t\t\tchatroom.addChatServer(members);\n\t\t\t\tmembers.joinChatroom(chatStub);\n\t\t\t}\n\t\t\tchatroom.addChatServer(chatStub);\n\t\t\tuser.addRoom(chatroom);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + chatroom.hashCode(), chatStub);\n\t\t\tHashSet<IChatServer> proxyChatServers = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer stub : chatroom.getChatServers()) {\n\t\t\t\tProxyIChatServer proxyChatServer = new ProxyIChatServer(stub);\n\t\t\t\tproxyChatServers.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(chatServer, proxyChatServers);\n\t\t\tminiMVCAdpts.put(chatroom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t\tview.append(\"Success!\");\n\t\t\t//\t\t\tminiMVCAdpt.refresh();\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Fail to join the room!\");\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n Log.d(TAG,\"JOINING ROOMID\" + chat_list.get(position).roomhash );\n mSocket.emit(\"CreateRoom\",chat_list.get(position).roomhash,chat_list.get(position).gcmID);\n Intent intent2 = new Intent(CTX, ChatInstance.class);\n intent2.putExtra(\"roomnum\", chat_list.get(position).roomhash);\n\n CTX.startActivity(intent2);\n\n }",
"@Override\n public void onTombstoneLinkClicked(String roomId, String senderId) {\n showInitLoading();\n\n // Extract the server name\n String serverName = MXPatterns.extractServerNameFromId(senderId);\n\n List<String> viaServers = null;\n\n if (serverName != null) {\n viaServers = Collections.singletonList(serverName);\n }\n\n mSession.joinRoom(roomId, viaServers, new ApiCallback<String>() {\n @Override\n public void onNetworkError(Exception e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onUnexpectedError(Exception e) {\n hideInitLoading();\n Toast.makeText(getActivity(), e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onSuccess(String info) {\n hideInitLoading();\n\n // Open the room\n if (isAdded()) {\n Intent intent = new Intent(getActivity(), VectorRoomActivity.class);\n intent.putExtra(VectorRoomActivity.EXTRA_ROOM_ID, info);\n intent.putExtra(VectorRoomActivity.EXTRA_MATRIX_ID, mSession.getCredentials().userId);\n getActivity().startActivity(intent);\n getActivity().finish();\n }\n }\n });\n }",
"private void joinGame() {\n\t\tgame.connect(list.getSelectedValue());\n\t\tdispose();\n\t}",
"public void joinGame(int lobbyId)\n {\n //call Client controller's joinLobby method with the selected lobby's\n //id\n clientController.joinGame(lobbyId);\n }",
"public void joinWave(String roomID) {\n\t\t\r\n\t}",
"private void joinRoom(int roomId) {\n // Reset room state variables\n messages.clear();\n\n ChatAdapter adapter = new ChatAdapter(getApplicationContext(),messages);\n adapter.notifyDataSetChanged();\n\n chatRecyclerView.setAdapter(adapter);\n this.destinationPublicKey = null;\n\n // Emit room join request.\n this.socket.emit(\"join\", roomId, nickname);\n }",
"public void join() throws OperationFailedException\n {\n if (chatRoomSession == null && chatInvitation == null)\n { // the session is not set and we don't have a chatInvitatoin\n // so we try to join the chatRoom again\n ChatRoomManager chatRoomManager =\n provider.getAimConnection().getChatRoomManager();\n chatRoomSession = chatRoomManager.joinRoom(this.getName());\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n else if (chatInvitation != null)\n {\n chatRoomSession = chatInvitation.accept();\n chatRoomSession.addListener(new AdHocChatRoomSessionListenerImpl(\n this));\n }\n\n // We don't specify a reason.\n opSetMuc.fireLocalUserPresenceEvent(this,\n LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOINED, null);\n }",
"public void onButtonClick(View v) {\n // initialize editText with method findViewById()\n // here editText will hold the name of room which is given by user\n EditText editText = findViewById(R.id.conferenceName);\n\n // store the string input by user in editText in\n // an local variable named text of string type\n String text = editText.getText().toString();\n\n // if user has typed some text in\n // EditText then only room will create\n if (text.length() > 0) {\n // creating a room using JitsiMeetConferenceOptions class\n // here .setRoom() method will set the text in room name\n // here launch method with launch a new room to user where\n // they can invite others too.\n JitsiMeetConferenceOptions options\n = new JitsiMeetConferenceOptions.Builder()\n .setRoom(text)\n .build();\n JitsiMeetActivity.launch(this, options);\n }\n\n }",
"private void onJoinRoom(String roomName) {\n if (roomEntries.containsKey(roomName)) {\n backBTN.setEnabled(chatController.getJoinedRooms().size() > 0);\n JPanel panel = roomEntries.get(roomName);\n panel.removeAll();\n renderRoom(roomName, panel);\n panel.revalidate();\n panel.repaint();\n }\n }",
"public void join(Player player) {\n\t\tGamePlayer gamePlayer = new GamePlayer(player);\n\t\tthis.gamePlayers.add(gamePlayer);\n\n\t\tif (getEmptyPad() != null) ß{\n\t\t\tPad pad = getEmptyPad();\n\t\t\tgamePlayer.setPad(pad);\n\t\t\tpad.setFree(false);\n\t\t\tLocation loc = pad.getLocation();\n\n\t\t\tplayer.teleport(new Location(loc.getWorld(), loc.getX(), loc.getY(), loc.getZ()));\n\t\t\tsetupPlayerInventory(player);\n\t\t\tplayer.sendMessage(\"You have joined the game\");\n\t\t} else {\n\t\t\tSystem.out.println(\"Not enough room for \" + player.getName() + \" to join. Kicking...\");\n\t\t\tplayer.kickPlayer(\"Game Full\");\n\t\t}\n\t}",
"void joinGame(String playeruuid);",
"@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}",
"private void providerJoinRoom(String roomName) {\n Room room = roomManager.getRoomOrCreate(roomName);\n\n WebUserSession provider = room.getProvider();\n\n // Start the session\n WebRtcEndpoint providerWebRtcEp = room.createProviderWebRtcEp(provider);\n\n if (room.getAlexaWebRtcEp() != null) {\n room.setUpPipeline();\n }\n\n // Generate SDP answer for caller(Provider)\n log.info(\"Provider SDP: {} \", provider.getSdpOffer());\n String callerSdpAnswer = providerWebRtcEp.processOffer(provider.getSdpOffer());\n JsonObject startCommunication = new JsonObject();\n startCommunication.addProperty(\"id\", \"startCommunication\");\n startCommunication.addProperty(\"sdpAnswer\", callerSdpAnswer);\n\n try {\n provider.sendMessage(startCommunication);\n } catch (IOException e) {\n e.printStackTrace();\n }\n log.info(\"SDP answer is generated for provider. \" + callerSdpAnswer);\n providerWebRtcEp.gatherCandidates();\n }",
"public void handleJoin()\n {\n String n = name.getText();\n if(n.isEmpty())\n {\n setStatus(\"Bitte Namen eingeben!\",Color.RED);\n return;\n }\n if(n.contains(\";\"))\n {\n setStatus(\"Bitte keine ; verwenden!\",Color.RED);\n return;\n }if(n.contains(\"'\"))\n {\n setStatus(\"Bitte keine ' verwenden!\",Color.RED);\n return;\n }if(n.contains(\",\"))\n {\n setStatus(\"Bitte keine , verwenden!\",Color.RED);\n return;\n }\n String ip = ip_text.getText();\n if(ip.isEmpty())\n {\n setStatus(\"Bitte IP eingeben!\",Color.RED);\n return;\n }\n if(ip.contains(\";\"))\n {\n setStatus(\"Bitte kiene ; verwenden!\",Color.RED);\n return;\n }if(ip.contains(\"|\"))\n {\n setStatus(\"Bitte kiene | verwenden!\",Color.RED);\n return;\n }if(ip.contains(\",\"))\n {\n setStatus(\"Bitte kiene , verwenden!\",Color.RED);\n return;\n }\n\n matchup.joinGame(n,color_snake.getValue(),color_head.getValue(),ip);\n }",
"private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}",
"public void join(LobbyPlayer player) {\n if (listener == null) listener = Firebase.registerListener(\"lobbies/\" + player.getLobbyCode(), onLobbyChange);\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n ObjectMapper mapper = new ObjectMapper();\n Map<String, Object> kv = mapper.convertValue(LobbyPlayerDTO.fromModel(player), new TypeReference<Map<String, Object>>() {});\n doc.update(\"players.\" + player.getUsername(), kv);\n }",
"public boolean joinLobby(Lobby lobby)\n {\n if (lobby.assignSlot(this))\n {\n this.currentLobby = lobby;\n return true;\n }\n return false;\n }",
"private void joinLobby(ActionEvent actionEvent, String name) throws ExecutionException, InterruptedException {\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n if(!fireStoreController.checkExistence(token)){\n JoinLobbyViewTokenTextField.setText(\"This lobby does not exist\");\n }\n\n if(fireStoreController.getLobbySize(token) >= 8){\n LobbyAlreadyFullPopup.setVisible(true);\n }\n\n }",
"@PostMapping(\"/join\")\n public String joinClass(Model model, @RequestParam String joinCode){\n Object principal = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\n CustomUser user = userRepo.findById(((CustomUserDetails)principal).getId());\n Classroom classroom = classroomRepo.findByJoinCode(joinCode);\n\n if(classroom == null) return \"redirect:/server-problem\"; \n if(\"TEACHER\".equals(user.getRole())) return \"redirect:/permission-denied\";\n if(classroom.containsUser(user.getId())) return \"redirect:/permission-denied\";\n if(classroom.getBannedUsers().get(user.getId()) != null) return \"redirect:/permission-denied\";\n\n classroom.getStudents().add(user);\n user.getStudentClassrooms().add(classroom);\n userRepo.save(user);\n classroomRepo.save(classroom);\n \n return \"redirect:/classroom/student/\" + classroom.getId(); \n }",
"public void roomOnePressed() {\r\n\t\tkeys.get(keys.put(Keys.ROOM_ONE, true));\r\n\t}",
"@Override\n public void onClickCreateRoom(String code) {\n\n boolean status = networkControl.checkDialogPresence(getApplicationContext(),MultiplayerActivity.this);\n if(status){\n loadingDialog = new LoadingDialog(MultiplayerActivity.this);\n loadingDialog.startDialog(getResources().getString(R.string.wait_access_room));\n loadingDialog.setDataToCancel(code);\n loadingDialog.setVisibleClick(true);\n\n HashMap<String,String> data = new HashMap<>();\n data.putAll((Map<String,String>) preferences.getAll());\n String nickname = data.get(KEY_NICKNAME_PREFERENCES);\n\n addRoomsEventListener(loadingDialog,code,nickname);\n }\n\n\n }",
"private void doJoin(){\n\n final String aggHost = System.getProperty(\"aggregate.host.uri\", \"\");\n if (aggHost.isEmpty()) {\n command(\"/aggregate\", \"addBot\", Record.of()\n .slot(\"node\", nodeUri().toString())\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));\n } else {\n command(aggHost, \"/aggregate\", \"addBot\", Record.of()\n .slot(\"host\", hostUriHack().toString()) // ws://192.168.0.151:9001\n .slot(\"node\", nodeUri().toString()) // /bot/6\n .slot(\"key\", System.getProperty(\"device.name\", \"\")));// RaspiBot6|192.168.0.151:9001\n }\n }",
"public void onJoinMeetingButtonClick(android.view.View view) {\n // Hide keyboard\n InputMethodHelper.hideSoftKeyBoard(this.getApplication().getApplicationContext(),\n view.getWindowToken());\n\n if (meetingJoined) {\n // Leave the meeting.\n try {\n this.anonymousConversation.leave();\n this.meetingJoined = false;\n this.updateUiState();\n\n } catch (SFBException e) {\n e.printStackTrace();\n }\n } else {\n //Join the meeting.\n // Get the display name.\n final android.widget.TextView displayNameTextView =\n (android.widget.TextView) findViewById(R.id.displayNameEditTextId);\n\n // Get the meeting uri\n final android.widget.EditText joinMeetingEditText =\n (android.widget.EditText) findViewById(R.id.meetingUriEditTextId);\n String meetingUriString = joinMeetingEditText.getText().toString();\n URI meetingUri = URI.create(meetingUriString);\n\n // Join meeting and monitor conversation state to determine meeting join completion.\n try {\n\n // Set the default device to Speaker\n //this.devicesManager.setActiveEndpoint(DevicesManager.Endpoint.LOUDSPEAKER);\n\n // To join an Online meeting use the discover URL method. Please refer the documentation for\n // the overall procedure of getting the discover URL and authorization token for a meeting.\n //\n // final URL discoverUrl = new URL(\"https://meetings.lync.com/platformService/discover?...\");\n // final String authToken = \"psat=...\";\n // this.anonymousSession = this.application.joinMeetingAnonymously(\n // displayNameTextView.getText().toString(), discoverUrl, authToken);\n\n this.anonymousSession = this.application.joinMeetingAnonymously(\n displayNameTextView.getText().toString(), meetingUri);\n\n this.anonymousConversation = this.anonymousSession.getConversation();\n SFBDemoApplication application = (SFBDemoApplication)getApplication();\n application.setAnonymousConversation(this.anonymousConversation);\n\n // Conversation begins in Idle state. It will move from Idle->Establishing->InLobby/Established\n // depending on meeting configuration.\n // We will monitor property change notifications for State property.\n // Once the conversation is Established, we will move to the next activity.\n this.conversationPropertyChangeListener = new ConversationPropertyChangeListener();\n this.anonymousConversation.addOnPropertyChangedCallback(this.conversationPropertyChangeListener);\n } catch (SFBException e) {\n e.printStackTrace();\n }\n }\n }",
"private void joinChannel() {\n // Get the User Id for the current user\n final String userId = mUser.getUid();\n // User Id set to 0 for auto handling by Agora\n int uid = 0;\n // Token object\n RtcTokenBuilder token = new RtcTokenBuilder();\n // Time stamp used for length of token\n int timestamp = (int)(System.currentTimeMillis() / 1000 + expirationTimeInSeconds);\n\n String uId = Objects.requireNonNull(mAuth.getCurrentUser()).getUid();\n\n addCallToDb(uId); // Add current user to db for active calls\n\n try {\n // Create a token using Agora Sdk\n agora_token = token.buildTokenWithUid(getString(R.string.agora_app_id), getString(R.string.agora_app_certificate),\n channelName, uid, RtcTokenBuilder.Role.Role_Publisher, timestamp);\n } catch (Exception e) {\n e.printStackTrace();\n }\n // Join the channel with the given token and channel name\n mRtcEngine.joinChannel(agora_token, channelName, \"\", uid);\n }",
"private void enterRoom() {\n connect();\n\n clientName = nameTextFiled.getText();\n try {\n toServer.writeInt(ENTERROOM);\n toServer.writeUTF(clientName);\n toServer.flush();\n report(\"Client ----> Server: \" + ENTERROOM + \" \" + clientId + \" \" + nameTextFiled.getText());\n\n clientFrame.setTitle(clientName);\n btnNewGame.setEnabled(true);\n\n// loginPanel.setVisible(false);\n// centerPanel.setVisible(true);\n // disable the login frame component\n nameTextFiled.removeActionListener(clientAction);\n nameTextFiled.setEnabled(false);\n btnEnterRoom.removeActionListener(clientAction);\n btnEnterRoom.setEnabled(false);\n\n // close the login frame\n loginFrame.setVisible(false);\n loginFrame.dispose();\n\n // open the client frame\n clientFrame.setVisible(true);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public boolean joinGame(){\n\t\tJoinGameBean resultBean = new JoinGameBean();\n\t\tresultBean.setTo(jid);\n\t resultBean.setFrom(fromJID);\n\t resultBean.setType(XMPPBean.TYPE_RESULT);\n\t connection.sendPacket(new BeanIQAdapter(resultBean));\n//\t System.out.println(\"JoinGameBean vom typ RESULT an \" + jid + \" gesendet\");\n\t return true;\n\t}",
"void opponentInRoom();",
"static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }",
"GameJoinResult join(Player player);",
"@FXML\n private void btnJoinPressed() {\n Tournament t = tblTournaments.getSelectionModel().getSelectedItem();\n String res = lmDriver.joinTournament(t.tournamentName.get(), stateManager.getUsername());\n Alert message = new Alert(Alert.AlertType.INFORMATION);\n message.setTitle(t.tournamentName.get());\n message.setContentText(res);\n message.showAndWait();\n }",
"@Override\n public void onClick(View v) {\n button.setText(\"CREATING ROOM\");\n button.setEnabled(false);\n writeStringDB(playerName,\"rooms/\" + playerName + \"/Player 1\" + \"/Name\");\n Intent intent = new Intent(getApplicationContext(), WaitingRoom.class);\n intent.putExtra(\"roomName\", roomName);\n intent.putExtra(\"playerID\",1);\n startActivity(intent);\n }",
"public void joinGame(String[] items, Player plr){\r\n\t\tVector<Game> games = lobby.getGames();\r\n\t\tString gameName = items[1];\r\n\t\t\r\n\t\tif(!games.isEmpty()){\r\n\t\t\tfor(int i=0; i<games.size(); i++){\r\n\t\t\t\tif(games.get(i).getName().equals(gameName)){\r\n\t\t\t\t\tlobby.addPlayerToGame(games.get(i), plr);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsendOnePlayer(plr, serverMessage(\"Game not found\"));\r\n\t}",
"public void joinGame(View view) {\n EditText editText = (EditText) findViewById(R.id.enter_game_keyword);\n gameName = editText.getText().toString();\n\n if (!nameEntered(gameName)) {\n return;\n }\n GameNameHandler.joinGameHandler(this, gameName, getPlayerName());\n saveInPreferences(gameName);\n }",
"private void joinGame(int gameId){\n\n }",
"Client join(Participant participant);",
"public void enterRoom(Room room) {\n currentRoom = room;\n }",
"public void startGame(Room room);",
"@Override\n\tpublic void joinLobby(int playerID, int sessionID){\n\t\tif(sessionID == NO_LOBBY_ID)\n\t\t\treturn;\n\t\t//check if the player is already in an other lobby\n\t\tint playerSession = getSessionFromClient(playerID);\n\n\t\tif(playerSession == NO_LOBBY_ID){\n\t\t\tlobbyMap.get(sessionID).addPlayer(getPlayerMap().get(playerID));\n\t\t\tDebugOutputHandler.printDebug(\"Player \"+getPlayerMap().get(playerID).getName()+\" now is in lobby \" + getPlayerMap().get(playerID).getSessionID());\n\t\t}\n\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int position,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\tIntent intent = new Intent(MultiRoomListActivity.this, ActivityMultiRoom.class);\r\n\t\t\t\tintent.putExtra(\"jid\", data.get(position).get(\"roomName\") + \"@conference\"+\".\"+((MyApplication)getApplication()).hostName);\r\n\t\t\t\tintent.putExtra(\"action\", \"join\");\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t\t\r\n\t\t\t}",
"public void joinMeeting(View view) {\n Intent myIntent = new Intent(WelcomeActivity.this, JoinMeetingActivity.class);\n startActivityForResult(myIntent, JOIN_MEETING);\n }",
"private boolean joinGame() throws RemoteException{\n\t\tgui.showLoginWindow(playerDetails);\n\n\t\twhile(!gui.isUserDataAvailable()){\n\t\t\t// wait for user to enter details\n\t\t\tDebug.log(\"MainMenu\", \"waiting for player details\");\n\t\t\ttry{\n\t\t\t\tThread.sleep(1000);\n\t\t\t}catch(InterruptedException e){\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.err.println(e.toString());\n\t\t\t}\n\t\t}\n\t\tplayerDetails = gui.getPlayerDetails();\n\t\tDebug.log(\"MainMenu\", \"player details received!\");\n\n\t\tif(playerDetails == null) quitGame(false); // quit if player declined/cancelled to enter details\n\n\t\t/* Get preferred position */\n\t\tpreferredPosition = gui.getPreferredPosition();\n\n\t\t/* Register this client as Callback */\n\t\treturn server.connect(this, myHost, myPort, preferredPosition, false, playerDetails.getFirstName(), playerDetails.getSurname(),\n\t\t\t\tplayerDetails.getAddress(), playerDetails.getPhone(), playerDetails.getUsername(), playerDetails.getPassword());\n\t}",
"public void actionPerformed(ActionEvent e) {\n try {\r\n if (roomOrUser == 1) {\r\n // send message to a room\r\n sock.executeCommand(new RoomMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes()));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n } else if (roomOrUser == 2) {\r\n // send message to a user\r\n sock.executeCommand(new UserMessageCommand(new LongInteger(name), textArea_1.getText()\r\n .getBytes(), true));\r\n textArea_2.setText(textArea_2.getText() + textField.getText() + \": \" + textArea_1.getText()\r\n + \"\\n\");\r\n }\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join or leave room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"@Override\n\tpublic void onUserJoinedRoom(RoomData arg0, String arg1) {\n\t\t\n\t}",
"private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}",
"@FXML\n private void JoinLobbySubmit(ActionEvent actionEvent) {\n try {\n token = Integer.parseInt(JoinLobbyViewTokenTextField.getText());\n name = JoinLobbyViewNameTextField.getText();\n\n FireStoreController fireStoreController = (FireStoreController) ControllerRegistry.get(FireStoreController.class);\n PlayerController playerController = (PlayerController) ControllerRegistry.get(PlayerController.class);\n\n joinLobby(actionEvent, name);\n goToLobby(actionEvent);\n int order = fireStoreController.getLobbySize(token);\n Players playersEnum = Players.getByOrder(order + 1)\n .orElseThrow( () -> new Exception(\"Order out of bounds\"));\n playerController.setClientPlayersEnum(playersEnum);\n Player player = playerController.setPlayerWithPlayersEnum(playersEnum, name);\n fireStoreController.addPlayer(token, player);\n } catch(NumberFormatException numberFormatException) {\n JoinLobbyViewTokenTextField.setText(\"Numbers Only\");\n } catch (Exception executionException) {\n executionException.printStackTrace();\n }\n }",
"@Override\n public void onClickJoinRoom(String code) {\n loadingDialog = new LoadingDialog(MultiplayerActivity.this);\n loadingDialog.startDialog(getResources().getString(R.string.wait_loading_game_room));\n\n DatabaseReference player2Ref = firebaseDatabase.getReference(ROOMS_NODE+ \"/\" + code + \"/\" + PLAYER2_NODE);\n HashMap<String,String> data = new HashMap<>();\n data.putAll((Map<String,String>) preferences.getAll());\n String nickname = data.get(KEY_NICKNAME_PREFERENCES);\n\n roomsRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n\n ValueEventListener thisValueEventListener = this;\n if(snapshot.hasChild(code)){\n if(!snapshot.child(code).child(PLAYER1_NODE).getValue().equals(nickname)){\n if(snapshot.child(code).child(PLAYER2_NODE).getValue().equals(EMPTY_STRING)){\n player2Ref.setValue(nickname, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n loadingDialog.dismissDialog();\n //accedo al gioco\n Intent intent = new Intent(MultiplayerActivity.this, ActualGameActivity.class);\n intent.putExtra(CODE_ROOM_EXTRA,code);\n intent.putExtra(CODE_PLAYER_EXTRA,PLAYER2_NODE);\n roomsRef.removeEventListener(thisValueEventListener);\n startActivity(intent);\n }\n });\n } else {\n //esiste già un giocatore 2 all'interno della stanza\n showErrorMessage(getResources().getString(R.string.error_room_already_taken));\n roomsRef.removeEventListener(thisValueEventListener);\n\n }\n } else {\n //il giocatore tenta di accedere ad una stanza con lo stesso profilo (CASO LIMITE DA PREVEDERE)\n showErrorMessage(getResources().getString(R.string.error_access_room_with_same_profile));\n roomsRef.removeEventListener(thisValueEventListener);\n }\n\n } else {\n // non è possibile accedere alla stanza poichè non è stata ancora creata\n showErrorMessage(getResources().getString(R.string.error_room_already_created));\n roomsRef.removeEventListener(thisValueEventListener);\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n OfflineFragment offlineFragment = new OfflineFragment();\n offlineFragment.show(getSupportFragmentManager(),\"Dialog\");\n }\n });\n\n }",
"@Override\n\tpublic void startJoinGame(GameInfo game) \n\t{\n\t\tif(game == null) return;\n\t\t\n\t\tgetSelectColorView().enableAllColors();\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\tref.game_id = game.getId();\n\t\tref.player_index = getIndex(game.getPlayers());\n\t\tfor(PlayerInfo player_info: game.getPlayers())\n\t\t{\n\t\t\tif(player_info.getColor() == null)continue;\n\t\t\tgetSelectColorView().setColorEnabled(player_info.getColor(), false);\n\t\t\tif (player_info.getName().equals(ref.getName())) \n\t\t\t{\n\t\t\t\tgetSelectColorView().setColorEnabled(player_info.getColor(), true);\n\t\t\t}\n\t\t}\n\t\tif(getJoinGameView().isModalShowing()) \n\t\t{\n\t\t\tgetJoinGameView().closeModal();\n\t\t}\n\t\t\n\t\tif(!getSelectColorView().isModalShowing())\n\t\t{\n\t\t\tgetSelectColorView().showModal();\n\t\t}\n\t}",
"@Override\n\tpublic void playerJoining(String playerID) {\n\t}",
"public void sendRequest() {\r\n\t\t\r\n\t\tclient.join(this, isHost, gameCode, playerName, playerNumber);\r\n\t\t\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == mBtnEnterRoom) {\n\t\t\tint dwRoomId=0;\n\t\t\tString strRoomId = mTxtRoomId.getText();\n\t\t\tif (strRoomId.length() == 0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"请输入房间号\", \"错误\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t} else {\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t dwRoomId = Integer.valueOf(strRoomId);\n\t\t\t\t}\n\t\t\t\tcatch (Exception k) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\tSystem.out.println(k.toString());\n\t\t\t\t\tdwRoomId=0;\n\t\t\t\t}\n\t\t\t\tif(dwRoomId!=0)\n\t\t\t\t anychat.EnterRoom(dwRoomId, \"\");\n\t\t\t}\n\t\t}\n\t\tif (e.getSource() == mBtnExit) {\n\t\t\tanychat.Release();\n\t\t\tthis.dispose();\n\t\t}\n\t\tif(e.getSource()==mBtnRoom1)\n\t\t{\n\t\t\tanychat.EnterRoom(1, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom2)\n\t\t{\n\t\t\tanychat.EnterRoom(2, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom3)\n\t\t{\n\t\t\tanychat.EnterRoom(3, \"\");\n\t\t}\n\t\tif(e.getSource()==mBtnRoom4)\n\t\t{\n\t\t\tanychat.EnterRoom(4, \"\");\n\t\t}\n\t}",
"public abstract void enterRoom();",
"private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }",
"private static void addGameJoinLink(GameDto gameDto) {\n if (gameDto.getPlayers()[0] == null || gameDto.getPlayers()[1] == null) {\n Link joinLink =\n linkTo(methodOn(GameController.class).join(gameDto.get_id(), null)).withRel(\"join\");\n gameDto.add(joinLink);\n }\n }",
"private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n Logger.Log(\"Where are you trying to go?\");\n return;\n }\n\n String direction = command.getSecondWord(); \n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n Logger.Log(\"You walk repeatedly into a wall... Please try another direction\");\n }\n // If the portal is entered, call the random room method\n else {\n if (nextRoom.RoomID == 17){\n //System.out.println(\"????????\"); //An unusable string which may be implemented later\n Logger.Log(\"~*~*~PoRtAl~*~*~\");\n nextRoom = getRandomRoom();\n }\n \n currentRoom = nextRoom;\n Logger.Log(currentRoom.getShortDescription());\n } \n }",
"public void sendJoiningPlayer() {\r\n Player p = nui.getPlayerOne();\r\n XferJoinPlayer xfer = new XferJoinPlayer(p);\r\n nui.notifyJoinConnected();\r\n networkPlayer.sendOutput(xfer);\r\n }",
"private void enterRoom(Room newRoomEntered)\n {\n \n player.setCurrentRoom(newRoomEntered);\n if(player.getCurrentRoom().isDark()){//check to see if room is dark\n System.out.println(\"The room is pitchblack and you are unable to see anything\");\n System.out.println();\n } else {\n System.out.println(player.getCurrentRoom().printLocationInfo());\n System.out.println();\n }\n }",
"@Override\n\tpublic void joinGame(CatanColor color) \n\t{\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\tJSONObject model;\n\t\ttry \n\t\t{\n\t\t\tString model_string =ref.proxy.joinGame(ref.game_id, color);\n\t\t\tmodel = new JSONObject(model_string);\n\t\t\tif(model.equals(\"FAILED\\n\"))\n\t\t\t{\n\t\t\t\tthrow new JoinExceptions(\"Join Refused by server\");\n\t\t\t}\n\t\t\tif(getSelectColorView().isModalShowing())\n\t\t\t{\n\t\t\t\tgetSelectColorView().closeModal();\n\t\t\t\tsetSelectColorView(null);\n//\t\t\t\tif(this.getJoinGameView().isModalShowing())\n//\t\t\t\t{\n//\t\t\t\t\tgetJoinGameView().closeModal();\n//\t\t\t\t}\n\t\t\t}\n\t\t\tModelPopulator.populateModel(model, ref.getFascade());\n\t\t\t// If join succeeded\n\t\t\tReference.GET_SINGLETON().player_color = color;\n\n\t\t\t//joinAction.execute();\n\t\t} \n\t\tcatch (JSONException | JoinExceptions e) \n\t\t{\n\t\t\tString error = \"Sorry, Failed to Join Game. Please try again or contact your system administrator.\";\n\t\t\tthis.messageView.setTitle(\"Join Failed\");\n\t\t\tthis.messageView.setMessage(error);\n\t\t\tSystem.err.print(\"ERROR: FAILED TO JOIN GAME\");\n\t\t\te.printStackTrace();\n\n\t\t\tif(!this.messageView.isModalShowing())\n\t\t\t{\n\t\t\t\tthis.messageView.showModal();\n\t\t\t}\n\t\t\tif(getSelectColorView().isModalShowing())\n\t\t\t{\n\t\t\t\tgetSelectColorView().closeModal();\n\t\t\t}\n\t\t} \n\t}",
"public void nextRoom() {\n room++;\n createRoom();\n }",
"void onJoin(String joinedNick);",
"public void setCurrentRoom(Room newRoom) {\n playerRoom = newRoom;\n }",
"public void joinGame(int selectedRow) {\n \t\tsynchronized (lobbyManager.getAvailableGames()) {\n \t\t\ttry {\n \t\t\t\tlobbyManager.joinGame(lobbyManager.getAvailableGames().get(selectedRow));\n \t\t\t} catch (IndexOutOfBoundsException e) {\n \t\t\t\t//Just to prevent a user trying to to rejoin a game that has been quit before refreshing\n \t\t\t}\n \t\t}\n \t}",
"private void setAvailableGames() {\n try {\n listView.getItems().clear();\n DataOutputStream dataOutputStream = new DataOutputStream(socket.getOutputStream());\n dataOutputStream.writeUTF(\"GLst\");\n ObjectInputStream objectInputStream = new ObjectInputStream(socket.getInputStream());\n HashMap<String, String> list = (HashMap<String, String>) objectInputStream.readObject();\n for (String roomCode : list.keySet()) {\n HBox hboxList = new HBox();\n hboxList.setSpacing(8);\n Button buttonJoin = new Button(\"Join\");\n buttonJoin.setOnAction(event -> joinGameRoom(roomCode));\n Separator separator = new Separator();\n separator.setOrientation(Orientation.VERTICAL);\n Label roomName = new Label(list.get(roomCode));\n roomName.setFont(Font.font(\"Arial\", 20));\n hboxList.getChildren().add(buttonJoin);\n hboxList.getChildren().add(separator);\n hboxList.getChildren().add(roomName);\n listView.getItems().add(hboxList);\n }\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n }\n }",
"public void setRoom(Room room) {\n this.selectedRoom = room;\n }",
"private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }",
"public void executeJoiningPlayer(Player player) {\r\n nui.setupNetworkPlayer(player);\r\n }",
"void sendJoinWorld(String worldName);",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Rooms selectedRoom = ((Rooms) adapterView.getItemAtPosition(i));\n\n // Open chat room\n API.openPrivateChatActivity(API.currentUID, selectedRoom.getId(), getView());\n }",
"public JoinScreen(Game game) {\n\t\tthis.game = game;\n\t\tname = \"Unknown\";\n\t\tserverNames = new ArrayList<String>();\n\t\tcurrentRequestId = 0;\n\t\t\n\t\tcamera = new OrthographicCamera();\n\t\tbackground = new Background();\n\t\t\n\t\ttexture = new Texture(\"textures/temp_file.png\");\n\t\ttexture2 = new Texture(\"textures/temp_file_2.png\");\n\t\tspriteBatch = new SpriteBatch();\n\t\tshowG = false;\n\t\tshowA = false;\n\t\t\n\t\tui = new Stage();\n\t\tfinal Skin skin = SkinManager.getSkin();\n\t\t\n\t\tTable table = new Table();\n\t\ttable.setFillParent(true);\n\t\t\n\t\ttable.add(new Label(\"Join\", skin.get(LabelStyle.class))).colspan(2);\n\n\t\ttable.row().center();\n\n\t\ttable.add(new Label(\"Name:\", skin.get(LabelStyle.class)));\n\n\t\tnameField = new TextField(\"\", skin.get(TextFieldStyle.class));\n\t\tnameField.setMessageText(\"Name\");\n\t\tnameField.setTextFieldListener(new TextFieldListener() {\n\t\t\t@Override\n\t\t\tpublic void keyTyped(TextField textField, char key) {\n\t\t\t\tname = nameField.getText();\n\t\t\t\tif(name.equalsIgnoreCase(\"Ganuelas\")) {\n\t\t\t\t\tshowG = true;\n\t\t\t\t} else {\n\t\t\t\t\tshowG = false;\n\t\t\t\t}\n\t\t\t\tif(name.equalsIgnoreCase(\"Aki\")) {\n\t\t\t\t\tshowA = true;\n\t\t\t\t} else {\n\t\t\t\t\tshowA = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttable.add(nameField).fill();\n\n\t\ttable.row().expand().center();\n\t\t\n\t\tserverTable = new Table();\n\t\t\n\t\ttable.add(serverTable).colspan(2);\n\t\t\n\t\ttable.row().bottom().center();\n\t\t\n\t\tTextButton backButton = new TextButton(\"Back\", skin.get(TextButtonStyle.class));\n\t\tbackButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\tJoinScreen.this.game.setScreen(new MainMenuScreen(JoinScreen.this.game));\n\t\t\t\tWifiHelper.closeClient();\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\ttable.add(backButton);\n\n\t\tTextButton refreshButton = new TextButton(\"Refresh\", skin.get(TextButtonStyle.class));\n\t\trefreshButton.addListener(new ClickListener() {\n\t\t\t@Override\n\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\trefreshServerList();\n\t\t\t}\n\t\t});\n\t\ttable.add(refreshButton);\n\t\t\n\t\tui.addActor(table);\n\t\t\n\t\tclient = WifiHelper.openClient();\n\t\tlistener = new Listener() {\n\t\t\t@Override\n\t\t\tpublic void received(Connection connection, Object object) {\n\t\t\t\tif(object instanceof NameResponse) {\n\t\t\t\t\tNameResponse response = (NameResponse)object;\n\t\t\t\t\tif(response.getRequestId() == currentRequestId) {\n\t\t\t\t\t\tint index = Math.min(response.getIndex(), serverNames.size());\n\t\t\t\t\t\tserverNames.add(index, response.getName());\n\t\t\t\t\t\tserverTable.clear();\n\t\t\t\t\t\tfor(int i = 0; i < serverNames.size() && i < addresses.size(); i++) {\n\t\t\t\t\t\t\tTextButton serverButton = new TextButton(serverNames.get(i), skin.get(TextButtonStyle.class));\n\t\t\t\t\t\t\tfinal InetAddress address = addresses.get(i);\n\t\t\t\t\t\t\tserverButton.addListener(new ClickListener() {\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\t\t\tJoinScreen.this.game.setScreen(new PartyScreen(JoinScreen.this.game, address, name));\n\t\t\t\t\t\t\t\t\tdispose();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tserverTable.add(serverButton);\n\t\t\t\t\t\t\tserverTable.row();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsynchronized(client) {\n\t\t\t\t\tclient.notifyAll();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tclient.addListener(listener);\n\t}",
"@Override\n\tpublic JsonElement join(JoinGameRequest JoinRequest) {\n\t\treturn null;\n\t}",
"static void goRoom(Command command) throws InterruptedException {\n if (currentRoom == airport) {\n lockRoom(command);\n }\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n Room nextRoom = currentRoom.getExit(direction);\n player.setCurrentRoom(nextRoom);\n /* loop that when next room is equel to null it print a message that says \"there is no door\" \n but if nextRoom is not equel null set currentRoom to nextRoom and print the description of the new room*/\n if (nextRoom == null) {\n System.out.println(\"There is no path!\");\n } else {\n currentRoom = nextRoom;\n System.out.println(player.getCurrentRoom().getLongDescription());\n\n }\n\n forceDialog();\n }",
"static void enter(Player player, Room room) {\n if (player.moveTo(room)) {\n System.out.println(\"You just entered \" + player.getLocation());\n }\n else {\n System.out.println(\"That way appears to be blocked.\");\n }\n }",
"void setRoomId(String roomId);",
"@Override\n public void onGroupJoined(final String nickname, String groupCode, String username) {\n ServerAPI.joinGroup(groupCode, username, prefs.getDeviceID(), new RequestHandler<Group>() {\n @Override\n public void callback(Group joined) {\n if (joined == null) {\n Toast.makeText(context, \"Incorrect group code! Please try again.\", Toast.LENGTH_LONG).show();\n return;\n }\n savedGroups.add(new Pair<String, Group>(nickname, joined));\n populateListView();\n saveGroups();//Save list to the SharedPreferences\n }\n });\n }",
"private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n System.out.println(\"That way is blocked!\");\n }\n else {\n lastRoom = currentRoom;\n multiLastRooms.push (lastRoom);\n currentRoom = nextRoom;\n timer = timer + 1;\n System.out.println(currentRoom.getLongDescription());\n }\n }",
"@UiHandler(\"roomsLink\")\r\n\tprotected void onClickRoomsLink(ClickEvent event) {\r\n\t\tnavigation.goTo(RoomListPage.class, PageStates.empty());\r\n\t}",
"private void UserJoinChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Join to \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}",
"public void join(Player player) {\n if (this.stored.contains(player.getName()) ^ !this.optInEnable) {\n if (Trivia.wrapper.permission(player, PermissionTypes.PLAY) && this.running) {\n if (!this.active.contains(player)) {\n this.active.add(player);\n player.sendMessage(\"Qukkiz is now \" + ChatColor.GREEN + \"enabled\" + ChatColor.WHITE + \".\");\n }\n }\n }\n }",
"public void join(String ip,int port, int myPort){\r\n\t\ttry{\r\n\t\t\tXmlRpcSender.execute(\"joinRequest\", new Object[] { this.ip, String.valueOf(this.port), this.id }, ip, port);\r\n\t\t\tthis.isJoined = true;\r\n\t\t}catch(Exception e ){e.printStackTrace();}\t\r\n\t}",
"public void loadJoinScreen(View view) {\r\n // Do stuff in response to button press\r\n Intent intent = new Intent(this, GamePlayActivity.class);\r\n startActivity(intent);\r\n }",
"public void talkToCharacter(Room room)//Made by Lexi\n {\n if (currentRoom.getTitle().equals(\"outside\")) {\n System.out.println(\"All you need to do is unlock the door...\");\n System.out.println(\"Hint: use INSPECT to examine an item in detail.\");\n if (player.inventoryContains(key))\n {\n kitchen.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n \n \n else if (currentRoom.getTitle().equals(\"kitchen\")) {\n System.out.println(\"In order to move on to the next room, you must first find an item which can be found by solving this riddle: \");\n System.out.println(\"A box without hinges, key, or lid, yet golden treasure inside is hid.\");\n System.out.println(\"The answer is an item in this room that will help you escape and move on to the next room.\");\n if (player.inventoryContains(egg))\n {\n poolRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"pool room\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"Wash me and I am not clean. Don't wash me and then I'm clean. What I Am?\"); //water\n System.out.println(\"The answer to the riddle is where you'll find the object needed to escape this room... \");\n if (player.inventoryContains(snorkel))\n {\n library.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else if (currentRoom.getTitle().equals(\"library\")) {\n System.out.println(\"In order to escape this room you must solve this next riddle: \");\n System.out.println(\"The objects, or people, have been removed from their previous localities through the power of a naturally moving phenomenon.\");\n System.out.println(\"Once you have figured out what item belongs to the answer of this riddle you will have escaped the building!\");\n if (player.inventoryContains(blueBook))\n {\n \n exitRoom.setLocked(false);\n System.out.println(\"The door makes a loud click.\");\n }\n }\n else {\n System.out.println(\"There is nobody here, so you talk to yourself...\");\n }\n }",
"private void chatRoomBtnListener() {\n chatRoomBtn.addListener(new ClickListener(){\n public void clicked(InputEvent event, float x, float y){\n ChessGame.client.ingame = false;\n }\n });\n }",
"@Override\n\tpublic void onUserJoinedLobby(LobbyData arg0, String arg1) {\n\t\t\n\t}",
"public void updateRoom(Room room);",
"private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n \n \n \n String direction = command.getSecondWord();\n Room nextRoom = currentRoom.getExit(direction); \n \n if (nextRoom == null) \n {\n System.out.println(\"There is no door!\");\n }\n else \n {\n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n printInfo();\n }\n \n }",
"public void actionPerformed(ActionEvent e) {\n if (textField.getText().trim().equals(\"\")) {\r\n // prompt to user and do nothing\r\n JOptionPane.showMessageDialog(null, \"Please input a valid username\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n textField.setText(\"\");\r\n } else {\r\n // if checkbox for room drop down is selected meaning we are\r\n // connecting to a room\r\n if (chckbxNewCheckBox.isSelected() == true) {\r\n\r\n // if no tab exist with a chosen room name continue\r\n if (tabbedPane.indexOfTab(comboBox.getSelectedItem().toString()) == -1) {\r\n\r\n // get the room members\r\n Set<LongInteger> roomMembers = sock.getPresenceManager().membersOf(\r\n new LongInteger(comboBox.getSelectedItem().toString()));\r\n // initialize field to store room member names\r\n String[] roomMemberNames = new String[roomMembers.size()];\r\n // using for loop convert long to string and store\r\n // in room member name array\r\n int i = 0;\r\n for (LongInteger member : roomMembers) {\r\n roomMemberNames[i] = member.toString();\r\n i++;\r\n }\r\n\r\n // connect to room below and based on return type\r\n // add tab\r\n try {\r\n sock.executeCommand(new PresenceCommand(new LongInteger(comboBox.getSelectedItem()\r\n .toString()), true));\r\n } catch (InvalidCommandException ex) {\r\n JOptionPane.showMessageDialog(null, \"Unable to join room.\", \"alert\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n // add tab based on return type above\r\n // once you connect successfully disable the\r\n // username textfield\r\n textField.setEnabled(false);\r\n // add tab for Room to user chat\r\n addTab(comboBox.getSelectedItem().toString(), roomMemberNames, 1);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same room\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \"\r\n + comboBox.getSelectedItem().toString(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n // if checkbox for user is selected meaning we are\r\n // connecting to a user\r\n else if (chckbxNewCheckBox_1.isSelected() == true) {\r\n\r\n if (tabbedPane.indexOfTab(\"Chat with \" + textField_3.getText()) == -1) {\r\n // one does not connect to a user so the tab is\r\n // automatically created\r\n // once you connect successfully disable the\r\n // username textfield\r\n // disable the textfield for usernname\r\n textField.setEnabled(false);\r\n // add tab for User to user chat\r\n addTab(\"Chat with \" + textField_3.getText(), new String[] { textField_3.getText() }, 2);\r\n } else {\r\n // prompt user and ensures that one does not open\r\n // multiple tabs to the same user\r\n JOptionPane.showMessageDialog(null, \"You are already connected to \" + \"Chat with \"\r\n + textField_3.getText(), \"alert\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }\r\n }\r\n }",
"public void setRoom(java.lang.CharSequence value) {\n this.room = value;\n }",
"private void joinGame(String server, int port, String playername) throws UnknownHostException, IOException, ClassNotFoundException, UnableToStartGameException\n\t{\n\t\tsocket = new Socket(server, port);\n\t\tobjectInputStream = new ObjectInputStream(socket.getInputStream());\n\t\tObject object = objectInputStream.readObject();\n\t\t//Spielerid empfangen\n\t\tif (object instanceof ClientId)\n\t\t{\n\t\t\tClientId clientId = (ClientId) object;\n\t\t\tplayerId = clientId.getClientId();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new UnableToStartGameException(\"Konnte die Spielerid nicht empfangen.\");\n\t\t}\n\t\t\n\t\t//Dem Server unseren Namen mitteilen\n\t\tthis.objectOutputStream = new ObjectOutputStream(socket.getOutputStream());\n\t\tobjectOutputStream.writeObject(new PlayerName(playername, playerId));\n\t\t\n\t}",
"public void setRoom(String room) {\n\t\tthis.room = room;\n\t}",
"public void createRoom(LoadingDialog load, String code, String nickname, DataSnapshot roomToHaveAccess) {\n DatabaseReference roomRef = firebaseDatabase.getReference(ROOMS_NODE + \"/\" + code);\n room = new Room(nickname,EMPTY_STRING,0,0,0,0,0,0,false,0,0,0,0,0,3);\n\n roomRef.setValue(room, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n ref.child(PLAYER2_NODE).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot fieldPlayer2) {\n if(fieldPlayer2.getValue() != null){\n if(! fieldPlayer2.getValue().equals(EMPTY_STRING)){\n // il giocatore accede alla stanza poichè passa tutti i controlli sulla disponibilità del posto in stanza\n load.dismissDialog();\n Intent intent = new Intent(MultiplayerActivity.this,ActualGameActivity.class);\n intent.putExtra(CODE_ROOM_EXTRA,code);\n intent.putExtra(CODE_PLAYER_EXTRA,ROLE_PLAYER1);\n ref.child(PLAYER2_NODE).removeEventListener(this);\n startActivity(intent);\n }\n } else {\n ref.child(PLAYER2_NODE).removeEventListener(this);\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n OfflineFragment offlineFragment = new OfflineFragment();\n offlineFragment.show(getSupportFragmentManager(),\"Dialog\");\n }\n });\n\n }\n });\n\n\n\n }",
"@Override\n\tpublic void onJoinLobbyDone(LobbyEvent arg0) {\n\t\tMain.log(getClass(), \"onJoinLobbyDone\");\n\t}",
"public synchronized void setRoom(String room) {\n this.room = room;\n }",
"public static WebSocket<JsonNode> join() {\n return new WebSocket<JsonNode>() {\n @Override\n public void onReady(In<JsonNode> in, Out<JsonNode> out) {\n ConnectedPlayer lowerPlayer = new ConnectedPlayer(in, out);\n log.trace(\"Incoming {}.\", lowerPlayer);\n\n // Tell the player that we are trying to find a pair.\n new WaitingForOpponent(lowerPlayer.getId()).write(out);\n\n // Try to pair the incoming player with another player.\n ConnectedPlayer upperPlayer = pendingPlayers.poll();\n if (upperPlayer != null) {\n Game game = new Game(\n upperPlayer, lowerPlayer,\n new Game.ShutdownListener() {\n @Override\n public void onGameShutdown(String gameId) {\n Application.onGameShutdown(gameId);\n }\n });\n game.start();\n games.put(game.getId(), game);\n log.trace(\"Started {} with {} and {}.\", game, upperPlayer, lowerPlayer);\n }\n\n // Else, queue the player into the waiting list.\n else {\n pendingPlayers.add(lowerPlayer);\n log.trace(\"Queued {}.\", lowerPlayer);\n }\n }\n };\n }",
"void join(User user);",
"private static void performRoomManagement() {\n\t\t\r\n\t\t\r\n\r\n\t}",
"public void onButoonClick(View v) {\n JitsiMeetConferenceOptions options\n = new JitsiMeetConferenceOptions.Builder()\n .setRoom(text)\n .setVideoMuted(false)\n .setWelcomePageEnabled(false)\n .setFeatureFlag(\"invite.enabled\", true)\n .setFeatureFlag(\"meeting-password.enabled\", true)\n .setFeatureFlag(\"live-streaming.enabled\", false)\n .setFeatureFlag(\"calendar.enabled\", false)\n .setFeatureFlag(\"add-people.enabled\", false)\n .setFeatureFlag(\"call-integration.enabled\", false)\n .setFeatureFlag(\"pip.enabled\", true)\n .setFeatureFlag(\"recording.enabled\", false)\n .setFeatureFlag(\"close-captions.enabled\", false)\n .setFeatureFlag(\"meeting-name.enabled\", false)\n .build();\n // Launch the new activity with the given options. The launch() method takes care\n // of creating the required Intent and passing the options.\n JitsiMeetActivity.launch(this, options);\n overridePendingTransition(R.anim.right_in, R.anim.left_out);\n Vibrator y = (Vibrator) getApplicationContext().getSystemService(Context.VIBRATOR_SERVICE);\n assert y != null;\n y.vibrate(300);\n Toast.makeText(getApplicationContext(),\n \"Creating your room..\",\n Toast.LENGTH_LONG)\n .show();\n }",
"private static void lockRoom(Command command) {\n if (command.getCommandWord().name().equalsIgnoreCase(CommandWord.GO.toString())) {\n if (inventory.getInventory().containsKey(\"Boardingpass\") == false) {\n System.out.println(\"You have no boardingpass, please return when you do!!!\");\n }\n }\n\n if (inventory.getInventory().containsKey(\"Boardingpass\") && !hasBoardingpass) {\n hasBoardingpass = true;\n airport.setExit(\"west\", beach);\n System.out.println(airport.getExitString());\n }\n }"
]
| [
"0.70898896",
"0.671927",
"0.66155845",
"0.65513015",
"0.6470525",
"0.6461551",
"0.6369708",
"0.63306224",
"0.63238776",
"0.6280479",
"0.62641734",
"0.61725247",
"0.6158455",
"0.6102057",
"0.60851544",
"0.605515",
"0.603837",
"0.6005022",
"0.59531534",
"0.59206235",
"0.5914322",
"0.58919275",
"0.58223724",
"0.5817343",
"0.5799701",
"0.57865727",
"0.5771223",
"0.576849",
"0.57519555",
"0.5746973",
"0.57383215",
"0.5732975",
"0.57222533",
"0.57194954",
"0.57144535",
"0.5704119",
"0.57036316",
"0.5645572",
"0.56453645",
"0.56217474",
"0.56075984",
"0.557232",
"0.5528888",
"0.55247295",
"0.55170435",
"0.5505519",
"0.5494281",
"0.5493398",
"0.54724365",
"0.5467807",
"0.54667497",
"0.5455591",
"0.5453668",
"0.54455423",
"0.5435668",
"0.5403284",
"0.5388919",
"0.5383475",
"0.5376656",
"0.53569573",
"0.5349427",
"0.53355855",
"0.53084695",
"0.5298564",
"0.5292736",
"0.5292343",
"0.5288063",
"0.5274933",
"0.5269329",
"0.52676326",
"0.52616507",
"0.5257327",
"0.5234279",
"0.522265",
"0.52170306",
"0.52137554",
"0.52089137",
"0.52057016",
"0.5200212",
"0.51999617",
"0.5188931",
"0.5187491",
"0.5181397",
"0.5179741",
"0.5144584",
"0.5136934",
"0.51366305",
"0.5120631",
"0.51200736",
"0.51180226",
"0.5117477",
"0.51154774",
"0.5112194",
"0.510709",
"0.5104581",
"0.5103502",
"0.5093038",
"0.5085804",
"0.50676894",
"0.506073"
]
| 0.7181064 | 0 |
Constructs an action to send the input message immediately. | public MessageResponseAction(Message message) {
this(message, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SendAction createSendAction();",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"public void actionPerformed(ActionEvent e) {\n\n if (inputField.getText().trim().length() == 0) {\n return;\n }\n try {\n\n String input = inputField.getText();\n \n inputField.setText(\"\");\n clientMessage = new Message(getName(), Message.ALL, input, Message.DATA);\n clientMessage.setID(manager.getNextMessageID());\n //JOptionPane.showMessageDialog(null, input);\n //JOptionPane.showMessageDialog(null, clientMessage.getContent());\n sendMessage(clientMessage);\n\n } catch (IOException err) {\n System.err.println(err.getMessage());\n err.printStackTrace();\n }\n }",
"abstract protected String performAction(String input);",
"public ExecuteAction()\n {\n this(null);\n }",
"private void sendInput(int input) {\n sendMessage(new Message(String.valueOf(input)));\n }",
"public void createAction() {\n }",
"@Nonnull\r\n\tpublic static Observable<Void> start(\r\n\t\t\t@Nonnull final Action0 action) {\r\n\t\treturn start(action, scheduler());\r\n\t}",
"public void actionStarted(ActionStreamEvent action);",
"public void startAction(String s_) {\n\t\tthis.startAction(incomingConnection, incomingMsg);\n\t}",
"public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }",
"protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }",
"private void sendRequest(Action action) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n request.setLanguage(new SLCodec().getName());\n request.setOntology(MobilityOntology.getInstance().getName());\n try {\n getContentManager().fillContent(request, action);\n request.addReceiver(action.getActor());\n send(request);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"ActionEvent createActionEvent();",
"public void doInitialAction(){}",
"public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}",
"public static EventHandler<ActionEvent> createEmptyAction()\n\t{\n\t\treturn new EventHandler<ActionEvent>()\n\t\t{\n\t\t\tpublic void handle(ActionEvent event)\n\t\t\t{\t\t\t\t\n\t\t\t\tevent.consume();\n\t\t\t}\n\t\t};\n\t}",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }",
"Input createInput();",
"@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}",
"public Action(String name) {\n this.name = name;\n }",
"@Override\n\tpublic void updateAction(Client input) {\n\t\t\n\t}",
"void tell(String message, Result<Actor<InputOutput>> sender);",
"TurnAction createTurnAction();",
"public Action newAction(Object data) throws Exception;",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\t\t\r\n\r\n\t\t// Get input from GUI window\r\n\t\tString input = m_GUI.getInput();\r\n\r\n\t\tif (input.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\tString message = new String();\r\n\r\n\t\tif (input.startsWith(\"/\"))\r\n\t\t{\r\n\t\t\t// Input is a command\r\n\t\t\tString command = new String(input.split(\" \")[0].trim().toLowerCase());\r\n\r\n\t\t\tswitch (command)\r\n\t\t\t{\r\n\t\t\tcase \"/connect\":\r\n\t\t\tcase \"/c\":\r\n\t\t\t\tString hostname = input.split(\" \")[1];\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tm_connection.connect(hostname);\r\n\t\t\t\t} catch (IOException e1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Error: IO exception when conencting to server\");\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/disconnect\":\r\n\t\t\tcase \"/dc\":\r\n\t\t\t\tm_connection.disconnect();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/whisper\":\r\n\t\t\tcase \"/w\":\r\n\t\t\t\tString recepient = input.split(\" \")[1];\r\n\t\t\t\tmessage = input.split(\" \", 3)[2];\r\n\t\t\t\tm_connection.whisper(recepient, message);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/list\":\r\n\t\t\tcase \"/l\":\r\n\t\t\t\tm_connection.list();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Type is broadcast\r\n\t\t\tmessage = input;\r\n\t\t\tm_connection.broadcast(message);\r\n\t\t}\r\n\t\tm_GUI.clearInput();\r\n\t}",
"public FlowAction(FlowActionType type) {\n this.actionType = type;\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==sendButton){\n\t\t\tif(!inputField.getText().trim().isEmpty()){\n\t\t\t\ttry{\n\t\t\t\t\tclient.sendRequest(inputField.getText().trim());\n\t\t\t\t}catch(Exception ee){\n\t\t\t\t\tee.printStackTrace();\n\t\t\t\t}\n\t\t\t\toutputArea.append(client.getResponse()+\"\\n\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tJOptionPane.showConfirmDialog(this, \"输入不能为空!\");\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tinputField.setText(\"\");\n\t\t\toutputArea.setText(\"\");\n\t\t}\n\t}",
"@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }",
"public Intent intent( String inAction ) {\r\n\t\treturn new Intent( kMessagePlayer ).putExtra( \"action\" , inAction );\r\n\t}",
"private void\n processMsg(Msg input) throws IOException {\n assert Tracer.printConsoleLog(\"INFO Received \" + input + \" in state \" + currentState);\n\n Transition trans = transition[currentState.ordinal()][input.ordinal()];\n if (trans != null) {\n currentState = trans.execute(input);\n }\n assert Tracer.printConsoleLog(\"INFO New State: \" + currentState);\n }",
"public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }",
"void requestInput();",
"public void action() {\n action.action();\n }",
"public QFeedback<S> takedAction();",
"NoAction createNoAction();",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"public Action() {\n //ensureInterpolator();\n }",
"public String getInput()\t\n\t{\t//start of getInput method\n\t\treturn inputMsg;\n\t}",
"synchronized void giveInput(int input) {\n this.input = input;\n inputGiven = true;\n notifyAll();\n }",
"public ActionState createActionState();",
"public ScheduledActionAction() {\n\n }",
"private void requestInput(RequestType type){\n inputType = type;\n inputMessage.setText(\"Input path below\");\n stage.setScene(input);\n }",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"public void start(){\n\t\tdo{\n\t\t\tMessage<T> msg= input.read();\n\t\t\tif (!msg.getQuit() && !msg.getFail() ){\n\t\t\t\tconsume(msg.getContent());\n\t\t\t}\n\t\t\tif (msg.getQuit()){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t}",
"public void doAction(){}",
"@Override\n public void onPressed(Action action) {\n // pass the message on\n notifyOnPress(action);\n }",
"static void setInputFromAction(IAdaptable input) {\n\t\tif (input instanceof IJavaElement)\n\t\t\tfgJavaElementFromAction= (IJavaElement)input;\n\t\telse\n\t\t\tfgJavaElementFromAction= null;\n\t}",
"public Builder setAction(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n action_ = value;\n onChanged();\n return this;\n }",
"private void action(String action) {\n\n\t\tSystem.out.println(name + \" is \" + action);\n\n\t\ttry {\n\t\t\tThread.sleep(((long)(Math.random() * 150)));\n\t\t} catch (InterruptedException e) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"CustomAction(String actionType, String message) {\n action.put(\"Object\", actionType);\n JSONObject attributes = new JSONObject();\n attributes.put(\"message\", message);\n action.put(\"Action\", attributes);\n }",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tSystem.out.println(\"Got an M\");\n\t}",
"public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }",
"public TextBotFlowTurnRequest inputEventUserInput(TextBotUserInputEvent inputEventUserInput) {\n this.inputEventUserInput = inputEventUserInput;\n return this;\n }",
"@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}",
"public void sendInput(String input) throws IOException {\n\t\tmShell.sendCommand(\"INPUT:\" + mStag + \":\" + input + \":\");\n\t}",
"public void setAction(String action) { this.action = action; }",
"ActionBlock createActionBlock();",
"protected void processRequest(String input) {\r\n\t \r\n\t String[] variables = input.split(\",\");\r\n\t Message myMessage = new Message(variables[0], Integer.valueOf(variables[1]),Integer.valueOf(variables[2]), variables[3],Integer.valueOf(variables[4]), Boolean.parseBoolean(variables[5]), variables[6]);\r\n\t String action = myMessage.getAction();\r\n\t switch (action) {\r\n\tcase \"Setup\":\r\n\t\tmyMessage.setAction(\"Nothing\");\r\n\t\tthis.myItems = new ArrayList<Message>();\r\n\t\tmyItems.add(myMessage);\r\n\t\tbreak;\r\n\tcase \"Buy\":\r\n\t\tbreak;\r\n\r\n\tcase \"Bid\":\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\r\n\tcase \"TimeOut\":\r\n\t\tbreak;\r\n\t\r\n\t//Continue without any action\r\n\tcase \"Nothing\":\r\n\t\tbreak;\r\n\t}\r\n\t \r\n\t \r\n\t \r\n\t return;\r\n }",
"Result<Actor<InputOutput>> self();",
"public void setInput(String M)\t\n\t{\t//start of setInput method\n\t\tinputMsg = M;\n\t}",
"ListeningFuture<Boolean> setInput(String input);",
"private Input()\n {\n }",
"public void acceptConversationInput ( String input ) {\n\t\texecute ( handle -> handle.acceptConversationInput ( input ) );\n\t}",
"public void performAction();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput(input.getText().toString());\n\t\t\t\tshow.setText(output.toString());\n\t\t\t}",
"interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }",
"private ExecuteMessage() {\n initFields();\n }",
"protected void fireActionEvent() {\n if (actionListener != null) {\n ActionEvent ae = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, command);\n actionListener.actionPerformed(ae);\n }\n }",
"IWDAction wdCreateAction(WDActionEventHandler eventHandler, String text);",
"private void sendMessage() {\n Log.d(\"FlashChat\", \"I sent something\");\n // get the message the user typed\n String userInput = mInputText.getText().toString();\n\n if (! (userInput.length() == 0)){\n\n InstantMessage message = new InstantMessage(userInput, mUserMe);\n // push the message to Firebase DB\n mDatabaseReference.child(mLocation).push().setValue(message);\n mInputText.setText(\"\");\n }\n\n }",
"public Builder withAction(final String action) {\n this.action = action;\n return this;\n }",
"static <InputOutput> Result<Actor<InputOutput>> noSender() {\n return Result.empty();\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(inputLine);\n\t\tjade.lang.acl.ACLMessage msg=myAgent.receive();\n\t\tif(msg!=null){\n\t\t\tSystem.out.println(inputLine);\n\t\t}else{\n\t\t\tblock();\n\t\t}\n\t\t\n\t\n\t\t\n\t\n\t}",
"@Override\n public void action() {\n ACLMessage acl = blockingReceive();\n System.err.println(\"Hola, que gusto \" + acl.getSender() + \", yo soy \" + getAgent().getName());\n new EnviarMensaje().enviarMensajeString(ACLMessage.INFORM, \"Ag4\", getAgent(), \"Hola agente, soy \" + getAgent().getName(),\n \"COD0001\");\n }",
"public ActionReturn() {\r\n error = OK;\r\n msg = null;\r\n }",
"@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}",
"private void buffer(Runnable action) {\n actions.add(action);\n }",
"protected PMBaseAction() {\r\n super();\r\n }",
"@Override\n public void accept(Action action) {\n }",
"public synchronized void applyAction(int action) {\n\n }",
"public final java_cup.runtime.Symbol CUP$parser$do_action_part00000000(\n int CUP$parser$act_num,\n java_cup.runtime.lr_parser CUP$parser$parser,\n java.util.Stack CUP$parser$stack,\n int CUP$parser$top)\n throws java.lang.Exception\n {\n /* Symbol object for return from actions */\n java_cup.runtime.Symbol CUP$parser$result;\n\n /* select the action based on the action number */\n switch (CUP$parser$act_num)\n {\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 0: // input ::= expr SEMI \n {\n Function RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"input\",7, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 1: // $START ::= input EOF \n {\n Object RESULT =null;\n\t\tint start_valleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint start_valright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tFunction start_val = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\tRESULT = start_val;\n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"$START\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n /* ACCEPT */\n CUP$parser$parser.done_parsing();\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 2: // expr ::= LPAREN expr RPAREN \n {\n Function RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\t \n\t RESULT = e; \n\t result = RESULT;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 3: // expr ::= constant \n {\n Function RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction c = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n\t\t \tRESULT = c;\n\t\t \tresult = RESULT; \n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 4: // expr ::= arithmatic_expr \n {\n Function RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction c = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n\t\t \tRESULT = c;\n\t\t \tresult = RESULT; \n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 5: // expr ::= boolean_expr \n {\n Function RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction c = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n\t\t \tRESULT = c;\n\t\t \tresult = RESULT; \n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 6: // expr ::= relational_expr \n {\n Function RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction c = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n\t\t \tRESULT = c;\n\t\t \tresult = RESULT; \n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 7: // expr ::= function \n {\n Function RESULT =null;\n\t\tint cleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint cright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction c = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n\t\t \tRESULT = c;\n\t\t \tresult = RESULT; \n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"expr\",6, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 8: // arguments ::= arguments COMMA expr \n {\n Function RESULT =null;\n\t\tint argsleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint argsright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction args = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n \t((Arguments)args).addArgument(e);\n \tRESULT=args;\n \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arguments\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 9: // arguments ::= expr \n {\n Function RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t\n \tArguments arguments = (Arguments)newInstance(\"Arguments\");\n \targuments.addArgument(e);\n \tRESULT = arguments;\n \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arguments\",4, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 10: // function ::= IDENTIFIER LPAREN RPAREN \n {\n Function RESULT =null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tString i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\t\n\t\t\t Class<?> clazz = loadFunction(i);\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t RESULT = function;\n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 11: // function ::= IDENTIFIER LPAREN arguments RPAREN \n {\n Function RESULT =null;\n\t\tint ileft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).left;\n\t\tint iright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)).right;\n\t\tString i = (String)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-3)).value;\n\t\tint argsleft = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).left;\n\t\tint argsright = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)).right;\n\t\tFunction args = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-1)).value;\n\t\t\n\t\t \t Class<?> clazz = loadFunction(i);\n\t\t\t Function function = (Function)clazz.newInstance();\n\t\t\t Arguments arguments = (Arguments)args;\n\t\t\t Function[] functions = arguments.evaluate();\n\t\t\t function.setArgs(functions);\n\t\t\t RESULT = function;\n\t\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"function\",5, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-3)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 12: // boolean_expr ::= NOT expr \n {\n Function RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Not\");\n\t \tfunction.setArgs(e);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"boolean_expr\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 13: // boolean_expr ::= expr AND expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"And\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"boolean_expr\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 14: // boolean_expr ::= expr OR expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Or\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"boolean_expr\",2, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 15: // arithmatic_expr ::= expr PLUS expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Add\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function; \n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 16: // arithmatic_expr ::= expr MINUS expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Subtract\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 17: // arithmatic_expr ::= MINUS expr \n {\n Function RESULT =null;\n\t\tint eleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint eright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t Function function = (Function)newInstance(\"Subtract\");\n\t \tfunction.setArgs(loadConstant(0.0), e);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-1)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 18: // arithmatic_expr ::= expr TIMES expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Multiply\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function; \n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 19: // arithmatic_expr ::= expr DIVIDE expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Divide\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 20: // arithmatic_expr ::= expr MOD expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tFunction function = (Function)newInstance(\"Mod\");\n\t \tfunction.setArgs(e1, e2);\n\t RESULT = function; \n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"arithmatic_expr\",1, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 21: // relational_expr ::= expr GTEQ expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"GTEquals\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 22: // relational_expr ::= expr EQEQ expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"Equals\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 23: // relational_expr ::= expr LTEQ expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"LTEquals\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 24: // relational_expr ::= expr GT expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"GreaterThan\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 25: // relational_expr ::= expr LT expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"LessThan\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 26: // relational_expr ::= expr NOTEQ expr \n {\n Function RESULT =null;\n\t\tint e1left = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).left;\n\t\tint e1right = ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)).right;\n\t\tFunction e1 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.elementAt(CUP$parser$top-2)).value;\n\t\tint e2left = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint e2right = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tFunction e2 = (Function)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \t Class<?> clazz = loadFunction(\"NotEquals\");\n\t\t\t Function<Double> function = (Function<Double>)clazz.newInstance();\n\t\t\t function.setArgs(e1, e2);\n\t\t\t RESULT = function;\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"relational_expr\",3, ((java_cup.runtime.Symbol)CUP$parser$stack.elementAt(CUP$parser$top-2)), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 27: // constant ::= IDENTIFIER \n {\n Function RESULT =null;\n\t\tint nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint nright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tString n = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tField field = object.getClass().getDeclaredField(n);\n\t\t boolean accessible = field.isAccessible();\n\t\t field.setAccessible(true);\n\t\t\tObject o = field.get(object);\n\t\t\tif(o instanceof Number) {\n\t\t\t\to = ((Number)o).doubleValue();\n\t\t\t}\n\t \tRESULT = loadConstant(o);\n\t\t field.setAccessible(accessible);\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 28: // constant ::= NUMBER \n {\n Function RESULT =null;\n\t\tint nleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint nright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tDouble n = (Double)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t \tDouble d = Double.valueOf(n);\n\t \tRESULT = loadConstant(d);\n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /*. . . . . . . . . . . . . . . . . . . .*/\n case 29: // constant ::= STRING \n {\n Function RESULT =null;\n\t\tint sleft = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).left;\n\t\tint sright = ((java_cup.runtime.Symbol)CUP$parser$stack.peek()).right;\n\t\tString s = (String)((java_cup.runtime.Symbol) CUP$parser$stack.peek()).value;\n\t\t \n\t RESULT=loadConstant(s); \n\t \n CUP$parser$result = parser.getSymbolFactory().newSymbol(\"constant\",0, ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), ((java_cup.runtime.Symbol)CUP$parser$stack.peek()), RESULT);\n }\n return CUP$parser$result;\n\n /* . . . . . .*/\n default:\n throw new Exception(\n \"Invalid action number \"+CUP$parser$act_num+\"found in internal parse table\");\n\n }\n }",
"public synchronized void parseInput(String message) {\n\n try {\n int row, column, worker;\n String[] parts = message.split(\" \");\n String name = parts[0];\n InputString action = InputString.valueOf(parts[1].toLowerCase());\n boolean actionExecuted = false;\n UndoHandler undoThread = null;\n\n // The name is set by the connection so only the current player can execute actions\n if (name.equals(game.getCurrentPlayer().getName())) {\n\n\n switch (action) {\n case usepower -> {\n // Set the path of fsm as the one of the divinity\n if (fsm.getState() == State.start)\n fsm.setPath(game.getCurrentPlayer().getGodPower().getDivinity());\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" wants to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case normal -> {\n // Set the default path\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" doesn't want to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case placeworker -> {\n // Place the worker on the map\n // There isn't a state.placeworker because it happen only once\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n if (fsm.getState() == State.move) fsm.setState(State.build);\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.placeWorker(row, column);\n lastAction = fsm.getState();\n }\n case move -> {\n // Move the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.move) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.move(row, column, worker);\n }\n if (fsm.getState() == State.superMove || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n case build -> {\n // Build with the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.build) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.build(row, column, worker);\n }\n if (fsm.getState() == State.superBuild || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n\n case undo -> {\n undoing = true;\n actionExecuted = false;\n undoThread = new UndoHandler(game, this, State.undo);\n new Thread(undoThread).start();\n String msg = \"Undo: \" + game.getCurrentPlayer().getName() + \" undoing\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n }\n\n case endturn -> {\n if (fsm.getState() == State.endTurn) {\n setUndoing(true);\n actionExecuted = game.endTurn();\n lastAction = fsm.getState();\n }\n }\n\n }\n\n // If something went wrong:\n // actionExecuted will be false,\n // the fsm stay in the current state and\n // the undoThread doesn't start so it can't undo last action\n if (actionExecuted) {\n setUndoing(false);\n fsm.nextState();\n if (undoThread != null) new Thread(undoThread).start();\n }\n }\n else throw new IllegalArgumentException();\n\n } catch (IllegalArgumentException | IndexOutOfBoundsException exception) {\n game.sendBoard(new LiteBoard(\"Please, be sure you're using the official software since last message was unexpected or had a wrong format\"));\n }\n }",
"public abstract void onAction();",
"public EmptyAction() {\n\t\tsetActionName(\"Empty Action\");\n\t}",
"@Override\n\tprotected Output<Param<?>> executeInternal(Input input) {\n\t\tExecutionContext eCtx = handleNewDomainRoot(input.getContext());\n\t\n\t\tParam<Object> actionParam = findParamByCommandOrThrowEx(eCtx);\n\t\t\n\t\tfinal Param<?> outputParam;\n\t\tif(containsFunctionHandler(input)) {\n\t\t\toutputParam = executeFunctionHanlder(input, FunctionHandler.class);\n\t\t} else { \n\t\t\tsetStateNew(eCtx, input.getContext().getCommandMessage(), actionParam);\n\t\t\toutputParam = actionParam;\n\t\t}\n\t\treturn Output.instantiate(input, eCtx, outputParam);\n\t}",
"ForwardMinAction createForwardMinAction();",
"public abstract void promptForInput(final String msg);",
"State takeAction(State state);",
"protected abstract void createTriggerOrAction();",
"private Action(){\r\n\t\tthis(-1);\r\n\t}",
"Message sendAndWait();",
"@Override\n public void onClick(View v) {\n new TerminalThread(etInput.getText().toString(), 2).start();\n }",
"public void expectInput(Consumer<T> asserter) {\n consumer = Preconditions.checkNotNull(asserter);\n trap =\n () -> {\n throw new AssertionError(\"No transition to \" + stateName);\n };\n }",
"@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}",
"public abstract void onInput();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}"
]
| [
"0.6511965",
"0.6304241",
"0.6304241",
"0.6304241",
"0.6085278",
"0.5954076",
"0.5878162",
"0.5816696",
"0.5795234",
"0.57850844",
"0.57431066",
"0.5691893",
"0.5672664",
"0.56567395",
"0.56485075",
"0.56164885",
"0.56139785",
"0.55959004",
"0.55782104",
"0.557401",
"0.5566366",
"0.55661345",
"0.5555215",
"0.5548136",
"0.5529531",
"0.54959625",
"0.5469687",
"0.546907",
"0.54556733",
"0.54467225",
"0.5438558",
"0.54370904",
"0.54366976",
"0.54357916",
"0.5426768",
"0.53910995",
"0.53893685",
"0.5382778",
"0.5380554",
"0.5358249",
"0.5356783",
"0.532081",
"0.5310097",
"0.53059024",
"0.5280621",
"0.52768433",
"0.5237919",
"0.52341574",
"0.5230433",
"0.52276903",
"0.52202594",
"0.52191734",
"0.521433",
"0.52070904",
"0.5198683",
"0.5195673",
"0.51911473",
"0.5189301",
"0.5187495",
"0.51756877",
"0.5175618",
"0.51713055",
"0.51616704",
"0.516089",
"0.5158899",
"0.5156668",
"0.5152396",
"0.5151818",
"0.51505166",
"0.5149174",
"0.5145456",
"0.5140885",
"0.51301354",
"0.5129693",
"0.5128166",
"0.5127195",
"0.5125561",
"0.5124701",
"0.5122468",
"0.5121383",
"0.5117942",
"0.5116094",
"0.51150614",
"0.51116526",
"0.5108285",
"0.5107276",
"0.510335",
"0.5098051",
"0.50975364",
"0.50947344",
"0.5093211",
"0.50901794",
"0.5080823",
"0.5077642",
"0.507575",
"0.5067189",
"0.5061691",
"0.5055028",
"0.5052638",
"0.50493723"
]
| 0.52263224 | 50 |
Constructs an action to send the input message at some time in the future. | public MessageResponseAction(Message message, long delayInMs) {
this.message = message;
this.delayInMs = delayInMs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"SendAction createSendAction();",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"protected void takeAction() {\n lastAction = System.currentTimeMillis();\n }",
"ActionEvent createActionEvent();",
"public void createAction() {\n }",
"public ScheduledActionAction() {\n\n }",
"public void actionStarted(ActionStreamEvent action);",
"private void\n processMsg(Msg input) throws IOException {\n assert Tracer.printConsoleLog(\"INFO Received \" + input + \" in state \" + currentState);\n\n Transition trans = transition[currentState.ordinal()][input.ordinal()];\n if (trans != null) {\n currentState = trans.execute(input);\n }\n assert Tracer.printConsoleLog(\"INFO New State: \" + currentState);\n }",
"abstract protected String performAction(String input);",
"void action(String response, GameChatEvent cause) throws InterruptedException, IOException;",
"TurnAction createTurnAction();",
"public void action()\n {\n if(timeout > 0 && timeout < 2)\n {\n timeout = 0;\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n counter = 0;\n\n\n }\n //If this is the very first time getting to this state or if the timeout reset the counter to 0\n if(counter < 1)\n {\n //Clean the list of receivers in case there is something\n if(!receivers.isEmpty())\n receivers.removeAllElements();\n //Calculate the duration of the intro\n calculateDurationIntro();\n //Find a receiver\n findAllReceivers();\n constructACLMessage();\n introNegotiation = new IntroNegotiation(agent,msg);\n introNegotiation.setDataStore(getDataStore());\n agent.addBehaviour(introNegotiation);\n }\n\n\n //Handle where I'm heading to from here.\n switch (steps)\n {\n case 0:\n transition = 29;\n break;\n case 1:\n agent.removeBehaviour(introNegotiation);\n introNegotiation = null;\n transition = 17;\n\n }\n\n\n\n }",
"public void run() {\n long startTime = 0;\n if (action.getClass().getName().contains(\"TooAction\")) {\n startTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sending a ToO alert...\");\n }\n\n action.doTriggerAction(change, handback);\n\n // Record the end time and warn if it took too long.\n if (startTime != 0) {\n long curTime = System.currentTimeMillis();\n LOG.log(Level.WARNING, \"Sent ToO alert\");\n\n long elapsed = curTime - startTime;\n if (elapsed > 5000) {\n LOG.log(Level.WARNING, \"Long delay sending ToO alert: \" + elapsed);\n }\n }\n\n }",
"private void action(String action) {\n\n\t\tSystem.out.println(name + \" is \" + action);\n\n\t\ttry {\n\t\t\tThread.sleep(((long)(Math.random() * 150)));\n\t\t} catch (InterruptedException e) {\n\t\t\tThread.currentThread().interrupt();\n\t\t}\n\t}",
"public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }",
"public ForeseeableAction(int baseTime) {\n\t\tthis.baseTime = baseTime;\n\t\tthis.timeRemaining = baseTime;\n\t}",
"public ActionState createActionState();",
"void tell(String message, Result<Actor<InputOutput>> sender);",
"public void actionPerformed(ActionEvent e) {\n\n if (inputField.getText().trim().length() == 0) {\n return;\n }\n try {\n\n String input = inputField.getText();\n \n inputField.setText(\"\");\n clientMessage = new Message(getName(), Message.ALL, input, Message.DATA);\n clientMessage.setID(manager.getNextMessageID());\n //JOptionPane.showMessageDialog(null, input);\n //JOptionPane.showMessageDialog(null, clientMessage.getContent());\n sendMessage(clientMessage);\n\n } catch (IOException err) {\n System.err.println(err.getMessage());\n err.printStackTrace();\n }\n }",
"Action(String desc){\n this.desc = desc;\n this.append = \"\";\n }",
"public Action(String name) {\n this.name = name;\n }",
"@Override\n public void act() {\n sleepCheck();\n if (!isAwake()) return;\n while (getActionTime() > 0f) {\n UAction action = nextAction();\n if (action == null) {\n this.setActionTime(0f);\n return;\n }\n if (area().closed) return;\n doAction(action);\n }\n }",
"@Override\n\tpublic void updateAction(Client input) {\n\t\t\n\t}",
"protected abstract void createTriggerOrAction();",
"@Override\n\tpublic void run() {\n\t\tthis.originateAction = new OriginateAction();\n\t\tthis.originateAction.setChannel(this.destination); // SIP/1083484/01703846797\n\t\tthis.originateAction.setContext(EPursuit.properties.getProperty(\"context\"));\n\t\tthis.originateAction.setExten(this.agi.getExtension());\n\t\tthis.originateAction.setPriority(new Integer(1));\n\t\t// TODO: Which timeout to use? Occurs sometimes when the phone is down\n\t\t// or never receives an event (for some reason)\n\t\tthis.originateAction.setTimeout(new Long(EPursuit.properties.getProperty(\"callTime\"))+new Long(EPursuit.properties.getProperty(\"dialTime\")));\n\t\tthis.originateAction.setAsync(true);\n\n\t\t// make initial call\n\t\tthis.makeCall();\n\t}",
"public MessagingEvent(T source, MessagingAction action, KafkaOutputChannel destination) {\n super(source);\n this.source = source;\n this.action = action;\n this.destination = destination;\n }",
"private void sendInput(int input) {\n sendMessage(new Message(String.valueOf(input)));\n }",
"public Task makeTask() {\n Task new_task = new Task();\n new_task.setAction(this);\n new_task.setDeadline(\n new Date(System.currentTimeMillis() + deadlineSeconds() * 1000L));\n\n return new_task;\n }",
"public Action newAction(Object data) throws Exception;",
"@Nonnull\r\n\tpublic static Observable<Void> start(\r\n\t\t\t@Nonnull final Action0 action) {\r\n\t\treturn start(action, scheduler());\r\n\t}",
"public FrameworkCommand(String input, ObjectType init) \n {\n commandString = input.toUpperCase();\n initiator = init;\n\n // todo: verb as first word?\n \n /* This is a crummy timestamp.. We'll hope to do better in subclasses \n using scheduler instances. */\n lTimestamp = System.currentTimeMillis() * 1000;\n }",
"public synchronized void parseInput(String message) {\n\n try {\n int row, column, worker;\n String[] parts = message.split(\" \");\n String name = parts[0];\n InputString action = InputString.valueOf(parts[1].toLowerCase());\n boolean actionExecuted = false;\n UndoHandler undoThread = null;\n\n // The name is set by the connection so only the current player can execute actions\n if (name.equals(game.getCurrentPlayer().getName())) {\n\n\n switch (action) {\n case usepower -> {\n // Set the path of fsm as the one of the divinity\n if (fsm.getState() == State.start)\n fsm.setPath(game.getCurrentPlayer().getGodPower().getDivinity());\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" wants to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case normal -> {\n // Set the default path\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n String msg = \"Insert \" + game.getCurrentPlayer().getName() + \" doesn't want to use the God Power\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n actionExecuted = true;\n lastAction = fsm.getState();\n }\n case placeworker -> {\n // Place the worker on the map\n // There isn't a state.placeworker because it happen only once\n if (fsm.getState() == State.start) fsm.setPath(Divinity.Default);\n if (fsm.getState() == State.move) fsm.setState(State.build);\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.placeWorker(row, column);\n lastAction = fsm.getState();\n }\n case move -> {\n // Move the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.move) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.move(row, column, worker);\n }\n if (fsm.getState() == State.superMove || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n case build -> {\n // Build with the worker\n row = Integer.parseInt(parts[2]) - 1;\n column = Integer.parseInt(parts[3]) - 1;\n worker = Integer.parseInt(parts[4]) - 1;\n if (fsm.getState() == State.build) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.build(row, column, worker);\n }\n if (fsm.getState() == State.superBuild || fsm.getState() == State.secondTimeState) {\n undoThread = new UndoHandler(game, this, fsm.getState());\n actionExecuted = game.useGodPower(row, column, worker);\n }\n lastAction = fsm.getState();\n }\n\n case undo -> {\n undoing = true;\n actionExecuted = false;\n undoThread = new UndoHandler(game, this, State.undo);\n new Thread(undoThread).start();\n String msg = \"Undo: \" + game.getCurrentPlayer().getName() + \" undoing\";\n game.sendBoard(new LiteBoard(msg, game.getBoard(), game));\n }\n\n case endturn -> {\n if (fsm.getState() == State.endTurn) {\n setUndoing(true);\n actionExecuted = game.endTurn();\n lastAction = fsm.getState();\n }\n }\n\n }\n\n // If something went wrong:\n // actionExecuted will be false,\n // the fsm stay in the current state and\n // the undoThread doesn't start so it can't undo last action\n if (actionExecuted) {\n setUndoing(false);\n fsm.nextState();\n if (undoThread != null) new Thread(undoThread).start();\n }\n }\n else throw new IllegalArgumentException();\n\n } catch (IllegalArgumentException | IndexOutOfBoundsException exception) {\n game.sendBoard(new LiteBoard(\"Please, be sure you're using the official software since last message was unexpected or had a wrong format\"));\n }\n }",
"@Override\r\n public boolean onSubmit(CharSequence input) {\r\n\r\n //make a message\r\n long systemNenoTime = System.nanoTime();\r\n\r\n _Message message = new _Message(\r\n systemNenoTime + \"::\" + socketManager.getSocketID(), //just make incremental,\r\n // need for chat kit only (No need socket id ref, in this project, but may be future)\r\n systemNenoTime, // this will need for me as primary key, because chatkit abnormally demand ID as String\r\n //but i need long for realm operation\r\n me.getRoomName(), //pass 1-1 unique room name\r\n me, //responsible person is me for this message\r\n input.toString(), //text of message\r\n new Date());\r\n\r\n //check is user valid and ready to broadcast his message\r\n if (socketManager.isUserValid()) {\r\n\r\n //save new submitted message to realm\r\n saveOrUpdateNewMessageRealm(message);\r\n\r\n //emit submitted messages to socket IO for broadcast in current room\r\n socketManager.performEmit(\"newMessage\", message);\r\n\r\n runOnUiThread(() -> {\r\n //submitted message should be view immediately\r\n messagesAdapter.addToStart(message, true);\r\n\r\n //update last chat incremental id\r\n lastMessageIncrementalID = message.getIncrementalID();\r\n });\r\n\r\n\r\n //know the adapter submission has completed\r\n return true;\r\n\r\n } else {\r\n\r\n Toast.makeText(ChatMessageActivity.this, \"Please wait until valid connection confirmed. \" +\r\n \"Try again after sometime! In real project there should be a progress bar.\", Toast.LENGTH_LONG).show();\r\n\r\n //alas adapter will omit submission\r\n return false;\r\n\r\n }\r\n\r\n }",
"ActionBlock createActionBlock();",
"public void action() {\n MessageTemplate template = MessageTemplate.MatchPerformative(CommunicationHelper.GUI_MESSAGE);\n ACLMessage msg = myAgent.receive(template);\n\n if (msg != null) {\n\n /*-------- DISPLAYING MESSAGE -------*/\n try {\n\n String message = (String) msg.getContentObject();\n\n // TODO temporary\n if (message.equals(\"DistributorAgent - NEXT_SIMSTEP\")) {\n \tguiAgent.nextAutoSimStep();\n // wykorzystywane do sim GOD\n // startuje timer, zeby ten zrobil nextSimstep i statystyki\n // zaraz potem timer trzeba zatrzymac\n }\n\n guiAgent.displayMessage(message);\n\n } catch (UnreadableException e) {\n logger.error(this.guiAgent.getLocalName() + \" - UnreadableException \" + e.getMessage());\n }\n } else {\n\n block();\n }\n }",
"public Action() {\n //ensureInterpolator();\n }",
"public ExecuteAction()\n {\n this(null);\n }",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"Message sendAndWait();",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e)\r\n\t{\r\n\t\t\r\n\r\n\t\t// Get input from GUI window\r\n\t\tString input = m_GUI.getInput();\r\n\r\n\t\tif (input.isEmpty())\r\n\t\t\treturn;\r\n\r\n\t\tString message = new String();\r\n\r\n\t\tif (input.startsWith(\"/\"))\r\n\t\t{\r\n\t\t\t// Input is a command\r\n\t\t\tString command = new String(input.split(\" \")[0].trim().toLowerCase());\r\n\r\n\t\t\tswitch (command)\r\n\t\t\t{\r\n\t\t\tcase \"/connect\":\r\n\t\t\tcase \"/c\":\r\n\t\t\t\tString hostname = input.split(\" \")[1];\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tm_connection.connect(hostname);\r\n\t\t\t\t} catch (IOException e1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.err.println(\"Error: IO exception when conencting to server\");\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/disconnect\":\r\n\t\t\tcase \"/dc\":\r\n\t\t\t\tm_connection.disconnect();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/whisper\":\r\n\t\t\tcase \"/w\":\r\n\t\t\t\tString recepient = input.split(\" \")[1];\r\n\t\t\t\tmessage = input.split(\" \", 3)[2];\r\n\t\t\t\tm_connection.whisper(recepient, message);\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase \"/list\":\r\n\t\t\tcase \"/l\":\r\n\t\t\t\tm_connection.list();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else\r\n\t\t{\r\n\t\t\t// Type is broadcast\r\n\t\t\tmessage = input;\r\n\t\t\tm_connection.broadcast(message);\r\n\t\t}\r\n\t\tm_GUI.clearInput();\r\n\t}",
"interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }",
"private void execStartAction(String action){\n\n if (action.length() == 0) { return; }\n\n if (startTask != null ){\n startTask.interrupt();\n startTask = null;\n }\n\n RunningTask rt = new RunningTask(this,action.split(\" \"),true);\n startTask = new Thread(rt);\n startTask.start();\n }",
"private void sendRequest(Action action) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n request.setLanguage(new SLCodec().getName());\n request.setOntology(MobilityOntology.getInstance().getName());\n try {\n getContentManager().fillContent(request, action);\n request.addReceiver(action.getActor());\n send(request);\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"protected void processNewMessage(String user, CfAction action){\n\t\tif (shouldTakeActionOnMessage(action)){\n\t\t\tsendToAllAgents(user, action);\t\n\t\t}\n\t}",
"public FlowAction(FlowActionType type) {\n this.actionType = type;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tconfirm_button.setEnabled(false);\n\t\t\t\tthis.startAppium();\n\t\t\t\twhile(!isStarted()){\n\t\t\t\t\tthis.startAppium();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tMyFrame.username=u_field.getText();\n\t\t\t\tMyFrame.password=p_field.getText();\n\t\t\t\tMyFrame.time=(String) year_box.getSelectedItem()+\"-\"+month_box.getSelectedItem()+\"-\"+day_box.getSelectedItem()+\"_\"+hour_box.getSelectedItem()+\":\"+minute_box.getSelectedItem();\n\t\t\t\tHello531.initUser(MyFrame.username, MyFrame.password);\n\t\t\t\tSystem.out.println(MyFrame.time);\n\t\t\t\tconfirm_panel();\n\t\t\t\tnew Call().start(time);\n\t\t\t\t\n\t\t\t}",
"public abstract void userActionStarts(long ms);",
"public synchronized void applyAction(int action) {\n\n }",
"protected void processRequest(String input) {\r\n\t \r\n\t String[] variables = input.split(\",\");\r\n\t Message myMessage = new Message(variables[0], Integer.valueOf(variables[1]),Integer.valueOf(variables[2]), variables[3],Integer.valueOf(variables[4]), Boolean.parseBoolean(variables[5]), variables[6]);\r\n\t String action = myMessage.getAction();\r\n\t switch (action) {\r\n\tcase \"Setup\":\r\n\t\tmyMessage.setAction(\"Nothing\");\r\n\t\tthis.myItems = new ArrayList<Message>();\r\n\t\tmyItems.add(myMessage);\r\n\t\tbreak;\r\n\tcase \"Buy\":\r\n\t\tbreak;\r\n\r\n\tcase \"Bid\":\r\n\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\r\n\tcase \"TimeOut\":\r\n\t\tbreak;\r\n\t\r\n\t//Continue without any action\r\n\tcase \"Nothing\":\r\n\t\tbreak;\r\n\t}\r\n\t \r\n\t \r\n\t \r\n\t return;\r\n }",
"private void handleActionOnce() {\n // TODO: Handle action\n try {\n Executors.newScheduledThreadPool(1).submit(new NewsReceiveTask(getApplicationContext() , true));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public BGMEvent()\n\t{\n\t\tthis(\"\", BGMTransition.IMMEDIATE);\n\t}",
"private void sendNextAction() throws IOException {\n if (this.actionSendQueue.isEmpty()) {\n // invalid state, maybe something is up\n System.out.println(\"AI attempt to send action without any actions in action queue\");\n this.finishedTurn = true;\n return;\n }\n String action = this.actionSendQueue.remove(0);\n this.dslocal.sendPlayerAction(action);\n StringTokenizer st = new StringTokenizer(action);\n if (Integer.parseInt(st.nextToken()) == EndTurnAction.ID) {\n this.finishedTurn = true;\n this.nodeMap.clear();\n }\n }",
"@FXML\n private void sendMessage(ActionEvent actionEvent) {\n String playerName = RiskMain.getInstance().getDomain().getPlayerName();\n System.out.println(messageInput.getText());\n String text = playerName + \": \" + messageInput.getText();\n if (RiskMain.getInstance().getDomain().isServer()) {\n this.serverInterface = RiskMain.getInstance().getDomain().getServer();\n this.serverInterface\n .sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n } else {\n this.clientPlayerInterface = RiskMain.getInstance().getDomain().getClient();\n this.clientPlayerInterface.sendMessageChat(RiskMain.getInstance().getDomain().getPlayerName(),\n messageInput.getText(), recipientList.getValue());\n }\n }",
"public QFeedback<S> takedAction();",
"public void nextAction(){\n\t\tif (this.currentAction == this.onAction){\n\t\t\tthis.currentAction = this.offAction;\n\t\t\tthis.currentAction = this.currentAction.next();\n\t\t\tthis.lastOffDelay = this.currentAction.getCurrentLapsTime();\n\t\t}else{\n\t\t\tthis.currentAction = this.onAction;\n\t\t\tthis.currentAction = this.currentAction.next();\n\t\t\tthis.currentAction.spendTime(this.lastOffDelay);\n\t\t}\n\t}",
"public interface SignallingAction extends Action {\n}",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tMessageTemplate cfpTemplate = MessageTemplate.MatchPerformative(ACLMessage.CFP);\n\t\t\t\tMessageTemplate informTemplate = MessageTemplate.MatchPerformative(ACLMessage.INFORM);\n\t\t\t\tMessageTemplate messageTemplate = MessageTemplate.or(cfpTemplate, informTemplate);\n\t\t\t\tACLMessage receivedMessage = myAgent.receive(messageTemplate);\n\t\t\t\t\n\t\t\t\tif (receivedMessage != null) {\n\t\t\t\t\thasReceivedMessage = true;\n\t\t\t\t\t\n\t\t\t\t\tif (receivedMessage.getPerformative() == ACLMessage.CFP) {\n\t\t\t\t\t\tdouble price = Double.parseDouble(receivedMessage.getContent());\n\t\t\t\t\t\tSystem.out.println(\"Buyer [\" + getAID().getLocalName() + \"] received \"\n\t\t\t\t\t\t\t\t+ \"CFP with price \" + Double.toString(price));\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Value in range; send proposal\n\t\t\t\t\t\tif (price <= priceToBuy) {\n\t\t\t\t\t\t\tACLMessage proposal = new ACLMessage(ACLMessage.PROPOSE);\n\t\t\t\t\t\t\tproposal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\tproposal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(proposal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = sendProposal;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Price too high; refuse and wait for new CFP\n\t\t\t\t\t\t\tACLMessage refusal = new ACLMessage(ACLMessage.REFUSE);\n\t\t\t\t\t\t\trefusal.addReceiver(receivedMessage.getSender());\n\t\t\t\t\t\t\trefusal.setProtocol(receivedMessage.getProtocol());\n\t\t\t\t\t\t\tmyAgent.send(refusal);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttransitionStatus = highPrice;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (receivedMessage.getPerformative() == ACLMessage.INFORM) {\n\t\t\t\t\t\ttransitionStatus = noBuyers;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"interface Action {\n void process(AbstractMessagingService serviceAction,\n Message message);\n\n }",
"@Override\r\n\t\tpublic void action() {\n\t\t\tswitch (state) {\r\n\t\t\tcase REGISTER:\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" trying to register\");\r\n\t\t\t\t\r\n\t\t\t\t// searching for waiter agent\r\n\t\t\t\twhile(waiter == null) {\r\n\t\t\t\t\twaiter = searchWaiterAgent(\"waiter-service\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tACLMessage cfp = new ACLMessage(ACLMessage.CFP);\r\n\t\t\t\tcfp.addReceiver(waiter);\r\n\t\t\t\tcfp.setContent(\"philosopher-agent\");\r\n\t\t\t\tcfp.setConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tcfp.setReplyWith(\"cfp\"+System.currentTimeMillis());\r\n\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t+ \" send registration request \" + cfp);\r\n\t\t\t\tmyAgent.send(cfp);\r\n\t\t\t\t\r\n\t\t\t\t// Prepare template to get response\r\n\t\t\t\t//mt = MessageTemplate.and(MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\"),\r\n\t\t\t\t//\t\tMessageTemplate.MatchInReplyTo(request.getReplyWith()));\r\n\t\t\t\tmt = MessageTemplate.MatchConversationId(\"philosopher-waiter-fork\");\r\n\t\t\t\tstate = State.REGISTERED;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\tcase REGISTERED:\r\n\t\t\t\tACLMessage response = myAgent.receive();\r\n\t\t\t\tif (response != null && response.getConversationId().equals(\"philosopher-waiter-fork\")) {\r\n\t\t\t\t\tif (response.getPerformative() == ACLMessage.SUBSCRIBE) {\r\n\t\t\t\t\t\t// behaviour can be finished\r\n\t\t\t\t\t\tregistered = true;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registered Successfully\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tregistered = false;\r\n\t\t\t\t\t\tSystem.out.println(\"Philosopher Agent \"\r\n\t\t\t\t\t\t\t\t+ myAgent.getAID().getName()\r\n\t\t\t\t\t\t\t\t+ \" registration in progress\");\r\n\t\t\t\t\t\tstate = State.REGISTER;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tSystem.out.println(myAgent.getAID().getName() + \" blocked\");\r\n\t\t\t\t\tblock();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}",
"private void push(GameAction action) {\n this.queue.add(action);\n }",
"@Override\n\tpublic synchronized void processCfAction(String user, CfAction action) {\n\t\tprocessNewMessage(user, action);\n\t}",
"public WaitActionConditionBuilder action(TestAction action) {\n getCondition().setAction(action);\n return this;\n }",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"State takeAction(State state);",
"public void startAction(String s_) {\n\t\tthis.startAction(incomingConnection, incomingMsg);\n\t}",
"public void action(BotInstance bot, Message message);",
"synchronized void giveInput(int input) {\n this.input = input;\n inputGiven = true;\n notifyAll();\n }",
"public void doInitialAction(){}",
"public void submit(Action<T> action) {\r\n Logger.v(this, \">> submit\");\r\n \r\n if (mReceiver != null) {\r\n Logger.v(this, \"submit, executing\");\r\n action.apply(mReceiver);\r\n } else {\r\n Logger.v(this, \"submit, cached\");\r\n mActions.add(action);\r\n }\r\n\r\n Logger.v(this, \"<< submit\");\r\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\tSystem.out.println(\"Sent\");\n\t\t\t\t\t}",
"public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }",
"public Task(String msg) {\n this.msg = msg;\n completed = false;\n }",
"public MessageResponseAction(Message message) {\n this(message, 0);\n }",
"Result<Actor<InputOutput>> self();",
"abstract public boolean timedActionPerformed(ActionEvent e);",
"public void notifyNewAction(Action action){\n\t\tnotifyObservers(action);\n\t}",
"public void action(Runnable action) {\n if (this.condition == null) {\n throw new APSValidationException( \"Cannot execute action, no condition has been provided!\" );\n }\n if (this.condition.met()) {\n runAction( action );\n }\n else {\n this.todo.add(action);\n }\n }",
"public WaitActionConditionBuilder action(TestActionBuilder<?> action) {\n getCondition().setAction(action.build());\n return this;\n }",
"ForwardMinAction createForwardMinAction();",
"LogAction createLogAction();",
"public void processMsg(Msg input) {\r\n\t\tSystem.out.println(\"INFO Received \"+input+\" in state \"+currentState);\r\n\t\tTransition trans = transition[currentState.ordinal()][input.ordinal()];\r\n\t\tif(trans != null){\r\n\t\t\tcurrentState = trans.execute(input);\r\n\t\t}\r\n\t\tSystem.out.println(\"INFO State: \"+ currentState);\r\n\t}",
"public void act() \n {\n // Add your action code here.\n tempoUp();\n }",
"@Override\n public void setNewAction(Mossa.Action action) {\n jumpMove.setDisable(false);\n Platform.runLater(() -> {\n submitAction.setDisable(true);\n\n });\n switch (action) {\n case BUILD:\n lightBuild();\n if (!inTurno) {\n lightMyPawns();\n inTurno = true;\n firstAction = true;\n } else {\n c = table.getTableCell(table.getXYPawn(getID(), currentPawn, true),\n table.getXYPawn(getID(), currentPawn, false));\n firstAction = false;\n lightAvailable(c, bt[table.getXYPawn(getID(), currentPawn, true)][table.getXYPawn(getID(), currentPawn, false)]);\n\n }\n currentMove = new Mossa();\n currentMove.setAction(action);\n\n break;\n case MOVE:\n lightMove();\n currentMove = new Mossa();\n currentMove.setAction(action);\n if (!inTurno) {\n effetto = true;\n lightMyPawns();\n inTurno = true;\n firstAction = true;\n } else {\n firstAction = false;\n c = table.getTableCell(table.getXYPawn(getID(), currentPawn, true),\n table.getXYPawn(getID(), currentPawn, false));\n lightAvailable(c, bt[table.getXYPawn(getID(), currentPawn, true)][table.getXYPawn(getID(), currentPawn, false)]);//prima era true\n\n }\n }\n }",
"public TextBotFlowTurnRequest inputEventUserInput(TextBotUserInputEvent inputEventUserInput) {\n this.inputEventUserInput = inputEventUserInput;\n return this;\n }",
"private void buffer(Runnable action) {\n actions.add(action);\n }",
"@Override\n\t\t\tpublic void action() {\n\t\t\t\tACLMessage message =receive(messageTemplate);\n\t\t\t\tif(message!=null) {\n\t\t\t\t\tSystem.out.println(\"Sender => \" + message.getSender().getName());\n\t\t\t\t\tSystem.out.println(\"Content => \" + message.getContent());\n\t\t\t\t\tSystem.out.println(\"SpeechAct => \" + ACLMessage.getPerformative(message.getPerformative()));\n\t\t\t\t\t//reply with a message\n//\t\t\t\t\tACLMessage reply = new ACLMessage(ACLMessage.CONFIRM);\n//\t\t\t\t\treply.addReceiver(message.getSender());\n//\t\t\t\t\treply.setContent(\"Price = 1000\");\n//\t\t\t\t\tsend(reply);\n\t\t\t\t\t\n\t\t\t\t\tconsumerContainer.logMessage(message);\n\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.println(\"block() ...............\");\n\t\t\t\t\tblock();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (!Window.Linksign) {\n\t\t\tif (BeganSign == 0) {\n\t\t\t\tBeganSign = 1;\n\t\t\t\taccept.append(\"已准备\\n\");\n\t\t\t\tWindow.f3listener.F3();\n\t\t\t\tbattleSend.Mistake = 0;\n\t\t\t} else {\n\t\t\t\tBeganSign = 0;\n\t\t\t\taccept.append(\"取消准备\\n\");\n\t\t\t\tsendText.setText(\"\");\n\t\t\t\tsendText.setEditable(false);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tout = new DataOutputStream(client.socket.getOutputStream());\n\t\t\t\tString message = \"%\" + BeganSign + \"%\" + sendText.getText()\n\t\t\t\t\t\t+ \"%\" + RegexText.duan1 + \"#\" + Window.wenben.getText()\n\t\t\t\t\t\t+ \"%0\" + \"%\" + Login.zhanghao.getText();\n\t\t\t\tQQZaiwenListener.wenbenstr = Window.wenben.getText();\n\t\t\t\tout.writeUTF(message);// 向服务器发送信息\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\taccept.append(\"请先加入一个房间\\n\");\n\t\t}\n\t}",
"public static EventHandler<ActionEvent> createEmptyAction()\n\t{\n\t\treturn new EventHandler<ActionEvent>()\n\t\t{\n\t\t\tpublic void handle(ActionEvent event)\n\t\t\t{\t\t\t\t\n\t\t\t\tevent.consume();\n\t\t\t}\n\t\t};\n\t}",
"public WaitMessage() {\n super(\"Wait for other player...\\n\");\n }",
"private void makeCall() {\n\t\t// send the originate action (Call)\n\t\tthis.asteriskServer.originateAsync(this.originateAction, new OriginateCallbackAdapter() {\n\t\t\t@Override\n\t\t\tpublic void onDialing(final AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.log.log(Level.INFO, \"Dialing: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t\tCall.this.state=CallState.DIALING;\n\t\t\t\tCall.this.currentChannel = asteriskChannel.getName();\n\t\t\t\t// Make sure when there was a hangup event that it is realy hung up.\n\t\t\t\tif(Call.this.hangup)\n\t\t\t\t\tCall.this.hangup();\n\t\t\t\t// Listen for cool stuff like \"ringing\"\n\t\t\t\tasteriskChannel.addPropertyChangeListener(new PropertyChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\t\t// is the phone ringing?\n\t\t\t\t\t\tif (evt.getPropertyName().equals(\"state\") && evt.getNewValue().toString().equals(\"RINGING\")) {\n\t\t\t\t\t\t\tCall.this.log.log(Level.INFO, \"Ringing: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t\t\t\t\t// Schedule hangup timeout\n\t\t\t\t\t\t\tCall.this.timeoutTimer.schedule(new TimerTask() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tif (!Call.this.success) {\n\t\t\t\t\t\t\t\t\t\tCall.this.asteriskServer.getChannelByName(Call.this.currentChannel).hangup();\n\t\t\t\t\t\t\t\t\t\t// no \"noAnswer()\" called here because a\n\t\t\t\t\t\t\t\t\t\t// onNoAnswer event will come in anyway\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}, new Long(EPursuit.properties.getProperty(\"callTime\")));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.state=CallState.RUNNING;\n\t\t\t\tCall.this.success = true;\n\t\t\t\tCall.this.log.log(Level.INFO, \"Connection successful: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNoAnswer(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.log.log(Level.INFO, \"Channel not answered: \" + Call.this.currentChannel + \" \" + Call.this.destination);\n\t\t\t\tif (asteriskChannel.getHangupCause().toString().equals(\"CALL_REJECTED\")) {\n\t\t\t\t\tCall.this.noAnswer();\n\t\t\t\t} else {\n\t\t\t\t\tCall.this.noAnswer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onBusy(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.noAnswer();\n\n\t\t\t\tCall.this.log.log(Level.INFO, \"Busy: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(LiveException cause) {\n\t\t\t\tCall.this.noAnswer();\n\n\t\t\t\tif (cause.getClass().getCanonicalName().equals(\"org.asteriskjava.live.NoSuchChannelException\")) {\n\t\t\t\t\t// Called when the channel is busy... dunno why\n\t\t\t\t\tCall.this.log.log(Level.INFO, \"Channel perhabs busy. \" + Call.this.destination);\n\t\t\t\t} else {\n\t\t\t\t\tCall.this.log.log(Level.WARNING, \"Received unknown error.\\n\" + cause + \" \" + Call.this.destination);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t}",
"public void action() {\n action.action();\n }",
"@Override\n\tpublic void action() {\n\t\tACLMessage msgRx = myAgent.receive();\n\t\tif (msgRx != null && msgRx.getPerformative() == ACLMessage.REQUEST) {\n\t\t\tContentManager contentManager = myAgent.getContentManager();\n\t\t\tSystem.out.println(\"RECEIVED = \" + msgRx.getContent());\n\t\t\tmsgRx.setLanguage(\"fipa-sl\");\n\t\t\tmsgRx.setOntology(\"blocks-ontology\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tContentElementList elementList = (ContentElementList) contentManager\n\t\t\t\t\t\t.extractContent(msgRx);\n\n\t\t\t\tIterator elementIterator = elementList.iterator();\n\n\t\t\t\twhile (elementIterator.hasNext()) {\n\t\t\t\t\tAction action = (Action) elementIterator.next();\n\t\t\t\t\t((Environment) myAgent).getWorld().getActionList().add((Executable) (action.getAction()));\n//\t\t\t\t\t((Executable) (action.getAction()))\n//\t\t\t\t\t\t\t.execute((Environment) myAgent);\n\t\t\t\t}\n\n\t\t\t} catch (UngroundedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (CodecException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (OntologyException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tblock();\n\t\t}\n\t\t\n\t}",
"private Action(){\r\n\t\tthis(-1);\r\n\t}",
"ListeningFuture<Boolean> setInput(String input);",
"public void c(String str) {\n String str2;\n long j;\n String str3;\n try {\n long currentTimeMillis = System.currentTimeMillis();\n Context a2 = d.a();\n long a3 = m.a(a2, \"action_begin\", 0);\n long a4 = m.a(a2, \"action_end\", 0);\n long a5 = m.a(a2, \"action_auto_end\", 0);\n String a6 = m.a(a2, \"action_name\", \"\");\n if (TextUtils.isEmpty(a6) || a3 <= 0 || a4 != 0) {\n str2 = \"action_name\";\n j = a3;\n str3 = \"SMV2\";\n } else {\n j.a(\"SMV2\", \"Record the last unusual PA event with auto-end.\");\n long j2 = a3;\n j = a3;\n long j3 = a5;\n str2 = \"action_name\";\n str3 = \"SMV2\";\n a(a6, j2, j3, true);\n }\n if (!b) {\n b = true;\n if (!TextUtils.isEmpty(a6) && j > 0 && a4 > 0) {\n boolean j4 = new h().j(j);\n j.a(str3, \"check the last pa event whether been inserted to db. actionBeginTs =\" + j + \" isInserted = \" + j4);\n if (!j4) {\n j.a(str3, \"Record the last unusual PA event without auto-end.\");\n a(a6, j, a4, false);\n }\n }\n }\n m.b(a2, \"action_begin\", currentTimeMillis);\n m.b(a2, \"action_end\", 0);\n m.b(a2, \"action_auto_end\", 0);\n m.b(a2, str2, str);\n try {\n this.c.sendEmptyMessageDelayed(100, 15000);\n } catch (Exception e) {\n e = e;\n }\n } catch (Exception e2) {\n e = e2;\n j.a(\"processActActivated exception: \", (Throwable) e);\n }\n }",
"public abstract void onAction();",
"@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}",
"public void doAction(Action action) {\n\t\tif (!isMyTurn) {\n\t\t\treporter.log(Level.SEVERE, \"User did action but it's not his turn\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tconnection.send(action);\n\t\t} catch (IOException e) {\n\t\t\treporter.log(Level.SEVERE, \"Can't send action\", e);\n\t\t\treturn;\n\t\t}\n\t\tif (progress instanceof ProgressRounds) {\n\t\t\tprogress = ((ProgressRounds) progress).advance();\n\t\t}\n\t\tsetMyTurn(false);\n\t\t// notifyListeners(action);\n\t}"
]
| [
"0.6135316",
"0.6039478",
"0.6039478",
"0.6039478",
"0.58711684",
"0.564407",
"0.55133927",
"0.55125755",
"0.5507013",
"0.54972506",
"0.5490514",
"0.54902583",
"0.5477362",
"0.5444155",
"0.5430481",
"0.5404792",
"0.54011077",
"0.53999716",
"0.53782696",
"0.5360334",
"0.5319373",
"0.5310126",
"0.53067756",
"0.5218921",
"0.52153516",
"0.5214429",
"0.520279",
"0.5187336",
"0.5175085",
"0.5142463",
"0.5126272",
"0.5126071",
"0.5119609",
"0.5112968",
"0.51035696",
"0.50902885",
"0.5074121",
"0.50684476",
"0.50588316",
"0.50499946",
"0.5044287",
"0.5041245",
"0.50390446",
"0.503798",
"0.5037711",
"0.50324637",
"0.5031585",
"0.50295687",
"0.5023592",
"0.49997294",
"0.49987304",
"0.49825656",
"0.4971276",
"0.49710453",
"0.49686238",
"0.4968054",
"0.49657574",
"0.49587828",
"0.4957033",
"0.49496976",
"0.49444163",
"0.4942773",
"0.49405864",
"0.49393725",
"0.49318686",
"0.4927781",
"0.49276593",
"0.49199852",
"0.49081406",
"0.49054813",
"0.49030477",
"0.49000296",
"0.48974064",
"0.48953834",
"0.48952174",
"0.48786706",
"0.48755145",
"0.48668697",
"0.48667836",
"0.48584133",
"0.4853756",
"0.48527044",
"0.48489875",
"0.48462704",
"0.4844879",
"0.48428556",
"0.484235",
"0.48254794",
"0.48252776",
"0.48216808",
"0.48196608",
"0.48173547",
"0.48160568",
"0.48116347",
"0.4808209",
"0.48072985",
"0.48042148",
"0.48025987",
"0.48007002",
"0.4799708"
]
| 0.48505047 | 82 |
variables values listeners Inverse Binding Event Handlers | public ActivityMeetingRoomBindingImpl(@Nullable androidx.databinding.DataBindingComponent bindingComponent, @NonNull View root) {
this(bindingComponent, root, mapBindings(bindingComponent, root, 15, sIncludes, sViewsWithIds));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void onVariableChanged(Object... newValue);",
"private void addBindingAndListener() {\n // When the simulation has more than one time of simulation this property change the selected element\n // of time series.\n this.changeListener = (observable, oldValue, newValue) -> {\n if (newValue instanceof Component) { // IS LINK OR NODE\n Component comp = (Component) newValue;\n idTextField.setText(comp.getId());\n }\n };\n this.selectableItem.addListener(changeListener);\n }",
"public void addListeners(){\n createBookingType.valueProperty().addListener(new ChangeListener<String>() {\n @Override public void changed(ObservableValue ov, String t, String t1) {\n createBookingFee.setText(dbH.getBookingPrice(t1).toString());\n updateFreeBays();\n } \n });\n \n //Listener for when they change start time\n createBookingTimeStart.localTimeProperty().addListener(new ChangeListener<LocalTime>() {\n @Override\n public void changed(\n ObservableValue<? extends LocalTime> observableValue,\n LocalTime oldValue, LocalTime newValue) { \n updateFreeBays(); \n }\n });\n \n //Listener for when they change end time\n createBookingTimeEnd.localTimeProperty().addListener(new ChangeListener<LocalTime>() {\n @Override\n public void changed(\n ObservableValue<? extends LocalTime> observableValue,\n LocalTime oldValue, LocalTime newValue) { \n updateFreeBays(); \n }\n });\n \n //EventHandler for when they change the date\n createBookingDate.setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent event) { \n updateFreeBays(); \n }\n });\n \n }",
"public void newValueBinding(BGMEvent e);",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}",
"private void addEventHandlers()\n {\n DepartureBox self = this;\n\n departureTimeField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (null != currentDeparture) {\n Change<Departure, String> change = new Change<>(currentDeparture, oldValue, newValue, \"departureTime\");\n self.execute(IEventListener.EVENT_CHANGE, change, \"depbox\");\n }\n });\n\n destinationField.textProperty().addListener((observable, oldValue, newValue) -> {\n if (null != currentDeparture) {\n Change<Departure, String> change = new Change<>(currentDeparture, oldValue, newValue, \"destination\");\n self.execute(IEventListener.EVENT_CHANGE, change, \"depbox\");\n }\n });\n }",
"public void variableChanged(VariableAttribute var);",
"@Override\n\tpublic void beforeVariableChanged(ProcessVariableChangedEvent arg0) {\n\n\t}",
"void addCalcValueListener(CalcValueListener l);",
"public void addListeners(){\n\n //listener for artists ComboBox\n artists.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observableValue, String s, String t1) {\n if(t1 != null){\n search.setDisable(false);\n genres.getSelectionModel().clearSelection();\n year.getSelectionModel().clearSelection();\n }\n }\n });\n\n //listener for genres ComboBox\n genres.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observableValue, String s, String t1) {\n if(t1 != null){\n search.setDisable(false);\n artists.getSelectionModel().clearSelection();\n year.getSelectionModel().clearSelection();\n }\n }\n });\n\n //listener for year ComboBox\n year.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<Integer>() {\n @Override\n public void changed(ObservableValue<? extends Integer> observableValue, Integer integer, Integer t1) {\n if(t1 != null){\n search.setDisable(false);\n artists.getSelectionModel().clearSelection();\n genres.getSelectionModel().clearSelection();\n }\n }\n });\n\n }",
"public interface AttrToVisVarChangeListener {\n\n\tpublic void valuesChanged(AttrToVisVarChangeEvent e);\n\t\n}",
"private void setUpListeners()\n {\n fromDatePicker.valueProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue.isAfter(toDate))\n {\n showAlert(\"OOOPS!\", \"\\\"Från och med\\\" kan inte vara efter \\\"till och med\\\"\", Alert.AlertType.ERROR);\n fromDatePicker.setValue(oldValue);\n fromDate = oldValue;\n return;\n }\n fromDate = newValue;\n });\n\n // Set up listener to toDateSelectedValueProperty\n toDatePicker.valueProperty().addListener((observable, oldValue, newValue) -> {\n\n if (newValue.isBefore(fromDate))\n {\n showAlert(\"OOOPS!\", \"\\\"Tilloch med\\\" kan inte vara tidigare än \\\"från och med\\\"\", Alert.AlertType.ERROR);\n toDatePicker.setValue(oldValue);\n fromDate = oldValue;\n return;\n }\n toDate = newValue;\n });\n }",
"private void addListeners() {\n\t\t\n\t\tresetButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \treset();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\ttoggleGroup.selectedToggleProperty().addListener(\n\t\t\t (ObservableValue<? extends Toggle> ov, Toggle old_toggle, \n\t\t\t Toggle new_toggle) -> {\n\t\t\t \t\n\t\t\t \tif(rbCourse.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, CourseSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbAuthor.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, AuthorSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbNone.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.setDisable(true);\n\t\t \t\t\n\t\t \t}\n\t\t\t \t\n\t\t\t});\n\t\t\n\t\tapplyButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tfilter();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\tsearchButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tResult.instance().search(quizIDField.getText());\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t}",
"private void addListeners(){\n Conservable[] listenerFromProductTypeRelation = this.productRelation.getListener();\n this.listener[0] = listenerFromProductTypeRelation[0];\n this.listener[1] = listenerFromProductTypeRelation[1];\n this.listener[2] = this.post;\n this.listener[3] = this.productRelation;\n this.listener[4] = this;\n }",
"private void bindValues(){\r\n\t\tif (contenuEquation.isDisposed())return;\r\n\t\tif(equation == null)return;\r\n\t\t//the DatabindingContext object will manage the databindings\r\n\t\t//In this first part I monitor the the equation expression and check its\r\n\t\t//conformity to the correct syntaxe of an equation.\r\n\t\tDataBindingContext ctx = new DataBindingContext();\r\n\r\n\r\n\t\tIObservableValue contenuEqnWidget = WidgetProperties.text(SWT.Modify).observe(contenuEquation);\r\n\t\tIObservableValue contenuEqnValue = BeanProperties.value(Equation.class, \"contenuEqn\").observe(equation);\r\n\r\n\t\t//Defining the update strategy\r\n\t\tUpdateValueStrategy strategy = new UpdateValueStrategy();\r\n\r\n\t\t//Defining the Update Strategy that the field validator should use, this validation is passed before the value can be set.\r\n\t\tstrategy.setBeforeSetValidator(value->{\r\n\t\t\tString eqnString = String.valueOf(value);\r\n\t\t\ttry {\r\n\t\t\t\tnew VerificationSyntaxeEquation(eqnString);\r\n\t\t\t\tExtractionParametre.listEquationParameters(eqnString);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(false);\r\n\t\t\t\tif (e instanceof ErreurDeSyntaxe){\t\t\t\t\t\t\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof EquationVide) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t\telse if (e instanceof InvalidParameter) {\r\n\t\t\t\t\tsetStatus(ValidationStatus.error(e.toString()));\r\n\t\t\t\t\treturn ValidationStatus.error(e.toString());\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\tif(!btnTerminer.isDisposed()) btnTerminer.setEnabled(true);\r\n\t\t\tsetStatus(ValidationStatus.ok());\r\n\t\t\treturn ValidationStatus.ok();\r\n\t\t});\r\n\t\t//Binding the control and the data with the update strategy to use\t\t\r\n\t\tBinding bindValue = ctx.bindValue(contenuEqnWidget, contenuEqnValue,strategy,null);\r\n\r\n\t\t//Adding some decoration to indicate to the user the validation status of\r\n\t\t//of the currently typed equation expression\r\n\t\tControlDecorationSupport.create(bindValue, SWT.TOP|SWT.RIGHT);\r\n\t\tUpdateValueStrategy convertAndUpdate = new UpdateValueStrategy();\r\n\r\n\t\tconvertAndUpdate.setBeforeSetValidator(value->{\t\t\t\t\r\n\t\t\tboolean val = (Boolean)value;\t\t\t\r\n\r\n\t\t\tif ( val) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed())\r\n\t\t\t\t\tif(getStatus().equals(ValidationStatus.ok())){\r\n\t\t\t\t\t\tparametreDeSortieCombo.setEnabled(true);\r\n\r\n\t\t\t\t\t\tparametreDeSortieCombo.setItems(makeItems.apply(equation.getListeDeParametresEqn()));\r\n\t\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\t\tparametreDeSortieCombo.update();\r\n\r\n\t\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\tif (val == false) {\r\n\t\t\t\tif(!parametreDeSortieCombo.isDisposed()){\r\n\r\n\t\t\t\t\tparametreDeSortieCombo.setEnabled(false);\r\n\t\t\t\t\tparametreDeSortieCombo.setItems(new String[]{});\r\n\t\t\t\t\tparametreDeSortieCombo.pack();\r\n\t\t\t\t\tparametreDeSortieCombo.update();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\t\t\r\n\r\n\t\tIObservableValue contrainteWidget = WidgetProperties.selection().observe(contrainteButton);\r\n\t\tIObservableValue contrainteValue = BeanProperties.value(Equation.class, \"isConstraint\").observe(equation);\r\n\t\tctx.bindValue(contrainteWidget, contrainteValue);\r\n\r\n\r\n\t\tIObservableValue orientationWidget = WidgetProperties.selection().observe(orientationButton);\r\n\t\tIObservableValue orientationValue = BeanProperties.value(Equation.class, \"isOriented\").observe(equation);\r\n\r\n\t\tctx.bindValue(orientationWidget, orientationValue, convertAndUpdate, null);\r\n\r\n\t\tIObservableValue parametreDeSortieWidget = WidgetProperties.selection().observe(parametreDeSortieCombo);\r\n\t\tIObservableValue parametreDeSortieValue = BeanProperties.value(Equation.class, \"parametreDeSortie.nomP\").observe(equation);\r\n\t\tUpdateValueStrategy updateParametreDeSortie = new UpdateValueStrategy();\r\n\r\n\t\tupdateParametreDeSortie.setAfterGetValidator(updateOutput->{\r\n\t\t\t//System.out.println(updateOutput);\r\n\t\t\tParametre parametre = equation.getParametreByName((String)updateOutput);\r\n\t\t\tif (parametre == null) {\r\n\t\t\t\treturn ValidationStatus.error(\"Parameter not found.\");\r\n\t\t\t}\r\n\t\t\ttry {\r\n\t\t\t\tparametre.setTypeP(TypeParametre.OUTPUT);\r\n\t\t\t\tparametre.setSousTypeP(SousTypeParametre.OUTPUT);\r\n\t\t\t\tequation.setParametreDeSortie(parametre);\r\n\t\t\t} catch (MainApplicationException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t//\tSystem.err.println(parametre);\r\n\t\t\treturn ValidationStatus.ok();\r\n\r\n\t\t});\r\n\t\tctx.bindValue(parametreDeSortieWidget, parametreDeSortieValue, updateParametreDeSortie, null);\r\n\r\n\t\tIObservableValue proprieteEqnWidget = WidgetProperties.text(SWT.Modify).observe(properties);\r\n\t\tIObservableValue proprieteEqnValue = BeanProperties.value(Equation.class, \"proprieteEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(proprieteEqnWidget, proprieteEqnValue);\r\n\r\n\t\tIObservableValue descEqnWidget = WidgetProperties.text(SWT.Modify).observe(description);\r\n\t\tIObservableValue descEqnEqnValue = BeanProperties.value(Equation.class, \"descEqn\").observe(equation);\r\n\r\n\t\tctx.bindValue(descEqnWidget, descEqnEqnValue);\r\n\r\n\r\n\r\n\t\t//In this second part I aim to monitor the the equation expression and check its parameter names'\r\n\t\t//conformity to the correct syntaxe of a parameter name before showing it in the combobox.\r\n\r\n\t}",
"private void createListeners() {\n btGeneralSave.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n saveGeneralData();\n }\n });\n }",
"private void setupEventListeners(){\n\t\t//Check boxes.k\n\t\tchkVisible.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setVisible(chkVisible.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkEnabled.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setEnabled(chkEnabled.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkLocked.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setLocked(chkLocked.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkRequired.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setRequired(chkRequired.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\t//Text boxes.\n\t\ttxtDefaultValue.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttxtDefaultValue.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tWindow.alert(LocaleText.get(\"invalidDefaultValueForQuestionType\"));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\t\ttxtHelpText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN)\n\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\t\ttxtBinding.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString s = txtBinding.getText();\n\n\t\t\t\ts = s.replace(\"%\", \"\");\n\t\t\t\ts = s.replace(\"(\", \"\");\n\t\t\t\ts = s.replace(\"!\", \"\");\n\t\t\t\ts = s.replace(\"&\", \"\");\n\t\t\t\t//s = s.replace(\".\", \"\"); //Looks like this is an allowed character in xml node names.\n\t\t\t\ts = s.replace(\"'\", \"\");\n\t\t\t\ts = s.replace(\"\\\"\", \"\");\n\t\t\t\ts = s.replace(\"$\", \"\");\n\t\t\t\ts = s.replace(\"#\", \"\");\n\n\t\t\t\ttxtBinding.setText(s);\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_UP){\n\t\t\t\t\tif(cbDataType.isEnabled())\n\t\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyPressHandler(new KeyPressHandler(){\n\t\t\tpublic void onKeyPress(KeyPressEvent event) {\n\t\t\t\tif(propertiesObj instanceof PageDef){\n\t\t\t\t\tif(!Character.isDigit(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(propertiesObj instanceof FormDef || propertiesObj instanceof QuestionDef){\n\t\t\t\t\tif(((TextBox) event.getSource()).getCursorPos() == 0){\n\t\t\t\t\t\tif(!isAllowedXmlNodeNameStartChar(event.getCharCode())){\n\t\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!isAllowedXmlNodeNameChar(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} //else OptionDef varname can be anything\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\t\ttxtText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_DOWN){\n\t\t\t\t\tif(txtHelpText.isEnabled())\n\t\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtDescTemplate.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\t\ttxtDescTemplate.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\n\t\ttxtCalculation.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\t\ttxtCalculation.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\n\t\t//Combo boxes\n\t\tcbDataType.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeEvent().getKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN){\n\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t}\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\ttxtHelpText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\ttxtFormKey.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t\ttxtFormKey.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t}",
"private void addListeners(final Car car){\n onDo1.addActionListener(new ActionListener(){\n // Listener definition \n @Override\n public void actionPerformed(ActionEvent e) {\n // Action performed action\n l1.setText(car.reqData()); // Call the car event and append the result to the debug\n }\n });\n // Add listener to the second event\n onDo2.addActionListener(new ActionListener(){\n // Listener definition\n @Override\n public void actionPerformed(ActionEvent e) {\n // TODO Auto-generated method stub\n l1.setText(car.dataRecieved()); // Call the car event and append the result to the debug\n }\n });\n //\n // Add listener to the second event\n onDo4.addActionListener(new ActionListener(){\n // Listener definition\n @Override\n public void actionPerformed(ActionEvent e) {\n // TODO Auto-generated method stub\n car.setCheckSum();\n }\n });\n }",
"private void initHandlers() {\n setOnAction(new EventHandler<ActionEvent>() {\n\n @Override\n public void handle(ActionEvent arg0) {\n System.out.println(\"-5\");\n parseAndFormatInput();\n }\n });\n\n focusedProperty().addListener(new ChangeListener<Boolean>() {\n\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (!newValue.booleanValue()) {\n System.out.println(\"1\");\n parseAndFormatInput();\n }\n }\n });\n\n // Set text in field if BigDecimal property is changed from outside.\n numberProperty().addListener(new ChangeListener<BigDecimal>() {\n\n @Override\n public void changed(ObservableValue<? extends BigDecimal> obserable, BigDecimal oldValue, BigDecimal newValue) {\n if (newValue.toBigInteger().signum() < 0) {\n newValue = new BigDecimal(1);\n }\n setText(nf.format(newValue));\n }\n });\n\n textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observableValue, String s, String t1) {\n try {\n int newValue = Integer.parseInt(t1);\n if (newValue < NumberSpinner.MIN) newValue = NumberSpinner.MIN;\n if (newValue > NumberSpinner.MAX+1) newValue = NumberSpinner.MAX+1;\n setText(newValue+\"\");\n } catch (NumberFormatException e) {\n setText(s);\n }\n }\n });\n }",
"private void addChangeListeners() {\n\t\troom.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tif (!hotel.getText().isEmpty() && !quality.getText().isEmpty()) {\n\t\t\t\tcalculatePrice();\n\t\t\t}\n\t\t});\n\t\thotel.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tif (!hotel.getText().isEmpty() && !quality.getText().isEmpty()) {\n\t\t\t\tcalculatePrice();\n\t\t\t}\n\t\t});\n\t\tquality.textProperty().addListener((observable, oldValue, newValue) -> {\n\t\t\tif (!hotel.getText().isEmpty() && !quality.getText().isEmpty()) {\n\t\t\t\tcalculatePrice();\n\t\t\t}\n\t\t});\n\t}",
"public void valueChanged(IntegerStorage istorage);",
"@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}",
"protected void giveValueToListeners(String value, MinMaxEvent evt) {\n for(int i = 0; i < listeners.size(); i++) {\n listeners.get(i).setValueOfNode(value, evt);\n }\n }",
"@Override\n\tpublic void valueChange(ValueChangeEvent event) {\n\t\t\n\t}",
"public interface KnobValuesChangedListener {\r\n\t\tvoid onValuesChanged(boolean knobStartChanged, boolean knobEndChanged, int knobStart, int knobEnd);\r\n\t\tvoid onMoveValuePoint(int pX, int pY, int knobStartPX, int knobEndPX, boolean isMoving);\r\n void onSliderClicked();\r\n\t}",
"private void addListeners() {\r\n updateMethod.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n enableFieldBasedOnUpdateMethod();\r\n }\r\n });\r\n cbUseLeakyLearning.addActionListener(this);\r\n cbUseLeakyLearning.setActionCommand(\"useLeakyLearning\");\r\n }",
"public void onParaDataChangeByVar(int i) {\n }",
"private void listenersInitiation() {\n ActionSelectors listener = new ActionSelectors();\n submit.addActionListener(listener);\n goBack.addActionListener(listener);\n }",
"@Override\n public void bindViewsListener() {\n seekbar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);\n }",
"public JInputPanel() {\n initComponents();\n listeners = new Vector();\n blue =txtBlue.getValue();\n green =txtGreen.getValue();\n red =txtRed.getValue();\n \n// sldRe.addActionListener(new ActionListener() {\n// public void actionPerformed(ActionEvent e) {\n// \n// }});\n \n \n }",
"private void addListener() {\n\t\tOperatorPair operators = chooseOperators(name);\n\t\t\n\t\taddActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tif (inversion.isSelected()) {\n\t\t\t\t\tmodel.setValue(operators.inversed.applyAsDouble(model.getValue()));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.setValue(operators.original.applyAsDouble(model.getValue()));\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t\tmodel.clearAll();\n\t\t\t\tpopupMessage(\"Cannot perform that operation.\");\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\tprotected void setControlListeners() {\n\t\tcheckBox.selectedProperty().addListener(new ChangeListener<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic void changed(\n\t\t\t\t\tObservableValue<? extends Boolean> observable,\n\t\t\t\t\tBoolean oldValue, Boolean newValue) {\n\t\t\t\tif (!settingsPane.isExperimentRunning()) {\n\t\t\t\t\tparameter.set(newValue);\n\t\t\t\t\tsettingsPane.revalidateParameters();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public void setListeners(){\n\t\t\n\t\tthis.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// chosen to add new patient\n\t\t\t\t\n\t\t\t\tArrayList<String> constructorInput = null;\n\t\t\t\tconstructorInput = NewPatientWindow.showInputdialog(true);\n\t\t\t\t\n\t\t\t\t// if cancel or close chosen on new patient window:\n\t\t\t\tif (constructorInput == null)\n\t\t\t\t\treturn; \n\t\t\t\t\n\t\t\t\t//else:\n\t\t\t\tBrainFreezeMain.patients.add(new Patient(\n\t\t\t\t\t\t(constructorInput.toArray( new String[constructorInput.size()]))));\n\t\t\t\tBrainFreezeMain.currentPatientIndex = BrainFreezeMain.patients.size()-1;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tLeftPanel.refreshPatientLabel(); // change to patient list, update label\n\t\t\t\tLeftPanel.refreshPatientData(); // change to patient, update data\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t}",
"private void updateListener() {\n \n if(resizeListener != null) {\n s.heightProperty().removeListener(resizeListener);\n s.widthProperty().removeListener(resizeListener);\n }\n \n resizeListener = (observable, oldValue, newValue) -> {\n listeners.forEach((r) -> r.onResize());\n };\n \n s.heightProperty().addListener(resizeListener);\n s.widthProperty().addListener(resizeListener);\n }",
"@Override\n protected void onBind() {\n registerHandler(clusterPresenter.addDataSelectionHandler(event -> {\n if (!EqualsUtil.isEquals(clusterPresenter.getSelectedEntityReference(), getEntity().getClusterRef())) {\n setDirty(true);\n }\n }));\n\n registerHandler(editExpressionPresenter.addDirtyHandler(dirty -> setDirty(true)));\n\n registerHandler(pipelinePresenter.addDataSelectionHandler(selection -> {\n if (!Objects.equals(pipelinePresenter.getSelectedEntityReference(), defaultExtractionPipeline)) {\n setDirty(true);\n defaultExtractionPipeline = pipelinePresenter.getSelectedEntityReference();\n }\n }));\n }",
"public void addListeners() {\n\t\tsave.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t//Set the window variables\r\n\t\t\t\tEnvironmentVariables.setWidth(Float.parseFloat(width.getText()));\r\n\t\t\t\tEnvironmentVariables.setHeight(Float.parseFloat(height.getText()));\r\n\t\t\t\tEnvironmentVariables.setTitle(title.getText());\r\n\t\t\t\tupdateGameWorld();\r\n\t\t\t\t//go to save function\r\n\t\t\t\tsaveGame();\r\n\t\t\t\t\r\n\t\t\t\tWindow.getFrame().setVisible(false);\r\n\t\t\t\tWindow.getFrame().dispose();\r\n\t\t\t\t\r\n\t\t\t\tHomePage.buildHomePage();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//reset to empty world\r\n\t\treset.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEnvironmentVariables.clearWorld();\r\n\t\t\t\tWindow.render();\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"void eventChanged();",
"protected void onBind()\n\t{\n\t}",
"void afterVariableChange(RuleFlowVariableChangeEvent event,\n WorkingMemory workingMemory);",
"private void addListeners() {\n table.addValueChangeListener((Property.ValueChangeListener) this);\n// selectedCustomer.comboBoxSelectCustomer.addValueChangeListener((Property.ValueChangeListener) this);\n }",
"void valueChanged(CalcModel model);",
"void valueChanged(CalcModel model);",
"public void onValueChange(final ChangeListener listener) {\n\t\tchangeListener = listener;\n\t\treturn;\n\t}",
"private void setListeners() {\n\n }",
"private void setupListeners()\n\t{\n\t\tfinal String query = \"INSERT INTO\" + \"`\" + table + \"` \" + getFields() + \"VALUES\" + getValues();\n\t\t\n\t\tqueryButton.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent click)\n\t\t\t{\n\t\t\t\tbaseController.getDataController().submitUpdateQuery(query);\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n\tpublic void valuesChanged() {\r\n\t}",
"private void initHandlers(){\n\t\tlabel.setOnMouseClicked(new EventHandler<MouseEvent>() {\n\t\t\tpublic void handle(MouseEvent e) {\n\t\t\t\tfor(TLEventLabel label : eventLabels){\n\t\t\t\t\tlabel.setSelected(false);\n\t\t\t\t}\n\t\t\t\tsetSelected(true);\n\t\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\tmodel.selectEvent(event);\n\t\t\t\t\t}\n\t\t\t\t}).start();\n\t\t\t}\n\t\t});\n\t}",
"private void setListener() {\n\t}",
"protected void fireValueChangedEvent(ValueChangedEvent event) {\n\t\tif (listeners != null) {\n\t\t\tfor (int i = 0; i < listeners.length; i++) { \n\t\t\t\tlisteners[i].valueChanged(event);\n\t\t\t}\n\t\t}\n\t}",
"private void initListeners() {\n comboBox.comboBoxListener(this::showProgramData);\n view.refreshListener(actionEvent -> scheduledUpdate());\n\n }",
"public void valueUnbound(HttpSessionBindingEvent arg0) {\n\n\t}",
"public void valueUnbound(HttpSessionBindingEvent even) {\n\t\t\n\t}",
"private void eventhandler() {\n\r\n\t}",
"SliderListener(Sampler[] samplers,Container pane,int numSampler,char parameter){\n this.samplers = samplers;\n this.pane = pane;\n this.numSampler = numSampler;\n this.parameter = parameter; \n }",
"public void setOnKnobValuesChangedListener (KnobValuesChangedListener l) {\r\n\t\tknobValuesChangedListener = l;\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n JTextField inputCell = (JTextField) e.getSource();\n String[] operands = inputCell.getText().split(\" \");\n InterpreterDesignPattern interpreter = new InterpreterDesignPattern();\n\n if (listenerF == null) {\n listenerF = new ValueViewObserverF(equationView.getValView());\n }\n\n //following line fetches current expression from the jTextField where user made changes\n ((ValueViewObserverF) listenerF).setExpression(inputCell.getText());\n\n //This line unregisters listenerF from unwanted subjects\n equationView.getValView().removeObserver(listenerF);\n\n //This line dynamically registers listenerF object in jTextFields according to cell labels in operands\n equationView.getValView().registerObserver(listenerF, operands);\n\n //Following line evaluates an expression entered by user and displays that result in value view\n equationView.getValView().getjTextField7().setText(interpreter.interpretPostfixExpression(\n equationView.getInputString(operands)));\n\n //Following line will store a state of the Equation View GUI, after the user changes an expression.\n equationView.createMemento();\n }",
"private void setupListeners() {\n\n // \"Save\" button\n Button confirmButton = (Button) findViewById(R.id.button_save_report);\n confirmButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setResult(RESULT_OK);\n saveForm();\n finish(); // eventually calls onPause() and onStop()\n }\n });\n\n // \"Cancel\" button\n Button cancelButton = (Button) findViewById(R.id.button_cancel_edit_report);\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setResult(RESULT_CANCELED);\n finish(); // eventually calls onPause() and onStop()\n }\n });\n\n TextWatcher onFormChangeListener = new TextWatcher() {\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n mFormChanged = true;\n }\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n };\n\n mValueText.addTextChangedListener(onFormChangeListener);\n }",
"public void valueChanged(ListSelectionEvent e) {\r\n\t\tObject source = e.getSource();\r\n\t\tif (source == this.gragraNames) {\r\n\t\t\tswitch (this.stepPanel.getStep()) {\r\n\t\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\t\tsetPairs();\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_FINISH:\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void onDataChanged()\n\t{\n\t\tfor (DataChangedCallbacks listener : this.dataChangedListeners)\n\t\t{\n\t\t\tlistener.onDataChanged();\n\t\t}\n\t}",
"private void createEvents() {\n\t\tbtnPushTheButton.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t\n\t\t\tprivate List<String> b;\n\n\t\n\t\t\t//@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tact = true;\n\t\t\t\t\n//\t\t\t\tb = new ArrayList<String>();\n//\t\t\t\t\n//\t\t\t\tthis.b= (List<String>) ((List<Object>) (agent.v.getData())).stream().map(item -> {\n//\t\t\t\t\treturn (String) item;\n//\t\t\t\t});\n//\t\t\t\tString c = String.join(\", \", b);\n//\t\t\t\tclassTextArea.setText(c);\n//\t\t\t\n//\t\t\t\tclassTextArea.setText(b.toString());\n//\t\t\t\t\n//\t\t\t\treturn;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t});\n\t\t\n\t}",
"void beforeVariableChange(RuleFlowVariableChangeEvent event,\n WorkingMemory workingMemory);",
"private void InitListeners() {\n craftRobot.addActionListener(e -> settler.CraftRobot());\n craftTp.addActionListener(e -> settler.CraftTeleportGate());\n placeTp.addActionListener(e -> settler.PlaceTeleporter());\n fill.addActionListener(e -> {\n if(!inventory.isSelectionEmpty()) settler.PlaceResource(inventory.getSelectedValue());\n });\n inventory.addListSelectionListener(e -> fill.setEnabled(!(inventory.isSelectionEmpty())\n && settler.GetOnAsteroid().GetResource()==null\n && settler.GetOnAsteroid().GetLayerCount()==0)\n );\n }",
"public void valueChanged(IntegerStorageChange istoragech);",
"private void updateAndAlertListener() {\n\n\t\teditText.setText(getRoundedValue(value));\n\n\t\tif (changeListener != null) {\n\t\t\tchangeListener.onValueChange(this, value);\n\t\t}\n\t}",
"public interface CalcValueListener {\n\n\t/**\n\t * Method notifies the implementing class that a value has changed.\n\t * \n\t * @param model\n\t * implementation of the CalcModel\n\t */\n\tvoid valueChanged(CalcModel model);\n}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n public void eventsChanged() {\n }",
"@Override\r\n\tprotected void setListeners() {\n\t\t\r\n\t}",
"public synchronized void addValueChangedListener(ValueChangedListener listener) {\n\t\tif (listener == null) {\n\t\t\tthrow new NullPointerException(\"Listener must not be null\"); \n\t\t}\n\t\tif (listeners == null) {\n\t\t\tlisteners = new ValueChangedListener[] { listener };\n\t\t} else {\n\t\t\tValueChangedListener[] tmp = new ValueChangedListener[listeners.length + 1];\n\t\t\tSystem.arraycopy(listeners, 0, tmp, 0, listeners.length);\n\t\t\ttmp[listeners.length] = listener;\n\t\t\tlisteners = tmp;\n\t\t}\n\t}",
"private void gListValueChanged(ListSelectionEvent e) {\n }",
"private void setListener() {\n\t\tmSlidingLayer.setOnInteractListener(this);\r\n\t\tmMsgNotifySwitch.setOnCheckedChangeListener(this);\r\n\t\tmMsgSoundSwitch.setOnCheckedChangeListener(this);\r\n\t\tmShowHeadSwitch.setOnCheckedChangeListener(this);\r\n\t\tmAccountSetting.setOnClickListener(this);\r\n\t\tmMyProfile.setOnClickListener(this);\r\n\t\tmFaceJazzEffect.setOnClickListener(this);\r\n\t\tmAcountInfo.setOnClickListener(this);\r\n\t\tmFeedBack.setOnClickListener(this);\r\n\t\tmExitAppBtn.setOnClickListener(this);\r\n\r\n\t}",
"private void addListeners()\n {\n // Enable LDAP Checkbox\n addDirtyListener( enableLdapCheckbox );\n addSelectionListener( enableLdapCheckbox, enableLdapCheckboxListener );\n\n // LDAP Port Text\n addDirtyListener( ldapPortText );\n addModifyListener( ldapPortText, ldapPortTextListener );\n\n // LDAP Address Text\n addDirtyListener( ldapAddressText );\n addModifyListener( ldapAddressText, ldapAddressTextListener );\n\n // LDAP nbThreads Text\n addDirtyListener( ldapNbThreadsText );\n addModifyListener( ldapNbThreadsText, ldapNbThreadsTextListener );\n\n // LDAP BackLogSize Text\n addDirtyListener( ldapBackLogSizeText );\n addModifyListener( ldapBackLogSizeText, ldapBackLogSizeTextListener );\n\n // Enable LDAPS Checkbox\n addDirtyListener( enableLdapsCheckbox );\n addSelectionListener( enableLdapsCheckbox, enableLdapsCheckboxListener );\n\n // LDAPS Address Text\n addDirtyListener( ldapsAddressText );\n addModifyListener( ldapsAddressText, ldapsAddressTextListener );\n\n // LDAPS Port Text\n addDirtyListener( ldapsPortText );\n addModifyListener( ldapsPortText, ldapsPortTextListener );\n\n // LDAPS nbThreads Text\n addDirtyListener( ldapsNbThreadsText );\n addModifyListener( ldapsNbThreadsText, ldapsNbThreadsTextListener );\n\n // LDAPS BackLogSize Text\n addDirtyListener( ldapsBackLogSizeText );\n addModifyListener( ldapsBackLogSizeText, ldapsBackLogSizeTextListener );\n \n // Enable wantClientAuth Checkbox\n addDirtyListener( wantClientAuthCheckbox );\n addSelectionListener( wantClientAuthCheckbox, wantClientAuthListener );\n\n // Enable needClientAuth Checkbox\n addDirtyListener( needClientAuthCheckbox );\n addSelectionListener( needClientAuthCheckbox, needClientAuthListener );\n\n // Auth Mechanisms Simple Checkbox\n addDirtyListener( authMechSimpleCheckbox );\n addSelectionListener( authMechSimpleCheckbox, authMechSimpleCheckboxListener );\n\n // Auth Mechanisms GSSAPI Checkbox\n addDirtyListener( authMechGssapiCheckbox );\n addSelectionListener( authMechGssapiCheckbox, authMechGssapiCheckboxListener );\n\n // Auth Mechanisms CRAM-MD5 Checkbox\n addDirtyListener( authMechCramMd5Checkbox );\n addSelectionListener( authMechCramMd5Checkbox, authMechCramMd5CheckboxListener );\n\n // Auth Mechanisms DIGEST-MD5 Checkbox\n addDirtyListener( authMechDigestMd5Checkbox );\n addSelectionListener( authMechDigestMd5Checkbox, authMechDigestMd5CheckboxListener );\n\n // Auth Mechanisms NTLM Checkbox\n addDirtyListener( authMechNtlmCheckbox );\n addSelectionListener( authMechNtlmCheckbox, authMechNtlmCheckboxListener );\n\n // Auth Mechanisms NTLM Text\n addDirtyListener( authMechNtlmText );\n addModifyListener( authMechNtlmText, authMechNtlmTextListener );\n\n // Auth Mechanisms GSS SPNEGO Checkbox\n addDirtyListener( authMechGssSpnegoCheckbox );\n addSelectionListener( authMechGssSpnegoCheckbox, authMechGssSpnegoCheckboxListener );\n addModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Auth Mechanisms GSS SPNEGO Text\n addDirtyListener( authMechGssSpnegoText );\n addModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Keystore File Text\n addDirtyListener( keystoreFileText );\n addModifyListener( keystoreFileText, keystoreFileTextListener );\n\n // Keystore File Browse Button\n addSelectionListener( keystoreFileBrowseButton, keystoreFileBrowseButtonSelectionListener );\n\n // Password Text\n addDirtyListener( keystorePasswordText );\n addModifyListener( keystorePasswordText, keystorePasswordTextListener );\n\n // Show Password Checkbox\n addSelectionListener( showPasswordCheckbox, showPasswordCheckboxSelectionListener );\n\n // SASL Host Text\n addDirtyListener( saslHostText );\n addModifyListener( saslHostText, saslHostTextListener );\n\n // SASL Principal Text\n addDirtyListener( saslPrincipalText );\n addModifyListener( saslPrincipalText, saslPrincipalTextListener );\n\n // SASL Seach Base Dn Text\n addDirtyListener( saslSearchBaseDnText );\n addModifyListener( saslSearchBaseDnText, saslSearchBaseDnTextListener );\n\n // SASL Realms Table Viewer\n addSelectionChangedListener( saslRealmsTableViewer, saslRealmsTableViewerSelectionChangedListener );\n addDoubleClickListener( saslRealmsTableViewer, saslRealmsTableViewerDoubleClickListener );\n addSelectionListener( editSaslRealmsButton, editSaslRealmsButtonListener );\n addSelectionListener( addSaslRealmsButton, addSaslRealmsButtonListener );\n addSelectionListener( deleteSaslRealmsButton, deleteSaslRealmsButtonListener );\n\n // Max Time Limit Text\n addDirtyListener( maxTimeLimitText );\n addModifyListener( maxTimeLimitText, maxTimeLimitTextListener );\n\n // Max Size Limit Text\n addDirtyListener( maxSizeLimitText );\n addModifyListener( maxSizeLimitText, maxSizeLimitTextListener );\n\n // Max PDU Size Text\n addDirtyListener( maxPduSizeText );\n addModifyListener( maxPduSizeText, maxPduSizeTextListener );\n\n // Enable TLS Checkbox\n addDirtyListener( enableTlsCheckbox );\n addSelectionListener( enableTlsCheckbox, enableTlsCheckboxListener );\n\n // Hashing Password Checkbox\n addDirtyListener( enableServerSidePasswordHashingCheckbox );\n addSelectionListener( enableServerSidePasswordHashingCheckbox, enableServerSidePasswordHashingCheckboxListener );\n\n // Hashing Method Combo Viewer\n addDirtyListener( hashingMethodComboViewer );\n addSelectionChangedListener( hashingMethodComboViewer, hashingMethodComboViewerListener );\n\n // Advanced SSL Cipher Suites\n ciphersSuiteTableViewer.addCheckStateListener( ciphersSuiteTableViewerListener );\n\n // Advanced SSL Enabled Protocols\n // Enable sslv3 Checkbox\n addDirtyListener( sslv3Checkbox );\n addSelectionListener( sslv3Checkbox, sslv3CheckboxListener );\n\n // Enable tlsv1 Checkbox\n addDirtyListener( tlsv1_0Checkbox );\n addSelectionListener( tlsv1_0Checkbox, tlsv1_0CheckboxListener );\n\n // Enable tlsv1.1 Checkbox\n addDirtyListener( tlsv1_1Checkbox );\n addSelectionListener( tlsv1_1Checkbox, tlsv1_1CheckboxListener );\n\n // Enable tlsv1.2 Checkbox\n addDirtyListener( tlsv1_2Checkbox );\n addSelectionListener( tlsv1_2Checkbox, tlsv1_2CheckboxListener );\n\n // Replication Pinger Sleep\n addDirtyListener( replicationPingerSleepText );\n addModifyListener( replicationPingerSleepText, replicationPingerSleepTextListener );\n\n // Disk Synchronization Delay\n addDirtyListener( diskSynchronizationDelayText );\n addModifyListener( diskSynchronizationDelayText, diskSynchronizationDelayTextListener );\n }",
"public void valueChanged(ListSelectionEvent arg0) {\n\t\t\r\n\t}",
"private void attachListeners(){\n\t\t//Add window listener\n\t\tthis.removeWindowListener(this);\n\t\tthis.addWindowListener(this); \n\n\t\tbuttonCopyToClipboard.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttry {\n\t\t\t\t\tOS.copyStringToClipboard( getMessagePlainText() );\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\tshowErrorMessage(e.getMessage());\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tsetMessage( translations.getMessageHasBeenCopied() );\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChooseDestinationDirectory.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchooseDirectoryAction();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(false);//false => real file change\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonSimulateChangeFileNames.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tchangeFileNamesAction(true);//true => only simulation of change with log\n\t\t\t\tif(DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowTextAreaHTMLInConsole();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonExample.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tsetupInitialValues();\n\t\t\t\t//if it's not debugging mode\n\t\t\t\tif(!DebuggingConfig.debuggingOn){\n\t\t\t\t\tshowPlainMessage(translations.getExampleSettingsPopup());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tbuttonClear.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\ttextArea.setText(textAreaInitialHTML);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbuttonResetToDefaults.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif( deleteSavedObject() ) {\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemovedFromFile().replace(replace, getObjectSavePath()) );\n\t\t\t\t\tsetMessage( translations.getPreviousSettingsRemoved() );\n\t\t\t\t\t//we have to delete listener, because it's gonna save settings after windowClosing, we don't want that\n\t\t\t\t\tFileOperationsFrame fileOperationsFrame = (FileOperationsFrame) getInstance();\n\t\t\t\t\tfileOperationsFrame.removeWindowListener(fileOperationsFrame);\n\t\t\t\t\tresetFields();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tshowWarningMessage( translations.getFileHasNotBeenRemoved().replace(replace, getObjectSavePath()) + BR + translations.getPreviousSettingsHasNotBeenRemoved() );\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tcomboBox.addActionListener(new ActionListener() {\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJComboBox<String> obj = (JComboBox<String>) arg0.getSource();\n\t\t\t\tselectedLanguage = AvailableLanguages.getByName( (String)obj.getSelectedItem() ) ;\n\t\t\t\tselectLanguage(selectedLanguage);\n\t\t\t\tsetComponentTexts();\n\t\t\t};\n\t\t});\t\n\t\t\n\t\t//for debug \n\t\tif(DebuggingConfig.debuggingOn){\n\t\t\tbuttonExample.doClick();\n\t\t}\n\t\t\n\t\t\n\t}",
"@Override\n\tpublic void onEvent(Event ev) throws Exception {\n\n\t\tString[] valores = new String[listTx.size()];\n\t\tfor (int i = 0; i < listTx.size(); i++) {\n\t\t\tInputElement tx = (InputElement) listTx.get(i);\n\t\t\tObject valor = tx.getRawValue();\n\t\t\tif (valor == null) {\n\t\t\t\tvalor = \"\";\n\t\t\t}\n\t\t\tvalores[i] = (valor + \"\").trim();\n\t\t}\n\t\tthis.be.setValores(valores);\n\t\tthis.be.refreshModeloGrid();\n\n\t}",
"void removeCalcValueListener(CalcValueListener l);",
"private void bind()\n\t{\n\t\tthis.eventBus.addHandler(RefreshPageEvent.TYPE, new RefreshPageEventHandler()\n\t\t{\n\n\t\t\t@Override\n\t\t\tpublic void onRefreshPage(RefreshPageEvent event)\n\t\t\t{\n\t\t\t\tdataBindAccount();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tsetAchievementButtons();\n\t\t\n\t}",
"protected void valueChanged() {\r\n \t\tint newValue = slider.getSelection();\r\n \t\tint oldValue = this.intValue;\r\n \t\tintValue = newValue;\r\n \t\tjava.beans.PropertyChangeEvent event = new java.beans.PropertyChangeEvent(\r\n \t\t\t\tthis, IPropertyEditor.VALUE, oldValue, newValue);\r\n \t\tvalueChangeListener.valueChange(event);\r\n \t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\n\tpublic void addValueChangeListener(final ValueChangeListener<T> listener) {\n\t\t\n\t}",
"public interface OnValueSelectedListener {\n public void start();\n\n public void data(long open, long close, long high, long low);\n\n public void end();\n}",
"@Override\n\tpublic void getListener(){\n\t}",
"@Override\r\npublic void valueBound(HttpSessionBindingEvent arg0) {\n\t\r\n}",
"private void sensSliderMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_sensSliderMouseReleased\n this.sens = this.sensSlider.getValue();\n this.controller.setSens(this.sens);\n this.sensPercentLabel.setText(\"\"+this.sens+\"%\");\n }",
"private void fireValueChange(boolean b) {\n \t\n\t\t\n\t}",
"private void setupBtnListeners() {\n findViewById(R.id.btnAddValue).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n buttonAddValues();\n updateUI();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n\n //Button to open blood pressure chart sets opens blood pressure chart activity\n findViewById(R.id.btnOpenBPChart).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent bpChart = new Intent(WeightActivity.this, BPChartActivity.class);\n startActivity(bpChart.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION));\n mSettingsOrBPChartOpened = true;\n }\n });\n\n //Clicking date button opens date picker and closes keyboard\n findViewById(R.id.tvDate).setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n showDatePickerDialog();\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }",
"@Override\n\tpublic void setListener() {\n\n\t}",
"private void cargaListeners() {\n\t\tbtnGuardar.addActionListener(this);\n\n\t}",
"public void valueChanged(ListSelectionEvent e)\n\t\t\t{\n\t\t\t}",
"public void valueChanged(ListSelectionEvent e) {\n\t\t\n\t}",
"public void gxlValueChanged(GXLValueModificationEvent e) {\n\t}",
"public interface TwoWayListener<DM, UMD, DMD> extends EventListener {\n\n /**\n * Called when a new derived value has been produced.\n * May have been a result of a synchronous or asynchronous derivation.\n * @param evt the associated event with more information\n */\n void derived(TwoWayEvent.Derived<DM, UMD, DMD> evt);\n\n /**\n * Called when a derived model has been invalidated.\n * @param evt the associated event with more information\n */\n void invalidated(TwoWayEvent.Invalidated<DM, UMD, DMD> evt);\n \n /**\n * Called when the derived model was changed and the underlying model recreated.\n * @param evt the associated event with more information\n */\n void recreated(TwoWayEvent.Recreated<DM, UMD, DMD> evt);\n \n /**\n * Called when changes in the underlying model were clobbered by changes to\n * the derived model.\n * @param evt the associated event with more information\n */\n void clobbered(TwoWayEvent.Clobbered<DM, UMD, DMD> evt);\n \n /**\n * Called when the reference to the derived model was garbage collected.\n * @param evt the associated event\n */\n void forgotten(TwoWayEvent.Forgotten<DM, UMD, DMD> evt);\n \n /**\n * Called when an attempted derivation failed with an exception.\n * The underlying model is thus considered to be in an inconsistent state.\n * @param evt the associated event with more information\n */\n void broken(TwoWayEvent.Broken<DM, UMD, DMD> evt);\n \n}",
"public final void updateListener() {\n\t\tswitch (state) {\n\t\tcase 0:\n\t\t\taddMouseListenerToResultList();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\taddMouseListenerToMovieDisplay();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\taddMouseListenerToPersonDisplay();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\taddMouseListenerToCompanyDisplay();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\taddMouseListenerToRandomMoviePanel();\n\t\t\tbreak;\n\t\t}\n\t}",
"private void registerBindings(){\t\t\n\t}",
"private void registerBindings(){\t\t\n\t}",
"public void valueChanged(TreeSelectionEvent e) {\n\t}",
"public void gxlAttrValueChanged(GXLAttrValueModificationEvent e) {\n\t}",
"void valueChanged(T oldValue, T newValue);"
]
| [
"0.6254753",
"0.6237819",
"0.61801654",
"0.6102441",
"0.6097688",
"0.6097688",
"0.60286963",
"0.6000724",
"0.5999918",
"0.597477",
"0.5944254",
"0.5941",
"0.5910319",
"0.5901218",
"0.58392465",
"0.5808331",
"0.5771617",
"0.57671994",
"0.5763968",
"0.57020324",
"0.5686201",
"0.56780463",
"0.5669059",
"0.5663589",
"0.5661623",
"0.5658649",
"0.56474644",
"0.5645063",
"0.56412286",
"0.56361973",
"0.56325805",
"0.5630661",
"0.557058",
"0.5565343",
"0.5552184",
"0.554961",
"0.55476475",
"0.55441594",
"0.55358577",
"0.55344206",
"0.55174327",
"0.5513544",
"0.5513544",
"0.5505165",
"0.5503957",
"0.5488752",
"0.5487195",
"0.54867595",
"0.54865766",
"0.5482377",
"0.54822695",
"0.54764026",
"0.54616743",
"0.54454756",
"0.5438889",
"0.5438524",
"0.54354656",
"0.5429158",
"0.5424685",
"0.5424197",
"0.54234403",
"0.54228127",
"0.5422754",
"0.5418853",
"0.54164416",
"0.54153687",
"0.5415048",
"0.5415048",
"0.54036295",
"0.5399621",
"0.53948325",
"0.53917795",
"0.53876585",
"0.5385114",
"0.5380689",
"0.5377728",
"0.5371052",
"0.5369528",
"0.5369362",
"0.5367508",
"0.535677",
"0.535677",
"0.5353741",
"0.53488564",
"0.53486955",
"0.534733",
"0.53425086",
"0.5327828",
"0.5327325",
"0.5324624",
"0.532462",
"0.5319798",
"0.53161997",
"0.5313095",
"0.5301211",
"0.52949953",
"0.5292181",
"0.5292181",
"0.529167",
"0.5288667",
"0.52878195"
]
| 0.0 | -1 |
TODO: this is not spec | @Test
public void testAuthenticatedCall() throws Exception {
final Callable<Void> callable = () -> {
try {
final Principal principal = whoAmIBean.getCallerPrincipal();
Assert.assertNotNull("EJB 3.1 FR 17.6.5 The container must never return a null from the getCallerPrincipal method.", principal);
Assert.assertEquals("user1", principal.getName());
} catch (RuntimeException e) {
e.printStackTrace();
Assert.fail((("EJB 3.1 FR 17.6.5 The EJB container must provide the caller?s security context information during the execution of a business method (" + (e.getMessage())) + ")"));
}
return null;
};
Util.switchIdentitySCF("user1", "password1", callable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"private void test() {\n\n\t}",
"public void testEntrySetIteratorHasProperMappings() {\n return;\r\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public int describeContents() {\n// ignore for now\n return 0;\n }",
"public void smell() {\n\t\t\n\t}",
"@Override\n protected void prot() {\n }",
"public void method_4270() {}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public int describeContents()\n {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\n public int describeContents() {\n return 0;\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Ignore //DKH\n @Test\n public void testMakePersistentRecursesThroughReferenceFields() {\n }",
"private test5() {\r\n\t\r\n\t}",
"public final void mo51373a() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public void testGetInsDyn() {\n }",
"private void kk12() {\n\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"protected MetadataUGWD() {/* intentionally empty block */}",
"private void getStatus() {\n\t\t\n\t}",
"zzafe mo29840Y() throws RemoteException;",
"private void strin() {\n\n\t}",
"abstract int pregnancy();",
"@Override\r\n public int describeContents() {\r\n return 0;\r\n }",
"private void m50366E() {\n }",
"@Override\n protected void init() {\n }",
"@Override\r\n\tpublic void init() {}",
"protected abstract Set method_1559();",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private Util() { }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void describeTo(Description arg0) {\n \n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"@Override\n public void test() {\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"public void identify() {\n\n\t}",
"@Test\n public void iterator() {\n }",
"private void init() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"public abstract void mo70713b();",
"Consumable() {\n\t}",
"@Override\n\t\t\tpublic int describeContents() {\n\t\t\t\treturn 0;\n\t\t\t}",
"@Override\n public void init() {\n\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Test\n void getMandatoryDeepSuccessors () {\n\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int describeContents() {\n\t\treturn 0;\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}"
]
| [
"0.56523424",
"0.5597048",
"0.5587474",
"0.5497658",
"0.5457998",
"0.5455501",
"0.5376528",
"0.53371453",
"0.53205144",
"0.52979654",
"0.5252555",
"0.5231196",
"0.5198868",
"0.51735383",
"0.51650214",
"0.51591635",
"0.5145093",
"0.514268",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.5113025",
"0.50956845",
"0.50796795",
"0.50781804",
"0.5073731",
"0.5067502",
"0.5067502",
"0.5067502",
"0.5067502",
"0.5067502",
"0.5067502",
"0.5063086",
"0.5055413",
"0.5052377",
"0.5048361",
"0.50441164",
"0.50406533",
"0.5015782",
"0.5012278",
"0.5007292",
"0.5001642",
"0.49867263",
"0.4986606",
"0.49843454",
"0.49770924",
"0.49749762",
"0.49727404",
"0.49612045",
"0.49574202",
"0.49574202",
"0.49559772",
"0.4945232",
"0.4940045",
"0.49390042",
"0.49368864",
"0.49360856",
"0.49327835",
"0.4932606",
"0.49291566",
"0.49291566",
"0.49285358",
"0.49193367",
"0.4918836",
"0.49136323",
"0.49068075",
"0.49050447",
"0.49016064",
"0.48968095",
"0.4894816",
"0.4894816",
"0.4894816",
"0.4894816",
"0.4894816",
"0.4893173"
]
| 0.0 | -1 |
find by product unit type length | ProductUnitTypeLength findByUnitTypeAbbr(String productUnitType); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Length getUnit() {\n return unit;\n }",
"public double getLength();",
"public void setUnit(Length units) {\n unit = units;\n }",
"public abstract void getLength(double length);",
"abstract double getLength();",
"float getLength();",
"float getLength();",
"public long getNumCodeUnits();",
"private static int getSize(int type) {\n switch (type) {\n case 0:\n return 65535;\n case 1:\n return 78513;\n case 2:\n return 101597;//getModelCount();\n case 3:\n return 3696;\n case 4:\n return 4193;\n case 5:\n return 6827;\n case 6:\n return 8487;\n case 7:\n return 645;//midiIndices.length;\n /*case 8:\n return 0;//getAnimCount();\n case 9:\n return 0;//getMapAmount();\n case 10:\n return 34026;\n case 11:\n return 3159;\n case 12:\n return 1956;*/\n }\n return 0;\n }",
"QuantityExtentType getQuantityExtent();",
"public int countByProductType(String productType);",
"Length createLength();",
"public static UnitTypes GetUnitType(Units unit)\n {\n return MethodsCommon.GetTypeFromUnit(unit);\n }",
"public abstract Unit getUnits( int dimension );",
"public Unit<Length> footSurveyUS() {return footSurveyUS;}",
"public NM getNumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }",
"MeasureType getQuantity();",
"int getStrength(Unit unit);",
"public Unit<Length> kilometre() {return kilometre;}",
"String getUnits();",
"String getUnits();",
"String getUnits();",
"public UnitTypes GetCurrentUnitType()\n {\n return MethodsCommon.GetTypeFromUnit(Unit);\n }",
"public int getOperandSize(String operand, int type) {\n\t\tint size = -1;\n\t\tif (Op.matches(type, Op.SIZEQUALI)) {\n\t\t\tif (operand.equals(\"BYTE\")) {\n\t\t\t\tsize = 1;\n\t\t\t}\n\t\t\tif (operand.equals(\"WORD\")) {\n\t\t\t\tsize = 2;\n\t\t\t}\n\t\t\tif (operand.equals(\"DWORD\")) {\n\t\t\t\tsize = 4;\n\t\t\t}\n\t\t\tif (operand.equals(\"QWORD\")) {\n\t\t\t\tsize = 8;\n\t\t\t}\n\t\t} else if (Op.matches(type, Op.REG)) {\n\t\t\tsize = dataspace.getRegisterSize(operand);\n\t\t} else if (Op.matches(type, Op.IMM)) {\n\t\t\tlong arg = Long.parseLong(operand);\n\t\t\tsize = getOperandSize(arg);\n\t\t} else if (Op.matches(type, Op.FPUREG)) {\n\t\t\tsize = 8;\n\t\t} else if (type == Op.CHARS) {\n\t\t\tsize = roundToOpSize(operand.replaceAll(\"'\", \"\").length());\n\t\t} else if (type == Op.STRING) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn size;\n\t}",
"public NM getPsl14_NumberOfItemsPerUnit() { \r\n\t\tNM retVal = this.getTypedField(14, 0);\r\n\t\treturn retVal;\r\n }",
"public int NumSubMbPart(String type){\n\t\tif(type.equals(\"P_L0_8x8\")){\n\t\t\treturn 1;\n\t\t}else if(type.equals(\"P_L0_8x4\")){\n\t\t\treturn 2;\n\t\t}else if(type.equals(\"P_L0_4x8\")){\n\t\t\treturn 2;\n\t\t}else if(type.equals(\"P_L0_4x4\")){\n\t\t\treturn 4;\n\t\t}\n\t\treturn 0;\n\t}",
"private int getType(String type) {\n\t\tint i=0;\n\t\tif(type.equals(\"rxpck\"))\n\t\t\t i=3;\n\t\telse if(type.equals(\"txpck\"))\n\t\t\t\ti=4;\n\t\telse if(type.equals(\"rxkB\"))\n\t\t\t\ti=5; \n\t\telse if(type.equals(\"txkB\"))\n\t\t\t\ti=6;\n\t\telse if(type.equals(\"rxcmp\"))\n\t\t\t\ti=7;\n\t\telse if(type.equals(\"txcmp\"))\n\t\t\t\ti=8;\n\t\telse if(type.equals(\"rxmsct\"))\n\t\t\t i=9;\n\t\treturn i;\n\t}",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"private String countFileSize(long length) {\n\n if (length < UNIT) {\n return length + \" B\";\n }\n int exp = (int) (Math.log(length) / Math.log(UNIT));\n String pre = \"KMGTPE\".charAt(exp - 1) + \"i\";\n\n return String.format(\"%.1f %sB\", length / Math.pow(UNIT, exp), pre);\n\n }",
"long getQuantite();",
"public Double getLength()\n {\n return length;\n }",
"boolean isLengthUnitsPermitted(QName eltName, QName styleName, Length.Unit units);",
"String getUnit();",
"public int cantidadCartas(int type);",
"public native int kbAreaGetNumberUnits(int areaID);",
"@Override\n\tpublic LSystemBuilder setUnitLength(double unitLength) {\n\t\tthis.unitLength = unitLength;\n\t\treturn this;\n\t}",
"private static double MdUllah(double length, double height, double width) {\n\t\treturn length*height*width;\n\t}",
"public short getUnitsPerEm() throws PDFNetException {\n/* 843 */ return GetUnitsPerEm(this.a);\n/* */ }",
"public double getLength(){\n return length;\n }",
"private Values getThicknessSizeValObj(String val,String unit){\n\t\tval = val.replaceAll(\"[^0-9.x ]\", \"\");\r\n\t\tString[] values = val.split(\"x\");\r\n\t\tValue valObj1 = null;\r\n\t\tValue valObj2 = null;\r\n\t\tValue valObj3 = null;\r\n\t\tList<Value> listOfValue = new ArrayList<>();\r\n\t\tif(values.length == ApplicationConstants.CONST_INT_VALUE_ONE){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t} else if(values.length == ApplicationConstants.CONST_INT_VALUE_TWO){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t valObj2 = getValueObj(values[1].trim(), \"Thickness\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t} else if(values.length == ApplicationConstants.CONST_INT_VALUE_THREE){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t valObj2 = getValueObj(values[1].trim(), \"Width\", unit);\r\n\t\t\t valObj3 = getValueObj(values[2].trim(), \"Thickness\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t listOfValue.add(valObj3);\r\n\t\t}\r\n\t\t Values valuesObj = new Values(); \r\n\t\t valuesObj.setValue(listOfValue);\r\n\t\t return valuesObj;\r\n\t}",
"public double getLength()\n {\n return length;\n }",
"public Unit<Length> metre() {return metre;}",
"public boolean testDimensions(EIfcnamedunit type) throws SdaiException;",
"public void findLength()\n\t{\n\t\tlength = name.length();\n\t}",
"static int size_of_cm(String passed){\n\t\treturn 3;\n\t}",
"LengthSmaller createLengthSmaller();",
"public double getLength() {\r\n return length;\r\n }",
"private int getNumberOfMachineUnits() {\r\n\t\tint machineUnitsCount = 0;\r\n\r\n\t\tfor (UnitType unitType : RepairableUnitTypes) {\r\n\t\t\tmachineUnitsCount += this.informationStorage.getCurrentGameInformation().getCurrentUnitCounts()\r\n\t\t\t\t\t.getOrDefault(unitType, 0);\r\n\t\t}\r\n\t\treturn machineUnitsCount;\r\n\t}",
"public abstract long getLength() throws VlException;",
"private void parseUnitLength(String line) throws IllegalArgumentException {\n\t\tString[] tokens = line.split(\"\\\\s+\");\n\t\tif(tokens.length != 2) {\n\t\t\tthrow new IllegalArgumentException(\"Invalid unitLength argument\");\n\t\t}\n\t\tthis.setUnitLength(Double.parseDouble(tokens[1]));\n\t}",
"public double getLength() {\n return length;\n }",
"public byte getUnits() { return units; }",
"public String getUnit();",
"LengthDistinct createLengthDistinct();",
"boolean isLengthUnitsRequired(QName eltName, QName styleName);",
"public static int getUnitType(String unitTypeName) {\n\n\tint unitType = UnitTypes.UNKNOWN;\n\n\tif(unitTypeName.equals(\"lifeForm_USSR_DIGroup6_MgGndRfl\")) {\n\t unitType = UnitTypes.LIGHT_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"lifeForm_USSR_DIGroup3_Ags17\")) {\n\t unitType = UnitTypes.LIGHT_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"lifeForm_USSR_DIGroup2_Lfk5\")) {\n\t unitType = UnitTypes.LIGHT_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_BMP2\")) {\n\t unitType = UnitTypes.MECH_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_BMP1\")) {\n\t unitType = UnitTypes.MECH_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_BTR80\")) {\n\t unitType = UnitTypes.MECH_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"US___M977_________\")) {\n\t unitType = UnitTypes.MECH_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"USSR_T72M_________\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"USSR_T80__________\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"USSR_ZSU23_4M_____\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"USSR_2S6__________\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_M1\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_M1A1\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_M1A2\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"US___M1___________\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"US___M1A1_________\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"US___M1A2_________\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"US___M35__________\")) {\n\t unitType = UnitTypes.MECH_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_SA_6_FCR\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_SA_6_TEL\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_T72M\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_T80\")) {\n\t unitType = UnitTypes.ARMOR;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_XM375S\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_XMG1S\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_XMLTS\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_XMTSS\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_ZSU23_4M\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_ZSU23_4M\")) {\n\t unitType = UnitTypes.AIR_DEFENSE_ARTILLERY;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_USSR_MIG29\")) {\n\t unitType = UnitTypes.AIR_FORCES;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_F16C\")) {\n\t unitType = UnitTypes.AIR_FORCES;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_F16D\")) {\n\t unitType = UnitTypes.AIR_FORCES;\n\t}\n\telse if(unitTypeName.equals(\"vehicle_US_A10\")) {\n\t unitType = UnitTypes.AIR_FORCES;\n\t}\n\telse if(unitTypeName.equals(\"munition_US_Maverick\")) {\n\t unitType = UnitTypes.MISSILE;\n\t}\n\telse if(unitTypeName.startsWith(\"lifeForm_\")) {\n\t unitType = UnitTypes.LIGHT_INFANTRY;\n\t}\n\telse if(unitTypeName.equals(\"unknown\")) {\n\t unitType = UnitTypes.UNKNOWN;\n\t}\n\telse {\n\t Debug.info(\"UnitTypes.getUnitType: Unknown unitTypeName=\"+unitTypeName);\n\t}\n\n\treturn unitType;\n }",
"NetVolumeMeasureType getNetVolumeMeasure();",
"public int getUnitSize() {\n\t\n\treturn 254; // A d64 block is 254 bytes (256 - pointer to the next sector).\n }",
"public void setLength(double length){this.length=length;}",
"public boolean testWidth(EIfcpixeltexture type) throws SdaiException;",
"public Units getUnitTable();",
"String getVolume_type();",
"static Unit<? extends Quantity> getProductInstance(Unit<?> left,\n Unit<?> right) {\n Element[] leftElems;\n if (left instanceof ProductUnit<?>)\n leftElems = ((ProductUnit<?>) left)._elements;\n else\n leftElems = new Element[]{new Element(left, 1, 1)};\n Element[] rightElems;\n if (right instanceof ProductUnit<?>)\n rightElems = ((ProductUnit<?>) right)._elements;\n else\n rightElems = new Element[]{new Element(right, 1, 1)};\n return getInstance(leftElems, rightElems);\n }",
"static int type_of_sub(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}",
"public long getLength();",
"public long getLength();",
"public int getUnits() {\r\n return units;\r\n }",
"public void findHighestPowerUnitAnySize() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.findHighestPowerUnitAnySize()\");\r\n\t\tfor (int i=1; i<=300; i++) {\r\n//\t\t\tcurrentGrid = new ShrinkingPowerGrid(i, 300);\r\n\t\t\tfindHighestPowerUnit(i);\r\n//\t\t\tpreviousGrids.add(currentGrid);\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}",
"public abstract long getLength();",
"public abstract long getLength();",
"public double getLength()\n\t{\n\t\treturn length;\n\t}",
"godot.wire.Wire.Vector3 getSize();",
"public abstract int getProductionOf(GoodsType goodsType);",
"BigInteger getLength();",
"private Values getOverAllSizeValObj(String val,String unit){\n\t\tString[] values = val.split(\"x\");\r\n\t\tValue valObj1 = null;\r\n\t\tValue valObj2 = null;\r\n\t\tValue valObj3 = null;\r\n\t\tList<Value> listOfValue = new ArrayList<>();\r\n\t\tif(values.length == ApplicationConstants.CONST_INT_VALUE_ONE){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t} else if(values.length == ApplicationConstants.CONST_INT_VALUE_TWO){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t valObj2 = getValueObj(values[1].trim(), \"Width\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t} else if(values.length == ApplicationConstants.CONST_INT_VALUE_THREE){\r\n\t\t\t valObj1 = getValueObj(values[0].trim(), \"Length\", unit);\r\n\t\t\t valObj2 = getValueObj(values[1].trim(), \"Width\", unit);\r\n\t\t\t valObj3 = getValueObj(values[2].trim(), \"Height\", unit);\r\n\t\t\t listOfValue.add(valObj1);\r\n\t\t listOfValue.add(valObj2);\r\n\t\t listOfValue.add(valObj3);\r\n\t\t}\r\n\t\t Values valuesObj = new Values(); \r\n\t\t valuesObj.setValue(listOfValue);\r\n\t\t return valuesObj;\r\n\t}",
"double getOrderSize();",
"int getToughness(Unit unit);",
"public double getLength() {\r\n\t\treturn length;\r\n\t}",
"public boolean compareLength(Length l1, Length l2){\n return Double.compare(l1.value*l1.unit.baseUnitConversion, l2.value*l2.unit.baseUnitConversion) == 0;\n }",
"private String get(int typeCode, long size, int precision, int scale)\n {\n Map<Long, String> map = weighted.get(typeCode);\n if (map != null && !map.isEmpty())\n {\n // iterate entries ordered by capacity to find first fit\n for (Map.Entry<Long, String> entry : map.entrySet())\n {\n if (size <= entry.getKey())\n {\n return replace(entry.getValue(), size, precision, scale);\n }\n }\n }\n return replace(getTypeName(typeCode), size, precision, scale);\n }",
"godot.wire.Wire.Vector2 getSize();",
"private String getResultUnit() {\n switch (mCalculationType) {\n case CONSUMPTION_L_100_KM:\n return \"l/100 km\";\n case CONSUMPTION_KM_L:\n return \"km/l\";\n case CONSUMPTION_MPG:\n return \"mpg\";\n default:\n return \"\";\n }\n }",
"public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}",
"Units getUnits();",
"public double getLength() {\n\t\treturn length;\n\t}",
"public long length() {\n\tint nBits;\n\tlong x, y;\n\tlong length = 7 + Math.max(minBitsS(toFixed(getTranslateX())),\n\t\t\t\t minBitsS(toFixed(getTranslateY())));\n\tif (hasScale()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getScaleX())),\n\t\t\t\t minBitsS(toFixed(getScaleY())));\n\t}\n\tif (hasRotate()) {\n\t length += 5 + Math.max(minBitsS(toFixed(getRotate1())),\n\t\t\t\t minBitsS(toFixed(getRotate2())));\n\t}\n\treturn length;\n }",
"String getUnitsString();",
"public long getPropertyVolumeMilliDbPerStep();",
"public com.redknee.util.crmapi.soap.subscriptions.xsd._2010._06.SubscriptionBundleUnitType getUnitType(){\n return localUnitType;\n }",
"int getSearchLength();",
"public int get_length();",
"private Integer findAdminUnitType(HttpServletRequest request) {\n\t\tString adminUnitIDAsString = request.getParameter(\"AdminUnitID\");\n\t\tInteger adminUnitID = Integer.parseInt(adminUnitIDAsString);\n\t\tAdminUnit au = new AdminUnitDAO().getByID(adminUnitID);\n\t\treturn au.getAdminUnitTypeID();\n\t}",
"Exp getElemSizeExp();",
"public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}",
"public int getLargeur() {\n\t\treturn DIM_CASE;\n\t}",
"public short getPrimitiveType() {\n \t\treturn unitType;\n \t}",
"static int size_of_cpe(String passed){\n\t\treturn 3;\n\t}",
"public long getPropertyVolumeSteps();",
"int getRadiusUnitsValue();",
"public SgfensPedidoProducto[] findWherePrecioUnitarioEquals(double precioUnitario) throws SgfensPedidoProductoDaoException;"
]
| [
"0.60962635",
"0.56981665",
"0.5693106",
"0.56791246",
"0.5678794",
"0.56698394",
"0.56698394",
"0.5618626",
"0.5612405",
"0.560575",
"0.5553043",
"0.55166703",
"0.54699194",
"0.54507",
"0.54336345",
"0.54058784",
"0.5382336",
"0.5365903",
"0.536467",
"0.53564805",
"0.53564805",
"0.53564805",
"0.53355414",
"0.5322356",
"0.5305956",
"0.52961797",
"0.5276229",
"0.5275765",
"0.5253285",
"0.52357304",
"0.5231804",
"0.5229156",
"0.5223383",
"0.5218249",
"0.5212185",
"0.52041006",
"0.51980394",
"0.519751",
"0.5184253",
"0.5178526",
"0.5171207",
"0.51680744",
"0.5166",
"0.5164353",
"0.5156701",
"0.5155745",
"0.5153505",
"0.5144892",
"0.5144377",
"0.51388884",
"0.51388204",
"0.51385736",
"0.51314807",
"0.5126915",
"0.5123233",
"0.51214486",
"0.5120153",
"0.51163185",
"0.511197",
"0.51107824",
"0.5101914",
"0.5094068",
"0.50896084",
"0.50871974",
"0.50858957",
"0.50858957",
"0.5084334",
"0.507318",
"0.5062639",
"0.5062639",
"0.5054931",
"0.50547034",
"0.5051978",
"0.5050813",
"0.5047575",
"0.5047216",
"0.5041916",
"0.50412756",
"0.5041263",
"0.50334823",
"0.5033398",
"0.5028701",
"0.5025756",
"0.50190556",
"0.50141704",
"0.50102913",
"0.50071925",
"0.5000949",
"0.5000457",
"0.49962083",
"0.49950564",
"0.499244",
"0.49880505",
"0.49784923",
"0.49759609",
"0.49717006",
"0.49624038",
"0.495824",
"0.49575922",
"0.49467888"
]
| 0.67123747 | 0 |
Stage an application directory with default resource limits | void stageApplicationWithDefaultResourceLimits(File stagingDir); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void stageApplicationWithRemoteResourceLimits(File stagingDir);",
"public Arguments create() throws IOException {\r\n Arguments args = new Arguments();\r\n ArrayList vmArgs = new ArrayList();\r\n \r\n // Start empty framework\r\n if (clean) {\r\n // Remove bundle directories\r\n File[] children = workDir.listFiles();\r\n for (int i=0; i<children.length; i++) {\r\n if (children[i].isDirectory() && children[i].getName().startsWith(\"bundle\")) {\r\n deleteDir(children[i]);\r\n }\r\n }\r\n }\r\n \r\n // Create system properties file\r\n File systemPropertiesFile = new File(workDir, \"system.properties\");\r\n Path path = new Path(systemPropertiesFile.getAbsolutePath());\r\n vmArgs.add(\"-Doscar.system.properties=\"+path.toString());\r\n \r\n // Set bundle cache dir\r\n writeProperty(systemPropertiesFile, PROPERTY_CACHE_DIR, new Path(workDir.getAbsolutePath()).toString(), false);\r\n \r\n // Set start level\r\n writeProperty(systemPropertiesFile, PROPERTY_STARTLEVEL, Integer.toString(startLevel), true);\r\n \r\n // System properties\r\n if (systemProperties != null) {\r\n for(Iterator i=systemProperties.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n writeProperty(systemPropertiesFile, (String) entry.getKey(), (String) entry.getValue(), true);\r\n }\r\n }\r\n\r\n // Add bundle\r\n StringBuffer autoStart = new StringBuffer(\"\");\r\n StringBuffer autoInstall = new StringBuffer(\"\");\r\n for (Iterator i=bundles.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n Integer level = (Integer) entry.getKey();\r\n \r\n // Add bundle install entries for this start level\r\n ArrayList l = (ArrayList) entry.getValue();\r\n autoStart.setLength(0);\r\n autoInstall.setLength(0);\r\n for (Iterator j = l.iterator() ; j.hasNext() ;) {\r\n BundleElement e = (BundleElement) j.next();\r\n if (e.getLaunchInfo().getMode() == BundleLaunchInfo.MODE_START) {\r\n if (autoStart.length()>0) {\r\n autoStart.append(\" \");\r\n }\r\n autoStart.append(\"file:\");\r\n autoStart.append(new Path(e.getBundle().getPath()).toString());\r\n } else {\r\n if (autoInstall.length()>0) {\r\n autoInstall.append(\" \");\r\n }\r\n autoInstall.append(\"file:\");\r\n autoInstall.append(new Path(e.getBundle().getPath()).toString());\r\n }\r\n }\r\n if (autoInstall.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_INSTALL+level, autoInstall.toString(), true);\r\n }\r\n if (autoStart.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_START+level, autoStart.toString(), true);\r\n }\r\n }\r\n \r\n args.setVMArguments((String[]) vmArgs.toArray(new String[vmArgs.size()]));\r\n return args;\r\n }",
"public void createFullScreenResources() {\r\n\t\t// Intentionally left empty\r\n\t}",
"public IStatus prepareRuntimeDirectory(IPath baseDir);",
"private void startWebApp(Handler<AsyncResult<HttpServer>> next) {\n Router router = Router.router(vertx);\n\n router.route(\"/assets/*\").handler(StaticHandler.create(\"assets\"));\n router.route(\"/api/*\").handler(BodyHandler.create());\n\n router.route(\"/\").handler(this::handleRoot);\n router.get(\"/api/timer\").handler(this::timer);\n router.post(\"/api/c\").handler(this::_create);\n router.get(\"/api/r/:id\").handler(this::_read);\n router.put(\"/api/u/:id\").handler(this::_update);\n router.delete(\"/api/d/:id\").handler(this::_delete);\n\n // Create the HTTP server and pass the \"accept\" method to the request handler.\n vertx.createHttpServer().requestHandler(router).listen(8888, next);\n }",
"abstract public void setTopResourcesDir(String path);",
"void setAppRootDirectory(String rootDir);",
"@Override\n public void start(Stage primaryStage) throws Exception {\n Rectangle2D screenBounds = Screen.getPrimary().getBounds();\n SCREEN_WIDTH = screenBounds.getWidth();\n SCREEN_HEIGHT = screenBounds.getHeight();\n // Obtain the scales\n SCREEN_WIDTH_SCALE = SCREEN_WIDTH / DEFAULT_SCREEN_WIDTH;\n SCREEN_HEIGHT_SCALE = SCREEN_HEIGHT / DEFAULT_SCREEN_HEIGHT;\n COMBINED_SCALE = (SCREEN_WIDTH_SCALE + SCREEN_HEIGHT_SCALE) / 2;\n\n // Create the stage which has set stage style transparent\n final Stage stage = new Stage(StageStyle.TRANSPARENT);\n // Create the root node of scene\n Group rootGroup = new Group();\n\n // Create scene with the width, height and color\n Scene scene = new Scene(rootGroup, SCREEN_WIDTH, SCREEN_HEIGHT, Color.TRANSPARENT);\n scene.setCursor(Cursor.NONE);\n stage.setScene(scene);\n stage.centerOnScreen();\n stage.setFullScreen(true);\n stage.show();\n\n // Press F/f to toggle full screen\n // Press Q/q to terminate the application\n rootGroup.setOnKeyPressed(keyEvent -> {\n if (keyEvent.getCode() != null) {\n switch (keyEvent.getCode()) {\n case F:\n stage.setFullScreen(!stage.isFullScreen());\n break;\n case Q:\n Platform.exit();\n System.exit(0);\n default:\n break;\n }\n }\n });\n\n // Create the background with desired size\n Rectangle dragger = new Rectangle(SCREEN_WIDTH, SCREEN_HEIGHT);\n dragger.setFill(Color.BLACK);\n // Create the UI and everything\n Building building = new Building(\n BuildingConfig.newConfig(BuildingConfig.SCENARIO_RESIDENCE_I));\n\n // Add all nodes to main root group\n rootGroup.getChildren().addAll(dragger, building);\n rootGroup.requestFocus();\n }",
"abstract Resource<Controller> setupStage(Stage stage);",
"public IStatus prepareForServingDirectly(IPath baseDir, TomcatServer server, String tomcatVersion);",
"private native void setDefaultRealmFileDirectory(String fileDir, AssetManager assets);",
"@Override\n public void start(Stage stage) throws Exception \n {\n \n FXMLLoader appMainLoader = new FXMLLoader(getClass().getResource(Resources.app_main));\n\n Parent root = (Parent)appMainLoader.load();\n root.prefHeight(600);\n root.prefWidth(1100);\n\n AppMainController appMainController = appMainLoader.getController();\n appMainController.setAppLauncher(this);\n\n// stage.initStyle(StageStyle.UNDECORATED);\n stage.setResizable(false);\n stage.setMaxHeight(600);\n stage.setMaxWidth(1000);\n\n Scene scene = new Scene(root, Color.TRANSPARENT);\n scene.getStylesheets().add(Resources.app_css);\n \n stage.setTitle(\"Hims-Lab Equipment Interface\");\n stage.setScene(scene);\n stage.show();\n //init();\n }",
"public void executelaunchDirectoryFiler() {\n \t\tif (conf.getProperty(\"rootDirectory\") == null)\n \t\t\tUtil.fatalError(\"You must provide a root directory for the filer with -r or --rootDirectory\");\n \t\tif (conf.getProperty(\"secret\") == null)\n \t\t\tUtil.fatalError(\"You must provide a shared secret to protect the server with -s or --secret\");\n \t\t\n \t\tfinal DirectoryFilerServer serv;\n \t\ttry {\n \t\t\tserv = new DirectoryFilerServer(conf.getProperty(\"rootDirectory\"),\n \t\t\t\tconf.getInteger(\"port\", 4263),\n \t\t\t\tconf.getProperty(\"secret\"));\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\tUtil.fatalError(\"failed to load configuration\", e1);\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tRuntime.getRuntime().addShutdownHook(new Thread(new Runnable(){\n \t\t\tpublic void run() {\n \t\t\t\tserv.close();\n \t\t\t}\n \t\t}));\n \t\t\n \t\tserv.launchServer();\n \t}",
"abstract public void setRingResourcesDir(String path);",
"public void expendLimitedResource(String resourceName){\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\t\tParent root = FXMLLoader.load(getClass().getResource(\"Application.fxml\"));\n\t\t\tScene scene = new Scene(root);\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n\t\t\tImage icon = new Image(getClass().getResourceAsStream(\"/resources/icon.png\"));\n\t\t\tprimaryStage.getIcons().add(icon);\n\t\t\t\n\t\t\tprimaryStage.setTitle(\"Billing Manager\");\n\t\t\tprimaryStage.setMaximized(true);\n\t\t\t//primaryStage.setFullScreen(true);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\t\t\n\t}",
"@TaskAction\n public void configureFromResources() {\n // set icon file as input for supplyIcon task\n File icon = helperTask.getIcon().getResolve().get();\n helperTask.getIcon().setIcon(nullifyIfNotExists(icon));\n\n // todo implement \"should we even try to produce a splash?\"\n\n // look at the headerType first.\n // ACTUALLY, we don't care. We would assume that the user put a splash\n // in the directory, so that's what they want. If they don't want to use a splash\n // they can disable the splash task.\n\n // set splash file as input for supplySplash task\n // if splash file is present change header type to gui if it is not already set.\n File splash = helperTask.getSplash().getResolve().get();\n helperTask.getSplash().setSplash(nullifyIfNotExists(splash));\n\n // todo update the launch4jTask with a \"gui\" headerType.\n // if we actually produced a splash, that is...\n\n File manifest = helperTask.getManifest().getResolve().get();\n helperTask.getManifest().setManifest(nullifyIfNotExists(manifest));\n }",
"private void stageSelfContainedJar(InputStream stream, ApplicationDescription desc)\n throws IOException {\n // First extract the bundle coordinates\n String coords = getSelfContainedBundleCoordinates(desc);\n if (coords == null) {\n return;\n }\n\n // Split the coordinates into segments and build the file name.\n String[] f = coords.substring(4).split(\"/\");\n String base = \"m2/\" + f[0].replace('.', '/') + \"/\" + f[1] + \"/\" + f[2] + \"/\" + f[1] + \"-\" + f[2];\n String jarName = base + (f.length < 4 ? \"\" : \"-\" + f[3]) + \".jar\";\n String featuresName = base + \"-features.xml\";\n\n // Create the file directory structure and copy the file there.\n File jar = appFile(desc.name(), jarName);\n boolean ok = jar.getParentFile().exists() || jar.getParentFile().mkdirs();\n if (ok) {\n Files.write(toByteArray(stream), jar);\n Files.copy(appFile(desc.name(), FEATURES_XML), appFile(desc.name(), featuresName));\n if (!appFile(desc.name(), FEATURES_XML).delete()) {\n log.warn(\"Unable to delete self-contained application {} features.xml\", desc.name());\n }\n } else {\n throw new IOException(\"Unable to save self-contained application \" + desc.name());\n }\n }",
"private void initialDeploy() {\n }",
"public static void main(String argv[]) {\n\n VertxOptions options = new VertxOptions().setBlockedThreadCheckInterval(200000000);\n options.setClustered(true);\n\n Vertx.clusteredVertx(options, res -> {\n if (res.succeeded()) {\n Vertx vertx = res.result();\n final JsonObject js = new JsonObject();\n vertx.fileSystem().readFile(\"app-conf.json\", result -> {\n if (result.succeeded()) {\n Buffer buff = result.result();\n js.mergeIn(new JsonObject(buff.toString()));\n initConfig(js);\n DeploymentOptions deploymentOptions = new DeploymentOptions().setConfig(js).setMaxWorkerExecuteTime(5000).setWorker(true).setWorkerPoolSize(5);\n vertx.deployVerticle(SparkVerticle.class.getName(), deploymentOptions);\n } else {\n System.err.println(\"Oh oh ...\" + result.cause());\n }\n });\n\n }\n });\n }",
"public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}",
"public void createStage(String name, int maxViewers) throws FileNotFoundException, IOException, ClassNotFoundException {\r\n\t\tgetOldFile();\r\n\t\tboolean stageTest = false;\r\n\t\tfor (int i = 0; i <stages.size();i++){\r\n\t\t\tif (name.equals(stages.get(i).getName())){\r\n\t\t\t\tstageTest = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (stageTest == true){\r\n\t\t\tmain.dubStage();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t stages.add(new Stage(name, maxViewers));\r\n\t\t\t\t\tmain.noDubStage();\r\n\t\t\t\t}\r\n\t\tupdate();\r\n\t}",
"@Override\n public void scan() throws Exception {\n if (getContexts() == null) {\n throw new IllegalArgumentException(\"No HandlerContainer\");\n }\n\n Resource r = Resource.newResource(getWebAppDir());\n if (!r.exists()) {\n throw new IllegalArgumentException(\"No such webapps resource \" + r);\n }\n\n if (!r.isDirectory()) {\n throw new IllegalArgumentException(\"Not directory webapps resource \" + r);\n }\n\n String[] files = r.list();\n\n files:\n for (int f = 0; (files != null) && (f < files.length); f++) {\n String context = files[f];\n\n if (context.equalsIgnoreCase(\"CVS/\") || context.equalsIgnoreCase(\"CVS\") || context.startsWith(\".\")) {\n continue;\n }\n\n Resource app = r.addPath(r.encode(context));\n\n if (context.toLowerCase().endsWith(\".war\") || context.toLowerCase().endsWith(\".jar\")) {\n context = context.substring(0, context.length() - 4);\n Resource unpacked = r.addPath(context);\n\n if ((unpacked != null) && unpacked.exists() && unpacked.isDirectory()) {\n Log.debug(context + \" already exists.\");\n continue;\n }\n } else if (!app.isDirectory()) {\n Log.debug(app + \" Not directory\");\n continue;\n }\n\n if (context.equalsIgnoreCase(\"root\") || context.equalsIgnoreCase(\"root/\")) {\n context = URIUtil.SLASH;\n } else {\n context = \"/\" + context;\n }\n if (context.endsWith(\"/\") && (context.length() > 0)) {\n context = context.substring(0, context.length() - 1);\n }\n\n // Check the context path has not already been added or the webapp\n // itself is not already deployed\n if (!getAllowDuplicates()) {\n Handler[] installed = getContexts().getChildHandlersByClass(ContextHandler.class);\n for (int i = 0; i < installed.length; i++) {\n ContextHandler c = (ContextHandler) installed[i];\n\n if (context.equals(c.getContextPath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(context + \" Context were equal; duplicate!\");\n }\n continue files;\n }\n\n String path;\n if (c instanceof WebAppContext) {\n path = Resource.newResource(((WebAppContext) c).getWar()).getFile().getAbsolutePath();\n } else {\n path = c.getBaseResource().getFile().getAbsolutePath();\n }\n\n if ((path != null) && path.equals(app.getFile().getAbsolutePath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(path + \" Paths were equal; duplicate!\");\n }\n continue files;\n }\n\n }\n }\n\n // create a webapp\n WebAppContext wah = null;\n HandlerCollection contexts = getContexts();\n if ((contexts instanceof ContextHandlerCollection)\n && WebAppContext.class.isAssignableFrom(((ContextHandlerCollection) contexts).getContextClass())) {\n try {\n wah = (WebAppContext) ((ContextHandlerCollection) contexts).getContextClass().newInstance();\n } catch (Exception e) {\n throw new Error(e);\n }\n } else {\n wah = new WebAppContext();\n }\n\n // configure it\n wah.setContextPath(context);\n\n if (getConfigurationClasses() != null) {\n wah.setConfigurationClasses(getConfigurationClasses());\n }\n\n if (getDefaultsDescriptor() != null) {\n wah.setDefaultsDescriptor(getDefaultsDescriptor());\n }\n wah.setExtractWAR(isExtract());\n wah.setWar(app.toString());\n wah.setParentLoaderPriority(isParentLoaderPriority());\n\n Enumeration<?> names = _attributes.getAttributeNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n wah.setAttribute(name, _attributes.getAttribute(name));\n }\n\n // add it\n Log.debug(\"AndroidWebAppDeployer: prepared \" + app.toString());\n contexts.addHandler(wah);\n _deployed.add(wah);\n //jetty-7.3.0 onwards need to start explicitly due to different startup time ordering\n wah.start();\n }\n }",
"@Override\n\tpublic void start(Stage primaryStage) throws IOException{\n\t\tstage = new Stage();\n\n\t\tstage.setScene(ClientEntranceController.getEntranceScene());\n\t\tstage.setTitle(\"Archive\");\n\t\tstage.show();\n\t\t\n\t\t\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent we) {\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t}",
"public void PreAppConfig(Double InputVersion) \n { \n File_Manager Config = new File_Manager(); \n Version = Config.GetVersion(); \n System.out.println(\"Version = \" + Version);\n if (Version != InputVersion)\n {\n System.out.println(\"ERROR: Version Mismatch!\"); \n }\n ServerCount = Config.GetServerCount();\n \n System.out.println(\"Server Count = \" + ServerCount); \n ServerPaths= Config.GetServerPaths(ServerCount);\n \n for (int i = 0; i <= ServerCount - 1 ; i++){ \n System.out.println(\"ServerPath for \" + i + \" = \" + ServerPaths[i]); \n } \n \n if (!Files.isDirectory(Paths.get(\"ServerFiles\"))) \n {\n Config.createFolder(\"ServerFiles\");\n \n } else System.out.println(\"Server Directory Found!\"); \n System.out.println(\"App Initialised: Running.. \\n ________________________________ \\n\" );\n }",
"public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }",
"abstract public String getRingResourcesDir();",
"abstract public String getTopResourcesDir();",
"public void start(Stage mainStage) throws IOException { \r\n\r\n\t}",
"public static void setup(String[] args) {\n\t\tif (parametersContains(\"classpath\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.CLASSPATH;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \"./src/main/resources/\";\r\n\t\t} else if (parametersContains(\"currentDir\", args)) {\r\n\t\t\tRESOURCE_TYPE = RessourceType.INSTALL_DIR;\r\n\t\t\tCobra2DEngine.setupEnvironment(RESOURCE_TYPE);\r\n\t\t\tROOT_PATH_STR = \".\";\r\n\t\t} else {\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"Start this runtime environment with option -classpath to load all resources from your classpath or with -currentDir to load all resources from current directory ./game-resources/.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\r\n\t\tROOT_PATH = new File(ROOT_PATH_STR);\r\n\t\tRESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR);\r\n\t\tIMAGE_RESOURCE_PATH = new File(ROOT_PATH_STR + File.separator\r\n\t\t\t\t+ RESOURCE_PATH_STR + File.separator + IMAGE_FOLDER_STR);\r\n\r\n\t\tlog.info(\"Setting up path settings for runtime.\");\r\n\t\tlog.info(\"Resource loading strategy : \" + RESOURCE_TYPE);\r\n\t\tlog.info(\"Root path (path): \" + ROOT_PATH.getPath());\r\n\t\tlog.info(\"Root path (absolute): \"\r\n\t\t\t\t+ ROOT_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Resource path (path): \" + RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Resource path (absolute): \"\r\n\t\t\t\t+ RESOURCE_PATH.getAbsolutePath());\r\n\t\tlog.info(\"Image resource path (path): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getPath());\r\n\t\tlog.info(\"Image resource path (absolute): \"\r\n\t\t\t\t+ IMAGE_RESOURCE_PATH.getAbsolutePath());\r\n\t}",
"public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}",
"@Override\n\tpublic void start( Stage stage ) throws Exception {\n\t\tpstage= stage;\n\t\tif( _SysConfig.maxWindowOnStart() ){\n\t\t\tstage.setMaximized( true );\n\t\t}else{\n\t\t\tstage.setWidth( currentBoard.getDim().getX() );\n\t\t\tstage.setHeight( currentBoard.getDim().getY() );\n\t\t}\n\t\t//\n\t\tstage.setScene( currentBoard.refreshRoot() );\n\t\tswitchWallPaperMode();\n\t\tstage.show();\n\t\tcurrentBoard.setWindowSizeChange();\n\t\t//\n\t\tstage.getIcons().add( new Image( \"file:\" + _SysConfig.getSysFolderName() +\n\t\t\t\tFile.separatorChar + \"icon.png\" ) );\n\t\tstage.setOnCloseRequest( new EventHandler <WindowEvent>() {\n\t\t\tpublic void handle( WindowEvent we ) {\n\t\t\t\tp.p( \"System closing\" );\n\t\t\t\tcloseApp();\n\t\t\t\tSystem.exit( 0 );\n\t\t\t}\n\t\t} );\n\t\t//\n\t\tstage.widthProperty().addListener( ( obs, oldVal, newVal ) -> {\n\t\t\tcurrentBoard.setWindowSizeChange();\n\t\t} );\n\t\tstage.heightProperty().addListener( ( obs, oldVal, newVal ) -> {\n\t\t\tcurrentBoard.setWindowSizeChange();\n\t\t} );\n\t\tstage.xProperty().addListener( ( obs, oldVal, newVal ) -> {\n\t\t\tif( wallpaperMode )\n\t\t\t\tstage.setX( 0.0 );\n\t\t} );\n\t\tstage.yProperty().addListener( ( obs, oldVal, newVal ) -> {\n\t\t\tif( wallpaperMode )\n\t\t\t\tstage.setY( 0.0 );\n\t\t} );\n\t\tstage.setFullScreenExitHint( \"\" );\n\t}",
"Rack.DefinitionStages.Blank define(String name);",
"@Override\n protected void createRootDir() {\n }",
"@Override\n\tpublic void start(Stage stage){\n\t\ttry{\n\t\t\tstage.initStyle(StageStyle.UNIFIED);\n\t\t\tloader=new FXMLLoader(getClass().getResource(\"Main.fxml\"));\n\t\t\tParent root=loader.load();\n\t\t\tScene scene=new Scene(root);\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t\tstage.setTitle(\"Easy file share\");\n\t\t\tstage.setResizable(false);\n\t\t\tstage.setOnCloseRequest(event->shutdown());\n\n\t\t\ttry{\n\t\t\t\tImage icon=new Image(\"0.png\");\n\t\t\t\tstage.getIcons().add(icon);\n\t\t\t}catch (Exception e) {\n\t\t\t\t\n\t\t\t}\n\n\n\t\t}catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"public IStatus prepareDeployDirectory(IPath deployPath);",
"@RequestMapping(value=\"/releaseAppResources\", method = RequestMethod.GET)\n\tpublic void releaseAppResources() {\n\t}",
"@Override\r\n public void start(Stage stage) {\r\n primaryStage = stage;\r\n\r\n Image image = new Image(icon);\r\n ImageView imageView = new ImageView(image);\r\n\r\n VBox rootLayout = new VBox();\r\n rootLayout.setSpacing(15.0);\r\n rootLayout.setAlignment(Pos.CENTER);\r\n rootLayout.getChildren().add(imageView);\r\n rootLayout.getStyleClass().setAll(\"splash-screen\");\r\n\r\n Scene scene = new Scene(rootLayout, width, height);\r\n scene.getStylesheets().add(Application.styleSheet);\r\n\r\n stage.setResizable(false);\r\n stage.setScene(scene);\r\n stage.initStyle(StageStyle.UNDECORATED);\r\n stage.show();\r\n\r\n centerWindowOnScreen();\r\n }",
"public void copyAssets(View view) {\n log(\"copy assets to fon\");\n try {\n String [] list = getApplicationContext().getAssets().list(\"\");\n if (list.length > 0) {\n for (String file : list) {\n copyAssetFile(file, getApplicationContext());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n log(\"copy finished\");\n log(\"deploy assets start\");\n executeCommand(\"deploy.sh\");\n log(\"deploy assets finished\");\n }",
"SiteWriterTemplate startBunch() throws Exception;",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"Splash.fxml\"));\r\n\t\t//Scene scene = new Scene(root,1200,800);\r\n\t\tScene scene = new Scene(root,800,400);\r\n\t\t\r\n\t\tprimaryStage.setResizable(false);\r\n\t\tprimaryStage.setScene(scene);\r\n\t\tprimaryStage.initStyle(StageStyle.UNDECORATED);\t\r\n\t\tprimaryStage.show();\r\n\t}",
"default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }",
"public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }",
"public CreateUAV(){\n createStage = new Stage();\n createStage.setTitle(\"UAV Setup\");\n createStage.initModality(Modality.APPLICATION_MODAL);\n setupOverwriteDialog();\n }",
"public static void initialize() {\n // check to see if the name of an alternate configuration\n // file has been specified. This can be done, for example,\n // java -Dfilesys.conf=myfile.txt program-name parameter ...\n String propertyFileName = System.getProperty(\"filesys.conf\");\n if (propertyFileName == null)\n propertyFileName = \"filesys.conf\";\n Properties properties = new Properties();\n try {\n FileInputStream in = new FileInputStream(propertyFileName);\n properties.load(in);\n in.close();\n } catch (FileNotFoundException e) {\n System.err.println(PROGRAM_NAME + \": error opening properties file\");\n System.exit(EXIT_FAILURE);\n } catch (IOException e) {\n System.err.println(PROGRAM_NAME + \": error reading properties file\");\n System.exit(EXIT_FAILURE);\n }\n\n // get the root file system properties\n String rootFileSystemFilename =\n properties.getProperty(\"filesystem.root.filename\", \"filesys.dat\");\n String rootFileSystemMode =\n properties.getProperty(\"filesystem.root.mode\", \"rw\");\n\n // get the current process properties\n short uid = 1;\n try {\n uid = Short.parseShort(properties.getProperty(\"process.uid\", \"1\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.uid in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n short gid = 1;\n try {\n gid = Short.parseShort(properties.getProperty(\"process.gid\", \"1\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.gid in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n short umask = 0002;\n try {\n umask = Short.parseShort(\n properties.getProperty(\"process.umask\", \"002\"), 8);\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.umask in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n String dir = \"/root\";\n dir = properties.getProperty(\"process.dir\", \"/root\");\n\n try {\n MAX_OPEN_FILES = Integer.parseInt(properties.getProperty(\n \"kernel.max_open_files\", \"20\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property kernel.max_open_files in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n try {\n ProcessContext.MAX_OPEN_FILES = Integer.parseInt(\n properties.getProperty(\"process.max_open_files\", \"10\"));\n } catch (NumberFormatException e) {\n System.err.println(PROGRAM_NAME +\n \": invalid number for property process.max_open_files in configuration file\");\n System.exit(EXIT_FAILURE);\n }\n\n // create open file array\n openFiles = new FileDescriptor[MAX_OPEN_FILES];\n\n // create the first process\n process = new ProcessContext(uid, gid, dir, umask);\n processCount++;\n\n // open the root file system\n try {\n openFileSystems[ROOT_FILE_SYSTEM] = new FileSystem(\n rootFileSystemFilename, rootFileSystemMode);\n } catch (IOException e) {\n System.err.println(PROGRAM_NAME + \": unable to open root file system\");\n System.exit(EXIT_FAILURE);\n }\n\n }",
"public static void main(String[] args){\n File f = new File(System.getProperty(\"user.dir\"));\n if(os){\n path = f.toString()+\"\\\\YuuTubevideos\";\n }else{\n path = f.toString()+\"/YuuTubevideos\";\n }\n start_page();\n }",
"VirtualDirectory getRootContents();",
"private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }",
"private void setupStage(Scene scene) {\n SystemTray.create(primaryStage, shutDownHandler);\n\n primaryStage.setOnCloseRequest(event -> {\n event.consume();\n stop();\n });\n\n\n // configure the primary stage\n primaryStage.setTitle(bisqEnvironment.getRequiredProperty(AppOptionKeys.APP_NAME_KEY));\n primaryStage.setScene(scene);\n primaryStage.setMinWidth(1020);\n primaryStage.setMinHeight(620);\n\n // on windows the title icon is also used as task bar icon in a larger size\n // on Linux no title icon is supported but also a large task bar icon is derived from that title icon\n String iconPath;\n if (Utilities.isOSX())\n iconPath = ImageUtil.isRetina() ? \"/images/[email protected]\" : \"/images/window_icon.png\";\n else if (Utilities.isWindows())\n iconPath = \"/images/task_bar_icon_windows.png\";\n else\n iconPath = \"/images/task_bar_icon_linux.png\";\n\n primaryStage.getIcons().add(new Image(getClass().getResourceAsStream(iconPath)));\n\n // make the UI visible\n primaryStage.show();\n }",
"void launchAsMaster();",
"@Override\r\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tthis.stage = primaryStage;\r\n\t\tprimaryStage.setResizable(false);\r\n\t\tthis.stage.setTitle(\"Forza 4\");\r\n\t\t\r\n\t\tstartWindow();\r\n\t\thomeStage();\r\n\t\t\r\n\t}",
"public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private static void deployStaticHEResources(String targetDir, boolean bootstrappingEnabled) throws URISyntaxException, IOException{\r\n \t\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURI jniInterfaceFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_FILE_NAME).toURI();\r\n\t\tURI jniInterfaceHeaderFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_HEADER_FILE_NAME).toURI();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFile origJniInterfaceFile = new File(jniInterfaceFilePath);\r\n\t\tFile newJniInterfaceFile = new File(targetDir + origJniInterfaceFile.getName());\r\n\t\t\r\n\t\tFile origJniInterfaceHeaderFile = new File(jniInterfaceHeaderFilePath);\r\n\t\tFile newJniInterfaceHeaderFile = new File(targetDir + origJniInterfaceHeaderFile.getName());\r\n\t\t\t\t\t\t\r\n\t\t \t\t\r\n\t\tUtils.deployStaticResource(origJniInterfaceFile, newJniInterfaceFile);\r\n\t\tUtils.deployStaticResource(origJniInterfaceHeaderFile, newJniInterfaceHeaderFile);\r\n }",
"public SystemPackagingTask() {\n super();\n exten = new SystemPackagingExtension();\n parentExten = getProject().getExtensions().findByType(ProjectPackagingExtension.class);\n\n if (parentExten != null) {\n getRootSpec().with(parentExten.getDelegateCopySpec());\n }\n }",
"@Override\n protected void doFullTaskAction() throws IOException {\n File srcOut = getSourceOutputDir();\n if (srcOut != null) {\n FileUtils.cleanOutputDir(srcOut);\n }\n\n @Nullable\n File resOutBaseNameFile = getPackageOutputFile();\n\n // If are in instant run mode and we have an instant run enabled manifest\n File instantRunManifest = getInstantRunManifestFile();\n File manifestFileToPackage = instantRunBuildContext.isInInstantRunMode() &&\n instantRunManifest != null && instantRunManifest.exists()\n ? instantRunManifest\n : getManifestFile();\n\n AndroidBuilder builder = getBuilder();\n MergingLog mergingLog = new MergingLog(getMergeBlameLogFolder());\n ProcessOutputHandler processOutputHandler = new ParsingProcessOutputHandler(\n new ToolOutputParser(new AaptOutputParser(), getILogger()),\n new MergingLogRewriter(mergingLog, builder.getErrorReporter()));\n\n String preferredDensity =\n getResourceConfigs().isEmpty()\n ? getPreferredDensity()\n : null; /* when resConfigs are set, we should respect it */\n try {\n Aapt aapt = AaptGradleFactory.make(\n getBuilder(),\n processOutputHandler,\n true,\n variantScope.getGlobalScope().getProject(),\n variantScope.getVariantConfiguration().getType(),\n FileUtils.mkdirs(new File(getIncrementalFolder(), \"aapt-temp\")),\n aaptOptions.getCruncherProcesses());\n\n AaptPackageConfig.Builder config =\n new AaptPackageConfig.Builder()\n .setManifestFile(manifestFileToPackage)\n .setOptions(getAaptOptions())\n .setResourceDir(getResDir())\n .setLibraries(getAndroidDependencies())\n .setCustomPackageForR(getPackageForR())\n .setSymbolOutputDir(getTextSymbolOutputDir())\n .setSourceOutputDir(srcOut)\n .setResourceOutputApk(resOutBaseNameFile)\n .setProguardOutputFile(getProguardOutputFile())\n .setMainDexListProguardOutputFile(getMainDexListProguardOutputFile())\n .setVariantType(getType())\n .setDebuggable(getDebuggable())\n .setPseudoLocalize(getPseudoLocalesEnabled())\n .setResourceConfigs(getResourceConfigs())\n .setSplits(getSplits())\n .setPreferredDensity(preferredDensity)\n .setBaseFeature(getBaseFeature())\n .setPreviousFeatures(getPreviousFeatures());\n\n builder.processResources(aapt, config, getEnforceUniquePackageName());\n\n if (resOutBaseNameFile != null && LOG.isInfoEnabled()) {\n LOG.info(\"Aapt output file {}\", resOutBaseNameFile.getAbsolutePath());\n }\n\n } catch (IOException | InterruptedException | ProcessException e) {\n throw new RuntimeException(e);\n }\n }",
"@Bean\n\tCommandLineRunner init()throws IOException{\n\t\treturn (args)->{\n\t\t\tFileSystemUtils.deleteRecursively(new File(UPLOAD_ROOT));\n\t\t\tFiles.createDirectory(Paths.get(UPLOAD_ROOT));\n\t\t\tFileCopyUtils.copy(\"test-file-1\", new FileWriter(UPLOAD_ROOT+\"/image-1.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-2\", new FileWriter(UPLOAD_ROOT+\"/image-2.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-3\", new FileWriter(UPLOAD_ROOT+\"/image-3.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-4\", new FileWriter(UPLOAD_ROOT+\"/image-4.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-5\", new FileWriter(UPLOAD_ROOT+\"/image-5.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-6\", new FileWriter(UPLOAD_ROOT+\"/image-6.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-6\", new FileWriter(UPLOAD_ROOT+\"/image-7.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-6\", new FileWriter(UPLOAD_ROOT+\"/image-8.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-6\", new FileWriter(UPLOAD_ROOT+\"/image-9.png\"));\n\t\t\tFileCopyUtils.copy(\"test-file-6\", new FileWriter(UPLOAD_ROOT+\"/image-10.png\"));\n\t\t};\n\t}",
"public void launch(String stage) {\n\t\tnew JFXPanel();\n\t\tresult = new FutureTask(new Callable(){\n \n @Override\n public Object call() throws Exception {\n StagedProduction prod=(StagedProduction)Class.forName(stage).getConstructor().newInstance();\n return (prod.produce());\n }\n \n \n });\n Platform.runLater(result);\n\t}",
"private void changeDirectory()\n {\n directory = SlideshowManager.getDirectory(this); //use SlideshowManager to select a directory\n\n if (directory != null) //if a valid directory was selected...\n {\n JFrame loading = new JFrame(\"Loading...\");\n Image icon = new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB_PRE);\n loading.setIconImage(icon);\n loading.setResizable(false);\n loading.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n loading.setSize(new Dimension(250,30));\n loading.setLocationRelativeTo(null);\n loading.setVisible(true);\n\n timeline.reset();\n timeline.setSlideDurationVisible(automated);\n timeline.setDefaultSlideDuration(slideInterval);\n\n m_ImageLibrary = ImageLibrary.resetLibrary(timeline, directory); //...reset the libraries to purge the current contents...\n JScrollPane spImages = new JScrollPane(m_ImageLibrary);\n spImages.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spImages.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Images\", spImages);\n \n m_AudioLibrary.resetAudio();\n m_AudioLibrary = AudioLibrary.resetLibrary(timeline, directory);\n JScrollPane spAudio = new JScrollPane(m_AudioLibrary);\n spAudio.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n spAudio.getVerticalScrollBar().setUnitIncrement(20);\n libraries.remove(0);\n libraries.add(\"Audio\", spAudio);\n\n loading.dispose();\n }\n }",
"public void execute() throws MojoExecutionException {\n\n // 1. Create and set up directories\n getLog().info(\"Creating and setting up the bundle directories\");\n buildDirectory.mkdirs();\n\n File bundleDir = new File(buildDirectory, bundleName + \".app\");\n bundleDir.mkdirs();\n\n File contentsDir = new File(bundleDir, \"Contents\");\n contentsDir.mkdirs();\n\n File resourcesDir = new File(contentsDir, \"Resources\");\n resourcesDir.mkdirs();\n\n File javaDirectory = new File(contentsDir, \"Java\");\n javaDirectory.mkdirs();\n\n File macOSDirectory = new File(contentsDir, \"MacOS\");\n macOSDirectory.mkdirs();\n\n // 2. Copy in the native java application stub\n getLog().info(\"Copying the native Java Application Stub\");\n File launcher = new File(macOSDirectory, javaLauncherName);\n launcher.setExecutable(true);\n\n FileOutputStream launcherStream = null;\n try {\n launcherStream = new FileOutputStream(launcher);\n } catch (FileNotFoundException ex) {\n throw new MojoExecutionException(\"Could not copy file to directory \" + launcher, ex);\n }\n\n InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);\n try {\n IOUtil.copy(launcherResourceStream, launcherStream);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy file \" + javaLauncherName + \" to directory \" + macOSDirectory, ex);\n }\n\n // 3.Copy icon file to the bundle if specified\n if (iconFile != null) {\n File f = searchFile(iconFile, project.getBasedir());\n\n if (f != null && f.exists() && f.isFile()) {\n getLog().info(\"Copying the Icon File\");\n try {\n FileUtils.copyFileToDirectory(f, resourcesDir);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + iconFile + \" to \" + resourcesDir, ex);\n }\n } else {\n throw new MojoExecutionException(String.format(\"Could not locate iconFile '%s'\", iconFile));\n }\n }\n\n // 4. Resolve and copy in all dependencies from the pom\n getLog().info(\"Copying dependencies\");\n List<String> files = copyDependencies(javaDirectory);\n if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {\n files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, \"lib\", additionalBundledClasspathResources));\n }\n\n // 5. Check if JRE should be embedded. Check JRE path. Copy JRE\n if (jrePath != null) {\n File f = new File(jrePath);\n if (f.exists() && f.isDirectory()) {\n // Check if the source folder is a jdk-home\n File pluginsDirectory = new File(contentsDir, \"PlugIns/JRE/Contents/Home/jre\");\n pluginsDirectory.mkdirs();\n\n File sourceFolder = new File(jrePath, \"Contents/Home\");\n if (new File(jrePath, \"Contents/Home/jre\").exists()) {\n sourceFolder = new File(jrePath, \"Contents/Home/jre\");\n }\n\n try {\n getLog().info(\"Copying the JRE Folder from : [\" + sourceFolder + \"] to PlugIn folder: [\" + pluginsDirectory + \"]\");\n FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);\n File binFolder = new File(pluginsDirectory, \"bin\");\n //Setting execute permissions on executables in JRE\n for (String filename : binFolder.list()) {\n new File(binFolder, filename).setExecutable(true, false);\n }\n\n new File (pluginsDirectory, \"lib/jspawnhelper\").setExecutable(true,false);\n embeddJre = true;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying folder \" + f + \" to \" + pluginsDirectory, ex);\n }\n } else {\n getLog().warn(\"JRE not found check jrePath setting in pom.xml\");\n }\n } else if (jreFullPath != null){\n getLog().info(\"JRE Full path is used [\" + jreFullPath + \"]\");\n embeddJre = true;\n }\n\n // 6. Create and write the Info.plist file\n getLog().info(\"Writing the Info.plist file\");\n File infoPlist = new File(bundleDir, \"Contents\" + File.separator + \"Info.plist\");\n this.writeInfoPlist(infoPlist, files);\n\n // 7. Copy specified additional resources into the top level directory\n getLog().info(\"Copying additional resources\");\n if (additionalResources != null && !additionalResources.isEmpty()) {\n this.copyResources(buildDirectory, additionalResources);\n }\n\n // 7. Make the stub executable\n if (!SystemUtils.IS_OS_WINDOWS) {\n getLog().info(\"Making stub executable\");\n Commandline chmod = new Commandline();\n try {\n chmod.setExecutable(\"chmod\");\n chmod.createArgument().setValue(\"755\");\n chmod.createArgument().setValue(launcher.getAbsolutePath());\n\n chmod.execute();\n } catch (CommandLineException e) {\n throw new MojoExecutionException(\"Error executing \" + chmod + \" \", e);\n }\n } else {\n getLog().warn(\"The stub was created without executable file permissions for UNIX systems\");\n }\n\n // 8. Create the DMG file\n if (generateDiskImageFile) {\n if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline dmg = new Commandline();\n try {\n // user wants /Applications symlink in the resulting disk image\n if (includeApplicationsSymlink) {\n createApplicationsSymlink();\n }\n dmg.setExecutable(\"hdiutil\");\n dmg.createArgument().setValue(\"create\");\n dmg.createArgument().setValue(\"-srcfolder\");\n dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n try {\n dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile, ex);\n } finally {\n if (includeApplicationsSymlink) {\n removeApplicationsSymlink();\n }\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile, ex);\n }\n\n if (diskImageInternetEnable) {\n getLog().info(\"Enabling the Disk Image file for internet\");\n try {\n Commandline internetEnableCommand = new Commandline();\n\n internetEnableCommand.setExecutable(\"hdiutil\");\n internetEnableCommand.createArgument().setValue(\"internet-enable\");\n internetEnableCommand.createArgument().setValue(\"-yes\");\n internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n internetEnableCommand.execute();\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error internet enabling disk image: \" + diskImageFile, ex);\n }\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n }\n if (SystemUtils.IS_OS_LINUX) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline linux_dmg = new Commandline();\n try {\n linux_dmg.setExecutable(\"genisoimage\");\n linux_dmg.createArgument().setValue(\"-V\");\n linux_dmg.createArgument().setValue(bundleName);\n linux_dmg.createArgument().setValue(\"-D\");\n linux_dmg.createArgument().setValue(\"-R\");\n linux_dmg.createArgument().setValue(\"-apple\");\n linux_dmg.createArgument().setValue(\"-no-pad\");\n linux_dmg.createArgument().setValue(\"-o\");\n linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n\n try {\n linux_dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile,\n ex);\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile + \" genisoimage probably missing\", ex);\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n\n } else {\n getLog().warn(\"Disk Image file cannot be generated in non Mac OS X and Linux environments\");\n }\n }\n\n getLog().info(\"App Bundle generation finished\");\n }",
"private static void copyResources(\n final List<String> resources, final String dir, final BlockingStorage bsto\n ) throws IOException {\n for (final String res : resources) {\n final Path tmp = Files.createTempFile(\n Path.of(res).getFileName().toString(), \".tmp\"\n );\n new JavaResource(String.format(\"example/%s/%s\", dir, res)).copy(tmp);\n bsto.save(new Key.From(res), Files.readAllBytes(tmp));\n Files.delete(tmp);\n }\n }",
"public void init( ){\n\t filepath = getServletContext().getContextPath();\r\n\tappPath = getServletContext().getRealPath(SAVE_DIR);\r\n\t \r\n\t }",
"private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }",
"@Override\n public void start (Stage primaryStage) {\n Group root = new Group();\n Scene scene = new Scene(root, AppConstants.STAGE_WIDTH, AppConstants.STAGE_HEIGHT);\n ModulePopulator = new ModuleCreationHelper(root, scene, primaryStage);\n view = new View();\n scene.setFill(AppConstants.BACKGROUND_COLOR);\n // scene.getStylesheets().add(getClass().getResource(\"application.css\").toExternalForm());\n view.init(root, ModulePopulator);\n ModulePopulator.setView(view);\n ModulePopulator.createMainPageModules();\n view.initRunner(root, ModulePopulator);\n primaryStage.setTitle(\"SLogo!\");\n primaryStage.setScene(scene);\n primaryStage.show();\n\n System.out.println(\"App Has Started!\");\n }",
"public static void main(String... args) throws IOException {\r\n\r\n checkDatabaseConnectivity();\r\n checkServerProperties();\r\n checkSchedulerProperties();\r\n server = new Server(port);\r\n\r\n try {\r\n ServletContextHandler context = new ServletContextHandler(\r\n ServletContextHandler.SESSIONS\r\n | ServletContextHandler.SECURITY);\r\n\r\n context.setInitParameter(\r\n \"org.eclipse.jetty.servlet.SessionIdPathParameterName\",\r\n \"none\");\r\n\r\n context.setContextPath(\"/\");\r\n context.setSecurityHandler(setUpSecurityHandler());\r\n AppServlet.getInstance().setLoginService(\r\n (HashLoginService) context.getSecurityHandler()\r\n .getLoginService());\r\n\r\n context.addServlet(new ServletHolder(AppServlet.getInstance()),\r\n \"/*\");\r\n context.addServlet(new ServletHolder(UserServlet.getInstance()),\r\n \"/users/*\");\r\n context.addServlet(new ServletHolder(ModuleServlet.getInstance()),\r\n \"/modules/*\");\r\n context.addServlet(new ServletHolder(RoomServlet.getInstance()),\r\n \"/rooms/*\");\r\n context.addServlet(\r\n new ServletHolder(EquipmentServlet.getInstance()),\r\n \"/equipment/*\");\r\n context.addServlet(\r\n new ServletHolder(TimeframeServlet.getInstance()),\r\n \"/timeframe/*\");\r\n context.addServlet(\r\n new ServletHolder(SchedulerServlet.getInstance()),\r\n \"/scheduler/*\");\r\n\r\n ContextHandler fileHandler = new ContextHandler();\r\n fileHandler.setContextPath(\"/resources\");\r\n ResourceHandler resourceHandler = new ResourceHandler();\r\n resourceHandler.setResourceBase(\"site/resources\");\r\n fileHandler.setHandler(resourceHandler);\r\n\r\n ContextHandlerCollection contexts = new ContextHandlerCollection();\r\n contexts.setHandlers(new Handler[] { context, fileHandler });\r\n server.setHandler(contexts);\r\n\r\n server.start();\r\n\r\n } catch (Exception e) {\r\n System.err.println(\"Server failed to start.\");\r\n e.printStackTrace();\r\n }\r\n }",
"private void createBuildVolume() {\n\n addVolume(shellScriptInfo.getBuild().getBuildDir());\n }",
"public File getScratchDir();",
"public void softwareResources() {\n\t\t\r\n\t}",
"private Resource useDeveloperBuild() throws IOException { Find ourselves in the CLASSPATH. We should be a loose class file.\n //\n URL u = getClass().getResource(getClass().getSimpleName() + \".class\");\n if (u == null) {\n throw new FileNotFoundException(\"Cannot find web application root\");\n }\n if (!\"file\".equals(u.getProtocol())) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n\n // Pop up to the top level classes folder that contains us.\n //\n File dir = new File(u.getPath());\n String myName = getClass().getName();\n for (;;) {\n int dot = myName.lastIndexOf('.');\n if (dot < 0) {\n dir = dir.getParentFile();\n break;\n }\n myName = myName.substring(0, dot);\n dir = dir.getParentFile();\n }\n\n // We should be in a Maven style output, that is $jar/target/classes.\n //\n if (!dir.getName().equals(\"classes\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop classes\n if (!dir.getName().equals(\"target\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop target\n dir = dir.getParentFile(); // pop the module we are in\n\n // Drop down into gerrit-gwtui to find the WAR assets we need.\n //\n dir = new File(new File(dir, \"gerrit-gwtui\"), \"target\");\n final File[] entries = dir.listFiles();\n if (entries == null) {\n throw new FileNotFoundException(\"No \" + dir);\n }\n for (File e : entries) {\n if (e.isDirectory() /* must be a directory */\n && e.getName().startsWith(\"gerrit-gwtui-\")\n && new File(e, \"gerrit/gerrit.nocache.js\").isFile()) {\n return Resource.newResource(e.toURI());\n }\n }\n throw new FileNotFoundException(\"No \" + dir + \"/gerrit-gwtui-*\");\n }",
"@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }",
"private void createJavaWebStartPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getJavaWebStartPath(),\n mModuleName\n };\n\n mJavaWebStartPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }",
"@Override\n public void start(Stage primaryStage) {\n// if (screenWidth >= 414) {\n// screenWidth = 414;\n// }\n// if (screenHeight >= 736) {\n// screenHeight = 736;\n// }//preset stage/scene size\n\n //System.out.println(Integer.toString(screenWidth) + Integer.toString(screenHeight));\n System.out.print(\"Default:\");\n gameController = new GameController(1, 4);//default player and map size\n// gameController.newMapPane();//preload a Map Pane\n\n ScreenController mainContainer = new ScreenController();\n mainContainer.loadScreen(GroupGame.homeScreenID, GroupGame.homeScreenFile);\n mainContainer.loadScreen(GroupGame.newOptionID, GroupGame.newOptionFile);\n mainContainer.loadScreen(GroupGame.createPlayerID, GroupGame.createPlayerFile);\n mainContainer.loadScreen(GroupGame.MapScreenID, GroupGame.MapScreenFile);\n mainContainer.setScreen(GroupGame.homeScreenID);\n\n Group root = new Group();\n root.getChildren().addAll(mainContainer);\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.show();\n }",
"static void updateLauncherArgs(Bootstrap bootstrap, Collection<String> extraJvmArgs)\n\t{\n\t\tFile configFile = new File(\"config.json\").getAbsoluteFile();\n\n\t\t// The AppImage mounts the packr directory on a readonly filesystem, so we can't update the vm args there\n\t\tif (!configFile.exists() || !configFile.canWrite())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tGson gson = new GsonBuilder()\n\t\t\t.setPrettyPrinting()\n\t\t\t.create();\n\t\tMap config;\n\t\ttry (FileInputStream fin = new FileInputStream(configFile))\n\t\t{\n\t\t\tconfig = gson.fromJson(new InputStreamReader(fin), Map.class);\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.warn(\"error updating packr vm args!\", e);\n\t\t\treturn;\n\t\t}\n\n\t\tString[] argsArr = getArgs(bootstrap);\n\t\tif (argsArr == null || argsArr.length == 0)\n\t\t{\n\t\t\tlog.warn(\"Launcher args are empty\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Insert JVM arguments to config.json because some of them require restart\n\t\tList<String> args = new ArrayList<>();\n\t\targs.addAll(Arrays.asList(argsArr));\n\t\targs.addAll(extraJvmArgs);\n\n\t\tconfig.put(\"vmArgs\", args);\n\t\tconfig.put(\"env\", getEnv(bootstrap));\n\n\t\ttry\n\t\t{\n\t\t\tFile tmpFile = File.createTempFile(\"openosrs\", null);\n\n\t\t\ttry (FileOutputStream fout = new FileOutputStream(tmpFile);\n\t\t\t\tFileChannel channel = fout.getChannel();\n\t\t\t\tPrintWriter writer = new PrintWriter(fout))\n\t\t\t{\n\t\t\t\tchannel.lock();\n\t\t\t\twriter.write(gson.toJson(config));\n\t\t\t\tchannel.force(true);\n\t\t\t\t// FileChannel.close() frees the lock\n\t\t\t}\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tFiles.move(tmpFile.toPath(), configFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);\n\t\t\t}\n\t\t\tcatch (AtomicMoveNotSupportedException ex)\n\t\t\t{\n\t\t\t\tlog.debug(\"atomic move not supported\", ex);\n\t\t\t\tFiles.move(tmpFile.toPath(), configFile.toPath(), StandardCopyOption.REPLACE_EXISTING);\n\t\t\t}\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tlog.warn(\"error updating packr vm args!\", e);\n\t\t}\n\t}",
"public static void mountWicketResourcesMerged(final String mountPrefix, final WebApplication application) {\n\t\tmountWicketResourcesMerged(mountPrefix, application, new ResourceMount().setDefaultAggressiveCacheDuration());\n\t}",
"private void expandPlainApplication(byte[] stream, ApplicationDescription desc)\n throws IOException {\n File file = appFile(desc.name(), APP_XML);\n checkState(!file.getParentFile().exists(), \"Application already installed\");\n createParentDirs(file);\n write(stream, file);\n }",
"public static void main(String[] args) throws Exception {\n String webPortStr = System.getenv(\"PORT\");\r\n int webPort = (webPortStr != null && !webPortStr.isEmpty()) ? Integer.parseInt(webPortStr) : 8080;\r\n \r\n String baseDir = System.getProperty(\"app.base.dir\"); \r\n if(baseDir == null || baseDir.isEmpty()) {\r\n \tthrow new IllegalArgumentException(\"the property \\\"app.base.dir\\\" is not set. Make sure to set it using -Dapp.base.dir=<BASEDIR> .\");\r\n }\r\n \r\n TomcatWrapper tomcat = new TomcatWrapper(webPort, baseDir+\"/war/\", System.getProperty(\"java.io.tmpdir\")); \r\n tomcat.addWebApp(\"/\", new File(baseDir+LOCATION).getAbsolutePath());\r\n \r\n logger.info(\"configuring app with basedir: {}\" , new File(baseDir+LOCATION).getAbsolutePath());\r\n \r\n tomcat.start(); \r\n }",
"public static void main(String[] args) {\r\n \t\r\n // Creates new controller named the main controller\r\n GlobalResources.MainControl = new Control();\r\n // Starts main application\r\n GlobalResources.MainControl.StartApplication();\r\n }",
"public void hardWareResources() {\n\t\tSystem.out.println(\"HadwareResources\");\r\n\t}",
"protected AppFile createChildAppFile(WebFile aFile)\n{\n // Get basic file info\n String name = aFile.getName(), path = aFile.getPath(); boolean dir = aFile.isDir();\n String type = aFile.getType(); int tlen = type.length();\n\n // Skip hidden files, build dir, child packages\n if(name.startsWith(\".\")) return null;\n //if(dir && _proj!=null && aFile==_proj.getBuildDir()) return null;\n if(_type==FileType.PACKAGE_DIR && dir && tlen==0) return null; // Skip child packages\n \n // Create AppFile\n AppFile fitem = new AppFile(this, aFile);\n //if(dir && _proj!=null && aFile==_proj.getSourceDir() && !aFile.isRoot()) {\n // fitem._type = FileType.SOURCE_DIR; fitem._priority = 1; }\n //else if(_type==FileType.SOURCE_DIR && dir && tlen==0) {\n // fitem._type = FileType.PACKAGE_DIR; fitem._priority = -1; }\n \n // Set priorities for special files\n if(type.equals(\"java\")) fitem._priority = 1;\n if(type.equals(\"snp\")) fitem._priority = 1;\n\n // Otherwise just add FileItem\n return fitem;\n}",
"public void setStage(String title, String resource) throws IOException, ClassNotFoundException {\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(resource));\n root = (AnchorPane)loader.load();\n //figure out which controller to show\n switch (resource){\n case \"../view/admin.fxml\":\n adminController = loader.getController();\n adminController.start(window);\n break;\n case \"../view/nonadmin.fxml\":\n nonAdminController = loader.getController();\n nonAdminController.start(window);\n break;\n case \"../view/login.fxml\":\n controller = loader.getController();\n controller.start(window);\n break;\n case \"../view/openAlbum.fxml\":\n openAlbumController = loader.getController();\n openAlbumController.start(window);\n break;\n case \"../view/searchPhotos.fxml\":\n searchPhotosController = loader.getController();\n searchPhotosController.start(window);\n break;\n case \"../view/slideshow.fxml\":\n slideShowController = loader.getController();\n slideShowController.start(window);\n break;\n default:\n throw new ClassNotFoundException();\n }\n Scene scene = new Scene(root, 714.0, 440.0);\n window.setScene(scene);\n window.setTitle(title);\n window.setResizable(false);\n window.show();\n }",
"void createStage(Stage stage){\n\t\tstage.setHeight(background.getHeight()+25);//displays full image (1)\r\n\t\tstage.setWidth(background.getWidth());\r\n\t\tshowBackground.setFitWidth(stage.getWidth());\r\n\t\tshowBackground.setFitHeight(stage.getHeight()-23);//displays full image (1)\r\n\t\r\n\t\tstage.setAlwaysOnTop(true);\r\n\t\tstage.setResizable(false);\r\n\t\t\r\n\t\t//launches first window in center of screen. \r\n\t\tstage.centerOnScreen();\r\n\t\tstage.setScene(mainScene);\r\n\t\tstage.setTitle(\"Don't Play Games in Class\");\r\n\t\t//supposed to prevent window from being moved\r\n\t\t\r\n\t\t//removes minimize, maximize and close buttons\r\n\t\t//unused because replacing the \r\n\t\t//stage.initStyle(StageStyle.UNDECORATED);\r\n\t\t\r\n\t\t//removes minimize and maximize button\r\n\t\tstage.initStyle(StageStyle.UTILITY);\r\n\t\t\r\n\t\t//replaces the closed window in the center of the screen.\r\n\t\tRespawn launch = new Respawn();\r\n\t\tstage.setOnCloseRequest(launch);\r\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/sample.fxml\"));\n Parent root = loader.load();\n primaryStage.setTitle(\"Tower Defence\");\n s = new Scene(root, 600, 480);\n primaryStage.setScene(s);\n primaryStage.show();\n MyController appController = (MyController)loader.getController();\n appController.createArena(); \t\t\n\t}",
"@Override\n public void start(Stage primaryStage) throws Exception {\n console(\"start...\");\n\n Parent root = FXMLLoader.load(getClass().getResource(\"AutoGraderApp.fxml\"));\n\n primaryStage.setTitle(appName);\n primaryStage.setScene(new Scene(root, MIN_STAGE_WIDTH, MIN_STAGE_HEIGHT));\n primaryStage.setMinWidth(MIN_STAGE_WIDTH);\n primaryStage.setMinHeight(MIN_STAGE_HEIGHT);\n\n primaryStage.show();\n }",
"public void doExport(IProgressMonitor monitor) throws ExportException\n\t{\n\t\tSubMonitor subMonitor = SubMonitor.convert(monitor, \"Creating War File\", 20);\n\t\tFile warFile = createNewWarFile();\n\t\tsubMonitor.worked(1);\n\t\tFile tmpWarDir = createTempDir();\n\t\tsubMonitor.worked(1);\n\t\tString appServerDir = exportModel.getServoyApplicationServerDir();\n\t\tsubMonitor.subTask(\"Copy root webapp files\");\n\t\tcopyRootWebappFiles(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy beans\");\n\t\tcopyBeans(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy plugins\");\n\t\tcopyPlugins(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy lafs\");\n\t\tcopyLafs(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy all standard libraries\");\n\t\tfinal File targetLibDir = copyStandardLibs(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy Drivers\");\n\t\tcopyDrivers(appServerDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy images\");\n\t\tcopyLibImages(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tmoveSlf4j(tmpWarDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Creating web.xml\");\n\t\tcopyWebXml(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tcreateTomcatContextXML(subMonitor, tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\taddServoyProperties(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tif (exportModel.isExportActiveSolution())\n\t\t{\n\t\t\tsubMonitor.subTask(\"Copy the active solution\");\n\t\t\tcopyActiveSolution(subMonitor.newChild(2), tmpWarDir);\n\t\t}\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Create properties for default admin page\");\n\t\tcreateAdminProperties(subMonitor, tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy NGClient components\");\n\t\tcopyComponents(subMonitor, tmpWarDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy exported components\");\n\t\tcopyExportedComponentsPropertyFile(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Creating/zipping the WAR file\");\n\t\tzipDirectory(tmpWarDir, warFile);\n\t\tsubMonitor.worked(2);\n\t\tdeleteDirectory(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tmonitor.done();\n\t\treturn;\n\t}",
"public static Stage initial( int count )\n\t\t{ return new InitialStage( count ); }",
"default void apriStage(String fxml, Object controller) throws IOException {\n FXMLLoader loader = new FXMLLoader(getClass().getResource(fxml));\n loader.setController(controller);\n Parent root = loader.load();\n Stage stage = new Stage();\n stage.getIcons().add(new Image(getClass().getResourceAsStream(\"resources/logo.png\")));\n stage.setTitle(\"C3\");\n stage.setScene(new Scene(root));\n stage.showAndWait();\n }",
"@Override\n /**\n * Start method that runs at the start of the photos app\n * @param primaryStage - main stage\n * @throws Exception\n */\n public void start(Stage primaryStage) throws Exception{\n\t\tFile dir = new File(\"photoData\");\n\t\tif(!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n window = primaryStage;\n\t\tsetStage(\"Login Page\", \"../view/login.fxml\");\n errorWindow = new Alert(AlertType.ERROR);\n errorWindow.initOwner(primaryStage);\n }",
"private void createSupportFiles(@NonNull final CommandLineRunner launcher,\n @NonNull final Map<String, String> env)\n throws IOException, InterruptedException, LoggedErrorException {\n File rawFolder = new File(mResOutputDir, SdkConstants.FD_RES_RAW);\n\n SourceSearcher searcher = new SourceSearcher(\n Collections.singletonList(rawFolder), EXT_BC);\n FileGatherer fileGatherer = new FileGatherer();\n searcher.search(fileGatherer);\n\n WaitableExecutor<Void> mExecutor = new WaitableExecutor<Void>();\n\n for (final File bcFile : fileGatherer.getFiles()) {\n String name = bcFile.getName();\n final String objName = name.replaceAll(\"\\\\.bc\", \".o\");\n final String soName = \"librs.\" + name.replaceAll(\"\\\\.bc\", \".so\");\n\n for (final Abi abi : ABIS) {\n if (mAbiFilters != null && !mAbiFilters.contains(abi.mDevice)) {\n continue;\n }\n\n // make sure the dest folders exist\n final File objAbiFolder = new File(mObjOutputDir, abi.mDevice);\n if (!objAbiFolder.isDirectory() && !objAbiFolder.mkdirs()) {\n throw new IOException(\"Unable to create dir \" + objAbiFolder.getAbsolutePath());\n }\n\n final File libAbiFolder = new File(mLibOutputDir, abi.mDevice);\n if (!libAbiFolder.isDirectory() && !libAbiFolder.mkdirs()) {\n throw new IOException(\"Unable to create dir \" + libAbiFolder.getAbsolutePath());\n }\n\n mExecutor.execute(new Callable<Void>() {\n @Override\n public Void call() throws Exception {\n File objFile = createSupportObjFile(bcFile, abi, objName, objAbiFolder,\n launcher, env);\n createSupportLibFile(objFile, abi, soName, libAbiFolder, launcher, env);\n return null;\n }\n });\n }\n }\n\n mExecutor.waitForTasksWithQuickFail(true /*cancelRemaining*/);\n }",
"private void writeManifest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n setNoCache(response);\n if (!isManifestEnabled(request)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n return;\n }\n if (errorParam.get(request) != null) {\n addManifestErrorCookie(response);\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n return;\n }\n \n try {\n setPreloads();\n \n String originalPath = (String)request.getAttribute(AuraResourceServlet.ORIG_REQUEST_URI);\n if(originalPath != null){\n String currentManifestUrl = AuraServlet.getManifest();\n if (!originalPath.equals(currentManifestUrl)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n String serverLastMod = Long.toString(getManifestLastMod());\n Cookie cookie = getManifestCookie(request);\n if(cookie != null){\n if (MANIFEST_ERROR.equals(cookie.getValue())) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n Map<String, Object> attribs = Maps.newHashMap();\n attribs.put(\"lastMod\", serverLastMod);\n StringWriter sw = new StringWriter();\n for(String s:AuraServlet.getStyles()){\n sw.write(s);\n sw.write('\\n');\n }\n for(String s:AuraServlet.getScripts()){\n sw.write(s);\n sw.write('\\n');\n }\n attribs.put(\"resourceURLs\", sw.toString());\n DefinitionService definitionService = Aura.getDefinitionService();\n InstanceService instanceService = Aura.getInstanceService();\n DefDescriptor<ComponentDef> tmplDesc = definitionService.getDefDescriptor(\"ui:manifest\", ComponentDef.class);\n Component tmpl = instanceService.getInstance(tmplDesc, attribs);\n Aura.getRenderingService().render(tmpl, response.getWriter());\n } catch (Exception e) {\n Aura.getExceptionAdapter().handleException(e);\n // Can't throw exception here: to set manifest OBSOLETE\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n }\n }",
"public MainController(){\n allShelves = new List[2];\n allShelves[0] = new List<File>(); //Beachtet die unterschiedliche Instanziierung! Was bedeutet das?\n allShelves[1] = new List<>();\n createFiles();\n }",
"@Override\n public void start(Stage primaryStage) {\n AnchorPane root = new PowerOffWindow(null);\n \n Scene scene = new Scene(root);\n \n primaryStage.setTitle(\"JSonFX\");\n primaryStage.setResizable(false);\n primaryStage.setScene(scene);\n primaryStage.getIcons().add(new Image(getClass().getResource(\"/res/JsonFX.png\").toString()));\n primaryStage.show();\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"MainForm.fxml\"));\n primaryStage.setTitle(\"Inventory Management System\");\n primaryStage.setMinHeight(500);\n primaryStage.setMinWidth(800);\n primaryStage.setScene(new Scene(root, 1280, 720));\n primaryStage.show();\n\n\n }",
"private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }",
"@Override\n\tpublic void start( Stage primaryStage ) throws Exception\n\t{\n\t\t// Load the FXML file containing all of the UI elements.\n\t\tParent rootNode = new FXMLLoader( getClass().getResource( \"../../../view/RootLayout.fxml\" ) ).load();\n\n\t\t// Create the stage and set the window title.\n\t\tprimaryStage.setTitle( \"SNMP Link Utilization\" );\n\n\t\t// Set the scene using root, with the specified width and height.\n\t\tprimaryStage.setScene( new Scene( rootNode, 500, 600 ) );\n\n\t\t// Set the icon for a non-Maven build: \"file:resources/images/nic.png\"\n\t\t// Set the icon for a Maven build.\n\t\tprimaryStage.getIcons().add( new Image( \"images/nic.png\" ) );\n\n\t\tprimaryStage.show();\n\t}",
"public void start(Stage primaryStage) throws IOException {\n\t\tParent root = FXMLLoader.load(getClass().getResource(\"/gui/ApproveDurationWindow.fxml\"));\n\t\tScene scene = new Scene(root);\n\t\tprimaryStage.setTitle(\"View Request\");\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.show();\n\t}",
"@Override\n public void start() throws LifecycleException {\n logger.info(\"Start http server ... \");\n\n\n try {\n // create a resource config that scans for JAX-RS resources and providers\n final ResourceConfig rc = new ResourceConfig()\n .packages(PACKAGES_SCAN) // packages path for resources loading\n .property(MvcFeature.TEMPLATE_BASE_PATH, FREEMARKER_BASE) // config freemarker view files's base path\n .register(LoggingFeature.class)\n .register(FreemarkerMvcFeature.class)\n .register(JettisonFeature.class)\n .packages(\"org.glassfish.jersey.examples.multipart\")\n .register(MultiPartFeature.class)\n .registerInstances(new ApplicationBinder()); //\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n httpServer = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n\n // Set StaticHttpHandler to handle http server's static resources\n String htmlPath = this.getClass().getResource(HTML_BASE).getPath(); // TODO, 部署后要根据实际目录修正!classes 同级目录下的 html 目录\n HttpHandler handler = new StaticHttpHandler(htmlPath);\n httpServer.getServerConfiguration().addHttpHandler(handler, \"/\");\n\n logger.info(\"Jersey app started with WADL available at {} application.wadl\\n \", BASE_URI);\n } catch (Exception e) {\n throw new LifecycleException(e); // just convert to self defined exception\n }\n }",
"public void start(Stage mainStage) {\n\t\t\n\t}",
"public void execute() throws MojoExecutionException, MojoFailureException {\n\n File target = new File(getDistfolder());\n\n // only create the target directoty when it doesn't exist\n // no deletion\n if (!target.exists()) {\n target.mkdir();\n } else {\n getLog().warn(\"Using existing target directory \" + target.getAbsolutePath());\n }\n\n getLog().info(\"Target is \" + target);\n\n String excludes2 = getExcludes();\n\n if (excludes2 == null) {\n excludes2 = \"**/.svn/,**/.cvs/\";\n\n getLog().info(\"Configuration for excludes not set. Defaulting to: \\\"\" + excludes2\n + \"\\\". Excludes are ant-fileset-style.\");\n } else {\n if (excludes2.contains(\"__acl\") || excludes2.contains(\"__properties\")) {\n getLog().warn(\"Your excludes \\\"\" + excludes2\n + \"\\\" contains __acl or __properties. You do not want these to be excluded in order to have permissoins and properties work.\");\n }\n }\n\n try {\n String targetLibPath = getTargetLibPath();\n\n if ((null != targetLibPath) && !\"\".equals(targetLibPath)) {\n File targetLibDir = new File(target, targetLibPath);\n\n if (!targetLibDir.exists()) {\n targetLibDir.mkdirs();\n }\n\n if (!targetLibDir.isDirectory()) {\n throw new MojoExecutionException(\"Could not create targetLibdir: \" + targetLibDir.toString());\n }\n\n File jar = new File(jarFile);\n FileUtils.copyFileToDirectory(jar, targetLibDir);\n }\n\n for (Resource resource : srcResources) {\n File source = new File(resource.getDirectory());\n File currentTarget = null;\n\n if (resource.getTargetPath() != null) {\n currentTarget = new File(target, resource.getTargetPath());\n } else {\n currentTarget = target;\n }\n\n String normalized = source.getAbsolutePath();\n int offsetLength = normalized.length();\n\n getLog().debug(\"Normalzed sourcefolder is \" + normalized + \" (Offset is: \" + offsetLength + \")\");\n\n List<String> results = FileUtils.getFileAndDirectoryNames(source, null, excludes2, true, true, true,\n true);\n\n for (String fileName : results) {\n File file = new File(fileName);\n\n String normalizedParent = new File(file.getParent()).getAbsolutePath();\n\n if (offsetLength > normalizedParent.length()) {\n getLog().info(\"Skipping file (its the sourcefolder or a parent of it): \"\n + file.getAbsolutePath());\n getLog().debug(\"Parent: \" + normalizedParent + \" with length \" + normalizedParent.length());\n\n continue;\n }\n\n String relative = file.getParent();\n relative = relative.substring(offsetLength); // cut the target-dir away\n\n getLog().debug(\"Copy \" + file + \" to \" + currentTarget.getPath() + File.separator + relative);\n\n if (file.isFile()) {\n File parent = new File(currentTarget.getPath() + File.separator + relative);\n\n if (!parent.exists()) {\n // create dir if it does not exist\n parent.mkdirs();\n }\n\n FileUtils.copyFileToDirectory(file, parent);\n } else if (file.isDirectory()) {\n // take care about directories (so that empty dirs get created)\n\n File tocreate = new File(currentTarget.getPath() + File.separator + relative + File.separator\n + file.getName());\n getLog().debug(\"Creating dir\" + tocreate.toString());\n tocreate.mkdirs();\n }\n }\n }\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could copy file(s) to directory\", ex);\n }\n }",
"private RunVolumes() {}",
"private static void createDir(File f) {\n int limit = 10;\n while (!f.exists()) {\n if (!f.mkdir()) {\n createDir(f.getParentFile());\n }\n limit --;\n if(limit < 1) {\n break;\n }\n }\n if (limit == 0) {\n }\n }",
"public static void main(String[] args) {\n \tEmbeddedServers.add(EmbeddedServers.Identifiers.JETTY, (Routes routeMatcher, StaticFilesConfiguration staticFilesConfiguration, boolean hasMultipleHandler) -> {\r\n JettyHandler handler = setupHandler(routeMatcher, staticFilesConfiguration, hasMultipleHandler);\r\n customJettyServerFactory serv = new customJettyServerFactory();\r\n return new EmbeddedJettyServer(serv, handler);\r\n });\r\n \t\r\n \tport(80);\r\n \t\r\n \tOptions op = new Options();\r\n \top.setOptions(args);\r\n \t//LabelCreator labels = new LabelCreator(op);\r\n\r\n \t\r\n \tstaticFiles.location(\"/public\"); // Static (web accessible) files (e.g. CSS files etc.) can be placed in src/main/resources/public \r\n \tstaticFiles.header(\"Access-Control-Allow-Origin\", \"*\"); // static files can be accessed from anywhere\r\n \tstaticFiles.header(\"Access-Control-Allow-Headers\", \"*\"); // static files can be accessed from anywhere\r\n \t\r\n \t// any empty action will be redirected to the API documentation\r\n \tredirect.any(\"/\", \"/labels/\"+API_VERSION+\"/\");\r\n \tredirect.any(\"/labels\", \"/labels/\"+API_VERSION+\"/\");\r\n \tredirect.any(\"/labels/\", \"/labels/\"+API_VERSION+\"/\");\t\r\n \tredirect.any(\"/labels/\"+API_VERSION, \"/labels/\"+API_VERSION+\"/\");\r\n \t\r\n \toptions(\"/*\", (req, res) -> {\r\n \t\tString accessControlRequestHeaders = req.headers(\"Access-Control-Request-Headers\");\r\n \t\tif (accessControlRequestHeaders != null) {\r\n \t\t\tres.header(\"Access-Control-Allow-Headers\", accessControlRequestHeaders);\r\n \t\t}\r\n\r\n \t\tString accessControlRequestMethod = req.headers(\"Access-Control-Request-Method\");\r\n \t\tif (accessControlRequestMethod != null) {\r\n \t\t\tres.header(\"Access-Control-Allow-Methods\", accessControlRequestMethod);\r\n \t\t}\r\n\r\n return \"OK\";\r\n \t});\r\n \t\r\n \ttry {\r\n\t\t\t// Build swagger json description\r\n\t\t\tfinal String swaggerJson = SwaggerParser.getSwaggerJson(APP_PACKAGE);\r\n\t\t\tget(\"/labels/\"+API_VERSION+\"/\", (req, res) -> { // TODO: redirect the Swagger JSON to a Swagger UI instance instead of returning it e.g. redirect.any(\"/test\", \"http://petstore.swagger.io\");\r\n\t\t\t\tres.header(\"Content-Type\", \"application/json\");\r\n\t\t\t\treturn swaggerJson;//.replace(oldChar, newChar);\r\n\t\t\t});\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.err.println(e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \t\r\n \t// Routes other than default Swagger documentation\r\n \tpath(\"/labels\", () -> {\r\n \t\tpath(\"/\"+API_VERSION, () -> {\r\n\t \t\t\r\n \t\t\tget(\"/static/*\", (req, res) -> {\r\n \t \t\t\r\n \t\t\t\t AccessStatic c = new AccessStatic(op, req, res);\r\n \t\t return c.result();\r\n \t\t\t});\r\n \t\t\t\r\n \t\t\tpost(\"/\", (req, res) -> {\r\n \t\t\t\t\r\n \t\t\t\tif(req.queryParams(\"template\")==null || req.queryParams(\"template\").isEmpty())\r\n \t\t\t\t{\t\r\n \t\t\t\t\t//res.redirect(\"/labels/\"+API_VERSION+\"/template/choose\", 303);\r\n \t\t\t\t\tTemplateCreator tmpl = new TemplateCreator(op);\r\n\t\t\t \t//tmpl.baseURL = \"http://\"+req.host();\r\n\t\t\t \ttmpl.target = tmpl.baseURL+ req.pathInfo();\r\n\t\t\t \ttmpl.origReq = req;\r\n\t\t\t \t\r\n\t\t\t \treturn tmpl.chooseTemplateForm();\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tString format = req.queryParams(\"format\");\r\n \t\t\t\t\tString data = req.queryParams(\"data\");\r\n \t\t\t\t\t//op.baseURL = \"http://\"+req.host() + req.pathInfo();\r\n \t\t\t\t\t//op.baseURL = op.baseURL + req.pathInfo();\r\n \t\t\t\t\t\r\n \t\t\t\t\tif(format==null || format.isEmpty())\r\n \t\t\t\t\t\tformat=\"html\";\r\n \t\t\t\t\t\r\n\t \t\t\t\tif(format.equalsIgnoreCase(\"html\"))\r\n\t \t\t\t\t\ttry {\r\n\t \t\t\t\t\t\t CreateHTML c = new CreateHTML(op, req, res);\r\n\t \t\t\t\t String re = c.result();\r\n\t \t\t\t\t return re;\r\n\t \t\t\t\t\t} catch (Exception e) {\r\n\t \t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t \t\t\t\t\t\te.printStackTrace();\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t \r\n\t \t\t\t\tif(format.equalsIgnoreCase(\"pdf\"))\r\n\t \t\t\t\t\ttry {\r\n\t \t\t\t\t\t\tCreatePDF c = new CreatePDF(op, req, res);\r\n\t \t\t\t\t return c.result();\r\n\t \t\t\t\t\t} catch (Exception e) {\r\n\t \t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t \t\t\t\t\t\te.printStackTrace();\r\n\t \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\treturn \"3rror\";\r\n \t\t\t});\r\n \t\t\t\r\n \t\t\tget(\"/tmp\", (req, res) -> {\r\n \t \t\t\r\n \t\t\t\t AccessTmp c = new AccessTmp(op, req, res);\r\n \t\t return c.result();\r\n \t\t });\r\n \t\t\t\r\n \t\t\ttry {\r\n\t\t\t\t\tCreatePDFRoute.route(op);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t \r\n \t\t\ttry {\r\n\t\t\t\t\tCreateHTMLRoute.route(op);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t \r\n \t\t\ttry {\r\n\t\t\t\t\tAccessTmpRoute.route(op);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t \r\n\t\t // TODO: Metadata about existing templates\r\n\t\t // @route /templates/ \t\t=> get a list of all existing templates\r\n\t\t // @route /template/{id} \t\t=> get a specific template with unique list of included placeholders and path to html file\r\n\t\t \r\n \t\t\tpath(\"/template\", () -> {\r\n\t\t\t get(\"/show\", (req, res) -> {\r\n\t\t\t\t\t \r\n\t\t\t \tres.header(\"Content-Type\", \"text/html\");\r\n\t\t\t \t\r\n\t\t\t if(req.queryParams(\"template\")!=null)\r\n\t\t\t\t\t\t\top.templateFile = op.templateDir+\"/\"+req.queryParams(\"template\");\r\n\t\t\t \r\n\t\t\t String html = \"\";\r\n\t\t\t File file = new File(op.templateFile);\r\n\t\t\t\t\t FileInputStream fis;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t if(file.exists()) {\r\n\t\t\t\t\t\t\tfis = new FileInputStream(file);\r\n\t\t\t\t\t\t byte[] data = new byte[(int) file.length()];\r\n\t\t\t\t\t\t\tfis.read(data);\r\n\t\t\t\t\t\t fis.close();\r\n\t\t\t\t\t\t html = new String(data, \"UTF-8\");\r\n\t\t\t\t\t };\r\n\t\t\t\t\t res.body(html);\r\n\t\t\t\t\t \r\n\t\t\t\t\t return res.body();\r\n\t\t\t });\r\n\t\t\t \r\n\t\t\t get(\"/show/all\", (req, res) -> {\r\n\t\t\t \t\r\n\t\t\t \tres.header(\"Content-Type\", \"application/json\");\r\n\t\t\t \tres.body(new TemplateCreator(op).getTemplates().toString());\r\n\t\t\t \treturn res.body();\r\n\t\t\t });\r\n\t\t\t \r\n\t\t\t \r\n \t\t\t});\r\n\t\t \r\n\t\t get(\"/check\", (req, res)-> {\r\n\t\t \t\r\n\t\t \t byte[] bytes = Files.readAllBytes(Paths.get(\"templates/submit.html\")); \r\n\t\t\t HttpServletResponse raw = res.raw();\r\n\t\t\t\r\n\t\t\t raw.getOutputStream().write(bytes);\r\n\t\t\t raw.getOutputStream().flush();\r\n\t\t\t raw.getOutputStream().close();\r\n\t\t\t \r\n\t\t\t return res.raw();\r\n\t\t \t\r\n\t\t });\r\n\t\t \r\n\t\t // TODO: set option for configuring Allow-Origin through config.ini\r\n\t\t\t\tbefore((req, res) -> {\r\n\t\t\t\t\tres.header(\"Access-Control-Allow-Origin\", \"*\");\r\n\t\t\t\t\tres.header(\"Access-Control-Allow-Headers\", \"Content-Type,Authorization,X-Requested-With,Content-Length,Accept,Origin,\");\r\n\t\t\t\t});\r\n\t\t \r\n\t\t // TODO: make template editable (e.g. with (static) implementation of WYSIWYG Aloha Editor (http://alohoeditor.org))\r\n\t\t // get(\"/template/edit\", (req, res) -> {\r\n\t\t //\t\t@param Sting template: name of the template\r\n\t\t // }\r\n\t\t \r\n\t\t // TODO: save template (e.g. by sending the (full) DOM of the template edited by Aloha Editor (http://alohoeditor.org))\r\n\t\t // get(\"/template/save\", (req, res) -> {\r\n\t\t //\t\t@param String template: name of the (new) template\r\n\t\t //\t\t@param Boolean overwrite: what to do if template name already exists \r\n\t\t // }\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t /* get(\"/json\", (req, res) -> {\r\n\t\t \r\n\t\t byte[] bytes = Files.readAllBytes(Paths.get(\"templates/data.json\")); \r\n\t\t HttpServletResponse raw = res.raw();\r\n\t\t\r\n\t\t raw.addHeader(\"Content-Type\", \"application/json\");\r\n\t\t raw.getOutputStream().write(bytes);\r\n\t\t raw.getOutputStream().flush();\r\n\t\t raw.getOutputStream().close();\r\n\t\t\r\n\t\t return res.raw();\r\n\t\t \r\n\t\t \t });\r\n\t\t */\r\n\t \t});\r\n \t});\r\n \t\r\n \tif(op.debug)\r\n \t\tenableDebugScreen(); \r\n }"
]
| [
"0.74800426",
"0.5080485",
"0.50116503",
"0.49334714",
"0.4902673",
"0.49009624",
"0.4868476",
"0.4862545",
"0.4835054",
"0.47924",
"0.4776944",
"0.47625503",
"0.47554055",
"0.46824443",
"0.46518728",
"0.46071848",
"0.45732874",
"0.4552523",
"0.45508504",
"0.45089534",
"0.45063066",
"0.44968522",
"0.4493214",
"0.44888228",
"0.44830847",
"0.44800857",
"0.44397143",
"0.44231045",
"0.44196585",
"0.43629122",
"0.4354829",
"0.43499377",
"0.43499288",
"0.43463778",
"0.43335336",
"0.43334755",
"0.4287801",
"0.42816228",
"0.42636034",
"0.4260308",
"0.42524642",
"0.42440948",
"0.42412525",
"0.42411593",
"0.42349857",
"0.4228134",
"0.4227825",
"0.4225507",
"0.42235893",
"0.42147684",
"0.42125842",
"0.42076778",
"0.42038807",
"0.4200751",
"0.4196368",
"0.41894674",
"0.4181389",
"0.4179681",
"0.41709387",
"0.416853",
"0.4166603",
"0.4164805",
"0.41635108",
"0.4160413",
"0.41576967",
"0.41534078",
"0.4151878",
"0.4151133",
"0.4150966",
"0.4145519",
"0.41415858",
"0.41407466",
"0.4139517",
"0.41323718",
"0.4130777",
"0.413046",
"0.41302177",
"0.41294995",
"0.41246334",
"0.4124128",
"0.4123282",
"0.41199124",
"0.41183472",
"0.41157642",
"0.41037247",
"0.4101743",
"0.410113",
"0.40994906",
"0.40986782",
"0.40973487",
"0.40962267",
"0.40839985",
"0.407861",
"0.40770966",
"0.4072009",
"0.4070958",
"0.40657166",
"0.4064312",
"0.40629736",
"0.40608078"
]
| 0.7885146 | 0 |
Stage an application directory with remote resource limits | void stageApplicationWithRemoteResourceLimits(File stagingDir); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void stageApplicationWithDefaultResourceLimits(File stagingDir);",
"public void executelaunchDirectoryFiler() {\n \t\tif (conf.getProperty(\"rootDirectory\") == null)\n \t\t\tUtil.fatalError(\"You must provide a root directory for the filer with -r or --rootDirectory\");\n \t\tif (conf.getProperty(\"secret\") == null)\n \t\t\tUtil.fatalError(\"You must provide a shared secret to protect the server with -s or --secret\");\n \t\t\n \t\tfinal DirectoryFilerServer serv;\n \t\ttry {\n \t\t\tserv = new DirectoryFilerServer(conf.getProperty(\"rootDirectory\"),\n \t\t\t\tconf.getInteger(\"port\", 4263),\n \t\t\t\tconf.getProperty(\"secret\"));\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\tUtil.fatalError(\"failed to load configuration\", e1);\n \t\t\treturn;\n \t\t}\n \t\t\n \t\tRuntime.getRuntime().addShutdownHook(new Thread(new Runnable(){\n \t\t\tpublic void run() {\n \t\t\t\tserv.close();\n \t\t\t}\n \t\t}));\n \t\t\n \t\tserv.launchServer();\n \t}",
"public IStatus prepareForServingDirectly(IPath baseDir, TomcatServer server, String tomcatVersion);",
"private void startWebApp(Handler<AsyncResult<HttpServer>> next) {\n Router router = Router.router(vertx);\n\n router.route(\"/assets/*\").handler(StaticHandler.create(\"assets\"));\n router.route(\"/api/*\").handler(BodyHandler.create());\n\n router.route(\"/\").handler(this::handleRoot);\n router.get(\"/api/timer\").handler(this::timer);\n router.post(\"/api/c\").handler(this::_create);\n router.get(\"/api/r/:id\").handler(this::_read);\n router.put(\"/api/u/:id\").handler(this::_update);\n router.delete(\"/api/d/:id\").handler(this::_delete);\n\n // Create the HTTP server and pass the \"accept\" method to the request handler.\n vertx.createHttpServer().requestHandler(router).listen(8888, next);\n }",
"private void initialDeploy() {\n }",
"private void execute(String webContextURL) throws Exception\n {\n // process incremental synchronization\n if(!full) {\n SortedMap<String, byte[]> sourceFiles = new TreeMap<String, byte[]>();\n for(String file : FilesIterator.getRelativeNamesIterator(sourceDir)) {\n if(excludes != null && file.endsWith(excludes)) {\n continue;\n }\n if(includes != null && !file.endsWith(includes)) {\n continue;\n }\n sourceFiles.put(Files.path2unix(file), Files.getFileDigest(new File(sourceDir, file)));\n }\n\n HttpRmi rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setReturnType(new GType(List.class, String.class));\n rmi.setExceptions(IOException.class);\n\n final List<String> dirtyFiles = rmi.invoke(\"getDirtyFiles\", targetDir, sourceFiles, removeStaleFiles);\n if(dirtyFiles.isEmpty()) {\n return;\n }\n\n rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setExceptions(IOException.class);\n\n rmi.invoke(\"synchronize\", targetDir, new StreamHandler<FilesOutputStream>(FilesOutputStream.class)\n {\n @Override\n protected void handle(FilesOutputStream files) throws IOException\n {\n files.addFiles(sourceDir, dirtyFiles);\n }\n });\n }\n\n // process full synchronization\n else {\n HttpRmi rmi = new HttpRmi(webContextURL, AppsManager.class);\n rmi.setExceptions(IOException.class);\n\n rmi.invoke(\"synchronize\", targetDir, new StreamHandler<FilesOutputStream>(FilesOutputStream.class)\n {\n @Override\n protected void handle(FilesOutputStream files) throws IOException\n {\n files.addFiles(sourceDir);\n }\n });\n }\n }",
"public IStatus prepareRuntimeDirectory(IPath baseDir);",
"MafResponse deploySourceSync(long systemId, String password, String token, File sourceFile);",
"public IStatus prepareDeployDirectory(IPath deployPath);",
"abstract Resource<Controller> setupStage(Stage stage);",
"public static void main(String argv[]) {\n\n VertxOptions options = new VertxOptions().setBlockedThreadCheckInterval(200000000);\n options.setClustered(true);\n\n Vertx.clusteredVertx(options, res -> {\n if (res.succeeded()) {\n Vertx vertx = res.result();\n final JsonObject js = new JsonObject();\n vertx.fileSystem().readFile(\"app-conf.json\", result -> {\n if (result.succeeded()) {\n Buffer buff = result.result();\n js.mergeIn(new JsonObject(buff.toString()));\n initConfig(js);\n DeploymentOptions deploymentOptions = new DeploymentOptions().setConfig(js).setMaxWorkerExecuteTime(5000).setWorker(true).setWorkerPoolSize(5);\n vertx.deployVerticle(SparkVerticle.class.getName(), deploymentOptions);\n } else {\n System.err.println(\"Oh oh ...\" + result.cause());\n }\n });\n\n }\n });\n }",
"void launchAsMaster();",
"public Arguments create() throws IOException {\r\n Arguments args = new Arguments();\r\n ArrayList vmArgs = new ArrayList();\r\n \r\n // Start empty framework\r\n if (clean) {\r\n // Remove bundle directories\r\n File[] children = workDir.listFiles();\r\n for (int i=0; i<children.length; i++) {\r\n if (children[i].isDirectory() && children[i].getName().startsWith(\"bundle\")) {\r\n deleteDir(children[i]);\r\n }\r\n }\r\n }\r\n \r\n // Create system properties file\r\n File systemPropertiesFile = new File(workDir, \"system.properties\");\r\n Path path = new Path(systemPropertiesFile.getAbsolutePath());\r\n vmArgs.add(\"-Doscar.system.properties=\"+path.toString());\r\n \r\n // Set bundle cache dir\r\n writeProperty(systemPropertiesFile, PROPERTY_CACHE_DIR, new Path(workDir.getAbsolutePath()).toString(), false);\r\n \r\n // Set start level\r\n writeProperty(systemPropertiesFile, PROPERTY_STARTLEVEL, Integer.toString(startLevel), true);\r\n \r\n // System properties\r\n if (systemProperties != null) {\r\n for(Iterator i=systemProperties.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n writeProperty(systemPropertiesFile, (String) entry.getKey(), (String) entry.getValue(), true);\r\n }\r\n }\r\n\r\n // Add bundle\r\n StringBuffer autoStart = new StringBuffer(\"\");\r\n StringBuffer autoInstall = new StringBuffer(\"\");\r\n for (Iterator i=bundles.entrySet().iterator();i.hasNext();) {\r\n Map.Entry entry = (Map.Entry) i.next();\r\n Integer level = (Integer) entry.getKey();\r\n \r\n // Add bundle install entries for this start level\r\n ArrayList l = (ArrayList) entry.getValue();\r\n autoStart.setLength(0);\r\n autoInstall.setLength(0);\r\n for (Iterator j = l.iterator() ; j.hasNext() ;) {\r\n BundleElement e = (BundleElement) j.next();\r\n if (e.getLaunchInfo().getMode() == BundleLaunchInfo.MODE_START) {\r\n if (autoStart.length()>0) {\r\n autoStart.append(\" \");\r\n }\r\n autoStart.append(\"file:\");\r\n autoStart.append(new Path(e.getBundle().getPath()).toString());\r\n } else {\r\n if (autoInstall.length()>0) {\r\n autoInstall.append(\" \");\r\n }\r\n autoInstall.append(\"file:\");\r\n autoInstall.append(new Path(e.getBundle().getPath()).toString());\r\n }\r\n }\r\n if (autoInstall.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_INSTALL+level, autoInstall.toString(), true);\r\n }\r\n if (autoStart.length()>0) {\r\n writeProperty(systemPropertiesFile, PROPERTY_AUTO_START+level, autoStart.toString(), true);\r\n }\r\n }\r\n \r\n args.setVMArguments((String[]) vmArgs.toArray(new String[vmArgs.size()]));\r\n return args;\r\n }",
"private void psPushAssetsToPhone() {\n if (DEBUG) {\n System.out.println(\"Pushing assets to phone...\");\n }\n for (ConcurrentMap.Entry<String, String> entry : downloadedProjectAssets.entrySet()) {\n String assetPath = entry.getKey();\n String localAssetPath = entry.getValue();\n final String assetName = assetNameFromAssetPath(assetPath);\n psPushAssetToPhone(assetName, localAssetPath, true /*ignore connect status*/);\n }\n if (DEBUG) {\n System.out.println(\"...finished pushing assets to phone.\");\n }\n }",
"public void execute() throws MojoExecutionException, MojoFailureException {\n\n File target = new File(getDistfolder());\n\n // only create the target directoty when it doesn't exist\n // no deletion\n if (!target.exists()) {\n target.mkdir();\n } else {\n getLog().warn(\"Using existing target directory \" + target.getAbsolutePath());\n }\n\n getLog().info(\"Target is \" + target);\n\n String excludes2 = getExcludes();\n\n if (excludes2 == null) {\n excludes2 = \"**/.svn/,**/.cvs/\";\n\n getLog().info(\"Configuration for excludes not set. Defaulting to: \\\"\" + excludes2\n + \"\\\". Excludes are ant-fileset-style.\");\n } else {\n if (excludes2.contains(\"__acl\") || excludes2.contains(\"__properties\")) {\n getLog().warn(\"Your excludes \\\"\" + excludes2\n + \"\\\" contains __acl or __properties. You do not want these to be excluded in order to have permissoins and properties work.\");\n }\n }\n\n try {\n String targetLibPath = getTargetLibPath();\n\n if ((null != targetLibPath) && !\"\".equals(targetLibPath)) {\n File targetLibDir = new File(target, targetLibPath);\n\n if (!targetLibDir.exists()) {\n targetLibDir.mkdirs();\n }\n\n if (!targetLibDir.isDirectory()) {\n throw new MojoExecutionException(\"Could not create targetLibdir: \" + targetLibDir.toString());\n }\n\n File jar = new File(jarFile);\n FileUtils.copyFileToDirectory(jar, targetLibDir);\n }\n\n for (Resource resource : srcResources) {\n File source = new File(resource.getDirectory());\n File currentTarget = null;\n\n if (resource.getTargetPath() != null) {\n currentTarget = new File(target, resource.getTargetPath());\n } else {\n currentTarget = target;\n }\n\n String normalized = source.getAbsolutePath();\n int offsetLength = normalized.length();\n\n getLog().debug(\"Normalzed sourcefolder is \" + normalized + \" (Offset is: \" + offsetLength + \")\");\n\n List<String> results = FileUtils.getFileAndDirectoryNames(source, null, excludes2, true, true, true,\n true);\n\n for (String fileName : results) {\n File file = new File(fileName);\n\n String normalizedParent = new File(file.getParent()).getAbsolutePath();\n\n if (offsetLength > normalizedParent.length()) {\n getLog().info(\"Skipping file (its the sourcefolder or a parent of it): \"\n + file.getAbsolutePath());\n getLog().debug(\"Parent: \" + normalizedParent + \" with length \" + normalizedParent.length());\n\n continue;\n }\n\n String relative = file.getParent();\n relative = relative.substring(offsetLength); // cut the target-dir away\n\n getLog().debug(\"Copy \" + file + \" to \" + currentTarget.getPath() + File.separator + relative);\n\n if (file.isFile()) {\n File parent = new File(currentTarget.getPath() + File.separator + relative);\n\n if (!parent.exists()) {\n // create dir if it does not exist\n parent.mkdirs();\n }\n\n FileUtils.copyFileToDirectory(file, parent);\n } else if (file.isDirectory()) {\n // take care about directories (so that empty dirs get created)\n\n File tocreate = new File(currentTarget.getPath() + File.separator + relative + File.separator\n + file.getName());\n getLog().debug(\"Creating dir\" + tocreate.toString());\n tocreate.mkdirs();\n }\n }\n }\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could copy file(s) to directory\", ex);\n }\n }",
"private void stageSelfContainedJar(InputStream stream, ApplicationDescription desc)\n throws IOException {\n // First extract the bundle coordinates\n String coords = getSelfContainedBundleCoordinates(desc);\n if (coords == null) {\n return;\n }\n\n // Split the coordinates into segments and build the file name.\n String[] f = coords.substring(4).split(\"/\");\n String base = \"m2/\" + f[0].replace('.', '/') + \"/\" + f[1] + \"/\" + f[2] + \"/\" + f[1] + \"-\" + f[2];\n String jarName = base + (f.length < 4 ? \"\" : \"-\" + f[3]) + \".jar\";\n String featuresName = base + \"-features.xml\";\n\n // Create the file directory structure and copy the file there.\n File jar = appFile(desc.name(), jarName);\n boolean ok = jar.getParentFile().exists() || jar.getParentFile().mkdirs();\n if (ok) {\n Files.write(toByteArray(stream), jar);\n Files.copy(appFile(desc.name(), FEATURES_XML), appFile(desc.name(), featuresName));\n if (!appFile(desc.name(), FEATURES_XML).delete()) {\n log.warn(\"Unable to delete self-contained application {} features.xml\", desc.name());\n }\n } else {\n throw new IOException(\"Unable to save self-contained application \" + desc.name());\n }\n }",
"public void expendLimitedResource(String resourceName){\n }",
"VirtualDirectory getRootContents();",
"private Step copyRemoteFiles() {\n return stepBuilderFactory.get(STEP_COPY_REMOTE_FILES)\n .tasklet(copyRemoteFilesTask)\n .build();\n }",
"public static synchronized void initializeArchiveFiles() {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.initializeArchiveFiles\");\n File sourceFile = new File(System.getProperty(USER_DIR) + File.separator + \"QVCSEnterpriseServer.kbwb\");\n String firstDestinationDirName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_PROJECTS_DIRECTORY\n + File.separator\n + getTestProjectName();\n File firstDestinationDirectory = new File(firstDestinationDirName);\n firstDestinationDirectory.mkdirs();\n File firstDestinationFile = new File(firstDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String secondDestinationDirName = firstDestinationDirName + File.separator + SUBPROJECT_DIR_NAME;\n File secondDestinationDirectory = new File(secondDestinationDirName);\n secondDestinationDirectory.mkdirs();\n File secondDestinationFile = new File(secondDestinationDirName + File.separator + \"QVCSEnterpriseServer.kbwb\");\n\n String thirdDestinationDirName = secondDestinationDirName + File.separator + SUBPROJECT2_DIR_NAME;\n File thirdDestinationDirectory = new File(thirdDestinationDirName);\n thirdDestinationDirectory.mkdirs();\n File thirdDestinationFile = new File(thirdDestinationDirName + File.separator + \"ThirdDirectoryFile.kbwb\");\n\n File fourthDestinationFile = new File(firstDestinationDirName + File.separator + \"Server.kbwb\");\n File fifthDestinationFile = new File(firstDestinationDirName + File.separator + \"AnotherServer.kbwb\");\n File sixthDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerB.kbwb\");\n File seventhDestinationFile = new File(firstDestinationDirName + File.separator + \"ServerC.kbwb\");\n try {\n ServerUtility.copyFile(sourceFile, firstDestinationFile);\n ServerUtility.copyFile(sourceFile, secondDestinationFile);\n ServerUtility.copyFile(sourceFile, thirdDestinationFile);\n ServerUtility.copyFile(sourceFile, fourthDestinationFile);\n ServerUtility.copyFile(sourceFile, fifthDestinationFile);\n ServerUtility.copyFile(sourceFile, sixthDestinationFile);\n ServerUtility.copyFile(sourceFile, seventhDestinationFile);\n } catch (IOException ex) {\n Logger.getLogger(TestHelper.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public ProgressObject deploy(Target[] target, File file, File file2, String host, int port) {\n mainModuleID = new JBTargetModuleID(target[0], file.getName());\n\n try {\n String server_url = \"http://\" + host + \":\" + port; // NOI18N\n\n if (file.getName().endsWith(\".war\")) {\n mainModuleID.setContextURL(getWebUrl(server_url, JbossWeb.createGraph(file2).getContextRoot()));\n } else if (file.getName().endsWith(\".ear\")) {\n JarFileSystem jfs = new JarFileSystem();\n jfs.setJarFile(file);\n FileObject appXml = jfs.getRoot().getFileObject(\"META-INF/application.xml\");\n if (appXml != null) {\n Application ear = DDProvider.getDefault().getDDRoot(appXml);\n Module[] modules = ear.getModule();\n for (int i = 0; i < modules.length; i++) {\n JBTargetModuleID mod_id = new JBTargetModuleID(target[0]);\n if (modules[i].getWeb() != null) {\n mod_id.setJARName(modules[i].getWeb().getWebUri());\n mod_id.setContextURL(getWebUrl(server_url, modules[i].getWeb().getContextRoot()));\n }\n mainModuleID.addChild(mod_id);\n }\n } else {\n // Java EE 5\n for (FileObject child : jfs.getRoot().getChildren()) {\n if (child.hasExt(\"war\") || child.hasExt(\"jar\")) { // NOI18N\n JBTargetModuleID mod_id = new JBTargetModuleID(target[0], child.getNameExt());\n\n if (child.hasExt(\"war\")) { // NOI18N\n String contextRoot = child.getName();\n ZipInputStream zis = new ZipInputStream(child.getInputStream());\n try {\n\n ZipEntry entry = null;\n while ((entry = zis.getNextEntry()) != null) {\n if (\"WEB-INF/jboss-web.xml\".equals(entry.getName())) { // NOI18N\n String ddContextRoot =\n JbossWeb.createGraph(new ZipEntryInputStream(zis)).getContextRoot();\n if (ddContextRoot != null) {\n contextRoot = ddContextRoot;\n }\n break;\n }\n }\n } catch (IOException ex) {\n LOGGER.log(Level.INFO, \"Error reading context-root\", ex); // NOI18N\n } finally {\n zis.close();\n }\n\n mod_id.setContextURL(getWebUrl(server_url, contextRoot));\n }\n mainModuleID.addChild(mod_id);\n }\n }\n }\n }\n\n } catch(Exception e) {\n LOGGER.log(Level.INFO, null, e);\n }\n\n this.file = file;\n fireHandleProgressEvent(null, new JBDeploymentStatus(ActionType.EXECUTE, CommandType.DISTRIBUTE, StateType.RUNNING, NbBundle.getMessage(JBDeployer.class, \"MSG_DEPLOYING\", file.getAbsolutePath())));\n RequestProcessor.getDefault().post(this, 0, Thread.NORM_PRIORITY);\n return this;\n }",
"public void launch(int dest) throws InterruptedException {\n // your code here\n\t\t\n }",
"public void copyAssets(View view) {\n log(\"copy assets to fon\");\n try {\n String [] list = getApplicationContext().getAssets().list(\"\");\n if (list.length > 0) {\n for (String file : list) {\n copyAssetFile(file, getApplicationContext());\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n log(\"copy finished\");\n log(\"deploy assets start\");\n executeCommand(\"deploy.sh\");\n log(\"deploy assets finished\");\n }",
"void setAppRootDirectory(String rootDir);",
"public void deploy() throws Exception {\n ArrayList<String> args = new ArrayList<String>();\n File onWindows = new File(\"C:/cygwin/bin/rsync.exe\");\n args.add(onWindows.exists() ? onWindows.getAbsolutePath() : \"rsync\");\n args.add(\"-vrzute\");\n args.add(ssh(_user, _key));\n args.add(\"--delete\");\n args.add(\"--chmod=u=rwx\");\n\n args.add(\"--exclude\");\n args.add(\"'build/*.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/hexbase_impl.jar'\");\n args.add(\"--exclude\");\n args.add(\"'lib/javassist'\");\n\n ArrayList<String> sources = new ArrayList<String>();\n sources.add(\"build\");\n sources.add(\"lib\");\n for( int i = 0; i < sources.size(); i++ ) {\n String path = new File(sources.get(i)).getAbsolutePath();\n // Adapts paths in case running on Windows\n sources.set(i, path.replace('\\\\', '/').replace(\"C:/\", \"/cygdrive/c/\"));\n }\n args.addAll(sources);\n\n args.add(_host + \":\" + \"/home/\" + _user + \"/\" + TARGET);\n ProcessBuilder builder = new ProcessBuilder(args);\n builder.environment().put(\"CYGWIN\", \"nodosfilewarning\");\n builder.redirectErrorStream(true);\n Process process = null;\n\n try {\n process = builder.start();\n SeparateVM.inheritIO(process, \"rsync to \" + _host, true);\n process.waitFor();\n } finally {\n if( process != null ) {\n try {\n process.destroy();\n } catch( Exception _ ) {\n }\n }\n }\n }",
"public void doFullPush( File siteDir ) throws IOException{\n clearDirectories();\n makeRemoteDir( root );\n publish( siteDir, false, null );\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\n\t\t\t\ttry{\n\t\t\t\t\n\t\t\t\t\tint staging_status = 1;\n\t\t\t\t\tboolean hasFailed = false;\n\t\t\t\t\t\n\t\t\t\t\tLong id;\n\t\t\t\t\t\n\t\t\t\t\t//Annoying Bug\n\t\t\t\t\tif(arg0.getParameter(\"app_inst_id\") instanceof String)\n\t\t\t\t\t\tid = Long.valueOf((String) arg0.getParameter(\"app_inst_id\"));\n\t\t\t\t\telse\n\t\t\t\t\t\tid = (Long) arg0.getParameter(\"app_inst_id\");\n\t\t\t\t\t\n\t\t\t\t\t//AppInstance inst = AHEEngine.getAppInstanceEntity(id);\n\t\t\t\t\tFileStaging[] in = AHEEngine.getFileStageInByAppInstId(id);\n\t\t\t\t\t\n\t\t\t\t\t//Update AppInstance Status\n\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Data_Staging.toString(),\"Staging Data\");\n\t\t\t\t\t\n\t\t\t\t\t//Sort FileStaging into groups\n\t\t\t\t\tHashMap<String, ArrayList<FileStaging>> map = new HashMap<String, ArrayList<FileStaging>>();\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0; i < in.length; i++){\n\t\t\t\t\t\t\n\t\t\t\t\t\tURI uri = null;\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\turi = new URI(in[i].getTarget());\n\t\t\t\t\t\t} catch (URISyntaxException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t\tlogger.error(\"Data Staging failed\",e);\n//\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\thasFailed = true;\n\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed\", e);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tResource res = ResourceRegisterAPI.getResourceByBestMatch(uri);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(map.containsKey(res.getResource_interface())){\n\t\t\t\t\t\t\tmap.get(res.getResource_interface()).add(in[i]);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tArrayList<FileStaging> array = new ArrayList<FileStaging>();\n\t\t\t\t\t\t\tarray.add(in[i]);\n\t\t\t\t\t\t\tmap.put(res.getResource_interface(), array);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\n\t\t\t\t\tString[] keyset = map.keySet().toArray(new String[map.size()]);\n\t\t\t\t\t\n\t\t\t\t\tString err = \"\";\n\t\t\t\t\t\n\t\t\t\t\tfor(int i=0; i < keyset.length; i++){\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\tArrayList<FileStaging> temp = map.get(keyset[i]);\n\t\t\t\t\t\t\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tAHEMessage msg = TransferHandler.transfer(temp.toArray(new FileStaging[temp.size()]));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(AHEMessageUtility.hasException(msg)){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString er1 = \"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(msg.getException() != null){\n\t\t\t\t\t\t\t\t\ter1 = msg.getException()[0];\n\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\t\thasFailed = true;\n//\t\t\t\t\t\t\t\tlogger.error(\"Data Staging failed. Transfer Module has returned an exception msg : \" + er1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed. Transfer Module has returned an exception msg : \" + er1,null);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse{\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\tif(msg.getInformation().length > 0){\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t//Update FileStaging with uid\n//\t\t\t\t\t\t\t\t\tfor(int j=0; j < temp.size(); j++){\n//\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t\ttemp.get(j).setIdentifier(msg.getInformation()[0]);\n//\t\t\t\t\t\t\t\t\t\tHibernateUtil.SaveOrUpdate(temp.get(j));\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}catch(Exception e){\n//\t\t\t\t\t\t\tlogger.error(\"Data Staging failed\",e);\n//\t\t\t\t\t\t\tstaging_status = -1;\n//\t\t\t\t\t\t\thasFailed = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfailed(id, arg0, \"Data Staging failed\",e);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(hasFailed) {\n\t\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Error_DataStaging.toString(),\"Data Staging Information Error : \" + err);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tAHEEngine.setCurrentAppInstanceState(id, AppInstanceStates.Workflow_Running.toString(),\"Data Staging Information Submitted\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tMap<String, Object> result = new HashMap<String, Object>();\n\t\t\t\t\t\n\t\t\t\t\tif(hasFailed){\n\t\t\t\t\t\tstaging_status = -1;\n\t\t\t\t\t\tresult.put(notification_code, \"Data Staging failed for AppInst : \" + id);\n\t\t\t\t\t}\n\t\t\t\t\tresult.put(staging_status_code, staging_status);\n\t\t\n\t\t\t\t\tAHERuntime.getAHERuntime().getAhe_engine().getWorkflowHandler().getStatefulKnowledgeSession().getWorkItemManager().completeWorkItem(arg0.getId(), result);\n\t\t\t\t\t\n\t\t\t\t\t//arg1.completeWorkItem(arg0.getId(), result);\n\t\t\n\t\t\t\t\treturn;\n\t\t\t\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t\t}catch(AHEException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tfailed(arg0, e.getMessage());\n\t\t\t\t}\n\n\t\t\t}",
"@Override\n public void scan() throws Exception {\n if (getContexts() == null) {\n throw new IllegalArgumentException(\"No HandlerContainer\");\n }\n\n Resource r = Resource.newResource(getWebAppDir());\n if (!r.exists()) {\n throw new IllegalArgumentException(\"No such webapps resource \" + r);\n }\n\n if (!r.isDirectory()) {\n throw new IllegalArgumentException(\"Not directory webapps resource \" + r);\n }\n\n String[] files = r.list();\n\n files:\n for (int f = 0; (files != null) && (f < files.length); f++) {\n String context = files[f];\n\n if (context.equalsIgnoreCase(\"CVS/\") || context.equalsIgnoreCase(\"CVS\") || context.startsWith(\".\")) {\n continue;\n }\n\n Resource app = r.addPath(r.encode(context));\n\n if (context.toLowerCase().endsWith(\".war\") || context.toLowerCase().endsWith(\".jar\")) {\n context = context.substring(0, context.length() - 4);\n Resource unpacked = r.addPath(context);\n\n if ((unpacked != null) && unpacked.exists() && unpacked.isDirectory()) {\n Log.debug(context + \" already exists.\");\n continue;\n }\n } else if (!app.isDirectory()) {\n Log.debug(app + \" Not directory\");\n continue;\n }\n\n if (context.equalsIgnoreCase(\"root\") || context.equalsIgnoreCase(\"root/\")) {\n context = URIUtil.SLASH;\n } else {\n context = \"/\" + context;\n }\n if (context.endsWith(\"/\") && (context.length() > 0)) {\n context = context.substring(0, context.length() - 1);\n }\n\n // Check the context path has not already been added or the webapp\n // itself is not already deployed\n if (!getAllowDuplicates()) {\n Handler[] installed = getContexts().getChildHandlersByClass(ContextHandler.class);\n for (int i = 0; i < installed.length; i++) {\n ContextHandler c = (ContextHandler) installed[i];\n\n if (context.equals(c.getContextPath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(context + \" Context were equal; duplicate!\");\n }\n continue files;\n }\n\n String path;\n if (c instanceof WebAppContext) {\n path = Resource.newResource(((WebAppContext) c).getWar()).getFile().getAbsolutePath();\n } else {\n path = c.getBaseResource().getFile().getAbsolutePath();\n }\n\n if ((path != null) && path.equals(app.getFile().getAbsolutePath())) {\n if (Log.isDebugEnabled()) {\n Log.debug(path + \" Paths were equal; duplicate!\");\n }\n continue files;\n }\n\n }\n }\n\n // create a webapp\n WebAppContext wah = null;\n HandlerCollection contexts = getContexts();\n if ((contexts instanceof ContextHandlerCollection)\n && WebAppContext.class.isAssignableFrom(((ContextHandlerCollection) contexts).getContextClass())) {\n try {\n wah = (WebAppContext) ((ContextHandlerCollection) contexts).getContextClass().newInstance();\n } catch (Exception e) {\n throw new Error(e);\n }\n } else {\n wah = new WebAppContext();\n }\n\n // configure it\n wah.setContextPath(context);\n\n if (getConfigurationClasses() != null) {\n wah.setConfigurationClasses(getConfigurationClasses());\n }\n\n if (getDefaultsDescriptor() != null) {\n wah.setDefaultsDescriptor(getDefaultsDescriptor());\n }\n wah.setExtractWAR(isExtract());\n wah.setWar(app.toString());\n wah.setParentLoaderPriority(isParentLoaderPriority());\n\n Enumeration<?> names = _attributes.getAttributeNames();\n while (names.hasMoreElements()) {\n String name = (String) names.nextElement();\n wah.setAttribute(name, _attributes.getAttribute(name));\n }\n\n // add it\n Log.debug(\"AndroidWebAppDeployer: prepared \" + app.toString());\n contexts.addHandler(wah);\n _deployed.add(wah);\n //jetty-7.3.0 onwards need to start explicitly due to different startup time ordering\n wah.start();\n }\n }",
"public synchronized Promise<DeployedInstanceManager, Throwable, Double> deploy() {\n final DeployedInstanceManager self = this;\n JSch.setConfig(\"StrictHostKeyChecking\", \"no\");\n final DeferredManager deferred = new DefaultDeferredManager();\n\n return deferred.when(new DeferredCallable<DeployedInstanceManager, Double>() {\n @Override\n public DeployedInstanceManager call() throws IOException {\n notify(0.2);\n scpFileToTarget(coreJar);\n notify(0.5);\n scpFileToTarget(projectFile);\n notify(1.0);\n return self;\n }\n\n });\n }",
"public void PreAppConfig(Double InputVersion) \n { \n File_Manager Config = new File_Manager(); \n Version = Config.GetVersion(); \n System.out.println(\"Version = \" + Version);\n if (Version != InputVersion)\n {\n System.out.println(\"ERROR: Version Mismatch!\"); \n }\n ServerCount = Config.GetServerCount();\n \n System.out.println(\"Server Count = \" + ServerCount); \n ServerPaths= Config.GetServerPaths(ServerCount);\n \n for (int i = 0; i <= ServerCount - 1 ; i++){ \n System.out.println(\"ServerPath for \" + i + \" = \" + ServerPaths[i]); \n } \n \n if (!Files.isDirectory(Paths.get(\"ServerFiles\"))) \n {\n Config.createFolder(\"ServerFiles\");\n \n } else System.out.println(\"Server Directory Found!\"); \n System.out.println(\"App Initialised: Running.. \\n ________________________________ \\n\" );\n }",
"public List<Resource> deployResources() throws Exception {\n List<Resource> developmentResources = findResources(m_developmentRepo, \"*\", \"*\");\n List<Resource> deployedResources = new ArrayList<>();\n for (Resource developmentResource : developmentResources) {\n deployedResources.add(deployResource(developmentResource));\n }\n return deployedResources;\n }",
"@RequestMapping(value=\"/releaseAppResources\", method = RequestMethod.GET)\n\tpublic void releaseAppResources() {\n\t}",
"public static void main(String[] args) throws Exception {\n URL webRootLocation = MainView.class.getResource(\"/webapp/\"); //src/masin\n URI webRootUri = webRootLocation.toURI();\n\n WebAppContext context = new WebAppContext();\n context.setBaseResource(Resource.newResource(webRootUri));\n context.setContextPath(\"/\");\n context.setAttribute(\"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern\", \".*\");\n context.setConfigurationDiscovered(true);\n context.setConfigurations(new Configuration[]{\n new AnnotationConfiguration(),\n new WebInfConfiguration(),\n new WebXmlConfiguration(),\n new MetaInfConfiguration()\n });\n context.getServletContext().setExtendedListenerTypes(true);\n context.addEventListener(new ServletContextListeners());\n\n Server server = new Server(8080);\n server.setHandler(context);\n server.start();\n server.join();\n }",
"public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws IOException{\n\t\tstage = new Stage();\n\n\t\tstage.setScene(ClientEntranceController.getEntranceScene());\n\t\tstage.setTitle(\"Archive\");\n\t\tstage.show();\n\t\t\n\t\t\n\t\tstage.setOnCloseRequest(new EventHandler<WindowEvent>() {\n\t\t\tpublic void handle(WindowEvent we) {\n\t\t\t\tPlatform.exit();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t}",
"public static void main(String[] args) throws Exception {\n\n String context = System.getProperty(\"rjrcontext\");\n String webAppDir = System.getProperty(\"rjrwebapp\");\n Integer port = Integer.getInteger(\"rjrport\");\n Integer sslport = Integer.getInteger(\"rjrsslport\");\n String webAppClassPath = System.getProperty(\"rjrclasspath\");\n String keystore = System.getProperty(\"rjrkeystore\");\n String password = System.getProperty(\"rjrpassword\");\n String keyPassword = System.getProperty(\"rjrkeypassword\");\n\n if (context == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrcontext\");\n }\n if (webAppDir == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrwebapp\");\n }\n if (port == null && sslport == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrport and/or -Drjrsslport\");\n }\n\n Server server = new Server();\n\n if (port != null) {\n SelectChannelConnector connector = new SelectChannelConnector();\n connector.setPort(port);\n\n if (sslport != null) {\n connector.setConfidentialPort(sslport);\n }\n\n server.addConnector(connector);\n }\n\n if (sslport != null) {\n if (keystore == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrkeystore with -Drjrsslport\");\n }\n if (password == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrpassword with -Drjrsslport\");\n }\n if (keyPassword == null) {\n throw new IllegalStateException(\"you need to provide argument -Drjrkeypassword with -Drjrsslport\");\n }\n\n SslSocketConnector sslConnector = new SslSocketConnector();\n sslConnector.setKeystore(keystore);\n sslConnector.setPassword(password);\n sslConnector.setKeyPassword(keyPassword);\n\n sslConnector.setMaxIdleTime(30000);\n sslConnector.setPort(sslport);\n\n server.addConnector(sslConnector);\n }\n\n WebAppContext web = new WebAppContext();\n web.setContextPath(context);\n web.setWar(webAppDir);\n\n // Fix issue 7, File locking on windows/Disable Jetty's locking of static files\n // http://code.google.com/p/run-jetty-run/issues/detail?id=7\n // by disabling the use of the file mapped buffers. The default Jetty behavior is\n // intended to provide a performance boost, but run-jetty-run is focused on\n // development (especially debugging) of web apps, not high-performance production\n // serving of static content. Therefore, I'm not worried about the performance\n // degradation of this change. My only concern is that there might be a need to\n // test this feature that I'm disabling.\n web.setInitParams(Collections.singletonMap(\"org.mortbay.jetty.servlet.Default.useFileMappedBuffer\", \"false\"));\n\n if (webAppClassPath != null) {\n ProjectClassLoader loader = new ProjectClassLoader(web, webAppClassPath);\n web.setClassLoader(loader);\n }\n\n server.addHandler(web);\n\n MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();\n MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);\n server.getContainer().addEventListener(mBeanContainer);\n mBeanContainer.start();\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n System.exit(100);\n }\n return;\n }",
"private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }",
"abstract public void setRingResourcesDir(String path);",
"public void launch(String stage) {\n\t\tnew JFXPanel();\n\t\tresult = new FutureTask(new Callable(){\n \n @Override\n public Object call() throws Exception {\n StagedProduction prod=(StagedProduction)Class.forName(stage).getConstructor().newInstance();\n return (prod.produce());\n }\n \n \n });\n Platform.runLater(result);\n\t}",
"private static void deployStaticHEResources(String targetDir, boolean bootstrappingEnabled) throws URISyntaxException, IOException{\r\n \t\r\n\t\tClassLoader loader = ServiceGenerator.class.getClassLoader();\r\n\t\tURI jniInterfaceFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_FILE_NAME).toURI();\r\n\t\tURI jniInterfaceHeaderFilePath = loader.getResource(Constants.HE_SERVICE_RESOURCES_FOLDER \r\n\t\t\t\t+ Constants.SERVICE_JNI_INTERFACE_HEADER_FILE_NAME).toURI();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFile origJniInterfaceFile = new File(jniInterfaceFilePath);\r\n\t\tFile newJniInterfaceFile = new File(targetDir + origJniInterfaceFile.getName());\r\n\t\t\r\n\t\tFile origJniInterfaceHeaderFile = new File(jniInterfaceHeaderFilePath);\r\n\t\tFile newJniInterfaceHeaderFile = new File(targetDir + origJniInterfaceHeaderFile.getName());\r\n\t\t\t\t\t\t\r\n\t\t \t\t\r\n\t\tUtils.deployStaticResource(origJniInterfaceFile, newJniInterfaceFile);\r\n\t\tUtils.deployStaticResource(origJniInterfaceHeaderFile, newJniInterfaceHeaderFile);\r\n }",
"public void run()\n {\n try\n {\n // Load the manifest file\n File manifest = new File(UploaderMain.getManifestName());\n if (!manifest.exists())\n {\n ErrorPrinter.printError(ErrorCode.fileNotFound, \"manifest does not exist\");\n System.exit(0);\n }\n\n // Read names of files from manifest\n Map<String, File> files = new HashMap<String, File>();\n BufferedReader manifestReader = new BufferedReader(new FileReader(manifest));\n String line;\n long totalLength = 0;\n while ((line = manifestReader.readLine()) != null)\n {\n if (line.startsWith(\"//\") || line.trim().isEmpty()) continue; // ignore comments\n StringTokenizer token = new StringTokenizer(line, \"@\");\n String destinationName = token.nextToken();\n String localName = token.nextToken();\n File f = new File(localName);\n if (!f.exists())\n {\n \tErrorPrinter.printError(ErrorCode.fileNotFound, \"file \" + localName + \" not found\");\n \tcontinue;\n }\n totalLength += f.length();\n files.put(destinationName, f);\n }\n manifestReader.close();\n\n dOut.writeInt(files.size());\n dOut.writeLong(totalLength);\n\n for (String s : files.keySet())\n {\n File f = files.get(s);\n \n try\n {\n // Send the name and length of the file\n dOut.writeUTF(s);\n dOut.writeLong(f.length());\n\n // Send the file over the network\n FileInputStream reader = new FileInputStream(f);\n byte[] buffer = new byte[BUFFER_SIZE];\n int numRead;\n long numSent = 0;\n while (numSent < f.length())\n {\n numRead = reader.read(buffer);\n dOut.write(buffer, 0, numRead);\n numSent += numRead;\n }\n\n reader.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error sending file \" + f.getName());\n }\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }",
"abstract public void setTopResourcesDir(String path);",
"private void addApplicationsPermissionsToRegistry() throws APIManagementException {\n Registry tenantGovReg = getRegistry();\n String permissionResourcePath = CarbonConstants.UI_PERMISSION_NAME + RegistryConstants.PATH_SEPARATOR + APPLICATION_ROOT_PERMISSION;\n try {\n if (!tenantGovReg.resourceExists(permissionResourcePath)) {\n String loggedInUser = CarbonContext.getThreadLocalCarbonContext().getUsername();\n UserRealm realm = (UserRealm) CarbonContext.getThreadLocalCarbonContext().getUserRealm();\n // Logged in user is not authorized to create the permission.\n // Temporarily change the user to the admin for creating the permission\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(realm.getRealmConfiguration().getAdminUserName());\n tenantGovReg = CarbonContext.getThreadLocalCarbonContext().getRegistry(RegistryType.USER_GOVERNANCE);\n Collection appRootNode = tenantGovReg.newCollection();\n appRootNode.setProperty(\"name\", \"Applications\");\n tenantGovReg.put(permissionResourcePath, appRootNode);\n PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(loggedInUser);\n }\n } catch (org.wso2.carbon.user.core.UserStoreException e) {\n throw new APIManagementException(\"Error while reading user store information.\", e);\n } catch (org.wso2.carbon.registry.api.RegistryException e) {\n throw new APIManagementException(\"Error while creating new permission in registry\", e);\n }\n }",
"public static void mountWicketResourcesMerged(final String mountPrefix, final WebApplication application) {\n\t\tmountWicketResourcesMerged(mountPrefix, application, new ResourceMount().setDefaultAggressiveCacheDuration());\n\t}",
"public void doExport(IProgressMonitor monitor) throws ExportException\n\t{\n\t\tSubMonitor subMonitor = SubMonitor.convert(monitor, \"Creating War File\", 20);\n\t\tFile warFile = createNewWarFile();\n\t\tsubMonitor.worked(1);\n\t\tFile tmpWarDir = createTempDir();\n\t\tsubMonitor.worked(1);\n\t\tString appServerDir = exportModel.getServoyApplicationServerDir();\n\t\tsubMonitor.subTask(\"Copy root webapp files\");\n\t\tcopyRootWebappFiles(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy beans\");\n\t\tcopyBeans(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy plugins\");\n\t\tcopyPlugins(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy lafs\");\n\t\tcopyLafs(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy all standard libraries\");\n\t\tfinal File targetLibDir = copyStandardLibs(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy Drivers\");\n\t\tcopyDrivers(appServerDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy images\");\n\t\tcopyLibImages(tmpWarDir, appServerDir);\n\t\tsubMonitor.worked(1);\n\t\tmoveSlf4j(tmpWarDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Creating web.xml\");\n\t\tcopyWebXml(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tcreateTomcatContextXML(subMonitor, tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\taddServoyProperties(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tif (exportModel.isExportActiveSolution())\n\t\t{\n\t\t\tsubMonitor.subTask(\"Copy the active solution\");\n\t\t\tcopyActiveSolution(subMonitor.newChild(2), tmpWarDir);\n\t\t}\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Create properties for default admin page\");\n\t\tcreateAdminProperties(subMonitor, tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy NGClient components\");\n\t\tcopyComponents(subMonitor, tmpWarDir, targetLibDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Copy exported components\");\n\t\tcopyExportedComponentsPropertyFile(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tsubMonitor.subTask(\"Creating/zipping the WAR file\");\n\t\tzipDirectory(tmpWarDir, warFile);\n\t\tsubMonitor.worked(2);\n\t\tdeleteDirectory(tmpWarDir);\n\t\tsubMonitor.worked(1);\n\t\tmonitor.done();\n\t\treturn;\n\t}",
"public void execute() throws MojoExecutionException {\n\n // 1. Create and set up directories\n getLog().info(\"Creating and setting up the bundle directories\");\n buildDirectory.mkdirs();\n\n File bundleDir = new File(buildDirectory, bundleName + \".app\");\n bundleDir.mkdirs();\n\n File contentsDir = new File(bundleDir, \"Contents\");\n contentsDir.mkdirs();\n\n File resourcesDir = new File(contentsDir, \"Resources\");\n resourcesDir.mkdirs();\n\n File javaDirectory = new File(contentsDir, \"Java\");\n javaDirectory.mkdirs();\n\n File macOSDirectory = new File(contentsDir, \"MacOS\");\n macOSDirectory.mkdirs();\n\n // 2. Copy in the native java application stub\n getLog().info(\"Copying the native Java Application Stub\");\n File launcher = new File(macOSDirectory, javaLauncherName);\n launcher.setExecutable(true);\n\n FileOutputStream launcherStream = null;\n try {\n launcherStream = new FileOutputStream(launcher);\n } catch (FileNotFoundException ex) {\n throw new MojoExecutionException(\"Could not copy file to directory \" + launcher, ex);\n }\n\n InputStream launcherResourceStream = this.getClass().getResourceAsStream(javaLauncherName);\n try {\n IOUtil.copy(launcherResourceStream, launcherStream);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Could not copy file \" + javaLauncherName + \" to directory \" + macOSDirectory, ex);\n }\n\n // 3.Copy icon file to the bundle if specified\n if (iconFile != null) {\n File f = searchFile(iconFile, project.getBasedir());\n\n if (f != null && f.exists() && f.isFile()) {\n getLog().info(\"Copying the Icon File\");\n try {\n FileUtils.copyFileToDirectory(f, resourcesDir);\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying file \" + iconFile + \" to \" + resourcesDir, ex);\n }\n } else {\n throw new MojoExecutionException(String.format(\"Could not locate iconFile '%s'\", iconFile));\n }\n }\n\n // 4. Resolve and copy in all dependencies from the pom\n getLog().info(\"Copying dependencies\");\n List<String> files = copyDependencies(javaDirectory);\n if (additionalBundledClasspathResources != null && !additionalBundledClasspathResources.isEmpty()) {\n files.addAll(copyAdditionalBundledClasspathResources(javaDirectory, \"lib\", additionalBundledClasspathResources));\n }\n\n // 5. Check if JRE should be embedded. Check JRE path. Copy JRE\n if (jrePath != null) {\n File f = new File(jrePath);\n if (f.exists() && f.isDirectory()) {\n // Check if the source folder is a jdk-home\n File pluginsDirectory = new File(contentsDir, \"PlugIns/JRE/Contents/Home/jre\");\n pluginsDirectory.mkdirs();\n\n File sourceFolder = new File(jrePath, \"Contents/Home\");\n if (new File(jrePath, \"Contents/Home/jre\").exists()) {\n sourceFolder = new File(jrePath, \"Contents/Home/jre\");\n }\n\n try {\n getLog().info(\"Copying the JRE Folder from : [\" + sourceFolder + \"] to PlugIn folder: [\" + pluginsDirectory + \"]\");\n FileUtils.copyDirectoryStructure(sourceFolder, pluginsDirectory);\n File binFolder = new File(pluginsDirectory, \"bin\");\n //Setting execute permissions on executables in JRE\n for (String filename : binFolder.list()) {\n new File(binFolder, filename).setExecutable(true, false);\n }\n\n new File (pluginsDirectory, \"lib/jspawnhelper\").setExecutable(true,false);\n embeddJre = true;\n } catch (IOException ex) {\n throw new MojoExecutionException(\"Error copying folder \" + f + \" to \" + pluginsDirectory, ex);\n }\n } else {\n getLog().warn(\"JRE not found check jrePath setting in pom.xml\");\n }\n } else if (jreFullPath != null){\n getLog().info(\"JRE Full path is used [\" + jreFullPath + \"]\");\n embeddJre = true;\n }\n\n // 6. Create and write the Info.plist file\n getLog().info(\"Writing the Info.plist file\");\n File infoPlist = new File(bundleDir, \"Contents\" + File.separator + \"Info.plist\");\n this.writeInfoPlist(infoPlist, files);\n\n // 7. Copy specified additional resources into the top level directory\n getLog().info(\"Copying additional resources\");\n if (additionalResources != null && !additionalResources.isEmpty()) {\n this.copyResources(buildDirectory, additionalResources);\n }\n\n // 7. Make the stub executable\n if (!SystemUtils.IS_OS_WINDOWS) {\n getLog().info(\"Making stub executable\");\n Commandline chmod = new Commandline();\n try {\n chmod.setExecutable(\"chmod\");\n chmod.createArgument().setValue(\"755\");\n chmod.createArgument().setValue(launcher.getAbsolutePath());\n\n chmod.execute();\n } catch (CommandLineException e) {\n throw new MojoExecutionException(\"Error executing \" + chmod + \" \", e);\n }\n } else {\n getLog().warn(\"The stub was created without executable file permissions for UNIX systems\");\n }\n\n // 8. Create the DMG file\n if (generateDiskImageFile) {\n if (SystemUtils.IS_OS_MAC_OSX || SystemUtils.IS_OS_MAC) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline dmg = new Commandline();\n try {\n // user wants /Applications symlink in the resulting disk image\n if (includeApplicationsSymlink) {\n createApplicationsSymlink();\n }\n dmg.setExecutable(\"hdiutil\");\n dmg.createArgument().setValue(\"create\");\n dmg.createArgument().setValue(\"-srcfolder\");\n dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n try {\n dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile, ex);\n } finally {\n if (includeApplicationsSymlink) {\n removeApplicationsSymlink();\n }\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile, ex);\n }\n\n if (diskImageInternetEnable) {\n getLog().info(\"Enabling the Disk Image file for internet\");\n try {\n Commandline internetEnableCommand = new Commandline();\n\n internetEnableCommand.setExecutable(\"hdiutil\");\n internetEnableCommand.createArgument().setValue(\"internet-enable\");\n internetEnableCommand.createArgument().setValue(\"-yes\");\n internetEnableCommand.createArgument().setValue(diskImageFile.getAbsolutePath());\n\n internetEnableCommand.execute();\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error internet enabling disk image: \" + diskImageFile, ex);\n }\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n }\n if (SystemUtils.IS_OS_LINUX) {\n getLog().info(\"Generating the Disk Image file\");\n Commandline linux_dmg = new Commandline();\n try {\n linux_dmg.setExecutable(\"genisoimage\");\n linux_dmg.createArgument().setValue(\"-V\");\n linux_dmg.createArgument().setValue(bundleName);\n linux_dmg.createArgument().setValue(\"-D\");\n linux_dmg.createArgument().setValue(\"-R\");\n linux_dmg.createArgument().setValue(\"-apple\");\n linux_dmg.createArgument().setValue(\"-no-pad\");\n linux_dmg.createArgument().setValue(\"-o\");\n linux_dmg.createArgument().setValue(diskImageFile.getAbsolutePath());\n linux_dmg.createArgument().setValue(buildDirectory.getAbsolutePath());\n\n try {\n linux_dmg.execute().waitFor();\n } catch (InterruptedException ex) {\n throw new MojoExecutionException(\"Thread was interrupted while creating DMG \" + diskImageFile,\n ex);\n }\n } catch (CommandLineException ex) {\n throw new MojoExecutionException(\"Error creating disk image \" + diskImageFile + \" genisoimage probably missing\", ex);\n }\n projectHelper.attachArtifact(project, \"dmg\", null, diskImageFile);\n\n } else {\n getLog().warn(\"Disk Image file cannot be generated in non Mac OS X and Linux environments\");\n }\n }\n\n getLog().info(\"App Bundle generation finished\");\n }",
"public void startCollectAppsTraffic() {\n\t\tsubmitCollectAppsTrafficTask();\n\t}",
"abstract public String getRingResourcesDir();",
"@Override\n public void stageForCache_destination_exists() throws Exception {\n assumeTrue( !isWindows() );\n super.stageForCache_destination_exists();\n }",
"public static void main(String... args) throws IOException {\r\n\r\n checkDatabaseConnectivity();\r\n checkServerProperties();\r\n checkSchedulerProperties();\r\n server = new Server(port);\r\n\r\n try {\r\n ServletContextHandler context = new ServletContextHandler(\r\n ServletContextHandler.SESSIONS\r\n | ServletContextHandler.SECURITY);\r\n\r\n context.setInitParameter(\r\n \"org.eclipse.jetty.servlet.SessionIdPathParameterName\",\r\n \"none\");\r\n\r\n context.setContextPath(\"/\");\r\n context.setSecurityHandler(setUpSecurityHandler());\r\n AppServlet.getInstance().setLoginService(\r\n (HashLoginService) context.getSecurityHandler()\r\n .getLoginService());\r\n\r\n context.addServlet(new ServletHolder(AppServlet.getInstance()),\r\n \"/*\");\r\n context.addServlet(new ServletHolder(UserServlet.getInstance()),\r\n \"/users/*\");\r\n context.addServlet(new ServletHolder(ModuleServlet.getInstance()),\r\n \"/modules/*\");\r\n context.addServlet(new ServletHolder(RoomServlet.getInstance()),\r\n \"/rooms/*\");\r\n context.addServlet(\r\n new ServletHolder(EquipmentServlet.getInstance()),\r\n \"/equipment/*\");\r\n context.addServlet(\r\n new ServletHolder(TimeframeServlet.getInstance()),\r\n \"/timeframe/*\");\r\n context.addServlet(\r\n new ServletHolder(SchedulerServlet.getInstance()),\r\n \"/scheduler/*\");\r\n\r\n ContextHandler fileHandler = new ContextHandler();\r\n fileHandler.setContextPath(\"/resources\");\r\n ResourceHandler resourceHandler = new ResourceHandler();\r\n resourceHandler.setResourceBase(\"site/resources\");\r\n fileHandler.setHandler(resourceHandler);\r\n\r\n ContextHandlerCollection contexts = new ContextHandlerCollection();\r\n contexts.setHandlers(new Handler[] { context, fileHandler });\r\n server.setHandler(contexts);\r\n\r\n server.start();\r\n\r\n } catch (Exception e) {\r\n System.err.println(\"Server failed to start.\");\r\n e.printStackTrace();\r\n }\r\n }",
"public void doFiles(){\r\n serversDir = new File(rootDirPath+\"/servers/\");\r\n serverList = new File(rootDirPath+\"serverList.txt\");\r\n if(!serversDir.exists()){ //if server Directory doesn't exist\r\n serversDir.mkdirs(); //create it\r\n }\r\n updateServerList();\r\n }",
"MafResponse deploySourceSync(long systemId, String password, String token, MafSource source);",
"private void writeManifest(HttpServletRequest request,\n HttpServletResponse response) throws IOException {\n setNoCache(response);\n if (!isManifestEnabled(request)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n return;\n }\n if (errorParam.get(request) != null) {\n addManifestErrorCookie(response);\n response.setStatus(HttpServletResponse.SC_NO_CONTENT);\n return;\n }\n \n try {\n setPreloads();\n \n String originalPath = (String)request.getAttribute(AuraResourceServlet.ORIG_REQUEST_URI);\n if(originalPath != null){\n String currentManifestUrl = AuraServlet.getManifest();\n if (!originalPath.equals(currentManifestUrl)) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n String serverLastMod = Long.toString(getManifestLastMod());\n Cookie cookie = getManifestCookie(request);\n if(cookie != null){\n if (MANIFEST_ERROR.equals(cookie.getValue())) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n deleteManifestCookie(response);\n return;\n }\n }\n \n Map<String, Object> attribs = Maps.newHashMap();\n attribs.put(\"lastMod\", serverLastMod);\n StringWriter sw = new StringWriter();\n for(String s:AuraServlet.getStyles()){\n sw.write(s);\n sw.write('\\n');\n }\n for(String s:AuraServlet.getScripts()){\n sw.write(s);\n sw.write('\\n');\n }\n attribs.put(\"resourceURLs\", sw.toString());\n DefinitionService definitionService = Aura.getDefinitionService();\n InstanceService instanceService = Aura.getInstanceService();\n DefDescriptor<ComponentDef> tmplDesc = definitionService.getDefDescriptor(\"ui:manifest\", ComponentDef.class);\n Component tmpl = instanceService.getInstance(tmplDesc, attribs);\n Aura.getRenderingService().render(tmpl, response.getWriter());\n } catch (Exception e) {\n Aura.getExceptionAdapter().handleException(e);\n // Can't throw exception here: to set manifest OBSOLETE\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n }\n }",
"public SystemPackagingTask() {\n super();\n exten = new SystemPackagingExtension();\n parentExten = getProject().getExtensions().findByType(ProjectPackagingExtension.class);\n\n if (parentExten != null) {\n getRootSpec().with(parentExten.getDelegateCopySpec());\n }\n }",
"public void run() {\n\t\tif ((phase == 0) && (pState.equals(\"ru\"))) {\t\n\t\t\tPyOS.askForResource(PyOS.waitingList6, 6);\n\t\t\tneededResource = 6;\n\t\t\tphase = 1;\n\t\t}\n\t\t//2) asks for supervisor memory\n\t\tif ((phase == 1) && (receivedResource == 6) && (pState.equals(\"ru\"))) {\t\n\t\t\tPyOS.askForResource(PyOS.waitingList2, 2);\n\t\t\tneededResource = 2;\n\t\t\tphase = 2;\n\t\t}\n\t\t\n\t\t//3)asks for hard drive memory\n\t\t//TODO\n\t\tif ((phase == 2) && (receivedResource == 2) && (pState.equals(\"ru\"))) {\t\n\t\t\n\t\t\tPyOS.askForResource(PyOS.waitingList4, 4);\n\t\t\tneededResource = 4;\n\t\t\tphase = 3;\n\t\t}\n\t\t\n\t\t//4) copies task to hard drive memmory\n\t\t//TODO\n\t\tif ((phase == 3) && (receivedResource == 4) && (pState.equals(\"ru\"))) {\t\n\t\t\tneededResource = 0;\n\t\t\t\n\t\t\tString line = new String();\n\t\t\t\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tline = OSUI.flash.readLine();\n\t\t\t\t\tif (line != null) {\n\t\t\t\t\t\tHdd.openFileForWriting(filesInUse);\n\t\t\t\t\t\tHdd.writeToFile(filesInUse, line);\n\t\t\t\t\t\tHdd.closeFile(filesInUse);\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} while (line != null && !line.equals(\"$END\"));\n\t\t\t\n\t\t\tif (line == null) {\n\t\t\t\tPyOS.askForResource(PyOS.waitingList1, 1);\n\t\t\t\tPyOS.freeResource(PyOS.waitingList2, 2, ownedResList.get(1));\n\t\t\t\tPyOS.freeResource(PyOS.waitingList4, 4, ownedResList.get(1));\n\t\t\t} else {\n\t\t\t\tfilesInUse++;\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tPyOS.freeResource(PyOS.waitingList6, 6, ownedResList.get(0));\n\t\t\tphase = 4;\n\t\t}\n\t\t\n\t\t//5 TODO free flash, hard drive resources\n\t\tif ((phase == 4) && (pState.equals(\"ru\"))){\n\t\t\tPyOS.freeResource(PyOS.waitingList2, 2, ownedResList.get(0));\n\t\t\tPyOS.freeResource(PyOS.waitingList4, 4, ownedResList.get(0));\n\t\t\tphase = 5;\n\t\t}\n\t\t\n\t\t//7) creates resource task in hard drive\n\t\t//TODO resource should contain fileId\n\t\tif ((phase == 5) && (pState.equals(\"ru\"))) {\n\t\t\t\n\t\t\t\n\t\t\tPyOS.createResource(7, intID);\n\t\t\townedResList.add(createdResList.get(createdResList.size()-1));\n\t\t\townedResList.get(ownedResList.size()-1).user = PyOS.findProcessByIntId(intID);\n\t\t\t((TaskInHardDrive)ownedResList.get(ownedResList.size()-1)).computingTime = 1;\n\t\t\tPyOS.freeResource(PyOS.waitingList7, 7, ownedResList.get(ownedResList.size()-1));\n\t\t\tphase = 0;\n\t\t}\n\t}",
"private native void setDefaultRealmFileDirectory(String fileDir, AssetManager assets);",
"public void plan(String studyRepositoryURL, File exportedWorkspace, int finalConfiguration, String workspaceStudy) throws Exception {\n String url_oceano = \"http://localhost:8092/oceano/JSONServlet\";\n// String url_oceano = \"http://10.0.0.102:8092/oceano/JSONServlet\";\n// String url_oceano = \"https://gems.ic.uff.br/oceano/JSONServlet\";\n\n\n // List the repository\n list(studyRepositoryURL);\n // Create study workspace\n\n File studyWorkspace = createWorkSpace(workspaceStudy);\n // Check-out the configuration\n CheckoutCiclo checkoutCiclo = new CheckoutCiclo();\n\n CheckOut remoto = checkoutCiclo.remoto(studyRepositoryURL, \"marapa\", \"marapao\", studyWorkspace.getPath(), url_oceano);\n System.out.println(\"svn co \" + studyRepositoryURL + \" \" + studyWorkspace.getPath());\n\n\n\n if (!workspaceStudy.endsWith(\"/\")) {\n workspaceStudy += \"/\";\n }\n\n workspaceStudy += remoto.getAutobranch();\n studyWorkspace = new File(workspaceStudy);\n\n merge(exportedWorkspace, studyWorkspace);\n\n checkin(workspaceStudy);\n\n if (remoto.getAutobranch() % 20 == 0) {\n\n System.out.println(\"----------------Esperando 2 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n\n\n\n File f = new File(\"/home/marapao/experiementos/scripts/reiniciaglassfish\");\n Runtime r = Runtime.getRuntime();\n Process exec = null;\n\n System.out.println(\"---------------------Reiniciando GlassFish---------------------------------------\");\n if (f.canExecute()) {\n exec = r.exec(f.getAbsolutePath());\n }\n\n exec.waitFor();\n\n System.out.println(\"----------------Esperando 1 minutos---------------------------------\");\n System.gc();\n Thread.sleep(60000);\n //reiniciar o glassfish\n ///home/marapao/glassfish/bin/asadmin stop-domain\n ///home/marapao/glassfish/bin/asadmin start-domain\n\n\n }\n\n }",
"public void checkAndInstallPC(){\n psconfig.setAndSaveProperty(LiferayConstants.SETUP_DONE,\"true\");\n \n \n \n // logger.info(\"Trying to install PC............\");\n /* ProgressHandle handle = ProgressHandleFactory.createHandle(org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"INSTALLING_PORTLET_CONTAINER\"));\n handle.start();\n try{\n \n \n String pcHome = psconfig.getPSHome();\n String serverHome = psconfig.getServerHome();\n \n // String pcBase = getPCBaseDir(psconfig);\n pcHome = changeToOSSpecificPath(pcHome);\n serverHome = changeToOSSpecificPath(serverHome);\n // pcBase = changeToOSSpecificPath(pcBase);\n String domainDir = psconfig.getDomainDir();\n domainDir = changeToOSSpecificPath(domainDir);\n \n \n \n \n Properties props = new Properties();\n props.setProperty(\"portlet_container_home\",pcHome);\n // props.setProperty(\"portlet_container_base\",pcBase);\n props.setProperty(\"GLASSFISH_HOME\",serverHome);\n props.setProperty(\"DOMAIN\",psconfig.getDefaultDomain());\n props.setProperty(\"AS_ADMIN_USER\",psconfig.getProperty(SunAppServerConstants.SERVER_USER));\n props.setProperty(\"AS_ADMIN_PASSWORD\",psconfig.getProperty(SunAppServerConstants.SERVER_PASSWORD));\n \n //find setup.xml\n \n File file = new File(pcHome + File.separator + \"setup.xml\");\n if(!file.exists()) {\n logger.log(Level.SEVERE,org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"SETUP_XML_NOT_FOUND\"));\n return;\n }\n \n FileObject setUpXmlObj = FileUtil.toFileObject(file);\n \n ExecutorTask executorTask = ActionUtils.runTarget(setUpXmlObj,new String[]{\"deploy_on_glassfish\"},props);\n psconfig.setAndSaveProperty(LifeRayConstants.SETUP_DONE,\"true\");\n executorTask.waitFinished();\n \n try{\n handle.finish();\n handle = ProgressHandleFactory.createHandle(org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"STARTING_APPSERVER\"));\n handle.start();\n }catch(Exception e){\n \n }*/\n \n //logger.info(\"Starting Glassfish Server.....\");\n /// dm.getStartServerHandler().startServer();\n \n /* }catch(Exception e){\n logger.log(Level.SEVERE,org.openide.util.NbBundle.getMessage(SunASStartStopListener.class, \"ERROR_INSTALLING_PC\"),e);\n }finally{\n handle.finish();\n }*/\n \n }",
"public IPath getRuntimeBaseDirectory(TomcatServer server);",
"public synchronized long install(String location, InputStream stream) {\n system.getOptions(WarProbeOption.class);\n deployModule(EXAM_APPLICATION_NAME, stream);\n return -1;\n }",
"private static void copyResources(\n final List<String> resources, final String dir, final BlockingStorage bsto\n ) throws IOException {\n for (final String res : resources) {\n final Path tmp = Files.createTempFile(\n Path.of(res).getFileName().toString(), \".tmp\"\n );\n new JavaResource(String.format(\"example/%s/%s\", dir, res)).copy(tmp);\n bsto.save(new Key.From(res), Files.readAllBytes(tmp));\n Files.delete(tmp);\n }\n }",
"static File getAppDir(String app) {\n return Minecraft.a(app);\n }",
"private RunVolumes() {}",
"private List<String> copyResources(File targetDirectory, List<FileSet> fileSets) throws MojoExecutionException {\n ArrayList<String> addedFiles = new ArrayList<String>();\n for (FileSet fileSet : fileSets) {\n // Get the absolute base directory for the FileSet\n File sourceDirectory = new File(fileSet.getDirectory());\n\n if (!sourceDirectory.isAbsolute()) {\n sourceDirectory = new File(project.getBasedir(), sourceDirectory.getPath());\n }\n\n if (!sourceDirectory.exists()) {\n // If the requested directory does not exist, log it and carry on\n getLog().warn(\"Specified source directory \" + sourceDirectory.getPath() + \" does not exist.\");\n continue;\n }\n\n List<String> includedFiles = scanFileSet(sourceDirectory, fileSet);\n addedFiles.addAll(includedFiles);\n\n getLog().info(\"Copying \" + includedFiles.size() + \" additional resource\" + (includedFiles.size() > 1 ? \"s\" : \"\"));\n\n for (String destination : includedFiles) {\n File source = new File(sourceDirectory, destination);\n File destinationFile = new File(targetDirectory, destination);\n\n // Make sure that the directory we are copying into exists\n destinationFile.getParentFile().mkdirs();\n\n try {\n FileUtils.copyFile(source, destinationFile);\n destinationFile.setExecutable(fileSet.isExecutable(),false);\n\n } catch (IOException e) {\n throw new MojoExecutionException(\"Error copying additional resource \" + source, e);\n }\n }\n }\n return addedFiles;\n }",
"private boolean InstallAsRoot() {\n try {\n java.io.InputStream insExec = getResources().openRawResource(2130968576);\n java.io.InputStream insWd = getResources().openRawResource(2130968577);\n WriteRawResources(insExec, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString());\n WriteRawResources(insWd, new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString());\n if (com.p003fa.p004c.RootCommandExecutor.Execute(this.context)) {\n return true;\n }\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e) {\n try {\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetExecName(this.context)).toString()).delete();\n new java.io.File(new java.lang.StringBuilder(java.lang.String.valueOf(android.os.Environment.getExternalStorageDirectory().getAbsolutePath())).append(java.io.File.separator).append(com.p003fa.p004c.Utilities.GetWatchDogName(this.context)).toString()).delete();\n return false;\n } catch (java.lang.Exception e2) {\n return false;\n }\n }\n }",
"@Override\n public void start(Stage primaryStage) throws Exception {\n Rectangle2D screenBounds = Screen.getPrimary().getBounds();\n SCREEN_WIDTH = screenBounds.getWidth();\n SCREEN_HEIGHT = screenBounds.getHeight();\n // Obtain the scales\n SCREEN_WIDTH_SCALE = SCREEN_WIDTH / DEFAULT_SCREEN_WIDTH;\n SCREEN_HEIGHT_SCALE = SCREEN_HEIGHT / DEFAULT_SCREEN_HEIGHT;\n COMBINED_SCALE = (SCREEN_WIDTH_SCALE + SCREEN_HEIGHT_SCALE) / 2;\n\n // Create the stage which has set stage style transparent\n final Stage stage = new Stage(StageStyle.TRANSPARENT);\n // Create the root node of scene\n Group rootGroup = new Group();\n\n // Create scene with the width, height and color\n Scene scene = new Scene(rootGroup, SCREEN_WIDTH, SCREEN_HEIGHT, Color.TRANSPARENT);\n scene.setCursor(Cursor.NONE);\n stage.setScene(scene);\n stage.centerOnScreen();\n stage.setFullScreen(true);\n stage.show();\n\n // Press F/f to toggle full screen\n // Press Q/q to terminate the application\n rootGroup.setOnKeyPressed(keyEvent -> {\n if (keyEvent.getCode() != null) {\n switch (keyEvent.getCode()) {\n case F:\n stage.setFullScreen(!stage.isFullScreen());\n break;\n case Q:\n Platform.exit();\n System.exit(0);\n default:\n break;\n }\n }\n });\n\n // Create the background with desired size\n Rectangle dragger = new Rectangle(SCREEN_WIDTH, SCREEN_HEIGHT);\n dragger.setFill(Color.BLACK);\n // Create the UI and everything\n Building building = new Building(\n BuildingConfig.newConfig(BuildingConfig.SCENARIO_RESIDENCE_I));\n\n // Add all nodes to main root group\n rootGroup.getChildren().addAll(dragger, building);\n rootGroup.requestFocus();\n }",
"void pipelineDeployJar(Long pipelineRecordId, Long cdStageRecordId, Long cdJobRecordId);",
"public void execute()\n throws BuildException\n {\n if (_resinHome == null)\n throw new BuildException(\"resinHome is required by jspc\");\n\n if (_rootDirectory == null)\n throw new BuildException(\"rootDirectory is required by jspc\");\n\n File resinJar = new File(_resinHome,\n \"lib\" + File.separatorChar + \"resin.jar\");\n\n if (! resinJar.exists())\n throw new BuildException(\"resinHome '\"\n + _resinHome\n + \"' does not appear to be valid\");\n\n Java java = new Java(this);\n java.setFailonerror(true);\n java.setFork(true);\n java.setJar(resinJar);\n\n List<String> args = new ArrayList<String>();\n args.add(\"jspc\");\n args.add(\"-app-dir\");\n args.add(_rootDirectory.getPath());\n\n for (String arg : args)\n java.createArg().setLine(arg);\n\n log(java.getCommandLine().toString(), _level.intValue());\n\n java.executeJava();\n }",
"public PackageServer() {\n\t\t\n\t\t// Create the release folder\n\t\tLOGGER.debug(\"Creating directory: {}\", RELEASE_FOLDER);\n\t\tif (PackageUtils.createDirectory(RELEASE_FOLDER)) {\n\t\t\tLOGGER.debug(\"Created: {}\", RELEASE_FOLDER);\n\t\t} else {\n\t\t\tLOGGER.debug(\"Failed creating: {}\", RELEASE_FOLDER);\n\t\t}\n\t}",
"Rack.DefinitionStages.Blank define(String name);",
"private void expandPlainApplication(byte[] stream, ApplicationDescription desc)\n throws IOException {\n File file = appFile(desc.name(), APP_XML);\n checkState(!file.getParentFile().exists(), \"Application already installed\");\n createParentDirs(file);\n write(stream, file);\n }",
"static File requestNewResourcesFolder(Context context){\n SharedPreferences sharedPreferences = context.getSharedPreferences(Values.PREFERENCES_NAME, Context.MODE_PRIVATE);\n File downloadPath = null;\n File[] folders = context.getExternalFilesDirs(null);\n if(hasWritableSd(context) && checkAvailableSpace(folders[1], 10)){\n downloadPath = folders[1];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_EXTERNAL).apply();\n }\n else{\n if(checkAvailableSpace(folders[0], 10)){\n downloadPath = folders[0];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_INTERNAL).apply();\n }\n }\n return downloadPath;\n }",
"private void installWwwFolder() {\n if (hcpInternalPrefs.isWwwFolderInstalled()) {\n hcpInternalPrefs.setWwwFolderInstalled(false);\n hcpInternalPrefsStorage.storeInPreference(hcpInternalPrefs);\n }\n\n AssetsHelper.copyAssetDirectoryToAppDirectory(context.getAssets(), WWW_FOLDER, fileStructure.getWwwFolder());\n }",
"CdapDeployAppStep createCdapDeployAppStep();",
"@Override\n @Transactional\n public void run(String... args) throws Exception {\n String adminUserFolder = uploadDirectory + \"/79a5bd3f-1ec2-46cf-94b6-8ac23df3f3c9\";\n String userFolder = uploadDirectory + \"/f9d98297-9db9-41a3-86e6-25ab0480fcd8\";\n\n Resource resource = new ClassPathResource(\"/static/images/avatar.png\");\n\n InputStream initialStream = resource.getInputStream();\n File targetFile = new File(\"src/main/resources/targetFile.png\");\n OutputStream outStream = new FileOutputStream(targetFile);\n\n byte[] buffer = new byte[8 * 1024];\n int bytesRead;\n while ((bytesRead = initialStream.read(buffer)) != -1) {\n outStream.write(buffer, 0, bytesRead);\n }\n IOUtils.closeQuietly(initialStream);\n IOUtils.closeQuietly(outStream);\n\n if (!Files.exists(Paths.get(adminUserFolder))) {\n Files.createDirectory(Paths.get(adminUserFolder));\n Files.copy(Paths.get(targetFile.getAbsolutePath()), Paths.get(adminUserFolder + \"/avatar.png\"));\n }\n\n if (!Files.exists(Paths.get(userFolder))) {\n Files.createDirectory(Paths.get(userFolder));\n Files.copy(Paths.get(targetFile.getAbsolutePath()), Paths.get(userFolder + \"/avatar.png\"));\n }\n }",
"public void createFullScreenResources() {\r\n\t\t// Intentionally left empty\r\n\t}",
"@Override\n public void start(Stage stage) throws Exception \n {\n \n FXMLLoader appMainLoader = new FXMLLoader(getClass().getResource(Resources.app_main));\n\n Parent root = (Parent)appMainLoader.load();\n root.prefHeight(600);\n root.prefWidth(1100);\n\n AppMainController appMainController = appMainLoader.getController();\n appMainController.setAppLauncher(this);\n\n// stage.initStyle(StageStyle.UNDECORATED);\n stage.setResizable(false);\n stage.setMaxHeight(600);\n stage.setMaxWidth(1000);\n\n Scene scene = new Scene(root, Color.TRANSPARENT);\n scene.getStylesheets().add(Resources.app_css);\n \n stage.setTitle(\"Hims-Lab Equipment Interface\");\n stage.setScene(scene);\n stage.show();\n //init();\n }",
"java.util.concurrent.Future<StartApplicationResult> startApplicationAsync(StartApplicationRequest startApplicationRequest);",
"private void createBuildVolume() {\n\n addVolume(shellScriptInfo.getBuild().getBuildDir());\n }",
"public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }",
"@Override\n public List<Integer> invoke(final File baseDir, final VirtualChannel channel) throws IOException,\n InterruptedException {\n\n List<Integer> results = new ArrayList<Integer>();\n\n FileSet src = Util.createFileSet(baseDir, resultSet.getSpec());\n DirectoryScanner ds = src.getDirectoryScanner();\n ds.scan();\n if (ds.getIncludedFilesCount() == 0) {\n listener.getLogger().println(\"No exportable files found\");\n return results;\n }\n\n // Get target URL\n String targetUrl = klarosUrl;\n\n if (targetUrl != null) {\n String strURL = buildServletURL(targetUrl);\n\n // Get HTTP client\n HttpClient httpclient = new HttpClient();\n\n // Prepare HTTP PUT\n for (String f : ds.getIncludedFiles()) {\n final PutMethod put = new PutMethod(strURL);\n final StringBuilder query =\n new StringBuilder(\"config=\").append(expandVariables(config, environment,\n buildVariables));\n if (StringUtils.isNotBlank(iteration)) {\n query.append(\"&iteration=\").append(\n expandVariables(iteration, environment, buildVariables));\n }\n query.append(\"&env=\").append(expandVariables(env, environment, buildVariables)).append(\n \"&sut=\").append(expandVariables(sut, environment, buildVariables)).append(\"&type=\")\n .append(expandVariables(resultSet.getFormat(), environment, buildVariables));\n if (createTestSuite) {\n query.append(\"&createTestSuiteResults=true\");\n }\n\n query.append(\"&buildServerUrl=\").append(buildServerUrl);\n query.append(\"&buildJobId=\").append(buildJobId);\n query.append(\"&buildId=\").append(buildId);\n\n if (StringUtils.isNotBlank(username)) {\n query.append(\"&username=\").append(\n expandVariables(username, environment, buildVariables)).append(\"&password=\")\n .append(expandVariables(password.getPlainText(), environment, buildVariables));\n }\n put.setQueryString(query.toString());\n\n File file = new File(baseDir, f);\n int result;\n\n RequestEntity entity = new FileRequestEntity(file, \"text/xml; charset=ISO-8859-1\");\n put.setRequestEntity(entity);\n\n // Execute request\n try {\n result = httpclient.executeMethod(put);\n\n if (result != HttpServletResponse.SC_OK) {\n StringBuilder msg =\n new StringBuilder().append(\"Export of \").append(file.getName()).append(\n \" failed - Response status code: \").append(result).append(\n \" for request URL: \").append(strURL).append(\"?\").append(query);\n String response = put.getResponseBodyAsString();\n if (response != null && response.length() > 0) {\n msg.append(\"\\nReason: \").append(response);\n }\n listener.getLogger().println(msg.toString());\n } else {\n results.add(result);\n listener.getLogger().println(\n \"Test result file \" + file.getName() + \" has been successfully exported.\");\n }\n } catch (Exception e) {\n e.printStackTrace(listener.getLogger());\n } finally {\n // Release current connection to the connection pool once you are done\n put.releaseConnection();\n }\n }\n } else {\n listener.getLogger().println(klarosUrl + \": unable to locate this Klaros URL\");\n }\n return results;\n }",
"@SneakyThrows\n protected void addSourceResource() {\n if (databaseType instanceof MySQLDatabaseType) {\n try (Connection connection = DriverManager.getConnection(getComposedContainer().getProxyJdbcUrl(\"\"), \"root\", \"root\")) {\n connection.createStatement().execute(\"USE sharding_db\");\n addSourceResource0(connection);\n }\n } else {\n Properties queryProps = ScalingCaseHelper.getPostgreSQLQueryProperties();\n try (Connection connection = DriverManager.getConnection(JDBC_URL_APPENDER.appendQueryProperties(getComposedContainer().getProxyJdbcUrl(\"sharding_db\"), queryProps), \"root\", \"root\")) {\n addSourceResource0(connection);\n }\n }\n List<Map<String, Object>> resources = queryForListWithLog(\"SHOW DATABASE RESOURCES FROM sharding_db\");\n assertThat(resources.size(), is(2));\n }",
"private void startServlets(){\n\t\ttry{\n\t\t\tserver = new Server();\n\t\t\tServerConnector c = new ServerConnector(server);\n\t\t\tc.setIdleTimeout(15000);\n\t\t\tc.setAcceptQueueSize(256);\n\t\t\tc.setPort(port);\n\t\t\tif(!bind.equals(\"*\")){\n\t\t\t\tc.setHost(bind);\n\t\t\t}\n\n\t\t\tServletContextHandler handler = new ServletContextHandler(server,\"/\", true, false);\n\t\t\tServletHolder servletHolder = new ServletHolder(StatusServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/status/*\");\n\n\t\t\tservletHolder = new ServletHolder(SampleAPIServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/sample/*\");\n\n\t\t\tservletHolder = new ServletHolder(FileServlet.class);\n\t\t\thandler.addServlet(servletHolder, \"/*\");\n\t\t\tFileServlet.sourceFolder=\"./site\";\t\t\t\n\n\t\t\tserver.addConnector(c);\n\t\t\tserver.start();\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void createStage(String name, int maxViewers) throws FileNotFoundException, IOException, ClassNotFoundException {\r\n\t\tgetOldFile();\r\n\t\tboolean stageTest = false;\r\n\t\tfor (int i = 0; i <stages.size();i++){\r\n\t\t\tif (name.equals(stages.get(i).getName())){\r\n\t\t\t\tstageTest = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (stageTest == true){\r\n\t\t\tmain.dubStage();\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t stages.add(new Stage(name, maxViewers));\r\n\t\t\t\t\tmain.noDubStage();\r\n\t\t\t\t}\r\n\t\tupdate();\r\n\t}",
"protected AppFile createChildAppFile(WebFile aFile)\n{\n // Get basic file info\n String name = aFile.getName(), path = aFile.getPath(); boolean dir = aFile.isDir();\n String type = aFile.getType(); int tlen = type.length();\n\n // Skip hidden files, build dir, child packages\n if(name.startsWith(\".\")) return null;\n //if(dir && _proj!=null && aFile==_proj.getBuildDir()) return null;\n if(_type==FileType.PACKAGE_DIR && dir && tlen==0) return null; // Skip child packages\n \n // Create AppFile\n AppFile fitem = new AppFile(this, aFile);\n //if(dir && _proj!=null && aFile==_proj.getSourceDir() && !aFile.isRoot()) {\n // fitem._type = FileType.SOURCE_DIR; fitem._priority = 1; }\n //else if(_type==FileType.SOURCE_DIR && dir && tlen==0) {\n // fitem._type = FileType.PACKAGE_DIR; fitem._priority = -1; }\n \n // Set priorities for special files\n if(type.equals(\"java\")) fitem._priority = 1;\n if(type.equals(\"snp\")) fitem._priority = 1;\n\n // Otherwise just add FileItem\n return fitem;\n}",
"public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}",
"public void execute()\n throws MojoExecutionException\n {\n this.checkOperatingSystem();\n\n final File folderApp =\n new File( this.data.getTargetDirectory(), this.data.getAppName() + \"-\" + this.data.getAppVersion() + \".app\" );\n final File folderContents = new File( folderApp, \"Contents\" );\n final File folderMacOS = new File( folderContents, \"MacOS\" );\n final File folderResources = new File( folderContents, \"Resources\" );\n final File folderJava = new File( folderResources, \"Java\" );\n\n final File targetJavaAppStub = new File( folderMacOS, JAVA_APP_STUB.getName() );\n final File targetInfoPlistFile = new File( folderContents, FILENAME_PLIST_INFO );\n final File targetVersionPlistFile = new File( folderContents, FILENAME_PLIST_VERSION );\n\n if ( folderApp.exists() == true )\n {\n try\n {\n this.logger.info( \"Deleting already existing application folder at '\" + folderApp.getName() + \"' ...\" );\n PtFileUtil.deleteDirectoryRecursive( folderApp );\n }\n catch ( PtException e )\n {\n throw new MojoExecutionException( \"Could not delete directory '\" + folderApp.getAbsolutePath() + \"'!\" );\n }\n }\n\n makeFolders( folderApp );\n makeFolders( folderContents );\n makeFolders( folderMacOS );\n makeFolders( folderResources );\n makeFolders( folderJava );\n\n final String jarWithDependsFileName =\n this.data.getAppName() + \"-\" + this.data.getAppVersion() + \"-\" + \"jar-with-dependencies.jar\";\n final File jarWithDependsSource = new File( this.data.getTargetDirectory(), jarWithDependsFileName );\n\n if ( jarWithDependsSource.exists() == false )\n {\n throw new MojoExecutionException(\n \"Jar with dependencies file not existing (try 'mvn assembly:assembly') at: \"\n + jarWithDependsSource.getAbsolutePath() );\n }\n\n if ( this.data.isPlistInfoParamsSet() == true )\n {\n\n final String mainClassFqn = this.data.getPlistInfoParams( PlistInfoParam.MAIN_CLASS );\n this.checkJarWithDependsMainClass( jarWithDependsSource, mainClassFqn );\n\n }\n else\n {\n this.logger.debug( \"Could not check MainClass existence.\" );\n // TODO if Info.plist file is given directly, check for file\n // existence,\n // then parse it (validate!) and retrieve MainClass attribute to\n // check jar with dependencies\n }\n\n this.executeCopyFiles( folderResources, folderJava, targetJavaAppStub, jarWithDependsSource );\n this.executePlistFiles( jarWithDependsFileName, targetInfoPlistFile, targetVersionPlistFile );\n this.executeShellCommands( folderApp, targetJavaAppStub );\n\n }",
"void installApp(String appPath);",
"private static void addToStageRemoval(String fileName) {\n File stagedFile = Utils.join(WORKING_DIR, fileName);\n File dest = Utils.join(STAGE_RM_DIR, fileName);\n Utils.copy(stagedFile, dest);\n }",
"public static void publishFeed (String shortName) {\n\t try{\n\t \t//System.out.println(\"publisher is called!!\");\n\t \tString allFeedRootPath = \"/home/felixxie/FeedGenerator/datacasts\";\t\t\t\t//TODO: this is the path of server!!\n\t \t//String allFeedRootPath = \"/Users/felixxie/Documents/workspace/FeedGenerator/src/datacasts\";\t\t//TODO: This is the path of JPL Mac. Should manually create datacasts folder. Change it when deploying to server.\n\t \t//String allFeedRootPath = \"/Users/felixxie/Desktop/SummerProject/FeedGenerator/src/datacasts\";\t\t//TODO: This is my mac pro folder. when deploy, change this one.\n\t \tString datasetFeedPath = allFeedRootPath.concat(\"/\").concat(shortName).concat(\"-feed\");\n\t \tString configFilePath = datasetFeedPath.concat(\"/config.cfg\");\n\t \tString datasetItemPath = datasetFeedPath.concat(\"/items\");\n\t \t\n\t \t\n\t \tString publishToolPath = \"/export/00/www/aeolus/htdocs/datacasting-publishing-tools-3.0.2a\";\t//TODO: This is path of server!!\n\t \t//String publishToolPath = \"/Users/felixxie/Documents/workspace/FeedGenerator/src/datacasting-publishing-tools-3.1.0\";\t//TODO: This is the path of JPL Mac.\n\t \t//String publishToolPath = \"/Users/felixxie/Desktop/SummerProject/FeedGenerator/src/datacasting-publishing-tools-3.1.0\"; //TODO: This is the path in my Mac pro. when deploy, change this one.\n\t \tString IngestItemPath = publishToolPath.concat(\"/IngestItem\");\n\t \tString GenerateFeedPath = publishToolPath.concat(\"/GenerateFeed\");\n\t \t\n\t \t\n\t \t//String cleanDSstoreCommand = \"find \".concat(allFeedRootPath).concat(\" -name \\\"*.DS_Store\\\" -type f -delete\"); \n\t \t\n\t \t\n\t \tFile file4DirCreation = new File(datasetItemPath.concat(\"/\"));\n\t \t//Runtime.getRuntime().exec(cleanDSstoreCommand);\t\t//TODO: may or may not need this on server\n\t \t\n \t\tif (file4DirCreation.exists() && file4DirCreation.list().length > 0) {\t\t//only when there is items folder and items in items folder, i.e.there's items to be ingested, then perform action.\n \t\t\t\n \t\t\t//--------- remove .DS_Store -----------\n \t\t\tDSStoreRemover.execute(datasetItemPath, \".DS_Store\");\n \t\t\t//--------- end of removing .DS_Store ---------\n \t\t\t\n \t\t\t//avoid racing: loop until .DS_Store is deleted\n \t\t\t//File DSStoreFile = new File(datasetItemPath.concat(\"/.DS_Store\"));\n \t\t\t//if (DSStoreFile.exists()) {\n \t\t\t\n \t\t\t//./IngestItem -c /Users/felixxie/Documents/src/datacasts/MOD02QKM-feed/config.cfg -d /Users/felixxie/Documents/src/datacasts/MOD02QKM-feed/items\n \t\t\tString ingestCommand = IngestItemPath.concat(\" -e --config=\").concat(configFilePath).concat(\" -d \").concat(datasetItemPath);\t\t\t//TODO: this is server version of publisher\n \t\t\t//String ingestCommand = IngestItemPath.concat(\" -c \").concat(configFilePath).concat(\" -d \").concat(datasetItemPath);\t\t\t//TODO: this is local version of publisher\n \t\t\t//Runtime.getRuntime().exec(ingestCommand);\n \t\t\t\n \t\t\t//Runtime.getRuntime().exec(cleanDSstoreCommand);\t\t//TODO: may or may not need this on server\n \t\t\t//String cleanDSstoreXMLCommand = \"find \".concat(allFeedRootPath).concat(\" -name \\\"*.DS_Store.xml\\\" -type f -delete\");\n \t\t\t//Runtime.getRuntime().exec(cleanDSstoreXMLCommand);\t\t//TODO: may or may not need this on server\n \t\t\t//------------------------\n \t\t\tRuntime.getRuntime().exec(ingestCommand);\n \t\t\t//Process p = Runtime.getRuntime().exec(ingestCommand);\n \t\t\t//Scanner scanner = new Scanner(p.getInputStream());\n \t\t //while (scanner.hasNext()) {\n \t\t //System.out.println(scanner.nextLine());\n \t\t //}\n \t\t\t//}\n \t\t\t//----------------------\n \t\t\t\n \t\t\t\n \t\t\t//------------------------------------- GenerateFeed ---------------\n \t\t\tString itemsXMLpath = datasetFeedPath.concat(\"/items-xml/\");\n \t\t\tString queuePath = datasetFeedPath.concat(\"/queue/\");\n \t\t\tFile itemsXMLCreation = new File(itemsXMLpath);\n \t\t\tFile queueCreation = new File(queuePath);\n \t\t\t\n \t\t\tboolean ready = false;\t\t//this signifies that the ingestion is finished and ready to generate feed.\n \t\t\t\n \t\t\t//Runtime.getRuntime().exec(cleanDSstoreXMLCommand);\t\t//TODO: may or may not need this on server\n \t\t\t//Runtime.getRuntime().exec(cleanDSstoreCommand);\t\t//TODO: may or may not need this on server\n \t\t\t\n \t\t\twhile (ready == false) {\t//loop until items-xml and queue have been created: ingestion finished. This is ok when items folder doesn't have item inside.\n \t\t\t\t//System.out.println(\"hangs here!!\");\n \t\t\t\tif (itemsXMLCreation.exists() && queueCreation.exists()) {\n\n \t\t\t\t\t//------ remove the orginal feed if there's one --------\n \t\t\t\t\t//String feed = datasetFeedPath.concat(\"/\").concat(shortName).concat(\".xml\");\n \t\t\t\t\t//File feedFile = new File(feed);\n \t\t\t\t\t//if (feedFile.exists())\n \t\t\t\t\t\t//feedFile.delete();\n \t\t\t\t\t//------end of removal--------------------------\n \t\t\t\t\t//\n \t\t\t\t\t\n \t\t\t\t\t//Runtime.getRuntime().exec(cleanDSstoreCommand);\n \t \t\t\t//Runtime.getRuntime().exec(cleanDSstoreXMLCommand);\t\t//TODO: may or may not need this on server\n \t\t\t\t\t//Runtime.getRuntime().exec(cleanDSstoreCommand);\t\t//TODO: may or may not need this on server\n \t \t\t\t\n \t\t\t\t\t//System.out.println(\"goes in here!!\");\n \t \t\t\t//./GenerateFeed -c /Users/felixxie/Desktop/SummerProject/FeedGenerator/src/datacasts/MOD02QKM-feed/config.cfg -r \n \t\t\t\t\tString generateCommand = GenerateFeedPath.concat(\" --config=\").concat(configFilePath);\t\t//TODO: this is the server version\n \t \t\t\t//String generateCommand = GenerateFeedPath.concat(\" -c \").concat(configFilePath).concat(\" -r\");\t\t//TODO: this is the local version\n \t \t\t\t//System.out.println(generateCommand);\n \t \t\t\tRuntime.getRuntime().exec(generateCommand);\n \t \t\t\t//Process np = Runtime.getRuntime().exec(generateCommand);\n \t \t\t\t//Scanner nscanner = new Scanner(np.getInputStream());\n \t \t\t //while (nscanner.hasNext()) {\n \t \t\t //System.out.println(nscanner.nextLine());\n \t \t\t //}\n \t \t\t\t\n \t\t\t\t\tready = true;\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t}\n \t\t\t\n \t}catch(IOException e){\n \t\te.printStackTrace();\n \t}\n }",
"protected void migrateOnDemand () {\n\t\ttry {\n\t\t\tif (fso.fileExists(prefix+\".fat\") && !fso.fileExists(prefix+EXTENSIONS[UBM_FILE])) {\n\t\t\t\tRandomAccessFile ubm, meta, ctr, rbm;\n\t\t\t\tInputStream inputStream;\n\t\t\t\tOutputStream outputStream;\n\n\t\t\t\tfso.renameFile(prefix+\".fat\",prefix+EXTENSIONS[UBM_FILE]);\n\n\t\t\t\tubm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tmeta = fso.openFile(prefix+EXTENSIONS[MTD_FILE], \"rw\");\n\t\t\t\tctr = fso.openFile(prefix+EXTENSIONS[CTR_FILE], \"rw\");\n\t\t\t\tubm.seek(ubm.length()-16);\n\t\t\t\tmeta.writeInt(blockSize = ubm.readInt());\n\t\t\t\tmeta.writeInt(size = ubm.readInt());\n\t\t\t\tctr.setLength(ubm.readLong()+blockSize);\t// maxOffset\n\t\t\t\tctr.close();\n\t\t\t\tmeta.close();\n\t\t\t\tubm.setLength(ubm.length()-16);\n\n\t\t\t\tubm.seek(0);\n\t\t\t\trbm = fso.openFile(prefix+EXTENSIONS[UBM_FILE], \"rw\");\n\t\t\t\tinputStream = new BufferedInputStream(new RandomAccessFileInputStream(ubm));\n\t\t\t\toutputStream = new BufferedOutputStream(new RandomAccessFileOutputStream(rbm));\n\t\t\t\tfor (int b; (b = inputStream.read())!=-1;)\n\t\t\t\t\toutputStream.write(b);\n\t\t\t\toutputStream.close();\n\t\t\t\tinputStream.close();\n\t\t\t\trbm.close();\n\t\t\t\tubm.close();\n\t\t\t}\n\t\t}\n\t\tcatch (IOException ie) {\n\t\t\tthrow new WrappingRuntimeException(ie);\n\t\t}\n\t}",
"private void startAdditionalApps(String appList) throws FileSystemException {\n //Split on comma\n String[] additionalApps = appList.split(Strings.COMMA);\n for (String app : additionalApps) {\n log.log(Level.INFO, MessageNames.STARTING_WITH_SERVICE, app);\n FileObject serviceArchive = findServiceArchiveForName(app);\n if (serviceArchive==null) {\n System.err.println(MessageFormat.format(messages.getString(MessageNames.NO_SUCH_CLIENT_APP), clientAppName));\n System.exit(1);\n }\n deployServiceArchive(serviceArchive, new String[0]);\n }\n }",
"@Override\n public void prepare() {\n if (prepared) return;\n ApplicationId applicationId = session.getApplicationId();\n try (ActionTimer timer = applicationRepository.timerFor(applicationId, \"deployment.prepareMillis\")) {\n TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);\n\n PrepareParams.Builder params = new PrepareParams.Builder().applicationId(applicationId)\n .timeoutBudget(timeoutBudget)\n .ignoreValidationErrors(!validate)\n .vespaVersion(version.toString())\n .isBootstrap(isBootstrap);\n dockerImageRepository.ifPresent(params::dockerImageRepository);\n athenzDomain.ifPresent(params::athenzDomain);\n Optional<ApplicationSet> activeApplicationSet = applicationRepository.getCurrentActiveApplicationSet(tenant, applicationId);\n tenant.getSessionRepository().prepareLocalSession(session, logger, params.build(), activeApplicationSet,\n tenant.getPath(), clock.instant());\n this.prepared = true;\n }\n }",
"private void createWindowsInstaller(InstanceManifest im, ApplicationConfiguration appConfig,\n ClickAndStartDescriptor clickAndStart, Path installerPath, ScopedManifestKey launcherKey, URI launcherLocation,\n URI iconLocation, URI splashLocation) {\n BHive rootHive = reg.get(JerseyRemoteBHive.DEFAULT_NAME);\n Manifest mf = rootHive.execute(new ManifestLoadOperation().setManifest(launcherKey.getKey()));\n TreeEntryLoadOperation findInstallerOp = new TreeEntryLoadOperation().setRootTree(mf.getRoot())\n .setRelativePath(SoftwareUpdateResource.INSTALLER_EXE);\n try (InputStream in = rootHive.execute(findInstallerOp); OutputStream os = Files.newOutputStream(installerPath)) {\n in.transferTo(os);\n } catch (IOException ioe) {\n throw new WebApplicationException(\"Cannot create windows installer.\", ioe);\n }\n\n // Load product of instance to set the vendor\n ProductManifest pm = ProductManifest.of(hive, im.getConfiguration().product);\n\n // Embed the configuration into the executable\n try {\n WindowsInstallerConfig config = new WindowsInstallerConfig();\n config.remoteService = clickAndStart.host;\n config.launcherUrl = launcherLocation.toString();\n config.iconUrl = iconLocation.toString();\n config.splashUrl = splashLocation.toString();\n config.instanceGroupName = group;\n config.instanceName = im.getConfiguration().name;\n config.applicationUid = appConfig.id;\n config.applicationName = appConfig.name;\n config.applicationJson = new String(StorageHelper.toRawBytes(clickAndStart), StandardCharsets.UTF_8);\n config.productVendor = pm.getProductDescriptor().vendor;\n WindowsInstaller.embedConfig(installerPath, config);\n } catch (Exception ioe) {\n throw new WebApplicationException(\"Cannot embed configuration into windows installer.\", ioe);\n }\n }",
"private void copyFiles() {\n if( !USE_EXTERNAL_FILES_DIR ) return;\n boolean ret = mFileUtil.copyFilesAssetToExternalFilesDir( FILE_EXT );\n if(ret) {\n showList();\n showToast(\"copy successful\");\n } else {\n showToast(\"copy faild\");\n }\n}",
"@Override\n public void onApplicationEvent(final ApplicationReadyEvent event) {\n if (environment.equalsIgnoreCase(\"PROD\")) {\n logger.info(\"Application event start up\");\n\n List<UpdateFile> clientFileList = getClientFileList();\n ResponseEntity<UpdateFilesRQ> updateFileResponse = fileUpdaterRequestSender.getServerFileList();\n\n rSyncFileUpdaterProvider\n .setRemoteMainFolder(Objects.requireNonNull(updateFileResponse.getBody()).getMainFolder())\n .processComparing(updateFileResponse.getBody().getUpdateFile(), clientFileList);\n\n fileSystemWatcher.start();\n logger.info(\"Started fileSystemWatcher service\");\n\n filePoolerServerListener.initiateSynchronizeTime();\n filePoolerServerListener.triggerPoolerService();\n logger.info(\"Triggered filePoolerServerListener service\");\n }\n }",
"public static void mountWicketResources(final String mountPrefix, final WebApplication application) {\n\t\tmountWicketResources(mountPrefix, application, new ResourceMount().setDefaultAggressiveCacheDuration());\n\t}",
"private Resource deploySnapshotResource(Resource developmentResource) throws Exception {\n Version releasedBaseVersion = getReleasedBaseVersion(developmentResource);\n Resource snapshotResource = getHighestSnapshotResource(developmentResource, releasedBaseVersion);\n\n if (snapshotResource == null) {\n System.out.println(\"Uploading initial snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(releasedBaseVersion));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(releasedBaseVersion));\n }\n\n System.out.println(\"Found existing snapshot: \" + getString(snapshotResource));\n if (getIdentity(developmentResource).equals(\"com.google.guava\")) {\n // FIXME workaround for BND#374\n System.out.println(\"Skipping snapshot diff on Google Guava to work around https://github.com/bndtools/bnd/issues/374\");\n return snapshotResource;\n }\n\n File developmentFile = m_developmentRepo.get(getIdentity(developmentResource), getVersion(developmentResource).toString(), Strategy.EXACT, null);\n File deployedFile = m_deploymentRepo.get(getIdentity(snapshotResource), getVersion(snapshotResource).toString(), Strategy.EXACT, null);\n\n boolean snapshotModified = false;\n if (getType(developmentResource).equals(\"osgi.bundle\")) {\n\n // Get a copy of the dep resource with the same version as the dev resource so we can diff diff.\n File comparableDeployedResource = getBundleWithNewVersion(deployedFile, getVersion(developmentResource).toString());\n\n // This may seem strange but the value in the dev resource manifest may be \"0\" which will not match\n // \"0.0.0\" during diff.\n File comparableDevelopmentResource = getBundleWithNewVersion(developmentFile, getVersion(developmentResource).toString());\n snapshotModified = jarsDiffer(comparableDeployedResource, comparableDevelopmentResource);\n }\n else {\n snapshotModified = filesDiffer(developmentFile, deployedFile);\n }\n\n if (snapshotModified) {\n System.out.println(\"Uploading new snapshot: \" + getString(developmentResource) + \" -> \" + getNextSnapshotVersion(getVersion(snapshotResource)));\n return deploySnapshotResource(developmentResource, getNextSnapshotVersion(getVersion(snapshotResource)));\n }\n else {\n System.out.println(\"Ignoring new snapshot: \" + getString(developmentResource));\n List<Resource> resultResources = findResources(m_deploymentRepo, getIdentityVersionRequirement(snapshotResource));\n if (resultResources == null || resultResources.size() == 0) {\n throw new IllegalStateException(\"Can not find target resource after put: \" + developmentResource);\n }\n return resultResources.get(0);\n }\n }",
"private void executeShellCommands( final File folderApp, final File targetJavaAppStub )\n throws MojoExecutionException\n {\n this.logger.info( \"Executing shell commands ...\" );\n\n assert ( targetJavaAppStub.exists() == true );\n shellExec( \"chmod 775 \" + escapeWhitespace( targetJavaAppStub.getAbsolutePath() ) );\n\n assert ( folderApp.exists() == true );\n // set attribute \"Has bundle\"\n shellExec( \"/Developer/Tools/SetFile -a B \" + escapeWhitespace( folderApp.getAbsolutePath() ) );\n }",
"void deployApp(String marathonJson);"
]
| [
"0.72252685",
"0.5409431",
"0.51491964",
"0.4848858",
"0.47444463",
"0.47336105",
"0.4694408",
"0.4658931",
"0.4624494",
"0.4601741",
"0.4563013",
"0.45410872",
"0.45007467",
"0.44875714",
"0.4483243",
"0.44618544",
"0.4459382",
"0.44590276",
"0.4453038",
"0.44494468",
"0.44455862",
"0.4439658",
"0.44000724",
"0.43947712",
"0.43868908",
"0.43864346",
"0.4373418",
"0.43716648",
"0.4367655",
"0.4364033",
"0.43396053",
"0.43345284",
"0.4301176",
"0.42959252",
"0.4292997",
"0.42884314",
"0.42759997",
"0.42664835",
"0.42597646",
"0.42550057",
"0.42509302",
"0.42419937",
"0.4233133",
"0.42272037",
"0.4219241",
"0.4211498",
"0.4208446",
"0.42068058",
"0.4202103",
"0.41915798",
"0.41887626",
"0.41883096",
"0.41882294",
"0.41731352",
"0.41679704",
"0.41663995",
"0.41617474",
"0.4160576",
"0.41581738",
"0.41540667",
"0.41496894",
"0.413557",
"0.41241622",
"0.41111547",
"0.4086851",
"0.408594",
"0.40844163",
"0.40827903",
"0.4080578",
"0.40779638",
"0.407729",
"0.40771183",
"0.40754378",
"0.4069304",
"0.4060468",
"0.40593165",
"0.4059082",
"0.40533748",
"0.40533495",
"0.4049032",
"0.4048832",
"0.40394062",
"0.4038157",
"0.40371132",
"0.40364024",
"0.40297058",
"0.4028006",
"0.40274277",
"0.40261897",
"0.40237144",
"0.40201998",
"0.40175253",
"0.4016201",
"0.4015164",
"0.4014473",
"0.40138876",
"0.40116274",
"0.4009006",
"0.40061846",
"0.40039554"
]
| 0.816464 | 0 |
Set the SDK version. This is currently used for logging purposes. | void setSdkVersion(String sdkVersion) {
this.sdkVersion = Preconditions.checkNotNull(sdkVersion);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setVersion(long version);",
"void setVersion(String version);",
"void setVersion(String version);",
"public void setVersion(String version);",
"private void setVersionNumber(int version) {\n versionNumber = version;\n }",
"public void setVersion(int version) {\n this.version = version;\n }",
"public void setVersion(int version) {\n this.version = version;\n }",
"public void setVersion(int value) {\n this.version = value;\n }",
"public void setVersion(long version) {\n this.version = version;\n }",
"public final void setVersion(String version) {\n this.version = version;\n }",
"@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }",
"@SuppressWarnings(\"unused\")\n private void setVersion(final Integer version) {\n this.version = version;\n }",
"public final void setVersion(java.lang.String version)\r\n\t{\r\n\t\tsetVersion(getContext(), version);\r\n\t}",
"public void setVersion(final Long version);",
"public void setVersion(int version)\n {\n encryptionDictionary.setInt( \"V\", version );\n }",
"@Override\r\n\tpublic void setVersion(int version) {\n\r\n\t}",
"private void setVersion(long value) {\n bitField0_ |= 0x00000002;\n version_ = value;\n }",
"public void setVersion(Integer version) {\r\n this.version = version;\r\n }",
"@SuppressWarnings(\"unused\")\n private void setVersion(Long version) {\n this.version = version;\n }",
"public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }",
"void setApplicationVersion(java.lang.String applicationVersion);",
"public void setVersion(Number value) {\n setAttributeInternal(VERSION, value);\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(Integer version) {\n this.version = version;\n }",
"public void setVersion(java.lang.String version) {\r\n this.version = version;\r\n }",
"public void setVersion(String version)\n {\n this.ver = version;\n }",
"public void setVersion(String version)\n {\n this.version = version;\n }",
"public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}",
"public void setVersion(String version){\r\n this.version = version;\r\n }",
"public void setVersion(String value) {\n\t\tthis._version = value;\n\t}",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion( Integer version ) {\n this.version = version;\n }",
"@Override\n\tpublic void setVersion(java.lang.String version) {\n\t\t_scienceApp.setVersion(version);\n\t}",
"public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}",
"public void setVersion(String version) {\n\t\t\r\n\t}",
"public Builder setCurrentVersion(int value) {\n bitField0_ |= 0x00000080;\n currentVersion_ = value;\n onChanged();\n return this;\n }",
"public void setVersion(int version)\n\t{\n\t\tconferenceInfo.setAttribute(VERSION_ATTR_NAME, Integer.toString(version));\n\t}",
"public void setVersion(String version) {\n this.version = version;\n }",
"public void setVersion(String version) {\n\t\tthis.version = version;\n\t}",
"private void setAppVersion() {\n try {\n String appVer = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n ServerSettingHelper.getInstance().setApplicationVersion(appVer);\n } catch (NameNotFoundException e) {\n if (Config.GD_ERROR_LOGS_ENABLED)\n Log.e(\"NameNotFoundException\", \"Error of getting package information!\");\n }\n }",
"public void setVersion(String _version) {\n this._version = _version;\n }",
"public void setVersion(org.hl7.fhir.String version)\n {\n generatedSetterHelperImpl(version, VERSION$4, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }",
"public void setVersion(Long version) {\n this.version = version;\n }",
"public void setVersion(Long version) {\n this.version = version;\n }",
"public void setVersion(Long version) {\n this.version = version;\n }",
"public void setVersion(Long version) {\n this.version = version;\n }",
"public Builder setVersion(long value) {\n copyOnWrite();\n instance.setVersion(value);\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }",
"public void setVersion( String version )\n {\n this.version = version.toLowerCase( Locale.ENGLISH );\n }",
"public Builder setVersion(final String value) {\n _version = value;\n return this;\n }",
"public void setManifestVersion() {\n\t\tSharedPreferences.Editor editor = sp.edit();\n\t\teditor.putString(VERSION_KEY, thisVersion);\n\t\teditor.commit();\n\t}",
"public final void setVersion(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String version)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Version.toString(), version);\r\n\t}",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n version_ = value;\n onChanged();\n return this;\n }",
"public Builder setVersion(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n version_ = value;\n bitField0_ |= 0x00008000;\n onChanged();\n return this;\n }",
"public void setCurrentVersion(String currentVersion) {\n this.currentVersion = currentVersion;\n }",
"public Builder setVersion(com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n version_ = value;\n onChanged();\n return this;\n }",
"void xsetApplicationVersion(com.microsoft.schemas.office.x2006.digsig.STVersion applicationVersion);",
"public void setVersion(String version) {\r\n this.version = version == null ? null : version.trim();\r\n }",
"public void setVersion(String version) {\n this.version = version == null ? null : version.trim();\n }",
"public void setVersion(java.math.BigInteger version)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(VERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(VERSION$6);\r\n }\r\n target.setBigIntegerValue(version);\r\n }\r\n }",
"private void setNodeVersion(int nodeVersion) {\n this.nodeVersion = nodeVersion;\r\n }",
"public void setBuildVersion(String version) {\n buildVersion = version;\n }",
"public WriterOptions version(Version value) {\n versionValue = value;\n return this;\n }",
"public String getSdkVersion() {\n return sdkVersion;\n }",
"public void setVer(Integer ver) {\n this.ver = ver;\n }",
"public synchronized void setVersion(final InternationalString newValue) {\n checkWritePermission();\n version = newValue;\n }",
"public void setApiVersion(Integer apiVersion)\n {\n this.apiVersion = apiVersion;\n }",
"public void setServiceVersion(String serviceVersion);",
"public Builder version(String version) {\n descriptor.version(version);\n return this;\n }",
"String getSdkVersion() {\n return sdkVersion;\n }",
"@Override\n\tpublic void setMethodVersion() {\n\t\tthis.version=\"app3.5\";\n\t}",
"@CompositeValue(ignore=true)\n @XmlAttribute(name=\"version\")\n public void setVersion(Version version)\n {\n versionRange = new VersionRange(version, true, version, true);\n }",
"public void setVersion(long param){\n \n // setting primitive attribute tracker to true\n \n if (param==java.lang.Long.MIN_VALUE) {\n localVersionTracker = false;\n \n } else {\n localVersionTracker = true;\n }\n \n this.localVersion=param;\n \n\n }",
"public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setEnvelopeVersion(java.lang.String value) {\n validate(fields()[12], value);\n this.envelopeVersion = value;\n fieldSetFlags()[12] = true;\n return this;\n }",
"public void setClassVersion(final long classVersion) {\n \t\tthis.classVersion = classVersion;\n \t}",
"void setKarafVersion(String version);",
"public void setConfigVersion(java.lang.String configVersion) {\r\n this.configVersion = configVersion;\r\n }",
"SchemaReference setVersion(String version);",
"public void incrementVersion() {\n this.version++;\n }",
"Version getApiVersion();",
"public void xsetVersion(org.apache.xmlbeans.XmlInteger version)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlInteger target = null;\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().find_element_user(VERSION$6, 0);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlInteger)get_store().add_element_user(VERSION$6);\r\n }\r\n target.set(version);\r\n }\r\n }",
"public void setVer(Integer ver) {\n\t\tthis.ver = ver;\n\t}",
"@Override\n\tpublic String getSDKVersion() {\n\t\treturn null;\n\t}",
"public void setAppVersion(String appVersion) {\n this.appVersion = appVersion == null ? null : appVersion.trim();\n }",
"void setOfficeVersion(java.lang.String officeVersion);",
"void setVersion(int version) {\n removeOldVersion();\n\n String sql = \"INSERT INTO \" + tableName + \" (\" + VERSION_COL + \") VALUES (?)\";\n\n execute(new ExecuteStatement(sql) {\n @Override\n public void prepare(PreparedStatement statement) throws SQLException {\n statement.setInt(1, version);\n }\n });\n }",
"public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }"
]
| [
"0.7361073",
"0.7334377",
"0.7334377",
"0.7179841",
"0.7151602",
"0.7054071",
"0.7054071",
"0.70501596",
"0.7027178",
"0.698401",
"0.6922424",
"0.6922424",
"0.6918074",
"0.68909407",
"0.6854795",
"0.6852665",
"0.68515915",
"0.6848424",
"0.6837265",
"0.6827964",
"0.6826553",
"0.68205404",
"0.6819148",
"0.6819148",
"0.6792024",
"0.6792024",
"0.6792024",
"0.6792024",
"0.6792024",
"0.6792024",
"0.6789115",
"0.6781825",
"0.6749508",
"0.67317206",
"0.6702653",
"0.66916776",
"0.6688768",
"0.6688768",
"0.6688768",
"0.6687976",
"0.6681157",
"0.66785794",
"0.6669883",
"0.66672105",
"0.66669536",
"0.6635292",
"0.66194373",
"0.6613633",
"0.6611639",
"0.656903",
"0.65610033",
"0.65610033",
"0.65610033",
"0.65610033",
"0.650789",
"0.6453505",
"0.6447593",
"0.6447593",
"0.6447593",
"0.643764",
"0.6423045",
"0.6401797",
"0.63699687",
"0.63483304",
"0.63483304",
"0.63483304",
"0.63402855",
"0.6339534",
"0.6281638",
"0.62649703",
"0.6261676",
"0.6250093",
"0.6213039",
"0.620191",
"0.61255926",
"0.6089838",
"0.60876584",
"0.608581",
"0.6067494",
"0.6064376",
"0.6015068",
"0.601109",
"0.59972376",
"0.59860796",
"0.5976159",
"0.59757894",
"0.59536415",
"0.5939124",
"0.59326476",
"0.59229946",
"0.59135306",
"0.5886365",
"0.58845085",
"0.5879663",
"0.5870894",
"0.5840392",
"0.58224076",
"0.58204246",
"0.5810586",
"0.5801027"
]
| 0.7199915 | 3 |
Returns the SDK version if it has been set and a string indicating an unknown version if it has not been set. | String getSdkVersion() {
return sdkVersion;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getSDKVersion() {\n return Constants.Z_SDK_ID;\n }",
"@Override\n\tpublic String getSDKVersion() {\n\t\treturn null;\n\t}",
"default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }",
"public String getSdkVersion() {\n return sdkVersion;\n }",
"public static String getVersion() {\n if (version != null) {\n return version;\n }\n\n Package p = MCBouncer.class.getPackage();\n\n if (p == null) {\n p = Package.getPackage(\"com.mcbouncer\");\n }\n\n if (p == null) {\n version = \"(unknown)\";\n } else {\n version = p.getImplementationVersion();\n\n if (version == null) {\n version = \"(unknown)\";\n }\n }\n\n return version;\n }",
"java.lang.String getApplicationVersion();",
"public static String getAppVersion() {\n \t\tif (props.containsKey(\"app.version\")) {\n \t\t\treturn props.getProperty(\"app.version\");\n \t\t} else {\n \t\t\treturn \"unspecified\";\n \t\t}\n \t}",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public String getVersion() {\n\t\tString version = \"0.0.0\";\n\n\t\tPackageManager packageManager = getPackageManager();\n\t\ttry {\n\t\t\tPackageInfo packageInfo = packageManager.getPackageInfo(\n\t\t\t\t\tgetPackageName(), 0);\n\t\t\tversion = packageInfo.versionName;\n\t\t} catch (NameNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn version;\n\t}",
"public int getSdkVersion() throws IOException {\n\t\tString s = exec(\"getprop ro.build.version.sdk\").replace('\\n', ' ').trim();\n\t\treturn Integer.parseInt(s);\n\t}",
"public static String getAppVersion(){\r\n return getProperty(\"version\");\r\n }",
"public static String getVersion() {\n\t\treturn version;\r\n\t}",
"public static String getVersion() {\n return version;\n }",
"public static String getVersion() {\n return version;\n }",
"public static String getVersion() {\n\t\treturn version;\n\t}",
"public static String getApplicationVersion() {\n String appVersion = Settings.getAppVersion();\n return appVersion != null ? appVersion : \"?\";\n }",
"public static String getVersion()\n {\n return \"\";\n }",
"public static String getVersion()\n {\n return \"\";\n }",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"java.lang.String getVersion();",
"@CheckForNull\n String getVersion();",
"private static String getSdkString() {\n\t\treturn null;\n\t}",
"public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}",
"@OnThread(Tag.Any)\n public static Version getAPIVersion()\n {\n if (version == null)\n {\n try\n {\n Class<?> bootCls = Class.forName(\"bluej.Boot\");\n Field field = bootCls.getField(\"GREENFOOT_API_VERSION\");\n String versionStr = (String) field.get(null);\n version = new Version(versionStr);\n }\n catch (ClassNotFoundException | SecurityException | NoSuchFieldException |\n IllegalArgumentException | IllegalAccessException e)\n {\n Debug.reportError(\"Could not get Greenfoot API version\", e);\n throw new InternalGreenfootError(e);\n }\n }\n return version;\n }",
"protected static native String getVersion();",
"public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }",
"public static final String getVersion() { return version; }",
"public static final String getVersion() { return version; }",
"java.lang.String getAndroidKtxVersion();",
"public String version() throws CallError, InterruptedException {\n return (String)service.call(\"version\").get();\n }",
"String getVersion() throws IOException, SoapException;",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"String getVersion();",
"public String getAppVersion() { return appVersion; }",
"@Nullable\n public String getVersion() {\n return gav.getVersion();\n }",
"int getCurrentVersion();",
"public String getVersion()\n {\n return version;\n }",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public String getVersion();",
"public default String getVersion() {\n return Constants.VERSION_1;\n }",
"public String getAppVersion() {\n return appVersion;\n }",
"public String getVersion () {\r\n return version;\r\n }",
"public String GetVersion() {\n\t\tString adapter_version = \"version: \" + adapter_version_;\n\t\treturn adapter_version;\n\t}",
"String version();",
"public java.lang.String getVersion() {\r\n return version;\r\n }",
"public String getVersion(){\r\n return version;\r\n }",
"public final String getVersion() {\n return version;\n }",
"public String getVersion() {\r\n return version;\r\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"@Override\n public String getVersionString() {\n return versionString;\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getBuildVersion() {\n try {\n Properties versionFileProperties = new Properties();\n InputStream inputStream = getClass().getClassLoader().getResourceAsStream(\"version.properties\");\n if (inputStream != null) {\n versionFileProperties.load(inputStream);\n return versionFileProperties.getProperty(\"version\", \"\") + \" \" + versionFileProperties.getProperty(\"timestamp\", \"\");\n }\n } catch (IOException e) {\n Logger.getLogger(OnStartup.class.getName()).log(Level.SEVERE, null, e);\n }\n return \"\";\n }",
"public String getVersion()\n {\n return version;\n }",
"public String getVersion()\n {\n return version;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic String getVersion()\n\t{\n\t\ttry\n\t\t{\n\t\t\tMethod m = clazz.getMethod(METHOD_VERSION, new Class[0]);\n\t\t\tm.setAccessible(true);\n\t\t\tString out = (String) m.invoke(instance, new Object[0]);\n\t\t\treturn out;\n\t\t}\n\t\tcatch (Throwable t)\n\t\t{\n\t\t\tThrowables.propagate(t);\n\t\t}\n\n\t\t// stupid compiler\n\t\treturn null;\n\t}",
"public java.lang.String getVersion() {\n return version_;\n }",
"private String m5297b() {\n String str = \"\";\n try {\n return getPackageManager().getPackageInfo(getPackageName(), 0).versionName;\n } catch (NameNotFoundException e) {\n e.printStackTrace();\n return str;\n }\n }",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getProductVersion();",
"public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getVersion() {\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"private static String getAppVersionNumber(Context c) {\n String version = \"N/A\";\n try {\n final PackageManager packageManager = c.getPackageManager();\n if (packageManager == null) {\n return version;\n }\n\n PackageInfo packageInfo = packageManager.getPackageInfo(c.getPackageName(), 0);\n version = packageInfo.versionName;\n }\n catch (Exception e) {\n FLog.e(TAG, \"Unable to read the app version!\", e);\n }\n\n return version;\n }",
"public String getVersion() {\n return version;\n }",
"public abstract String getVersion();",
"public abstract String getVersion();",
"public abstract String getVersion();",
"public String getVersion() {\n\t\treturn (VERSION);\n\t}"
]
| [
"0.73901147",
"0.73209",
"0.7156594",
"0.70125675",
"0.6916612",
"0.6879842",
"0.6854817",
"0.6665663",
"0.6665663",
"0.665031",
"0.6634799",
"0.66046464",
"0.6599919",
"0.6599919",
"0.65787023",
"0.6577729",
"0.65707207",
"0.65707207",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6567143",
"0.6548355",
"0.6545711",
"0.65309376",
"0.6530331",
"0.65197814",
"0.65185124",
"0.651046",
"0.651046",
"0.64986384",
"0.64928925",
"0.64666116",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.6456188",
"0.64378446",
"0.6340356",
"0.63037646",
"0.6259542",
"0.6257415",
"0.6257415",
"0.6257415",
"0.6257415",
"0.62489104",
"0.6237907",
"0.62369835",
"0.6225883",
"0.6224033",
"0.62155485",
"0.6214853",
"0.62099975",
"0.6189883",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.6181264",
"0.617701",
"0.617701",
"0.617701",
"0.61759835",
"0.61705875",
"0.61705875",
"0.61705875",
"0.6165884",
"0.61607134",
"0.61607134",
"0.6159445",
"0.61584383",
"0.6155347",
"0.61524737",
"0.61506605",
"0.61472154",
"0.6144781",
"0.6144781",
"0.61285007",
"0.609975",
"0.60927075",
"0.60927075",
"0.60927075",
"0.6092383"
]
| 0.6986566 | 4 |
long sid = allList.get(position).getId(); | @Override
public void onClick(View v) {
long sid = allListOkLast.get(position).getId();
Query<GpsPointDetailData> build = db.getGpsPointDetailDao().queryBuilder().where(GpsPointDetailDao.Properties.Id.eq(sid)).build();
db.deleteGpsPointDetailData(sid);
adapter.removeItem(position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getListSnId(int index);",
"@Override\n public long getItemId(int position) {\n return listInfoList.get(position).id;\n }",
"public int getListId()\n {\n return listId;\n }",
"public int getListSnId(int index) {\n return listSnId_.getInt(index);\n }",
"public int getListSnId(int index) {\n return listSnId_.getInt(index);\n }",
"public abstract ArrayList<Integer> getIdList();",
"@Override\n public long getItemId(int position) {\n return getItem(position).id;\n }",
"public abstract long getItemId(int position);",
"@Override\n\tpublic long getItemId(int position) {\n\t\treturn list.get(position).getId();\n\t}",
"@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn (Long) mListItems.get(position).get(\"id\");\n\t\t}",
"@Override\n public long getItemId(int position) {\n return getItem(position).getId();\n }",
"@Override\n\t\tpublic long getItemId(int position) {\n\t\t\treturn itemList.get(position).id;\n\t\t}",
"long getIds(int index);",
"@Override\n public long getItemId(int index) {\n return index;\n }",
"int getItemID();",
"@Override\n public long getItemId(int position) { return position; }",
"@Override\n public long getItemId(int i) {\n return (getItem(i)).getId();\n }",
"java.util.List<java.lang.Integer> getListSnIdList();",
"@Override\n public long getItemId(int position){\n return position;\n }",
"@Override\n public long getItemId(int position){\n return position;\n }",
"public int getIndexNumber(){\n return id;\r\n }",
"public ArrayList<String> get_list_ids(){\n\t\t\treturn list_ids;\n\t\t\t\n\t\t}",
"public long getItemId(int position)\n {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return listaEmpleados.get(position).getId();\n }",
"@Override\n public long getItemId(int position) {\n return contacts.get(position).getContactid();\n }",
"public long getItemId(int position)\n {\n return position;\n }",
"@Override\n public long getItemId(int i) {\n return i;\n }",
"@Override\n\tpublic long getItemId(int position) {\n\t\treturn position%filmList.size();\n\t}",
"public int getId(){\r\n return localId;\r\n }",
"@Override\r\n public long getItemId(int position) {\n return position;\r\n }",
"@Override\r\n public long getItemId(int position) {\n return position;\r\n }",
"@Override\r\n public long getItemId(int position) {\n return position;\r\n }",
"public java.util.List<java.lang.Integer>\n getListSnIdList() {\n return listSnId_;\n }",
"@Override\n\tpublic long getItemId(int position) {\n\t\tLog.d(\"jereh\",\"getItemId()\");\n\t\treturn position;\n\t}",
"@Override\n public long getItemId(int position) {\n return baseId + position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"@Override\r\n\t public long getItemId(int position) {\n\t return position;\r\n\t }",
"@Override\n public long getItemId(int position)\n {\n return position;\n }",
"@Override\n public long getItemId(int position)\n {\n return position;\n }",
"@Override\n public long getItemId(int position)\n {\n return position;\n }",
"public BigDecimal getLstId() {\n return lstId;\n }",
"@Override\n\tpublic long getItemId(int position) {\n\t\treturn (long) position;\n\t}",
"@Override\n public long getItemId(int position) {\n return position;\n }",
"long getID(Object item);",
"@Override\r\n public long getItemId(int position) {\r\n\treturn position;\r\n }"
]
| [
"0.7415909",
"0.68516904",
"0.6770338",
"0.6698373",
"0.66612315",
"0.65538806",
"0.65448725",
"0.64333916",
"0.64316744",
"0.6387246",
"0.6356007",
"0.63291055",
"0.625597",
"0.6196905",
"0.6187403",
"0.61346835",
"0.6132375",
"0.6130261",
"0.6116812",
"0.6116812",
"0.6095124",
"0.6088001",
"0.6067889",
"0.60640776",
"0.6061628",
"0.6059756",
"0.6058107",
"0.6024675",
"0.6015543",
"0.60125065",
"0.60125065",
"0.60125065",
"0.6009809",
"0.5993992",
"0.5992292",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.5990281",
"0.59810793",
"0.5975399",
"0.5975399",
"0.5975399",
"0.5968751",
"0.5967561",
"0.5967005",
"0.59655744",
"0.5949578"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (MainService.ACTION_SYNFINSH_SPORTS.equals(action)) { // 同步 运动模式数据
initdata();
dismissLoadingDialog();
Toast.makeText(getApplicationContext(), getString(R.string.data_refresh_success), Toast.LENGTH_LONG).show(); // 数据刷新成功
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
get scan package path | private void init() {
Mvcs.scanPackagePath = analyseScanPath();
if(StringHandler.isEmpty(Mvcs.scanPackagePath))
throw new RuntimeException("No scan path has been set! you need to setup ScanPackage annotation");
//put all class into the list
List<String> allClassNames = scanAllClassNames();
if(StringHandler.isEmpty(allClassNames)) //some loader may have no return value
return ;
for(String pkgPath : allClassNames){
list.add(ClassUtil.getClass(pkgPath));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String analyseScanPath() {\n\t\t//1. get main module from init params\n\t\tString mainModule = Mvcs.servletConfig.getInitParameter(\"mainModule\");\n\t\tClass<?> cl = ClassUtil.getClass(mainModule);\n\t\tif(cl.isAnnotationPresent(ScanPackage.class)){\n\t\t\tScanPackage ann = cl.getAnnotation(ScanPackage.class);\n\t\t\t//get annotation path value\n\t\t\treturn ann.path();\n\t\t}\n\t\t//default return null\n\t\treturn null;\n\t}",
"public String getJarLocation();",
"String getInstallRoot();",
"private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }",
"public String getSystemClassPath();",
"public static String sBasePath() \r\n\t{\r\n\t\tif(fromJar) \r\n\t\t{\r\n\t\t\tFile file = new File(System.getProperty(\"java.class.path\"));\r\n\t\t\tif (file.getParent() != null)\r\n\t\t\t{\r\n\t\t\t\treturn file.getParent().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn new java.io.File(\"\").getCanonicalPath();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public ArrayList<String> getScanPath() {\n return scanPath;\n }",
"public List<String> getScanPackages() {\n\t\treturn scanPackages;\n\t}",
"public String getClassPath();",
"java.lang.String getPackage();",
"private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }",
"@Test\n void findSourceJar() {\n Class<?> klass = org.apache.commons.io.FileUtils.class;\n var codeSource = klass.getProtectionDomain().getCodeSource();\n if (codeSource != null) {\n System.out.println(codeSource.getLocation());\n }\n }",
"public static String getBasePath() {\n String basePath;\n if (new File(\"../../MacOS/JavaApplicationStub\").canExecute()) {\n basePath = \"../../../..\";\n } else {\n basePath = \".\";\n }\n return basePath;\n }",
"abstract public String getRingResourcesDir();",
"public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }",
"public ClassPath getClassPath();",
"String pkg();",
"@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }",
"abstract public String getTopResourcesDir();",
"public static String getJarPath() {\n String classPath = \"/\" + JavaUtils.class.getName();\n classPath = classPath.replace(\".\", \"/\") + \".class\";\n try {\n URL url = JavaUtils.class.getResource(classPath);\n String path = URLDecoder.decode(url.getPath(), \"UTF-8\");\n path = URLDecoder.decode(new URL(path).getPath(), \"UTF-8\");\n int bang = path.indexOf(\"!\");\n if (bang >= 0) {\n path = path.substring(0, bang);\n }\n return path;\n } catch (Exception e) {\n ReportingUtils.logError(e, \"Unable to get path of jar\");\n return \"\";\n }\n }",
"Path getVendorManagerFilePath();",
"public String searchExportedPlugins()\n\t{\n\t\tFile parent = null;\n\t\tif (System.getProperty(\"eclipse.home.location\") != null)\n\t\t\tparent = new File(URI.create(System.getProperty(\"eclipse.home.location\").replaceAll(\" \", \"%20\")));\n\t\telse parent = new File(System.getProperty(\"user.dir\"));\n\n\t\tList<String> pluginLocations = exportModel.getPluginLocations();\n\t\tfor (String libName : NG_LIBS)\n\t\t{\n\t\t\tint i = 0;\n\t\t\tboolean found = false;\n\t\t\twhile (!found && i < pluginLocations.size())\n\t\t\t{\n\t\t\t\tFile pluginLocation = new File(pluginLocations.get(i));\n\t\t\t\tif (!pluginLocation.isAbsolute())\n\t\t\t\t{\n\t\t\t\t\tpluginLocation = new File(parent, pluginLocations.get(i));\n\t\t\t\t}\n\t\t\t\tFileFilter filter = new WildcardFileFilter(libName);\n\t\t\t\tFile[] libs = pluginLocation.listFiles(filter);\n\t\t\t\tif (libs != null && libs.length > 0)\n\t\t\t\t{\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (!found) return libName;\n\t\t}\n\t\treturn null;\n\t}",
"private static String getDBPath() {\r\n\t\ttry {\r\n\t\t\tString path = Consts.class.getProtectionDomain().getCodeSource().getLocation().getPath();\r\n\t\t\tString decoded = URLDecoder.decode(path, \"UTF-8\");\r\n\t\t\tif (decoded.contains(\".jar\")) {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf('/'));\r\n\t\t\t\treturn decoded + \"/database/ManageElectDB.accdb\";\r\n\t\t\t} else {\r\n\t\t\t\tdecoded = decoded.substring(0, decoded.lastIndexOf(\"bin/\"));\r\n\t\t\t\treturn decoded + \"src/entity/ManageElectDB.accdb\";\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public String findPackageForTest(String testClassName);",
"String getPackager();",
"public String resolvePath();",
"@Override\n\tpublic java.lang.String getBinPath() {\n\t\treturn _scienceApp.getBinPath();\n\t}",
"public String getPathForPrefix(String prefix) {\r\n String ns = this.getNamespaceURI(prefix);\r\n if (ns != null) {\r\n for (Import imp : getDefinitions().getImports()) {\r\n if (ns.equals(imp.getNamespace())) {\r\n // TODO: Also check that imp.getType() is BPMN\r\n return imp.getLocation();\r\n }\r\n }\r\n }\r\n return \"\";\r\n }",
"protected String getSahiFolder() {\n String packageName = \"/sahi\";\n Path sahHomeFolder = resolveResource(AbstractSakuliTest.class, packageName);\n if (Files.exists(sahHomeFolder)) {\n return sahHomeFolder.normalize().toAbsolutePath().toString();\n }\n throw new SakuliRuntimeException(\"Cannot load SAHI_HOME folder! Should be normally under 'target/classes/\" + packageName + \"'\");\n }",
"public List<String> getCompilerLibraryPath(Configuration config)\n {\n \tList<String> list = config.getCompilerSwfLibraryPath();\n if (list != null && list.size() > 0)\n \treturn list;\n return config.getCompilerLibraryPath();\n }",
"private String getBinaryPath() {\n return System.getProperty(SeLionConstants.WEBDRIVER_GECKO_DRIVER_PROPERTY,\n Config.getConfigProperty(ConfigProperty.SELENIUM_GECKODRIVER_PATH));\n }",
"static File getDistributionInstallationFolder() {\n return ProcessRunnerImpl.getDistRootPath();\n }",
"public static String packageNameToPath(String pkgName) {\n \tif (pkgName == null) return null;\n \tString path = pkgName.replace('.', File.separatorChar);\n \treturn path;\n }",
"@Override\n \tprotected File deriveLocalFileCodeBase(Class<?> baseClass)\n \t{\n \t\t// setup codeBase\n \t\tif (baseClass == null)\n \t\t\tbaseClass = this.getClass();\n \n \t\tPackage basePackage = baseClass.getPackage();\n \t\tString packageName = basePackage.getName();\n \t\tString packageNameAsPath = packageName.replace('.', Files.sep);\n \n \t\tString pathName = System.getProperty(\"user.dir\") + Files.sep;\n \t\tFile path = new File(pathName);\n \t\tString pathString = path.getAbsolutePath();\n \n \t\t// println(\"looking for \" + packageNameAsPath +\" in \" + pathString);\n \n \t\tint packageIndex = pathString.lastIndexOf(packageNameAsPath);\n \t\tif (packageIndex != -1)\n \t\t{\n \t\t\tpathString = pathString.substring(0, packageIndex);\n \t\t\tpath = new File(pathString + Files.sep);\n \t\t}\n \n \t\tcodeBase = new ParsedURL(path);\n \t\tprintln(\"codeBase=\" + codeBase);\n \t\treturn path;\n \t}",
"public Set<String> getPackagesToScan() {\n return packagesToScan;\n }",
"java.lang.String getSrcPath();",
"private String checkUserLibDir() {\n\t\t// user .libPaths() to list all paths known when R is run from the \n\t\t// command line\n \tif (!runRCmd(\"R -e \\\".libPaths()\\\" -s\")) {\n \t\tlogger.error(\"Could not detect user lib path.\");\n \t} else {\n \t\t// split on '\"'. This gives irrelevant strings, but those will\n \t\t// not match a user.home anyway\n \t\tString[] parts = status.split(\"\\\\\\\"\");\n \t\tString userHome = System.getProperty(\"user.home\");\n \t\tlogger.debug(\"user.home: \" + userHome);\n \t\tfor (int i=0; i<parts.length; i++) {\n \t\t\tString part = parts[i];\n \t\t\t// The replacement for front-slashes for windows systems.\n \t\t\tif (part != null && part.startsWith(userHome) || part.replace(\"/\", \"\\\\\").startsWith(userHome)) {\n \t\t\t\t// OK, we found the first lib path in $HOME\n \t\t\t\treturn part;\n \t\t\t}\n \t\t}\n \t}\n\t\treturn null;\n }",
"String getDockerFilelocation();",
"protected File getAsinstalldir() throws ClassNotFoundException {\n\t\tif (asinstalldir == null) {\n\t\t\tString home = getProject().getProperty(\"asinstall.dir\");\n\t\t\tif (home != null) {\n asinstalldir = new File(home);\n\t\t\t}\n else {\n home = getProject().getProperty(\"sunone.home\");\n if (home != null)\n {\n final String msg = lsm.getString(\"DeprecatedProperty\", new Object[] {\"sunone.home\", \"asinstall.dir\"});\n log(msg, Project.MSG_WARN);\n asinstalldir = new File(home);\n }\n \n }\n\t\t}\n if (asinstalldir!=null) verifyAsinstalldir(asinstalldir);\n\t\treturn asinstalldir;\n\t}",
"private static File calculateBluejLibDir()\n {\n File bluejDir = null;\n String bootFullName = Boot.class.getResource(\"Boot.class\").toString();\n\n try {\n if (! bootFullName.startsWith(\"jar:\")) {\n // Boot.class is not in a jar-file. Find a lib directory somewhere\n // above us to use\n File startingDir = (new File(new URI(bootFullName)).getParentFile());\n while((startingDir != null) &&\n !(new File(startingDir.getParentFile(), \"lib\").isDirectory())) {\n startingDir = startingDir.getParentFile();\n }\n \n if (startingDir == null) {\n bluejDir = null;\n }\n else {\n bluejDir = new File(startingDir.getParentFile(), \"lib\");\n }\n }\n else {\n // The class is in a jar file, '!' separates the jar file name\n // from the class name. Cut off the class name and the \"jar:\" prefix.\n int classIndex = bootFullName.indexOf(\"!\");\n String bootName = bootFullName.substring(4, classIndex);\n \n File finalFile = new File(new URI(bootName));\n bluejDir = finalFile.getParentFile();\n } \n } \n catch (URISyntaxException use) { }\n \n return bluejDir;\n }",
"public Path getRepositoryGroupBaseDir();",
"@Override\n protected Path calculateAppPath(Path image) throws Exception {\n return image.resolve(\"usr\").resolve(\"lib\").resolve(\"APPDIR\");\n }",
"public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}",
"String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }",
"public abstract VFolder locatePackage(final String pkg_name);",
"private String getPackagePath(ClassDoc jvdType)\r\n {\r\n JspTagContext context = getContext();\r\n String packagePath = null;\r\n PackageDoc jvdContainingPackage = jvdType.containingPackage();\r\n if (jvdContainingPackage != null)\r\n {\r\n String packageName = jvdContainingPackage.name();\r\n if (context.isItemExternal(packageName))\r\n {\r\n packagePath = context.getExternalLinkPath(packageName);\r\n if (!context.isItemAbsolute(packageName))\r\n {\r\n String currentJspUri = context.getCurrentTagDetail()\r\n .getTagLibUri();\r\n packagePath = buildDocRoot(currentJspUri) + '/' + packagePath;\r\n }\r\n }\r\n }\r\n return packagePath;\r\n }",
"public Path getRepositoryBaseDir();",
"Path getBaseInputDir();",
"List<IDirectory> getSourcePath();",
"private static String nativeLocationInJar() {\n\t\tString OS = System.getProperty(\"os.name\");\n\t\tString arch = System.getProperty(\"os.arch\");\n\t\tlog.info(\"Found OS={}, arch={}\", OS, arch);\n\t\tString key = OS+\"_\"+arch;\n\t\tswitch(key)\n\t\t{\n\t\tcase \"Linux_amd64\":\n\t\t\treturn \"native/MANIFEST.Linux_amd64\";\n\t\tcase \"Windows 7_amd64\":\n\t\tcase \"Windows 8_amd64\":\n\t\tcase \"Windows 8.1_amd64\":\n\t\t\treturn \"native/MANIFEST.Windows_amd64\";\n\t\t}\n\t\tlog.error(\"No matching native library for {}\", key);\n\t\tthrow new Error(\"No matching native library for \"+key);\n\t}",
"public String getLocationPath();",
"ModulePath getModulePath();",
"public List getRuntimeClasspath(IPath installPath, IPath configPath);",
"public static File getRootPackageDir(File location, String longPackageName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longPackageName, \".\");\r\n\t\tFile back = location;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\ttk.nextToken();\r\n\t\t\tback = back.getParentFile();\r\n\t\t}\r\n\t\treturn back;\r\n\t}",
"private static String getJarFilePath() throws URISyntaxException, UnsupportedEncodingException {\n\n\t\tFile jarFile;\n\n\t\t// if (codeSource.getLocation() != null) {\n\t\t// jarFile = new File(codeSource.getLocation().toURI());\n\t\t// } else {\n\t\tString path = ConfigurationLocator.class.getResource(ConfigurationLocator.class.getSimpleName() + \".class\")\n\t\t\t\t.getPath();\n\t\tString jarFilePath = path.substring(path.indexOf(\":\") + 1, path.indexOf(\"!\"));\n\t\tjarFilePath = URLDecoder.decode(jarFilePath, \"UTF-8\");\n\t\tjarFile = new File(jarFilePath);\n\t\t// }\n\t\treturn jarFile.getParentFile().getAbsolutePath();\n\t}",
"private HashSet<String> refreshLinterFromGoPath() {\n String goPath = System.getenv(\"GOPATH\");\n HashSet<String> rst = new HashSet<>();\n\n if (goPath != null) {\n for (String path: goPath.split(File.pathSeparator)) {\n Path fullPath = Paths.get(path, \"bin\", PlatformSettings.INSTANCE.getLinterExecutableName());\n if (fullPath.toFile().canExecute()) {\n rst.add(fullPath.toString());\n }\n }\n }\n return rst;\n }",
"private String getDicDir() {\n\t\tString wDir = null;\n\n\t\tif (System.getProperties().containsKey(\"root\")) {\n\t\t\twDir = System.getProperty(\"root\");\n\t\t}\n\n\t\tif ((wDir == null || wDir.isEmpty()) && CPlatform.isMacOs())\n\t\t\twDir = new File(CPlatform.getUserHome(), \"Library/Spelling\")\n\t\t\t\t\t.getAbsolutePath();\n\n\t\tif (wDir == null || wDir.isEmpty())\n\t\t\twDir = \"/home/ff/projects/hunspell\";\n\t\treturn wDir;\n\t}",
"protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}",
"private static LinkedList<String> findPackages(String dirpath) {\n\t\tlogger.entry();\n\t\tLinkedList<String> packageListing = new LinkedList<String>();\n\t\tLinkedList<String> dirsToProcess = new LinkedList<String>();\n\t\t\n\t\ttry {\n\t\t\t// Add any found subdirs to a list to process\n\t\t\tFile targetDir = new File(dirpath);\n\t\t\tif (targetDir.isDirectory()) {\n\t\t\t\tdirsToProcess = addAllSubDirs(targetDir, dirsToProcess);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e);\n\t\t}\n\n\t\t// Process the list of 'found' directories looking for additional directories\n\t\t// with Java files in them, indicating packaged code.\n\t\tString fileSep = System.getProperty(\"file.separator\");\n\t\twhile (dirsToProcess.size() > 0) {\n\t\t\tString item = dirsToProcess.removeFirst();\n\t\t\titem = item.substring(item.indexOf(dirpath) + dirpath.length() +1);\n\t\t\tFile candidate = new File(dirpath + fileSep + item);\n\t\t\tif (containsJavaFiles(candidate)) {\n\t\t\t\titem = item.replaceAll(fileSep, \".\");\n\t\t\t\tpackageListing.add(item);\n\t\t\t\tlogger.trace(item + \" \");\n\t\t\t}\n\t\t}\t\n\n\t\t// Process the list of dirs for subdirs. Any dir with Java files in it is a package\n\t\t// (except the top level ones)\n\t\treturn logger.exit(packageListing);\n\t}",
"public Path getRemoteRepositoryBaseDir();",
"String getApplicationContextPath();",
"public String getAppPathname();",
"public Path getInstallBase() {\n return installBase;\n }",
"public abstract String packageName();",
"public String getPackaging();",
"private static String getPackage() {\n\t\tPackage pkg = EnergyNet.class.getPackage();\n\n\t\tif (pkg != null) {\n\t\t\tString packageName = pkg.getName();\n\n\t\t\treturn packageName.substring(0, packageName.length() - \".api.energy\".length());\n\t\t}\n\n\t\treturn \"ic2\";\n\t}",
"private static String m19532b(Context context) {\n String str = null;\n try {\n ApplicationInfo applicationInfo = context.getApplicationInfo();\n if (applicationInfo == null) {\n return null;\n }\n str = applicationInfo.sourceDir;\n return str;\n } catch (Throwable unused) {\n }\n }",
"List<String> getSystemPackages();",
"private static String getDockerPath() {\n final String dockerPath = \"/usr/bin/docker\"; // path on Ubuntu\n File f = new File(dockerPath);\n if (f.exists() && !f.isDirectory()) {\n return dockerPath;\n }\n\n // path on Mac\n return \"/usr/local/bin/docker\";\n }",
"public String getNamespaceSourcePath(String ns) {\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}",
"public String getClassPath(Object ClassObject) {\n try {\n String temp = null;\n temp = new File(ClassObject.getClass().getProtectionDomain().getCodeSource().getLocation().getPath()).getParent();\n temp = URLDecoder.decode(temp, \"UTF-8\");\n return temp;\n } catch (Exception e) {\n return \"\";\n }\n }",
"public List<String> getCompilerExternalLibraryPath(Configuration config)\n {\n \tList<String> list = config.getCompilerSwfExternalLibraryPath();\n if (list != null && list.size() > 0)\n \treturn list;\n return config.getCompilerExternalLibraryPath();\n }",
"public Set<String> getPackagesToScan() {\n return Collections.unmodifiableSet(packagesToScan);\n }",
"String getRepositoryPath(String name);",
"@Override\n public URL getTemplateLocation() {\n try {\n String[] candidates = getDirectoryCandidates();\n for (int i = 0; i < candidates.length; i++) {\n if (Activator.getDefault().getBundle().getEntry(candidates[i]) != null) {\n URL candidate = new URL(getInstallURL(), candidates[i]);\n return candidate;\n }\n }\n } catch (MalformedURLException e) { // do nothing\n }\n return null;\n }",
"@Override\n\tpublic java.lang.String getSrcPath() {\n\t\treturn _scienceApp.getSrcPath();\n\t}",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public File getInstHomeDir() {\n \treturn this.getHomeDir(\"octHome\");\n }",
"private static String getPackage(final String fullName) {\n \t\treturn fullName.substring(0, fullName.lastIndexOf(\".\"));\n \t}",
"public String getBasePath(){\r\n\t\t \r\n\t\t String basePath = properties.getProperty(\"getPath\");\r\n\t\t if(basePath != null) return basePath;\r\n\t\t else throw new RuntimeException(\"getPath not specified in the configuration.properties file.\");\r\n\t }",
"String getRepositoryPath();",
"public String getXsdFileName();",
"private String inferRPath()\n {\n String path;\n\n //preferentially use R config setup in scripting props. only works if running locally.\n if (PipelineJobService.get().getLocationType() == PipelineJobService.LocationType.WebServer)\n {\n LabKeyScriptEngineManager svc = LabKeyScriptEngineManager.get();\n for (ExternalScriptEngineDefinition def : svc.getEngineDefinitions())\n {\n if (RScriptEngineFactory.isRScriptEngine(def.getExtensions()))\n {\n path = new File(def.getExePath()).getParent();\n getJob().getLogger().info(\"Using RSciptEngine path: \" + path);\n return path;\n }\n }\n }\n\n //then pipeline config\n String packagePath = PipelineJobService.get().getConfigProperties().getSoftwarePackagePath(\"R\");\n if (StringUtils.trimToNull(packagePath) != null)\n {\n getJob().getLogger().info(\"Using path from pipeline config: \" + packagePath);\n return packagePath;\n }\n\n //then RHOME\n Map<String, String> env = System.getenv();\n if (env.containsKey(\"RHOME\"))\n {\n getJob().getLogger().info(\"Using path from RHOME: \" + env.get(\"RHOME\"));\n return env.get(\"RHOME\");\n }\n\n //else assume it's in the PATH\n getJob().getLogger().info(\"Unable to infer R path, using null\");\n\n return null;\n }",
"private HashMap getRuntimeImport() {\n \t\tURL url = InternalBootLoader.class.getProtectionDomain().getCodeSource().getLocation();\n \t\tString path = InternalBootLoader.decode(url.getFile());\n \t\tFile base = new File(path);\n \t\tif (!base.isDirectory())\n \t\t\tbase = base.getParentFile(); // was loaded from jar\n \n \t\t// find the plugin.xml (need to search because in dev mode\n \t\t// we can have some extra directory entries)\n \t\tFile xml = null;\n \t\twhile (base != null) {\n \t\t\txml = new File(base, BOOT_XML);\n \t\t\tif (xml.exists())\n \t\t\t\tbreak;\n \t\t\tbase = base.getParentFile();\n \t\t}\n \t\tif (xml == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.boot\")); //$NON-NLS-1$\n \n \t\ttry {\n \t\t\treturn getImport(xml.toURL(), RUNTIME_PLUGIN_ID);\n \t\t} catch (MalformedURLException e) {\n \t\t\treturn null;\n \t\t}\n \t}",
"private TestPackage searchTestPackage(String javaPkgName) {\n for (TestPackage pkg : mSessionLog.getTestPackages()) {\n Collection<Test> tests = pkg.getTests();\n for (Test test : tests) {\n String testFullName = test.getFullName();\n if (testFullName.startsWith(javaPkgName)) {\n //adjust the java package name to make it equal to some java package name\n if (testFullName.charAt(javaPkgName.length()) != '.') {\n javaPkgName = javaPkgName.substring(0, javaPkgName.lastIndexOf(\".\"));\n }\n return pkg;\n }\n }\n }\n \n return null;\n }",
"private static String getApPluginRulePath(String pluginUID) {\n return String.format(\"//.okbuck/cache/processor:%s\", getApPluginRuleName(pluginUID));\n }",
"java.lang.String getPackageName();",
"String getPackageName();",
"private String getDesignPath() {\n Class<?> clazz = getClass();\n String designFilePath = null;\n if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {\n designFilePath = \"\";\n } else {\n // This is rather nasty.. but it works well enough for now.\n String userDir = System.getProperty(\"user.dir\");\n designFilePath = userDir + \"/uitest/src/\"\n + clazz.getPackage().getName().replace('.', '/') + \"/\";\n }\n\n String designFileName = clazz.getAnnotation(DeclarativeUI.class)\n .value();\n\n return designFilePath + designFileName;\n }",
"public static String getWorkingDirectory() {\r\n try {\r\n // get working directory as File\r\n String path = DBLIS.class.getProtectionDomain().getCodeSource()\r\n .getLocation().toURI().getPath();\r\n File folder = new File(path);\r\n folder = folder.getParentFile().getParentFile(); // 2x .getParentFile() for debug, 1x for normal\r\n\r\n // directory as String\r\n return folder.getPath() + \"/\"; // /dist/ for debug, / for normal\r\n } catch (URISyntaxException ex) {\r\n return \"./\";\r\n }\r\n }",
"public static String getPathProgramsFiles(){\r\n\t\treturn System.getenv(\"ProgramFiles\");\r\n\t}",
"protected String getRelativePackageForClass(String argDAOPackage,\r\n\t\t\tString argPackageKey) {\r\n\t\treturn CodeGenUtils.getRelativePackageForClass(argDAOPackage,\r\n\t\t\t\targPackageKey);\r\n\t}",
"private Resource useDeveloperBuild() throws IOException { Find ourselves in the CLASSPATH. We should be a loose class file.\n //\n URL u = getClass().getResource(getClass().getSimpleName() + \".class\");\n if (u == null) {\n throw new FileNotFoundException(\"Cannot find web application root\");\n }\n if (!\"file\".equals(u.getProtocol())) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n\n // Pop up to the top level classes folder that contains us.\n //\n File dir = new File(u.getPath());\n String myName = getClass().getName();\n for (;;) {\n int dot = myName.lastIndexOf('.');\n if (dot < 0) {\n dir = dir.getParentFile();\n break;\n }\n myName = myName.substring(0, dot);\n dir = dir.getParentFile();\n }\n\n // We should be in a Maven style output, that is $jar/target/classes.\n //\n if (!dir.getName().equals(\"classes\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop classes\n if (!dir.getName().equals(\"target\")) {\n throw new FileNotFoundException(\"Cannot find web root from \" + u);\n }\n dir = dir.getParentFile(); // pop target\n dir = dir.getParentFile(); // pop the module we are in\n\n // Drop down into gerrit-gwtui to find the WAR assets we need.\n //\n dir = new File(new File(dir, \"gerrit-gwtui\"), \"target\");\n final File[] entries = dir.listFiles();\n if (entries == null) {\n throw new FileNotFoundException(\"No \" + dir);\n }\n for (File e : entries) {\n if (e.isDirectory() /* must be a directory */\n && e.getName().startsWith(\"gerrit-gwtui-\")\n && new File(e, \"gerrit/gerrit.nocache.js\").isFile()) {\n return Resource.newResource(e.toURI());\n }\n }\n throw new FileNotFoundException(\"No \" + dir + \"/gerrit-gwtui-*\");\n }",
"public String getPackagedJava();",
"String getExternalPath(String path);",
"private static String getPackageNameForPackageDirFile(WebFile aFile)\n {\n String filePath = aFile.getPath();\n return filePath.substring(1).replace('/', '.');\n }",
"public static Path locateResourcesDir(ServiceContext context) {\n if (context.getServlet() != null) {\n return locateResourcesDir(context.getServlet().getServletContext(), context.getApplicationContext());\n }\n\n return context.getBean(GeonetworkDataDirectory.class).getResourcesDir();\n }",
"@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }",
"String getDir();",
"private String getJdkHome() {\n String result;\n result = System.getProperty(\"java.home\");\n if (result.endsWith(File.separatorChar + \"jre\")) {\n result = result.substring(0, result.length() - 4);\n }\n return result;\n }",
"private String searchForInitFileName() {\n String homeDirectoryInitFileName =\n System.getProperty(\"user.home\") + File.separatorChar + DEFAULT_INIT_FILE_NAME;\n String currentDirectoryInitFileName =\n System.getProperty(\"user.dir\") + File.separatorChar + DEFAULT_INIT_FILE_NAME;\n String systemPropertyInitFileName = System.getProperty(INIT_FILE_PROPERTY);\n\n String[] initFileNames =\n {systemPropertyInitFileName, currentDirectoryInitFileName, homeDirectoryInitFileName};\n\n for (String initFileName : initFileNames) {\n if (IOUtils.isExistingPathname(initFileName)) {\n return initFileName;\n }\n }\n\n return null;\n }"
]
| [
"0.7563837",
"0.6140582",
"0.6066505",
"0.6057425",
"0.6023511",
"0.59481996",
"0.59112686",
"0.58329487",
"0.5814381",
"0.57609934",
"0.5737745",
"0.5721623",
"0.5705816",
"0.56899655",
"0.5666068",
"0.56654507",
"0.56471807",
"0.5642545",
"0.5634594",
"0.5615133",
"0.560828",
"0.55948746",
"0.5549231",
"0.5529147",
"0.5523188",
"0.5488697",
"0.5484309",
"0.5460105",
"0.54397714",
"0.53991437",
"0.5398842",
"0.5387259",
"0.537042",
"0.5354009",
"0.5340326",
"0.53396684",
"0.5337834",
"0.5330656",
"0.5321632",
"0.53021544",
"0.5291753",
"0.5291196",
"0.5286301",
"0.5283106",
"0.5273182",
"0.52708954",
"0.5269221",
"0.5264587",
"0.5263702",
"0.5258576",
"0.52517515",
"0.5251559",
"0.5249244",
"0.5230373",
"0.522764",
"0.5223806",
"0.52185804",
"0.5215486",
"0.5207688",
"0.51997226",
"0.51886076",
"0.51883197",
"0.5181352",
"0.5180293",
"0.5167419",
"0.51639193",
"0.51635164",
"0.5162584",
"0.5153902",
"0.5150284",
"0.5138983",
"0.5138557",
"0.5110449",
"0.5109799",
"0.50974137",
"0.50968075",
"0.50883484",
"0.5078446",
"0.50765777",
"0.5074257",
"0.5073927",
"0.50677246",
"0.5067342",
"0.50611615",
"0.505966",
"0.5058938",
"0.5056018",
"0.5054262",
"0.50519794",
"0.5049353",
"0.50448805",
"0.5042923",
"0.5031654",
"0.50312114",
"0.50260127",
"0.5022781",
"0.50224555",
"0.5014481",
"0.49999145",
"0.49997187",
"0.4995196"
]
| 0.0 | -1 |
get scan path from ScanPackage annotation | private String analyseScanPath() {
//1. get main module from init params
String mainModule = Mvcs.servletConfig.getInitParameter("mainModule");
Class<?> cl = ClassUtil.getClass(mainModule);
if(cl.isAnnotationPresent(ScanPackage.class)){
ScanPackage ann = cl.getAnnotation(ScanPackage.class);
//get annotation path value
return ann.path();
}
//default return null
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public ArrayList<String> getScanPath() {\n return scanPath;\n }",
"String getAnnotationFile() {\n File imgFile = photos[fileIndex];\n String parentDir = imgFile.getParent();\n String fileName = imgFile.getName();\n String annotationName = fileName.replace(fileName.substring(fileName.lastIndexOf('.') + 1), \"xml\");\n File annotationDir = new File(parentDir.replace(\"images\", \"annotations\"));\n if (!annotationDir.exists()) {\n annotationDir.mkdirs();//create dir if none\n }\n return annotationDir.getAbsolutePath() + File.separator + annotationName;\n }",
"public String getPathForPrefix(String prefix) {\r\n String ns = this.getNamespaceURI(prefix);\r\n if (ns != null) {\r\n for (Import imp : getDefinitions().getImports()) {\r\n if (ns.equals(imp.getNamespace())) {\r\n // TODO: Also check that imp.getType() is BPMN\r\n return imp.getLocation();\r\n }\r\n }\r\n }\r\n return \"\";\r\n }",
"private static String getApPluginRulePath(String pluginUID) {\n return String.format(\"//.okbuck/cache/processor:%s\", getApPluginRuleName(pluginUID));\n }",
"public String getAdapterConfigLocation(String namespace);",
"List<AnnotationPath> findAnnotationPaths( String annotationCannonicalClassName );",
"private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }",
"@Override\r\n\tpublic String getName() {\n\t\treturn \"Scan\";\r\n\t}",
"java.lang.String getSrcPath();",
"@Override\n public String getConfigPath() {\n String fs = String.valueOf(File.separatorChar);\n StringBuilder sb = new StringBuilder();\n\n sb.append(\"scan\").append(fs);\n sb.append(\"config\").append(fs);\n sb.append(\"mesoTableConfig\").append(fs);\n\n return sb.toString();\n }",
"public File getLocalAnnotationDir() throws IOException {\n\t\t\treturn new File(System.getProperty(\"user.home\") + \"/.chipster/annotations\");\n\t\t}",
"public String getScan() {\n return scan;\n }",
"public List<String> getScanPackages() {\n\t\treturn scanPackages;\n\t}",
"private String getPathToSampleSummary() {\n\t\treturn pathToSampleSummary.getText();\n\t}",
"public void setScanPath(ArrayList<String> scanPath) {\n this.scanPath = scanPath;\n }",
"public abstract String getTargetPackage();",
"public abstract String getTargetPackage();",
"java.lang.String getPackage();",
"public String getNamespaceSourcePath(String ns) {\r\n \t\treturn getSourceFolderNames().iterator().next() + File.separator + \r\n \t\t\t\tns.replace('.', File.separatorChar) + \".tql\";\r\n \t}",
"protected String getRelativePackageForClass(String argDAOPackage,\r\n\t\t\tString argPackageKey) {\r\n\t\treturn CodeGenUtils.getRelativePackageForClass(argDAOPackage,\r\n\t\t\t\targPackageKey);\r\n\t}",
"public String getPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"@Override\n\tpublic java.lang.String getSrcPath() {\n\t\treturn _scienceApp.getSrcPath();\n\t}",
"public void addScanPath(String scanPath) {\n if (this.scanPath == null) {\n this.scanPath = new ArrayList<String>();\n }\n this.scanPath.add(scanPath);\n }",
"@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }",
"private String getPackagePath(ClassDoc jvdType)\r\n {\r\n JspTagContext context = getContext();\r\n String packagePath = null;\r\n PackageDoc jvdContainingPackage = jvdType.containingPackage();\r\n if (jvdContainingPackage != null)\r\n {\r\n String packageName = jvdContainingPackage.name();\r\n if (context.isItemExternal(packageName))\r\n {\r\n packagePath = context.getExternalLinkPath(packageName);\r\n if (!context.isItemAbsolute(packageName))\r\n {\r\n String currentJspUri = context.getCurrentTagDetail()\r\n .getTagLibUri();\r\n packagePath = buildDocRoot(currentJspUri) + '/' + packagePath;\r\n }\r\n }\r\n }\r\n return packagePath;\r\n }",
"private String getPathToMetricsResults() {\n\t\treturn pathToMetricsResults.getText();\n\t}",
"public String getLocationPath();",
"java.lang.String getXpath();",
"public String getPath (Class<?> cn) {\n return PATH + cn.getSimpleName().toLowerCase() + FILE_EXTENSION;\n }",
"public String getClassPath();",
"public String getFeedConfigLocation(String namespace);",
"public String resolvePath();",
"public PSLocator getSrcFolder()\n {\n return m_srcFolder;\n }",
"public abstract String getResourcePath(Method method);",
"String getDockerFilelocation();",
"public AnnotationLocation getAnnotationLocation() {\n return annotationLocation;\n }",
"public String getAppPathname();",
"public abstract ArrayList<CustomPath> getAnnotationPathList();",
"public String getJarLocation();",
"public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public String getAnnotationSubPackageProperty() {\n return null;\n }",
"public DevicePath getDevicePath(Device device);",
"String extractPathWithinPattern(String pattern, String path);",
"private String getDesignPath() {\n Class<?> clazz = getClass();\n String designFilePath = null;\n if (clazz.getAnnotation(DeclarativeUI.class).absolutePath()) {\n designFilePath = \"\";\n } else {\n // This is rather nasty.. but it works well enough for now.\n String userDir = System.getProperty(\"user.dir\");\n designFilePath = userDir + \"/uitest/src/\"\n + clazz.getPackage().getName().replace('.', '/') + \"/\";\n }\n\n String designFileName = clazz.getAnnotation(DeclarativeUI.class)\n .value();\n\n return designFilePath + designFileName;\n }",
"String path(Configuration configuration);",
"public String getFeedPathPrefix();",
"Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);",
"public static String packageNameToPath(String pkgName) {\n \tif (pkgName == null) return null;\n \tString path = pkgName.replace('.', File.separatorChar);\n \treturn path;\n }",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getDexFolders();",
"public String getPathToJarFolder(){\n Class cls = ReadWriteFiles.class;\r\n ProtectionDomain domain = cls.getProtectionDomain();\r\n CodeSource source = domain.getCodeSource();\r\n URL url = source.getLocation();\r\n try {\r\n URI uri = url.toURI();\r\n path = uri.getPath();\r\n \r\n // get path without the jar\r\n String[] pathSplitArray = path.split(\"/\");\r\n path = \"\";\r\n for(int i = 0; i < pathSplitArray.length-1;i++){\r\n path += pathSplitArray[i] + \"/\";\r\n }\r\n \r\n return path;\r\n \r\n } catch (URISyntaxException ex) {\r\n LoggingAspect.afterThrown(ex);\r\n return null;\r\n }\r\n }",
"public String getSuggestPath() {\n/* 105 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"AnnotationProvider getClassAnnotationProvider();",
"@Override\n public void onScanCompleted(String path, Uri uri) {\n }",
"public String getSourcePath()\r\n\t{\r\n\t\treturn sourcePath;\r\n\t}",
"public String getResPath()\n/* */ {\n/* 138 */ return this.resPath;\n/* */ }",
"public String getRunLocation();",
"String getRepositoryPath(String name);",
"public String getPathName();",
"public static void scanPackage(String scanProviderPackage) throws Exception {\n\t\tproviders = AnnotationUtil.getAnnotations(scanProviderPackage, Controller.class, ServiceRegister.class);\n\t}",
"public void setScan(Scan scan) {\n this.scan = scan;\n }",
"public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n srcPath_ = s;\n }\n return s;\n }\n }",
"public String getResourcePath();",
"public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getFeatureDexFolder();",
"CtPath getPath();",
"String getPackager();",
"public String getMappingFilePath();",
"@Nullable\n @Override\n public IFile getOutputRoot() {\n return myTempModuleLocation.findChild(\"src_gen\");\n }",
"public BinderConfiguration addPackageToScan(String packageToScan) {\n packagesToScan.add(packageToScan);\n return this;\n }",
"Set<Class<? extends Annotation>> getScanTypeAnnotations();",
"public static String getResourceName(Package pkg, String name) {\n if (name.charAt(0) == '/') {\r\n return name;\r\n } else {\r\n StringBuffer resourceName = new StringBuffer(\"/\");\r\n resourceName.append(pkg.getName().replace('.', '/'));\r\n resourceName.append(\"/\").append(name);\r\n return resourceName.toString();\r\n }\r\n }",
"String getPathName();",
"String getPathName();",
"public abstract VFolder locatePackage(final String pkg_name);",
"public String findPackageForTest(String testClassName);",
"String getContextPath();",
"String getContextPath();",
"String getContextPath();",
"IPath getPath();",
"public String getAnnotation();",
"String getRootAlias();",
"public String getResPath(){\n return resPath;\n }",
"public abstract String packageName();",
"abstract public String getRingResourcesDir();",
"public String getSourcePath() {\n return sourcePath;\n }",
"public String getAttributeFileLibPath();",
"private String getDirectoryParameter(PluginCall call) {\n return call.getString(\"directory\");\n }",
"List<IDirectory> getSourcePath();",
"String getExternalPath(String path);",
"public String getPath();",
"public String getPath();",
"public String getPath();",
"@Override\n public Artifact getMainIncludeScannerSource() {\n return getIncludeScannerSources().get(0);\n }",
"private String getPackageAlias(SymbolEnv env) {\n return env.enclPkg.imports.stream()\n .filter(imports -> imports.symbol.pkgID.toString().equals(ORG_NAME + ORG_SEPARATOR + PACKAGE_NAME))\n .map(importPackage -> importPackage.alias.value).findFirst().orElse(PACKAGE_NAME);\n }",
"public ClassPath getClassPath();",
"String getPackageName() {\n final int lastSlash = name.lastIndexOf('/');\n final String parentPath = name.substring(0, lastSlash);\n return parentPath.replace('/', '.');\n }",
"String getPath();",
"String getPath();",
"String getPath();",
"String getPath();"
]
| [
"0.5908536",
"0.5488229",
"0.54819024",
"0.5455609",
"0.5383588",
"0.538064",
"0.5278927",
"0.52434003",
"0.5201921",
"0.5180166",
"0.517584",
"0.5148378",
"0.5141511",
"0.5121575",
"0.50933534",
"0.5075306",
"0.5075306",
"0.5053011",
"0.50388736",
"0.49889654",
"0.49585524",
"0.49476126",
"0.49397787",
"0.49340293",
"0.49211314",
"0.4918646",
"0.49012575",
"0.48820442",
"0.4853421",
"0.4851609",
"0.48445007",
"0.48428443",
"0.48374432",
"0.48111454",
"0.4804046",
"0.47947294",
"0.47832313",
"0.47692522",
"0.47640848",
"0.4759547",
"0.47479743",
"0.47449547",
"0.47361416",
"0.47335276",
"0.47261417",
"0.47237897",
"0.47201195",
"0.4718521",
"0.47155827",
"0.47121313",
"0.47092205",
"0.4703655",
"0.46970844",
"0.46942863",
"0.4685776",
"0.46854365",
"0.46691284",
"0.4661067",
"0.46595046",
"0.46525845",
"0.4652025",
"0.46459687",
"0.46409824",
"0.46330845",
"0.46275496",
"0.4626206",
"0.46225318",
"0.4622278",
"0.4621783",
"0.46178406",
"0.4617555",
"0.4613581",
"0.4613581",
"0.46058586",
"0.45995843",
"0.45942304",
"0.45942304",
"0.45942304",
"0.45909128",
"0.45902514",
"0.45871115",
"0.4582095",
"0.45789927",
"0.45775512",
"0.45761862",
"0.45756286",
"0.4570695",
"0.45638552",
"0.456342",
"0.4561807",
"0.4561807",
"0.4561807",
"0.45523557",
"0.4551509",
"0.45377877",
"0.45374978",
"0.4534982",
"0.4534982",
"0.4534982",
"0.4534982"
]
| 0.82935876 | 0 |
get all class name | public abstract List<String> scanAllClassNames(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"java.lang.String getClassName();",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"public String getClasses() {\n String classesString = \"\";\n\n for (String className : classes) {\n classesString += (className + \"\\n\");\n }\n\n return classesString;\n }",
"public String getClassName();",
"public abstract String getClassName();",
"public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"abstract String getClassName();",
"private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }",
"List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }",
"private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}",
"protected String getClassName() {\n return getDescriptedClass().getName();\n }",
"@Override\n public String getClassName() {\n return kelas;\n }",
"@Override\n public String getClassName() {\n return kelas;\n }",
"public String getClazzName();",
"public String getName_Class() {\n\t\treturn name;\n\t}",
"public String getClassname() {\n return classname;\n }",
"public List<String> getClassesList() {\n\t\tCursor c = theDb.rawQuery(\"SELECT * \" +\n\t\t\t\t\t\t\t\t \"FROM \" + DbContract.Classes.TABLE_NAME, null);\n\t\t\n\t\t//Read cursor into an ArrayList\n\t\tList<String> classesList = new ArrayList<String>();\n\t\tclassesList.add( context.getString(R.string.all_classes) );\t\t\t//Add \"All classes\"\n\t\t\n\t\twhile (c.moveToNext()) {\n\t\t\tclassesList.add( c.getString( c.getColumnIndex(DbContract.Classes.ATTRIBUTE_NAME)));\n\t\t}\n\t\t\n\t\treturn classesList;\n\t}",
"public String getClassname() {\n\t\treturn classname;\n\t}",
"public String getClassname()\r\n {\r\n return m_classname;\r\n }",
"public static String getClassName() {\n return CLASS_NAME;\n }",
"public String getClassname(Class<?> aClass) {\n\t\tString result = aClass.getCanonicalName();\n\t\tif (result.endsWith(\"[]\")) {\n\t\t\tresult = result.substring(0, result.length() - 2);\n\t\t}\n\t\treturn result;\n\t}",
"String getClassName() {\n final StringBuilder builder = new StringBuilder();\n final String shortName = getShortName();\n boolean upperCaseNextChar = true;\n for (final char c : shortName.toCharArray()) {\n if (c == '_' || c == '-') {\n upperCaseNextChar = true;\n continue;\n }\n\n if (upperCaseNextChar) {\n builder.append(Character.toUpperCase(c));\n upperCaseNextChar = false;\n } else {\n builder.append(c);\n }\n }\n builder.append(\"Messages\");\n return builder.toString();\n }",
"public String getClassName(){\n\t\treturn classname;\n\t}",
"private String m56637b(Class cls) {\n return cls.getName();\n }",
"public List<String> getClassList() {\n return classlist;\n }",
"public String getClassName() {\n return super.getClassName();\n }",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public String getClassName() { return className; }",
"public String getClassName(){\n\t\treturn targetClass.name;\n\t}",
"String getClassName() {\n return this.className;\n }",
"public String getName() {\n return className;\n }",
"public String getClassName()\n {\n return _className;\n }",
"String getClassTypeVariables() {\n final StringBuilder sb = new StringBuilder();\n if (classTypes.size() > 0) {\n sb.append(\"<\");\n for (int i = 0; i < classTypes.size(); i++) {\n final Class<?> c = classTypes.get(i);\n if (c != null) {\n sb.append(getShortClassName(c));\n if (i < classTypes.size() - 1) {\n sb.append(\", \");\n }\n }\n }\n sb.append(\">\");\n }\n return sb.toString();\n }",
"String getInstanceOfClass();",
"public String getClassName()\n {\n return className;\n }",
"public String toString() {return classSimpleName+\"#\"+name;}",
"protected static String getSimpleName(Class<?> c) {\n String name = c.getName();\n return name.substring(name.lastIndexOf(\".\") + 1);\n }",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"@NotNull\n List<? extends ClassInfo> getAllClasses();",
"public String getCurrentClassName () {\n String currentClass = getCurrentElement(ElementKind.CLASS);\n if (currentClass == null) return \"\";\n else return currentClass;\n }",
"public String getClassName () { return _className; }",
"public String getClassName() {\r\n return className;\r\n }",
"com.google.protobuf.ByteString\n getClassNameBytes();",
"default String getClassName() {\n return declaringType().getClassName();\n }",
"public ArrayList<String> getNamesOfClasses(OWLOntology ontology){\n\t\t\n\t\tArrayList<String> classes = new ArrayList<String>();\n\t\tfor (OWLClass cls : ontology.getClassesInSignature())\n\t\t\tclasses.add( cls.getIRI().getFragment() );\n\t\t\t\n\t\treturn classes;\n\t}",
"private static String getSimpleClassName(String className) {\n\n\n\t\tString[] names = className.split(\"\\\\.\");\n\n\t\tfor (int i = 0; i < names.length; i++) {\n\t\t\tLog.d(\"\", \"names =\" + names[i]);\n\t\t}\n\n\t\treturn names[names.length - 1];\n\t}",
"public String getClassName() {\n return className;\n }",
"public String getClassName()\n {\n return this.className;\n }",
"private String getClassName(String fileName){\n String className = FilenameUtils.getBaseName(fileName);\n return className;\n }",
"com.google.protobuf.ByteString\n getClassNameBytes();",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"Object getClass_();",
"Object getClass_();",
"public Iterator<String> listAllClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses().filterDrop( new Filter() {\r\n public boolean accept( Object o ) {\r\n return ((Resource) o).isAnon();\r\n }} )\r\n );\r\n\t}",
"@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getBaseClassName() {\n return className;\n }",
"protected String getClassName() {\r\n return newName.getText();\r\n }",
"@Test\n public void testGetClasses() throws Exception {\n for (Class clazz : TestClass.class.getClasses()) {\n System.out.println(clazz.getName());\n }\n }",
"String getStringClass();",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getName() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n return this.className;\n }",
"public String getClassName() {\n return this.className;\n }",
"private String getClassName(final Class<?> clazz) {\n return EntityType.getEntityType(clazz).map(e -> e.getEntityName(clazz)).orElse(clazz.getSimpleName());\n }",
"public ApexQualifiedName getClassName() {\n if (isClass()) {\n return this;\n }\n\n return new ApexQualifiedName(this.nameSpace, this.classes, null);\n }",
"@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }",
"@Override\n public String getClassName() {\n Object ref = className_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n }\n }",
"String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }",
"@Override\n public com.google.protobuf.ByteString\n getClassNameBytes() {\n Object ref = className_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n className_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Override\n\tpublic String getClassNameKey() {\n\t\treturn CLASS_NAME_KEY;\n\t}",
"char[] getSuperclassName();",
"public java.lang.String getClassName() {\n return this._className;\n }",
"protected String getClassName(Object o) {\n\t\tString classString = o.getClass().getName();\n\t\tint dotIndex = classString.lastIndexOf(\".\");\n\n\t\treturn classString.substring(dotIndex + 1);\n\t}",
"public Set<String> getClassKeys();",
"@DISPID(-2147417111)\n @PropGet\n java.lang.String className();",
"public String getClassName(String path);",
"public abstract Class getDescriptedClass();",
"@Test\n public void testClassName() {\n TestClass testClass = new TestClass();\n logger.info(testClass.getClass().getCanonicalName());\n logger.info(testClass.getClass().getName());\n logger.info(testClass.getClass().getSimpleName());\n }",
"private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n\t\treturn className;\n\t}",
"private Vector<String> getSwingClassNames() {\n List<ClassLoader> classLoadersList = new LinkedList<>();\n classLoadersList.add(ClasspathHelper.contextClassLoader());\n classLoadersList.add(ClasspathHelper.staticClassLoader());\n\n Reflections reflections = new Reflections(new ConfigurationBuilder()\n .setScanners(new SubTypesScanner(false), new ResourcesScanner())\n .setUrls(ClasspathHelper.forClassLoader(classLoadersList.toArray(new ClassLoader[0])))\n .filterInputsBy(new FilterBuilder().include(FilterBuilder.prefix(\"javax.swing\"))));\n\n Set<Class<? extends JComponent>> classes = reflections.getSubTypesOf(JComponent.class);\n\n Vector<String> classNames = new Vector<>();\n for (Class<?> cls : classes) {\n if (cls.getSimpleName().length() > 0 && cls.getSimpleName().charAt(0) == 'J') {\n classNames.add(cls.getSimpleName() + \" (\" + cls.getName() + \")\");\n }\n }\n\n return classNames;\n }",
"String getClassName() {\n return mClassName;\n }",
"public Iterator<String> listAllandAnonClasses()\r\n\t{\r\n\t\treturn new ToStringIterator<String>(ONT_MODEL.listClasses());\r\n\t}",
"public String getBinaryClassName() {\n\t\tString bcn = classQName.dotSeparated();\n\t\t// Inner classes not supported yet\n\t\tassert(!bcn.contains(\"$\"));\n\t\treturn bcn;\n\t}",
"public String toString() {\n\t\treturn getClass().getName();\n\t}",
"protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}"
]
| [
"0.7561515",
"0.752236",
"0.7515027",
"0.74836016",
"0.74836016",
"0.74836016",
"0.74746877",
"0.7386459",
"0.7172089",
"0.71484315",
"0.709793",
"0.709793",
"0.709095",
"0.70711184",
"0.7061199",
"0.705052",
"0.70218533",
"0.7014894",
"0.7014841",
"0.7010813",
"0.6968763",
"0.69053555",
"0.681272",
"0.680092",
"0.67670596",
"0.67513525",
"0.6725962",
"0.6717522",
"0.67119974",
"0.6656234",
"0.66304034",
"0.66103727",
"0.6589007",
"0.6575521",
"0.6574942",
"0.65471137",
"0.65398204",
"0.6537268",
"0.65278083",
"0.6516374",
"0.65086544",
"0.650136",
"0.6499426",
"0.64970446",
"0.64970446",
"0.64970446",
"0.64833254",
"0.64820594",
"0.64721817",
"0.64711356",
"0.6453677",
"0.6448989",
"0.64463",
"0.6443213",
"0.64428234",
"0.6440288",
"0.64377207",
"0.6428969",
"0.6418809",
"0.641815",
"0.641815",
"0.6410653",
"0.64085543",
"0.6408461",
"0.6399846",
"0.6384542",
"0.63723475",
"0.63701034",
"0.63701034",
"0.63701034",
"0.63701034",
"0.63701034",
"0.63701034",
"0.6354227",
"0.63492996",
"0.63492996",
"0.6329484",
"0.6325896",
"0.63182855",
"0.6314719",
"0.6299248",
"0.62980443",
"0.6286263",
"0.6285781",
"0.6284043",
"0.6278805",
"0.6261893",
"0.6259823",
"0.62560886",
"0.6243941",
"0.6242678",
"0.62345713",
"0.6188895",
"0.6188895",
"0.6186086",
"0.61818266",
"0.6178697",
"0.6175239",
"0.61658424",
"0.61624724"
]
| 0.6889471 | 22 |
set the ioc container | public void analyseAnnotations(AbsIoc ioc){
//0. makeup a cache first
Map<String, IocObject> cacheMap = new HashMap<String, IocObject>();
IocObject iocObj = null;
for(Class<?> cl : list){
iocObj = new IocObject();
iocObj.setType(cl);
//1.tell if there is an IocBean
if(!cl.isAnnotationPresent(IocBean.class))
continue ;
//2.if have the class name
IocBean bean = cl.getAnnotation(IocBean.class);
if(StringHandler.isEmpty(bean))
continue ;
String className = bean.name();
if(StringHandler.isEmpty(className))
className = cl.getSimpleName(); //if no name has been set, then use simple name
//3. scope properties, here only use default properties
if(cl.isAnnotationPresent(IocScope.class)){
IocScope scope = cl.getAnnotation(IocScope.class);
String val = scope.value();
//default is singleton
if(StringHandler.isEmpty(val))
val = "singleton";
iocObj.scope = val.trim();
}
//4. initial a instance
try {
if(iocObj.scope.equals("singleton"))
iocObj.instanceObj = cl.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
//XXX later change to logger
System.out.println("success load class: " + cl.getName());
cacheMap.put(className, iocObj);
}
//finally replace the map
ioc.iocMap = cacheMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setContainer(RuntimeContainer container)\n {\n this.container = container;\n }",
"public void setContainer(String container) {\n this.container = container;\n }",
"ComponentContainer container(ContextDefinition context);",
"void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory);",
"public void setInit(ContainerProgram init)\n {\n _init = init;\n }",
"public Container getContainer() {\r\n return container;\r\n }",
"void setObjectFactory(Injectable injectable, ObjectFactory<?> objectFactory, InjectionAttributes attributes);",
"public ToolBarIO(ToolBarContainer container) {\n\t\tthis.container = container;\n\t}",
"public Container newContainer();",
"public DepControlar() {\n \n initComponents();\n depservice = new DepService();\n }",
"public void setDao(IDao dao) {\r\n\t\tSystem.out.println(\"dao is injected\");\r\n\t\r\n\t\tthis.dao = dao;\r\n\t}",
"private void setupJade() throws Exception {\r\n String name = getContainerController().getContainerName();\r\n container = new ContainerID(name, null);\r\n\r\n getContentManager().registerOntology(ontology);\r\n }",
"public static void initializeDiContainer() {\n addDependency(new CamelCaseConverter());\n addDependency(new JavadocGenerator());\n addDependency(new TemplateResolver());\n addDependency(new PreferenceStoreProvider());\n addDependency(new CurrentShellProvider());\n addDependency(new ITypeExtractor());\n addDependency(new DialogWrapper(getDependency(CurrentShellProvider.class)));\n addDependency(new PreferencesManager(getDependency(PreferenceStoreProvider.class)));\n addDependency(new ErrorHandlerHook(getDependency(DialogWrapper.class)));\n\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new GeneratedAnnotationPredicate());\n addDependency(new GenericModifierPredicate());\n addDependency(new IsPrivatePredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsStaticPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new IsPublicPredicate(getDependency(GenericModifierPredicate.class)));\n addDependency(new GeneratedAnnotationContainingBodyDeclarationFilter(getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new PrivateConstructorRemover(getDependency(IsPrivatePredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BodyDeclarationOfTypeExtractor());\n addDependency(new BuilderClassRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class),\n getDependency(IsPrivatePredicate.class),\n getDependency(IsStaticPredicate.class),\n getDependency(PreferencesManager.class)));\n addDependency(new JsonDeserializeRemover(getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderInterfaceRemover(getDependency(BodyDeclarationOfTypeExtractor.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new StaticBuilderMethodRemover(getDependency(IsStaticPredicate.class), getDependency(IsPublicPredicate.class),\n getDependency(GeneratedAnnotationContainingBodyDeclarationFilter.class)));\n addDependency(new BuilderAstRemover(getDependencyList(BuilderRemoverChainItem.class)));\n\n addDependency(new BuilderRemover(getDependency(PreferencesManager.class), getDependency(ErrorHandlerHook.class),\n getDependency(BuilderAstRemover.class)));\n addDependency(new CompilationUnitSourceSetter());\n addDependency(new HandlerUtilWrapper());\n addDependency(new WorkingCopyManager());\n addDependency(new WorkingCopyManagerWrapper(getDependency(HandlerUtilWrapper.class)));\n addDependency(new CompilationUnitParser());\n addDependency(new GeneratedAnnotationPopulator(getDependency(PreferencesManager.class)));\n addDependency(new MarkerAnnotationAttacher());\n addDependency(new ImportRepository());\n addDependency(new ImportPopulator(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new BuilderMethodNameBuilder(getDependency(CamelCaseConverter.class),\n getDependency(PreferencesManager.class),\n getDependency(TemplateResolver.class)));\n addDependency(new PrivateConstructorAdderFragment());\n addDependency(new JsonPOJOBuilderAdderFragment(getDependency(PreferencesManager.class), getDependency(ImportRepository.class)));\n addDependency(new EmptyBuilderClassGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocGenerator.class),\n getDependency(TemplateResolver.class),\n getDependency(JsonPOJOBuilderAdderFragment.class)));\n addDependency(new BuildMethodBodyCreatorFragment());\n addDependency(new BuildMethodDeclarationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(TemplateResolver.class)));\n addDependency(new JavadocAdder(getDependency(JavadocGenerator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuildMethodCreatorFragment(getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(BuildMethodBodyCreatorFragment.class)));\n addDependency(new FullyQualifiedNameExtractor());\n addDependency(new StaticMethodInvocationFragment());\n addDependency(new OptionalInitializerChainItem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new BuiltInCollectionsInitializerChainitem(getDependency(StaticMethodInvocationFragment.class), getDependency(PreferencesManager.class)));\n addDependency(new FieldDeclarationPostProcessor(getDependency(PreferencesManager.class), getDependency(FullyQualifiedNameExtractor.class),\n getDependency(ImportRepository.class), getDependencyList(FieldDeclarationPostProcessorChainItem.class)));\n addDependency(new BuilderFieldAdderFragment(getDependency(FieldDeclarationPostProcessor.class)));\n addDependency(new WithMethodParameterCreatorFragment(getDependency(PreferencesManager.class), getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new RegularBuilderWithMethodAdderFragment(getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new BuilderFieldAccessCreatorFragment());\n addDependency(new TypeDeclarationToVariableNameConverter(getDependency(CamelCaseConverter.class)));\n addDependency(new FieldSetterAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new IsRegularBuilderInstanceCopyEnabledPredicate(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderCopyInstanceConstructorAdderFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new PublicConstructorWithMandatoryFieldsAdderFragment());\n addDependency(new RegularBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(RegularBuilderWithMethodAdderFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(RegularBuilderCopyInstanceConstructorAdderFragment.class),\n getDependency(PublicConstructorWithMandatoryFieldsAdderFragment.class)));\n addDependency(new StaticBuilderMethodSignatureGeneratorFragment(getDependency(GeneratedAnnotationPopulator.class), getDependency(PreferencesManager.class)));\n addDependency(new BuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new BlockWithNewBuilderCreationFragment());\n addDependency(\n new RegularBuilderBuilderMethodCreator(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new PrivateConstructorMethodDefinitionCreationFragment(getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new SuperFieldSetterMethodAdderFragment(getDependency(BuilderFieldAccessCreatorFragment.class)));\n addDependency(new PrivateConstructorBodyCreationFragment(getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(FieldSetterAdderFragment.class),\n getDependency(BuilderFieldAccessCreatorFragment.class),\n getDependency(SuperFieldSetterMethodAdderFragment.class)));\n addDependency(new ConstructorInsertionFragment());\n addDependency(new PrivateInitializingConstructorCreator(\n getDependency(PrivateConstructorMethodDefinitionCreationFragment.class),\n getDependency(PrivateConstructorBodyCreationFragment.class),\n getDependency(ConstructorInsertionFragment.class)));\n addDependency(new FieldPrefixSuffixPreferenceProvider(getDependency(PreferenceStoreProvider.class)));\n addDependency(new FieldNameToBuilderFieldNameConverter(getDependency(PreferencesManager.class),\n getDependency(FieldPrefixSuffixPreferenceProvider.class),\n getDependency(CamelCaseConverter.class)));\n addDependency(new TypeDeclarationFromSuperclassExtractor(getDependency(CompilationUnitParser.class),\n getDependency(ITypeExtractor.class)));\n addDependency(new BodyDeclarationVisibleFromPredicate());\n addDependency(new ApplicableFieldVisibilityFilter(getDependency(BodyDeclarationVisibleFromPredicate.class)));\n addDependency(new ClassFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(ApplicableFieldVisibilityFilter.class)));\n addDependency(new RecordFieldCollector(getDependency(FieldNameToBuilderFieldNameConverter.class)));\n addDependency(new BodyDeclarationFinderUtil(getDependency(CamelCaseConverter.class)));\n addDependency(new SuperConstructorParameterCollector(getDependency(FieldNameToBuilderFieldNameConverter.class),\n getDependency(PreferencesManager.class), getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(BodyDeclarationVisibleFromPredicate.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new SuperClassSetterFieldCollector(getDependency(PreferencesManager.class),\n getDependency(TypeDeclarationFromSuperclassExtractor.class),\n getDependency(CamelCaseConverter.class),\n getDependency(BodyDeclarationFinderUtil.class)));\n addDependency(new ApplicableBuilderFieldExtractor(Arrays.asList(\n getDependency(SuperConstructorParameterCollector.class),\n getDependency(ClassFieldCollector.class),\n getDependency(SuperClassSetterFieldCollector.class),\n getDependency(RecordFieldCollector.class))));\n addDependency(new ActiveJavaEditorOffsetProvider());\n addDependency(new ParentITypeExtractor());\n addDependency(new IsTypeApplicableForBuilderGenerationPredicate(getDependency(ParentITypeExtractor.class)));\n addDependency(new CurrentlySelectedApplicableClassesClassNameProvider(getDependency(ActiveJavaEditorOffsetProvider.class),\n getDependency(IsTypeApplicableForBuilderGenerationPredicate.class),\n getDependency(ParentITypeExtractor.class)));\n addDependency(new BuilderOwnerClassFinder(getDependency(CurrentlySelectedApplicableClassesClassNameProvider.class),\n getDependency(PreferencesManager.class), getDependency(GeneratedAnnotationPredicate.class)));\n addDependency(new BlockWithNewCopyInstanceConstructorCreationFragment());\n addDependency(new CopyInstanceBuilderMethodDefinitionCreatorFragment(getDependency(TemplateResolver.class),\n getDependency(PreferencesManager.class),\n getDependency(JavadocAdder.class), getDependency(StaticBuilderMethodSignatureGeneratorFragment.class)));\n addDependency(new RegularBuilderCopyInstanceBuilderMethodCreator(getDependency(BlockWithNewCopyInstanceConstructorCreationFragment.class),\n getDependency(CopyInstanceBuilderMethodDefinitionCreatorFragment.class),\n getDependency(TypeDeclarationToVariableNameConverter.class),\n getDependency(IsRegularBuilderInstanceCopyEnabledPredicate.class)));\n addDependency(new JsonDeserializeAdder(getDependency(ImportRepository.class)));\n addDependency(new GlobalBuilderPostProcessor(getDependency(PreferencesManager.class), getDependency(JsonDeserializeAdder.class)));\n addDependency(new DefaultConstructorAppender(getDependency(ConstructorInsertionFragment.class), getDependency(PreferencesManager.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new RegularBuilderCompilationUnitGenerator(getDependency(RegularBuilderClassCreator.class),\n getDependency(RegularBuilderCopyInstanceBuilderMethodCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(RegularBuilderBuilderMethodCreator.class), getDependency(ImportPopulator.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new RegularBuilderUserPreferenceDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new RegularBuilderDialogDataConverter());\n addDependency(new RegularBuilderUserPreferenceConverter(getDependency(PreferencesManager.class)));\n addDependency(new RegularBuilderUserPreferenceProvider(getDependency(RegularBuilderUserPreferenceDialogOpener.class),\n getDependency(PreferencesManager.class),\n getDependency(RegularBuilderDialogDataConverter.class),\n getDependency(RegularBuilderUserPreferenceConverter.class)));\n addDependency(new RegularBuilderCompilationUnitGeneratorBuilderFieldCollectingDecorator(getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(RegularBuilderCompilationUnitGenerator.class),\n getDependency(RegularBuilderUserPreferenceProvider.class)));\n addDependency(new IsEventOnJavaFilePredicate(getDependency(HandlerUtilWrapper.class)));\n\n // staged builder dependencies\n addDependency(new StagedBuilderInterfaceNameProvider(getDependency(PreferencesManager.class),\n getDependency(CamelCaseConverter.class),\n getDependency(TemplateResolver.class)));\n addDependency(new StagedBuilderWithMethodDefiniationCreatorFragment(getDependency(PreferencesManager.class),\n getDependency(BuilderMethodNameBuilder.class),\n getDependency(MarkerAnnotationAttacher.class),\n getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(WithMethodParameterCreatorFragment.class)));\n addDependency(new StagedBuilderInterfaceTypeDefinitionCreatorFragment(getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderInterfaceCreatorFragment(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(StagedBuilderInterfaceTypeDefinitionCreatorFragment.class),\n getDependency(BuildMethodDeclarationCreatorFragment.class),\n getDependency(JavadocAdder.class),\n getDependency(GeneratedAnnotationPopulator.class)));\n addDependency(new StagedBuilderCreationBuilderMethodAdder(getDependency(BlockWithNewBuilderCreationFragment.class),\n getDependency(BuilderMethodDefinitionCreatorFragment.class)));\n addDependency(new NewBuilderAndWithMethodCallCreationFragment());\n addDependency(new StagedBuilderCreationWithMethodAdder(getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(NewBuilderAndWithMethodCallCreationFragment.class), getDependency(JavadocAdder.class)));\n addDependency(new StagedBuilderStaticBuilderCreatorMethodCreator(getDependency(StagedBuilderCreationBuilderMethodAdder.class),\n getDependency(StagedBuilderCreationWithMethodAdder.class),\n getDependency(PreferencesManager.class)));\n addDependency(new StagedBuilderWithMethodAdderFragment(\n getDependency(StagedBuilderWithMethodDefiniationCreatorFragment.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new InterfaceSetter());\n addDependency(new StagedBuilderClassCreator(getDependency(PrivateConstructorAdderFragment.class),\n getDependency(EmptyBuilderClassGeneratorFragment.class),\n getDependency(BuildMethodCreatorFragment.class),\n getDependency(BuilderFieldAdderFragment.class),\n getDependency(StagedBuilderWithMethodAdderFragment.class),\n getDependency(InterfaceSetter.class),\n getDependency(MarkerAnnotationAttacher.class)));\n addDependency(new StagedBuilderStagePropertyInputDialogOpener(getDependency(CurrentShellProvider.class)));\n addDependency(new StagedBuilderStagePropertiesProvider(getDependency(StagedBuilderInterfaceNameProvider.class),\n getDependency(StagedBuilderStagePropertyInputDialogOpener.class)));\n addDependency(new StagedBuilderCompilationUnitGenerator(getDependency(StagedBuilderClassCreator.class),\n getDependency(PrivateInitializingConstructorCreator.class),\n getDependency(StagedBuilderStaticBuilderCreatorMethodCreator.class),\n getDependency(ImportPopulator.class),\n getDependency(StagedBuilderInterfaceCreatorFragment.class),\n getDependency(BuilderRemover.class),\n getDependency(GlobalBuilderPostProcessor.class),\n getDependency(DefaultConstructorAppender.class)));\n addDependency(new StagedBuilderCompilationUnitGeneratorFieldCollectorDecorator(\n getDependency(StagedBuilderCompilationUnitGenerator.class),\n getDependency(ApplicableBuilderFieldExtractor.class),\n getDependency(StagedBuilderStagePropertiesProvider.class)));\n\n // Generator chain\n addDependency(new GenerateBuilderExecutorImpl(getDependency(CompilationUnitParser.class),\n getDependencyList(BuilderCompilationUnitGenerator.class),\n getDependency(IsEventOnJavaFilePredicate.class), getDependency(WorkingCopyManagerWrapper.class),\n getDependency(CompilationUnitSourceSetter.class),\n getDependency(ErrorHandlerHook.class),\n getDependency(BuilderOwnerClassFinder.class)));\n addDependency(new GenerateBuilderHandlerErrorHandlerDecorator(getDependency(GenerateBuilderExecutorImpl.class),\n getDependency(ErrorHandlerHook.class)));\n addDependency(new StatefulBeanHandler(getDependency(PreferenceStoreProvider.class),\n getDependency(WorkingCopyManagerWrapper.class), getDependency(ImportRepository.class)));\n addDependency(\n new StateInitializerGenerateBuilderExecutorDecorator(\n getDependency(GenerateBuilderHandlerErrorHandlerDecorator.class),\n getDependency(StatefulBeanHandler.class)));\n }",
"@Autowired\n public void setWebApp( WebApp sysDesc ) {\n webapp = sysDesc;\n }",
"@Override\n public ServiceRegistration<CdiContainer> call() throws Exception {\n BeanBundle cdiBundle = container.getInstance().select(BeanBundle.class)\n .get();\n BundleContext bc = bundle.getBundleContext();\n cdiBundle.setBundleContext(bc);\n\n // fire ContainerInitialized event\n BeanManager beanManager = container.getBeanManager();\n beanManager.fireEvent(new ContainerInitialized());\n\n // register CdiContainer service\n Dictionary<String, Object> props = new Hashtable<String, Object>();\n props.put(\"bundleId\", bundle.getBundleId());\n props.put(\"symbolicName\", bundle.getSymbolicName());\n\n return bc.registerService(CdiContainer.class, container, props);\n }",
"public void setIocCollector(IocCollector iocCollector) {\n\t\tSystem.out.println(\"Inside Setter of Threat Notifier\");\n\t\tthis.iocCollector = iocCollector;\n\t}",
"@Override\n protected ObjectFactory initObjectFactory() {\n try {\n BeanManager bm = (BeanManager) new InitialContext().lookup(\"java:comp/BeanManager\");\n Set<Bean<?>> beans = bm.getBeans(CdiObjectFactory.class);\n Bean<CdiObjectFactory> beanType = (Bean<CdiObjectFactory>) beans.iterator().next();\n CreationalContext<CdiObjectFactory> ctx = bm.createCreationalContext(beanType);\n CdiObjectFactory objFactory = (CdiObjectFactory) bm.getReference(beanType, CdiObjectFactory.class, ctx);\n objFactory.init(this);\n return objFactory;\n } catch (Exception ex) {\n throw new RuntimeException(ex);\n }\n }",
"public Container getContainer();",
"public GenericContainer<?> applicationContainer() {\n return applicationContainer;\n }",
"protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }",
"public void setIo(MapReader io) {\n\t\tthis.io = io;\n\t}",
"public ObjectContainer getObjectContainer()\n {\n return container;\n }",
"public void setCon(Object o) {\n con = o;\n }",
"@Override\n\tpublic void setApplicationContext(ApplicationContext ctx) throws BeansException {\n\t\tthis.ctx=ctx;\n\t}",
"@Inject\n private void setLogger(Logger log) {\n logger = log;\n }",
"Container createContainer();",
"public void setDao(IConsortiaDao dao) {\r\n super.setDao(dao);\r\n this.dao = dao;\r\n }",
"@Before\n\tpublic void inicializarEnCadaTest() {\n\t\tthis.servicioDocumento = spy (new ServicioDocumentoImpl(repositorioDocumento));\n\n\t}",
"public void containerInitializer(Container container)\n\t{\n\t\tcontainer.addContainerProperty(\"Description\", String.class, null);\n\t\tcontainer.addContainerProperty(\"Start Date\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"End Date\", Date.class, null); \n\t\tcontainer.addContainerProperty(\"Deadline\", Date.class, null);\n\t\tcontainer.addContainerProperty(\"Active\", Image.class, null);\n\t\tcontainer.addContainerProperty(\"Type\",String.class, null);\n\t\tcontainer.addContainerProperty(\"View\", \tButton.class, null);\n\t\tcontainer.addContainerProperty(\"Edit\",Button.class, null);\n\t\tcontainer.addContainerProperty(\"Delete\",Button.class, null);\n\t}",
"public void startIt() {\r\n\r\n\t\tfinal Weld weld = new Weld();\r\n\t\ttry (WeldContainer container = weld.initialize()) {\r\n\t\t\tfinal WeldInstance<ResearchCDIBean> instance = container.select(ResearchCDIBean.class);\r\n\t\t\tfinal ResearchCDIBean researchCDIBean = instance.get();\r\n\t\t\t/*\r\n\t\t\t * run in container\r\n\t\t\t */\r\n\t\t\tresearchCDIBean.process();\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void init(BundleContext context, DependencyManager manager)\n\t\t\tthrows Exception {\n\t\tmanager.add(createComponent()\n\t\t\t\t.setInterface(Object.class.getName(), null)\n\t\t\t\t.setImplementation(ConsoleClient.class)\n\t\t\t\t.add(createServiceDependency().setService(AgendaService.class).setRequired(true))\n\t\t);\n\t\t\n\t}",
"protected synchronized void set(Injector injector) {\n injectors.set(injector);\n }",
"@PostConstruct\r\n\tpublic void init(){\r\n\t\tconta = new Conta();\r\n\t\tservice = new ContaService();\r\n\t\tconta.setDataAbertura(Calendar.getInstance());\r\n\t}",
"public void init(HttpServletRequest request) {\n\n\t\ttry {\n\t\t\tsuper.init(request);\n\t\t\tthis.dataComposer = (IDataComposer) super.getBeanFactory().getBean(HDIVUtil.getDataComposerName());\n\t\t\trequest.setAttribute(\"dataComposer\", this.dataComposer);\n\n\t\t} catch (Exception e) {\n\t\t\tString errorMessage = HDIVUtil.getMessage(\"helper.init\");\n\t\t\tthrow new HDIVException(errorMessage, e);\n\t\t}\n\t}",
"private void setup(){\n\n // menginisialisasi variabel component\n component = DaggerApplicationComponent.builder()\n .applicationModule(new ApplicationModule(this)).build();\n\n // memanggil fungsi inject\n component.inject(this);\n }",
"void setClusterContainerService(IClusterContainerServices s) {\n logger.debug(\"Cluster Service set\");\n this.clusterContainerService = s;\n }",
"@PostConstruct\n\tpublic void inicializar() {\n\t}",
"void init(Component c) {\n Dictionary<?, ?> props = c.getServiceProperties();\n if (props != null) {\n this.containerName = (String) props.get(\"containerName\");\n logger.debug(\"Running containerName: {}\", this.containerName);\n } else {\n // In the Global instance case the containerName is empty\n this.containerName = \"\";\n }\n startUp();\n }",
"public void setObjectFactory(PoolObjectFactory factory) {\n if (initialized)\n throw new IllegalStateException(INITIALIZED);\n this.factory = factory;\n }",
"@Autowired\n\tpublic void setDao(BoardDAO dao) {\n\t\tthis.dao = dao;\n\t\tSystem.out.println(\"setDao() 호출됨(dao)->\"+dao);\n\t}",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n configureDefaultCommands();\n }",
"@PostConstruct\n public void init() {\n configureSwagger();\n }",
"public IOptionsContainer getContainer();",
"public void setDao(IProduitDao dao) {\r\n\t\tthis.dao = dao;\r\n\t}",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n }",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n }",
"@PostConstruct\n public void initPool() {\n SpringHelper.setApplicationContext(applicationContext);\n if (!initialized) {\n try {\n final File configDirectory = ConfigDirectory.setupTestEnvironement(\"OGCRestTest\");\n final File dataDirectory2 = new File(configDirectory, \"dataCsw2\");\n dataDirectory2.mkdir();\n\n try {\n serviceBusiness.delete(\"csw\", \"default\");\n serviceBusiness.delete(\"csw\", \"intern\");\n } catch (ConfigurationException ex) {}\n\n final Automatic config2 = new Automatic(\"filesystem\", dataDirectory2.getPath());\n config2.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"default\", config2, null);\n\n writeProvider(\"meta1.xml\", \"42292_5p_19900609195600\");\n\n Automatic configuration = new Automatic(\"internal\", (String)null);\n configuration.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"intern\", configuration, null);\n\n initServer(null, null, \"api\");\n pool = GenericDatabaseMarshallerPool.getInstance();\n initialized = true;\n } catch (Exception ex) {\n Logger.getLogger(OGCRestTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"DelegateContainer() {\n super();\n }",
"@Before\n public void setUp(){\n Cic.populate();\n }",
"public void init() {\n ContainerProperties containerProperties = buildContainerProperties();\n this.messageListenerContainer = buildMessageListenerContainer( consumerFactory, containerProperties );\n }",
"public void setUIComponent(Component c) {}",
"public void init(IApplication app){\n\t\tthis.iApp = app;\n\t}",
"@Override\n\tpublic void setApplicationContext(ApplicationContext context) throws BeansException {\n\t\t\n\t\tthis.context = context;\n\t\t\n\t}",
"@PostConstruct\n public void init() {\n super.setFacade(ejbFacadeFacturaIngreso);\n }",
"@Autowired\n public void setUserService(UserService userService) {\n this.userService = userService;\n }",
"public void setDependencyResolver( DependencyResolver resolver )\r\n {\r\n this.resolver = resolver;\r\n }",
"@Override\npublic void setParentContainer(VirtualContainer c) {\n\t\n}",
"@Reference\n protected void setServerContainerContainer(ServerContainer serverContainer) {\n this.serverContainer = serverContainer;\n }",
"@PostConstruct\n public void init() {\n c=new Cliente();\n lc=null;\n }",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n\n }",
"@Override\r\n\tpublic void setApplicationContext(ApplicationContext applicationContext)\r\n\t\t\tthrows BeansException {\n\t\tSystem.out.println(\"进入方法。。。\"+applicationContext);\r\n\t\tApplicationContextHolder.app=applicationContext;\r\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t\tEnvironmentUtils.setEnvironment(env);\n\t}",
"protected Container getContainer()\r\n {\n return _xarSource.getXarContext().getContainer();\r\n }",
"@Autowired\r\npublic void setDependency1(Dependency1 dependency1) {\r\n\tthis.dependency1=dependency1;\r\n}",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"@PostConstruct\n @Override\n public void init() {\n super.setFacade(ejbFacade);\n }",
"public External withContainer(String container) {\n this.container = container;\n return this;\n }",
"@Override\r\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\t\r\n\t}",
"public void setClDao(IClientDao clDao) {\r\n\t\tthis.clDao = clDao;\r\n\t}",
"@Autowired\r\n\tpublic void setContext(ApplicationContext context) {\r\n\t\tthis.context = context;\r\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"session\", new SessionScope());\r\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"request\", new RequestScope());\r\n\t}",
"@Autowired\r\n\tpublic void setContext(ApplicationContext context) {\r\n\t\tthis.context = context;\r\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"session\", new SessionScope());\r\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"request\", new RequestScope());\r\n\t}",
"public void setApplicationContext(ApplicationContext applicationContext)\n/* */ throws BeansException\n/* */ {\n/* 106 */ applicationContext = applicationContext;\n/* */ }",
"public interface ServletContextAware {\r\n\r\n /**\r\n * Called by GuiceContainerFactory when initialize module.\r\n *\r\n * @param servletContext ServletContext object to be used by this object\r\n */\r\n void setServletContext(ServletContext servletContext);\r\n\r\n}",
"public void selfRegister() {\n builder.factory(Configuration.class, MockConfiguration.class, Scope.SINGLETON);\n LocatableProperties props = new LocatableProperties();\n new StrutsDefaultConfigurationProvider().register(builder, props);\n builder.constant(StrutsConstants.STRUTS_DEVMODE, \"false\");\n builder.constant(StrutsConstants.STRUTS_CONFIGURATION_XML_RELOAD, \"true\");\n builder.constant(StrutsConstants.STRUTS_OGNL_ENABLE_EXPRESSION_CACHE, \"true\");\n builder.constant(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION, \"false\");\n container = builder.create(true);\n }",
"@Override\n\tpublic void setApplicationContext(ApplicationContext context) throws BeansException {\n\t\tSystem.out.println(\"setting newly\");\n\t\tthis.context=context;\n\t\tsetContext();\n\t}",
"@Autowired\n\tpublic void setContext(ApplicationContext context) {\n\t\tthis.context = context;\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"session\", new SessionScope());\n\t\t((DefaultListableBeanFactory) context.getAutowireCapableBeanFactory()).registerScope(\"request\", new RequestScope());\n\t}",
"public DockContainer getContainer() {\n return container;\n }",
"@Override\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException {\n\t\tcontext=applicationContext;\n\t}",
"@Autowired\n public void setPersonManager(IPersonManager personManager) {\n this.personManager = personManager;\n }",
"public void setApplicationContext(ApplicationContext context) throws BeansException {\n appContext = context;\n }",
"public String getContainer() {\n return this.container;\n }",
"public void setDao(IDaoCompte dao) {\n\t\tthis.dao = dao;\n\t}",
"public WuicFacadeBuilder() {\n contextPath = \"\";\n warmUpStrategy = WuicFacade.WarmupStrategy.NONE;\n multipleConfigInTagSupport = Boolean.TRUE;\n wuicXmlPath = getClass().getResource(\"/wuic.xml\");\n useDefaultContextBuilderConfigurator = Boolean.TRUE;\n objectBuilderInspector = null;\n configurators = new ArrayList<ContextBuilderConfigurator>();\n }",
"public void iocSelected (String iocId);",
"void setAppCtx(ApplicationContext appCtx);",
"public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}",
"public RobotContainer() {\n // Configure the button bindings\n configureButtonBindings();\n setDefaultCommands();\n }",
"@BeforeEach\n\tpublic void setup() throws Exception {\n\t\tGDACoreActivator activator = new GDACoreActivator(); // Make an instance to call method that sets static field!\n\t\tactivator.start(mockContext); // Inject the mock\n\n\t\tosgiServiceBeanHandler = new OsgiServiceBeanHandler();\n\t}",
"public void init()\n {\n context = getServletContext();\n parameters = (Siu_ContainerLabel)context.getAttribute(\"parameters\");\n }",
"public void setAutowired(EntityTobeAutowired autowired) {\n\t\tthis.autowired = autowired;\n\t}",
"public void setApplicationContext(ApplicationContext context) throws BeansException {\r\n CONTEXT = context;\r\n }",
"public DocumentumCoreServicesImpl() {\r\n\r\n\t\tIObjectService iObjService = null;\r\n\r\n\t\tif (this.objectService == null) {\r\n\r\n\t\t\tlogger.info(INFO_INICIANDO_EMC);\r\n\r\n\t\t\ttry {\r\n\r\n\t\t\t\tRepositoryIdentityConstants repositoryIdentityConstants = EMCDocumentumFactory\r\n\t\t\t\t\t\t.getConstants(RepositoryIdentityConstants.class);\r\n\r\n\t\t\t\tthis.setRepositoryIdentityConstants(repositoryIdentityConstants);\r\n\r\n\t\t\t\tContextFactory contextFactory = ContextFactory.getInstance();\r\n\r\n\t\t\t\tIServiceContext serviceContext = contextFactory.getContext();\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.USER_TRANSACTION_HINT, IServiceContext.TRANSACTION_REQUIRED);\r\n\t\t\t\tserviceContext.setRuntimeProperty(IServiceContext.PAYLOAD_PROCESSING_POLICY, \"PAYLOAD_FAIL_ON_EXCEPTION\");\r\n\r\n\t\t\t\tsetServiceContext(serviceContext);\r\n\r\n\t\t\t\tRepositoryIdentity repoId = new RepositoryIdentity();\r\n\r\n\t\t\t\trepoId.setRepositoryName(REPOSITORY_NAME);\r\n\r\n\t\t\t\trepoId.setUserName(USER_NAME);\r\n\r\n\t\t\t\trepoId.setPassword(USER_PASSWORD);\r\n\r\n\t\t\t\tgetServiceContext().addIdentity(repoId);\r\n\r\n\t\t\t\t//\t\tcontextFactory.register(getServiceContext());\r\n\r\n\t\t\t\t//iObjectService = ServiceFactory.getInstance().getRemoteService(IObjectService.class, serviceContext, MODULE_NAME, DFS_SERVICE_URL);\r\n\t\t\t\tiObjService = ServiceFactory.getInstance().getLocalService(IObjectService.class, serviceContext);\r\n\r\n\t\t\t\tlogger.info(INFO_CONEXAO_EMC);\r\n\r\n\t\t\t\tthis.objectService = iObjService;\r\n\r\n\t\t\t} catch (ServiceInvocationException e) {\r\n\r\n\t\t\t\tlogger.error(ERROR_CONEXAO_EMC.concat(e.getLocalizedMessage()));\r\n\r\n\t\t\t}\r\n\r\n\t\t\tthis.setObjectService(iObjService);\r\n\t\t}\r\n\r\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t\ttoolsClient = galaxyApiService.getGalaxyInstance().getToolsClient();\n\t}",
"@Override\n\tpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException\n\t{\n\t\trootApplicationContext = applicationContext;\n\t}",
"@Autowired\n public void setEnvironment(Environment environment) {\n this.environment = environment;\n }",
"public GenericContainer(T t){\n obj = t;\n }",
"public void init()\n {\n _appContext = SubAppContext.createOMM(System.out);\n _serviceName = CommandLine.variable(\"serviceName\");\n initGUI();\n }"
]
| [
"0.65594333",
"0.57340956",
"0.56779325",
"0.5667857",
"0.56179756",
"0.5601341",
"0.5585383",
"0.55160064",
"0.5496556",
"0.5463542",
"0.54608244",
"0.545623",
"0.5414547",
"0.5357245",
"0.53568333",
"0.53459495",
"0.53160304",
"0.5315574",
"0.5289466",
"0.52703595",
"0.526788",
"0.5259068",
"0.5250782",
"0.5250574",
"0.52263427",
"0.5199441",
"0.5198513",
"0.5195747",
"0.51953846",
"0.5190756",
"0.51841575",
"0.51761234",
"0.51678365",
"0.5150584",
"0.5142607",
"0.5133735",
"0.5132349",
"0.51105726",
"0.5096333",
"0.5086139",
"0.5072132",
"0.5046578",
"0.50452197",
"0.50425583",
"0.5040195",
"0.5040195",
"0.50361955",
"0.5033593",
"0.50280654",
"0.5024629",
"0.5024281",
"0.5015017",
"0.5006179",
"0.49987593",
"0.4995935",
"0.49949187",
"0.49943137",
"0.49821174",
"0.49806246",
"0.49780047",
"0.49773526",
"0.497379",
"0.49719104",
"0.4969588",
"0.49657118",
"0.49657118",
"0.49657118",
"0.49657118",
"0.49657118",
"0.49657118",
"0.49555656",
"0.49477592",
"0.494549",
"0.49192497",
"0.49192497",
"0.49192148",
"0.4909665",
"0.4907174",
"0.48998618",
"0.4898348",
"0.48938614",
"0.48925173",
"0.48880294",
"0.48749328",
"0.48662722",
"0.48627943",
"0.4859518",
"0.4858279",
"0.48571253",
"0.48534578",
"0.48510137",
"0.48467943",
"0.4844837",
"0.4837001",
"0.48302716",
"0.48219374",
"0.48211828",
"0.4820069",
"0.48196006",
"0.48188522",
"0.48157385"
]
| 0.0 | -1 |
IocLoader ld = new AnnotationIocLoader(); | public static void main(String[] args) {
System.out.println(System.getProperty("user.dir"));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface AnnotationReader\r\n{\r\n /**\r\n * Accessor for the annotations packages supported by this reader.\r\n * @return The annotations packages that will be processed.\r\n */\r\n String[] getSupportedAnnotationPackages();\r\n\r\n /**\r\n * Method to get the MetaData for a class from its annotations.\r\n * @param cls The class\r\n * @param pmd MetaData for the owning package (that this will be a child of)\r\n * @param clr ClassLoader resolver\r\n * @return The ClassMetaData (unpopulated and uninitialised)\r\n */\r\n AbstractClassMetaData getMetaDataForClass(Class cls, PackageMetaData pmd, ClassLoaderResolver clr);\r\n\r\n /**\r\n * Method to return whether this is reading in a persistence context.\r\n * @return Whether this is a persistence context\r\n */\r\n boolean isPersistenceContext();\r\n}",
"public AnnotationInfoImpl()\n {\n }",
"AnnotationProvider getClassAnnotationProvider();",
"public Framework_annotation<T> build_annotation();",
"public void analyseAnnotations(AbsIoc ioc){\n\t\t//0. makeup a cache first\n\t\tMap<String, IocObject> cacheMap = new HashMap<String, IocObject>();\n\t\tIocObject iocObj = null;\n\t\tfor(Class<?> cl : list){\n\t\t\tiocObj = new IocObject();\n\t\t\tiocObj.setType(cl);\n\t\t\t//1.tell if there is an IocBean \n\t\t\tif(!cl.isAnnotationPresent(IocBean.class))\n\t\t\t\tcontinue ;\n\t\t\t//2.if have the class name\n\t\t\tIocBean bean = cl.getAnnotation(IocBean.class);\n\t\t\tif(StringHandler.isEmpty(bean))\n\t\t\t\tcontinue ;\n\t\t\tString className = bean.name();\n\t\t\tif(StringHandler.isEmpty(className))\n\t\t\t\tclassName = cl.getSimpleName(); //if no name has been set, then use simple name\n\t\t\t\n\t\t\t//3. scope properties, here only use default properties\n\t\t\tif(cl.isAnnotationPresent(IocScope.class)){\n\t\t\t\tIocScope scope = cl.getAnnotation(IocScope.class);\n\t\t\t\tString val = scope.value();\n\t\t\t\t//default is singleton\n\t\t\t\tif(StringHandler.isEmpty(val)) \n\t\t\t\t\tval = \"singleton\"; \n\t\t\t\t\n\t\t\t\tiocObj.scope = val.trim();\n\t\t\t}\n\t\t\t\n\t\t\t//4. initial a instance\n\t\t\ttry {\n\t\t\t\tif(iocObj.scope.equals(\"singleton\"))\n\t\t\t\t\tiocObj.instanceObj = cl.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t//XXX later change to logger\n\t\t\tSystem.out.println(\"success load class: \" + cl.getName());\n\t\t\tcacheMap.put(className, iocObj); \n\t\t}\n\t\t\n\t\t//finally replace the map\n\t\tioc.iocMap = cacheMap;\n\t}",
"SpringLoader getSpringLoader();",
"public interface BootLoaderManager {\n\n /**\n * 注入上下文\n * @param atlasWrapperApplicationContext\n */\n BootLoaderManager attachContext(AtlasWrapperApplicationContext atlasWrapperApplicationContext);\n\n /**\n * 获取上下文环境\n * @return\n */\n AtlasWrapperApplicationContext getContext();\n\n /**\n * 启动加载\n */\n void load();\n}",
"public interface CoreAnnotationProcessorEnv\n{\n /** Map of String -> String */\n Map getOptions();\n\n Messager getMessager();\n\n Filer getFiler();\n\n TypeDeclaration[] getSpecifiedTypeDeclarations();\n\n TypeDeclaration getTypeDeclaration( String s );\n\n Declaration[] getDeclarationsAnnotatedWith( AnnotationTypeDeclaration annotationTypeDeclaration );\n \n void setAttribute( String propertyName, Object value );\n \n Object getAttribute( String propertyName );\n}",
"private BeanAnnotationUtils()\n\t{\n\t\tsuper();\n\t}",
"@MyFirstAnnotation(name=\"tom\",description=\"write by tom\")\n\tpublic UsingMyFirstAnnotation(){\n\t\t\n\t}",
"public interface SourceAnnotation {\n\n void annotate(AnnotationHolder holder, Document document, int sourceOffset);\n\n}",
"Annotation createAnnotation();",
"Annotation createAnnotation();",
"public interface AnnotationAccess\n{\n /**\n * Returns a provider for annotations on the service class and interface. This will reflect annotations defined by\n * the implementation class itself, plus annotations defined by the service interface (implementation class\n * annotations take precedence).\n * @return an AnnotationProvider instance.\n */\n AnnotationProvider getClassAnnotationProvider();\n\n /**\n * Returns a provider for annotations of a method of the class. This includes annotations on\n * the implementation method, plus annotations on the corresponding service interface method\n * (if such a method exists), with precedence on the implementation class method annotations.\n * @param methodName the name of the method.\n * @param parameterTypes the types of the parameters of the method.\n * @return an AnnotationProvider instance. * \n */\n AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes);\n\n}",
"public A annotation() {\n\t\treturn proxy(annotation, loader, className, map);\n\t}",
"public Framework_annotation<T> build_normal();",
"public interface Annotation {\n\t\n\t/** Return the unique ID associated with the annotation */\n\tpublic String getId();\n\n\t/** Return the type of the annotation (such as \"laughter\", \"speaker\") according to Alveo */\n\tpublic String getType();\n\n\t/** Return the label assigned to the annotation\n\t */\n\tpublic String getLabel();\n\n\t/** Return the start offset of the annotation\n\t */\n\tpublic double getStart();\n\n\t/** Return the end offset of the annotation\n\t */\n\tpublic double getEnd();\n\n\t/** Return the <a href=\"http://www.w3.org/TR/json-ld/#typed-values\">JSON-LD value type</a>\n\t */\n\tpublic String getValueType();\n\n\t/** Return a mapping containing URIs as keys corresponding to fields, and their matching values\n\t * This is used for converting to and from JSON\n\t *\n\t * The URIs correspond to JSON-LD URIs and therefore also to RDF predicate URIs on the server side\n\t *\n\t * @return a URI to value mapping\n\t */\n\tpublic Map<String, Object> uriToValueMap();\n\n\tpublic Document getAnnotationTarget();\n\n\n}",
"public interface BuiltInsLoader {\n public static final Companion Companion = Companion.$$INSTANCE;\n\n PackageFragmentProvider createPackageFragmentProvider(StorageManager storageManager, ModuleDescriptor moduleDescriptor, Iterable<? extends ClassDescriptorFactory> iterable, PlatformDependentDeclarationFilter platformDependentDeclarationFilter, AdditionalClassPartsProvider additionalClassPartsProvider, boolean z);\n\n /* compiled from: BuiltInsLoader.kt */\n public static final class Companion {\n static final /* synthetic */ Companion $$INSTANCE = new Companion();\n private static final Lazy<BuiltInsLoader> Instance$delegate = LazyKt.lazy(LazyThreadSafetyMode.PUBLICATION, BuiltInsLoader$Companion$Instance$2.INSTANCE);\n\n private Companion() {\n }\n\n public final BuiltInsLoader getInstance() {\n return Instance$delegate.getValue();\n }\n }\n}",
"@ServiceInit\n public void init() {\n }",
"public interface ProxyPOJOAnnotation {\n public String interfaceNS();\n public String interfaceName();\n public String name();\n public String serviceNS();\n public String serviceName();\n}",
"@Override\n public void visit(Tree.AnnotationList al) {\n }",
"@PostConstruct\n\tpublic void myInit() throws Exception {\n\t\tSystem.out.println(\"Init Method Using Annotation Approach \");\n\t}",
"public interface ospector\n{\n\n public abstract void addAbstractTypeResolver(AbstractTypeResolver abstracttyperesolver);\n\n public abstract void addBeanDeserializerModifier(BeanDeserializerModifier beandeserializermodifier);\n\n public abstract void addBeanSerializerModifier(BeanSerializerModifier beanserializermodifier);\n\n public abstract void addDeserializationProblemHandler(DeserializationProblemHandler deserializationproblemhandler);\n\n public abstract void addDeserializers(Deserializers deserializers);\n\n public abstract void addKeyDeserializers(KeyDeserializers keydeserializers);\n\n public abstract void addKeySerializers(Serializers serializers);\n\n public abstract void addSerializers(Serializers serializers);\n\n public abstract void addTypeModifier(TypeModifier typemodifier);\n\n public abstract void addValueInstantiators(ValueInstantiators valueinstantiators);\n\n public abstract void appendAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract w getMapperVersion();\n\n public abstract s getOwner();\n\n public abstract TypeFactory getTypeFactory();\n\n public abstract void insertAnnotationIntrospector(AnnotationIntrospector annotationintrospector);\n\n public abstract boolean isEnabled(f f);\n\n public abstract boolean isEnabled(i i);\n\n public abstract boolean isEnabled(n n);\n\n public abstract boolean isEnabled(DeserializationFeature deserializationfeature);\n\n public abstract boolean isEnabled(MapperFeature mapperfeature);\n\n public abstract boolean isEnabled(SerializationFeature serializationfeature);\n\n public transient abstract void registerSubtypes(NamedType anamedtype[]);\n\n public transient abstract void registerSubtypes(Class aclass[]);\n\n public abstract void setClassIntrospector(ClassIntrospector classintrospector);\n\n public abstract void setMixInAnnotations(Class class1, Class class2);\n}",
"Annotation getAnnotation();",
"public abstract Annotations mo30682c();",
"public interface AopProxy {\n Object getProxy();\n\n Object getProxy(ClassLoader classLoader);\n\n}",
"<T extends Annotation> IList<Object> getAnnotatedObjects(Class<T> type);",
"public interface AnnotationValue {\n}",
"public abstract AnnotationMap mo30683d();",
"HxAnnotated<?> createAnnotated();",
"default void onDiscovery(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }",
"public AnnotationPropertyFolderProvider() {\r\n }",
"@UserScope\n@Component(modules = CreateRichDocModule.class,dependencies = NetComponent.class)\npublic interface CreateRichDocComponent {\n void inject(CreateRichDocActivity activity);\n}",
"public ContainerLoader getLoader();",
"public interface BeanDefinitionReader {\n\n void loadBeanDefinitions(String location) throws Exception;\n\n}",
"@PostConstruct\r\n\tvoid init() {\n\t}",
"public interface Loader {\n\t\tpublic void load();\n\t}",
"public void libraryLoaded();",
"@Override\r\n\tpublic void load() {\n\r\n\t}",
"public String getAnnotation();",
"public interface LOAD {\n\n /**\n * Create a new loader with a given set of arguments and kick off the\n * loading process. An instance of the class specified by the\n * {@code java_class} parameter is created. The specified class is expected\n * to implement the {@link\n * io.ciera.runtime.instanceloading.generic.IGenericLoader IGenericLoader}\n * interface. Once created, the {@code load} method of the loader will be\n * invoked, passing {@code args} and an instance of the {@code LOAD} class\n * to link call back in to the instance population.\n *\n * @param java_class the fully qualified class name of the loader class to\n * create\n * @param args the list of arguments to pass to the loader class\n * @throws XtumlException if the class specified by {@code java_class}\n * cannot be loaded or if it does not implement the {@link\n * io.ciera.runtime.instanceloading.generic.IGenericLoader IGenericLoader}\n * interface\n * @see io.ciera.runtime.instanceloading.generic.IGenericLoader IGenericLoader\n */\n public void load(String java_class, String[] args) throws XtumlException;\n\n /**\n * Create an xtUML class instance.\n *\n * @param key_letters the key letters of the xtUML class\n * @return an instance handle to the newly created class instance\n * @throws XtumlException if no class with matching key letters can be found\n * in the component\n */\n\tpublic Object create(String key_letters) throws XtumlException;\n\n /**\n * Relate two xtUML instances together across the given relationship. For\n * non-reflexive relationships, {@code inst1} and {@code inst2} are\n * interchangeable and the value of {@code phrase} has no effect. It may be\n * {@code null}. For reflexive relationships, {@code inst1} and {@code inst2}\n * will \"read across\" according to the value of {@code phrase} with the same\n * semantics as OAL.\n *\n * @param inst1 the first instance to relate\n * @param inst2 the second instance to relate\n * @param rel_num the relationship number to create\n * @param phrase the text phrase used to disambiguate relates of reflexive\n * relationships\n * @throws XtumlException if the relationship specified does not exist\n * between inst1 and inst2 or if the act of relating the instances results in\n * a model integrity violation\n */\n public void relate(Object inst1, Object inst2, int rel_num, String phrase) throws XtumlException;\n\n /**\n *\n * Relate three xtUML instances together across the given associative\n * relationship. For non-reflexive relationships, {@code inst1} and {@code\n * inst2} are interchangeable and the value of {@code phrase} has no effect.\n * It may be {@code null}. For reflexive relationships, {@code inst1} and\n * {@code inst2} will \"read across\" according to the value of {@code phrase}\n * with the same semantics as OAL.\n *\n * @param inst1 the first instance to relate\n * @param inst2 the second instance to relate\n * @param link the associative instance to relate\n * @param rel_num the relationship number to create\n * @param phrase the text phrase used to disambiguate relates of reflexive\n * relationships\n * @throws XtumlException if the relationship specified does not exist\n * between inst1 and inst2 or if the act of relating the instances results in\n * a model integrity violation\n */\n public void relate_using(Object inst1, Object inst2, Object link, int rel_num, String phrase) throws XtumlException;\n\n /**\n * Set the value of an attribute on an instance of an xtUML class.\n *\n * @param instance the model class instance\n * @param attribute_name the name of the attribute to set\n * @param value the value to assign to the specified attribute\n * @throws XtumlException if the specified attribute does not exist on the\n * class or if the type of the passed value is not compatible with the\n * attribute type\n */\n public void set_attribute(Object instance, String attribute_name, Object value) throws XtumlException;\n\n /**\n * Invoke an xtUML domain function in the same component which originally\n * created the instance of {@code LOAD}.\n *\n * @param function_name The name of the domain function to invoke\n * @param args The argument list in modeled order\n * @return The result of the function invocation or {@code null} for\n * functions with void return type\n * @throws XtumlException if the a domain function could not be found with\n * the given names, or if the number of arguments or types of arguments\n * mismatch\n */\n\tpublic Object call_function(String function_name, Object ... args) throws XtumlException;\n\n\n\n}",
"@Override\r\n\tpublic void load() {\n\t}",
"@Override\n\tpublic void loadService() {\n\t\t\n\t}",
"public interface BeanDefinitionReader {\n\n void loadBeanDefinitions(String location) throws Exception;\n}",
"public interface OntologyService {\n\n @NotNull\n OntologyInformation loadOntology();\n}",
"public interface BookMetadata extends DocumentMetadata {\n}",
"public abstract AnnotationCollector mo30681b(Annotation annotation);",
"public interface ImageLoader {\n\n}",
"@PostConstruct\r\n public void init(){\n\r\n }",
"@Override\n public void load() {\n }",
"@PostConstruct\n\tpublic void inicializar() {\n\t}",
"public interface Annotator {\n\n\t/**\n\t * @param pamDataBlock Annotated datablock\n\t * @return the number of annotations\n\t */\n\tpublic int getNumAnnotations(PamDataBlock pamDataBlock);\n\t\n\t/**\n\t * Get an Annotation\n\t * @param pamDataBlock Annotated datablock\n\t * @param iAnnotation annotation number\n\t * @return Annotation\n\t */\n\tpublic Annotation getAnnotation(PamDataBlock pamDataBlock, int iAnnotation);\n}",
"public static void main(String args[]) {\n\r\n\t\r\n\tApplicationContext ac = new ClassPathXmlApplicationContext(\"com/springcore/annotations/anootationconfig.xml\");\r\n\t \r\n Employee emp = ac.getBean(\"myemployee\", Employee.class);\r\n System.out.println(emp.toString());\r\n\t}",
"private static void load(){\n }",
"@PostConstruct\n public void init() {\n }",
"void addAnnotatedClass( Class clazz );",
"public abstract Annotations getClassAnnotations();",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\n\tprotected void load() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initLoad() {\n\r\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tprotected void load() {\n\n\t}",
"@Override\n\tpublic void annotate(JDefinedClass cls) {\n\n\t}",
"default void onPreConstruct(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }",
"BasicRestAnnotation() {\n\t}",
"@Override\n public void load() {\n }",
"public NaviProxyFactoryBean() {\r\n\r\n }",
"@Override\n public void autonomousInit() {\n \n }",
"public AnnotationManager getAnnotationManager() {\n\t\treturn null;\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t}",
"@PostConstruct\n\tpublic void init() {\n\t}",
"@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}",
"public ConfigMetadataProcessor() {\n }",
"@Override\npublic void init() {\n\t\n}",
"@SuppressWarnings({ \"null\", \"unused\" })\n @Override\n public InjectAnnotationProcessor2 createAnnotationProcessor(final AnnotatedElement element) {\n SlingObject annotation = element.getAnnotation(SlingObject.class);\n if (annotation != null) {\n return new SlingObjectAnnotationProcessor(annotation);\n }\n return null;\n }",
"@PostConstruct\n\tpublic void myinitializecircle() {\n\t\tSystem.out.println(\"Const with annotations for circle\");\n\t}",
"public <T extends Annotation> T loadAnnotation(Class<T> type) {\n\t\tAnnotationMirror mirror = getAnnotation(type);\n\t\tif(mirror == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn mirror.getProxy(type);\n\t}",
"boolean hasAnnotationMetadata();",
"public String getAnnotationProcessor() {\n return null;\n }",
"@PostConstruct\n\tpublic void init() {\n\n\t}",
"@PostConstruct\n\tpublic void init() {\n\n\t}",
"public interface IPersistenceController {\n\n}",
"public interface AttentionService extends CoreService<AttentionDO> {\n \n}",
"public interface Framework_annotation<T extends Annotation> {\n \n // a builder call which returns the original Framework object\n public Framework_annotation<T> build_normal();\n \n // a builder call which requires that the T be of type Annotation or a subtype of that\n public Framework_annotation<T> build_annotation();\n \n // a call which returns a T element\n public <U extends T> U get();\n \n \n}",
"public interface LibraryService {\n}",
"@Override\n public void autonomousInit() {\n }",
"@Override\n public void autonomousInit() {\n }",
"public interface AppComponent {\n}",
"@View(navigation = NavigationMode.REDIRECT, viewParams = ViewParameterMode.INCLUDE)\n@Folder(name = \"pages/\")\npublic interface WebRoot extends ViewConfig {\n\n\t@View\n\tclass index implements WebRoot { // br\n\t}\n\n\t@Folder(name = \"lazy\")\n\tinterface Lazy extends WebRoot {\n\t\t@View\n\t\t@ViewControllerRef(Testbean.class)\n\t\tclass audilazy implements Lazy { // br\n\t\t}\n\n\t\t@View\n\t\t@ViewControllerRef(Testbean2.class)\n\t\tclass bmwlazy implements Lazy { // br\n\t\t}\n\t}\n\n\n}",
"@Local\r\npublic interface ResourceRegistryDAOLocal\r\n extends ResourceRegistryDAO\r\n{\r\n\r\n\r\n}",
"@OnInit\n public void init() {\n }",
"public interface IAppInfoUsePresenter {\n //加载app列表数据\n void loadAppList();\n}",
"@Override\r\n\tprotected void load() {\n\t\t\r\n\t}",
"public interface DaIotDictionaryService extends Service<DaIotDictionary> {\n\n}",
"public interface ImovelLoadedListener {\n void imovelLoaded(Imovel imovel);\n}",
"ProviderManagerExt()\n {\n load();\n }",
"@PostConstruct\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"void injectorClassLoader() {\n\t\t//To get the package name\n\t\tString pkgName = context.getPackageName();\n\t\t//To get the context\n\t\tContext contextImpl = ((ContextWrapper) context).getBaseContext();\n\t\t//Access to the Activity of the main thread\n\t\tObject activityThread = null;\n\t\ttry {\n\t\t\tactivityThread = Reflection.getField(contextImpl, \"mMainThread\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Get package container\n\t\tMap mPackages = null;\n\t\ttry {\n\t\t\tmPackages = (Map) Reflection.getField(activityThread, \"mPackages\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//To obtain a weak reference object, the standard reflection\n\t\tWeakReference weakReference = (WeakReference) mPackages.get(pkgName);\n\t\tif (weakReference == null) {\n\t\t\tlog.e(\"loadedApk is null\");\n\t\t} else {\n\t\t\t//Get apk need to be loaded\n\t\t\tObject loadedApk = weakReference.get();\n\t\t\t\n\t\t\tif (loadedApk == null) {\n\t\t\t\tlog.e(\"loadedApk is null\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (appClassLoader == null) {\n\t\t\t\t//Access to the original class loader\n\t\t\t\tClassLoader old = null;\n\t\t\t\ttry {\n\t\t\t\t\told = (ClassLoader) Reflection.getField(loadedApk,\n\t\t\t\t\t\t\t\"mClassLoader\");\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t//According to the default class loader instantiate a plug-in class loader\n\t\t\t\tappClassLoader = new SyknetAppClassLoader(old, this);\n\t\t\t}\n\t\t\t//Replace the new plug-in loader loader by default\n\t\t\ttry {\n\t\t\t\tReflection.setField(loadedApk, \"mClassLoader\", appClassLoader);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public JavaAnnotation getAnnotation( String name );"
]
| [
"0.6817076",
"0.6445009",
"0.6360364",
"0.63037217",
"0.6295115",
"0.62257487",
"0.6051403",
"0.6051308",
"0.59356034",
"0.5912036",
"0.588732",
"0.58491564",
"0.58491564",
"0.58170485",
"0.5812134",
"0.579225",
"0.57441264",
"0.57375324",
"0.5734815",
"0.5722091",
"0.5713912",
"0.569307",
"0.56901056",
"0.5651389",
"0.5646133",
"0.5644318",
"0.56392294",
"0.56376076",
"0.56353015",
"0.5631996",
"0.5619969",
"0.5603956",
"0.55816483",
"0.5555005",
"0.5508868",
"0.54907095",
"0.5489085",
"0.54853904",
"0.54630834",
"0.5457979",
"0.5452954",
"0.5437614",
"0.54299635",
"0.5418628",
"0.54068613",
"0.5405827",
"0.5402163",
"0.5397666",
"0.53840184",
"0.5366818",
"0.53624755",
"0.53575796",
"0.53573453",
"0.5344611",
"0.53340834",
"0.53338987",
"0.5328429",
"0.5327131",
"0.5327131",
"0.5327131",
"0.5327003",
"0.5325607",
"0.5325607",
"0.5320504",
"0.5317104",
"0.53071463",
"0.5305361",
"0.5292869",
"0.52915066",
"0.52909124",
"0.52873474",
"0.52873474",
"0.5284626",
"0.5283492",
"0.5264667",
"0.5260789",
"0.52452695",
"0.5243751",
"0.5241789",
"0.5239075",
"0.52388936",
"0.52388936",
"0.5236865",
"0.523266",
"0.52314496",
"0.5223617",
"0.52202344",
"0.52202344",
"0.5219886",
"0.5215692",
"0.5214141",
"0.52131224",
"0.520706",
"0.5206859",
"0.52025867",
"0.52013385",
"0.518283",
"0.51699275",
"0.51696163",
"0.5163977",
"0.51623285"
]
| 0.0 | -1 |
Marks the tiles the enemy snake can reach as filled unless our head is inside one of those tiles | public void markDangerTiles() {
List<Tile> dangerTiles = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y);
if (dangerTiles.contains(this.gb.get(this.us_head_x, this.us_head_y)))
return; // Don't force fill if our head is there
for (Tile t : dangerTiles)
t.setForceFilled(true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void markEmptyFields(int shipSize){\n\t\tint x = hitLocation3.x;\n\t\tint y = hitLocation3.y;\n\t\t\n\t\tif( hitLocation2==null && hitLocation3 !=null ){\n\t\t\tif(x-1 >= 0 && y - 1 >= 0){\n\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\t//po skosie lewy gorny\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0){\n\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\t//gorny\n\t\t\t}\n\t\t\tif(y + 1 <sizeBoard){\n\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\t//prawy\t\n\t\t\t}\n\t\t\tif(x+1 < sizeBoard && y +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y+1] = true;\t\t\t\t//po skosie dol prawy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x-1 >= 0 && y + 1 < sizeBoard){\n\t\t\t\topponentShootTable[x-1][y+1] = true;\t\t\t\t//po skosie prawy gora\n\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif( x +1 < sizeBoard){\n\t\t\t\topponentShootTable[x+1][y] = true;\t\t\t\t// dolny\n\t\t\t\tpossibleshoots.remove(new TabLocation(x+1,y));\t\t\t\t\t\n\t\t\t}\n\t\t\tif(x+1 <sizeBoard && y - 1 >= 0){\n\t\t\t\topponentShootTable[x+1][y-1] = true;\t\t\t//po skosie dol lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\tif(y - 1 >= 0){\n\t\t\t\topponentShootTable[x][y-1] = true;\t\t\t//lewy\n\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tboolean orientacja = false;\n\t\t\tif( hitLocation3.x == hitLocation2.x ) orientacja = true;\n\t\t\tint tempshipSize = shipSize;\n\t\t\tif( orientacja ){\n\t\t\t\t\n\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//prawy skrajny\t\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x-1, y+tempshipSize ) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation( x, y+tempshipSize ) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 <sizeBoard && y+tempshipSize>=0){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y+1<sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y+1<sizeBoard && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(x-1 >= 0 && y + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+tempshipSize) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y+tempshipSize) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+tempshipSize] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+tempshipSize) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(y-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x, y-1) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(y-1 >= 0 && x+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif( x-1 >= 0 ){\n\t\t\t\t\tif( hitLocation2.y < hitLocation3.y ){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y-i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-1][y+i] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(x + 1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.y < hitLocation3.y){\n\t\t\t\t\t\tfor(int i=0; i<shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y-i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x+1][y+i] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+i) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\ttempshipSize = - shipSize;\n\t\t\t\t\n\t\t\t\t//dolny skrajny\t\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x + tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize >= 0){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x+1 < sizeBoard ){\n\t\t\t\t\t\topponentShootTable[x+1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x+1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x+1 < sizeBoard && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tif(y-1 >= 0 && x + tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y-1) );\t\t//lewy gorny skos\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y) );\t//lewy \n\t\t\t\t\t}\n\t\t\t\t\tif(y+1 < sizeBoard && x+tempshipSize < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x+ tempshipSize][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+ tempshipSize, y+1) );\t\t// lewy dolny skos\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(x-1 >= 0 ){\n\t\t\t\t\t\topponentShootTable[x-1][y] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y) );\t\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y-1 >= 0){\n\t\t\t\t\t\topponentShootTable[x-1][y-1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y-1) );\n\t\t\t\t\t}\n\t\t\t\t\tif(x-1 >= 0 && y+1 < sizeBoard){\n\t\t\t\t\t\topponentShootTable[x-1][y+1] = true;\n\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-1, y+1) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(y-1 >= 0){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y-1] = true;\t\t\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y-1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(y+1 < sizeBoard){\n\t\t\t\t\tif(hitLocation2.x < hitLocation3.x){\n\t\t\t\t\t\tfor(int i=0; i<shipSize;i++){\n\t\t\t\t\t\t\topponentShootTable[x-i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x-i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tfor(int i=0; i < shipSize; i++){\n\t\t\t\t\t\t\topponentShootTable[x+i][y+1] = true;\n\t\t\t\t\t\t\tpossibleshoots.remove( new TabLocation(x+i, y+1) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void fillAreaAround(int[][] shots, int x, int y) {\n for (int i = putInSea(x - 1); i <= putInSea(x + 1); i++)\n for (int j = putInSea(y - 1); j <= putInSea(y + 1); j++)\n if (shots[i][j] == 0) shots[i][j] = 1;\n }",
"public static boolean isEveryTileFilled() {\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (tiles.get(new Coordinates(i, j)).getTextFromTile().getText().equals(\"\")) {\n return false;\n }\n }\n }\n return true;\n }",
"private void recheckTileCollisions() {\n\t\tint len = regTiles.size();\n\t\tfor(int i = 0; i < len; i ++) {\n\t\t\tRegTile tile = regTiles.get(i);\n\t\t\t\n\t\t\ttry{\n\t\t\t\tif(OverlapTester.overlapRectangles(player.bounds, tile.bounds)) {\n\t\t\t\t\t//check-x cols and fix\n\t\t\t\t\tif(player.position.x > tile.position.x - tile.bounds.width/2 && player.position.x < tile.position.x + tile.bounds.width/2 && player.position.y < tile.position.y + tile.bounds.height/2 && player.position.y > tile.position.y - tile.bounds.height/2) {\n\t\t\t\t\t\tif(player.position.x < tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x - 1;\n\t\t\t\t\t\t} else if(player.position.x > tile.position.x) {\n\t\t\t\t\t\t\tplayer.position.x = tile.position.x + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}",
"public boolean tileFence(float xTile, float yTile)\r\n/* 202: */ {\r\n/* 203:226 */ return (tileInBounds(xTile, yTile)) && (this.door[((int)xTile)][((int)yTile)] != 0);\r\n/* 204: */ }",
"public void setRemainingToScenery(){\n\t\tfor(int i=0;i<grid.length;i++){\n\t\t\tfor(int j=0;j<grid[0].length;j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tgrid[i][j]=new Scenery(i*grid[0].length+j);\n\t\t\t}\n\t\t}\n\t}",
"public void fillTheBoard() {\n for (int i = MIN; i <= MAX; i++) {\n for (int j = MIN; j <= MAX; j++) {\n this.getCells()[i][j] = new Tile(i, j, false);\n }\n }\n }",
"private void checkCollision() {\n for (int i = snakeSize; i > 0; i--) {\n if (i>4 && x[0] == x[i] && y[0] == y[i]){\n isInGame=false;\n }\n }\n\n if (x[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (x[0] < 0) {\n isInGame=false;\n }\n\n if (y[0] > FIELD_SIZE) {\n isInGame=false;\n }\n\n if (y[0] < 0) {\n isInGame=false;\n }\n\n\n }",
"private void fillShotsArea(int[][] shots, int x, int y) {\n for (int i = x; inSea(i) && shots[i][y] == 4; i--) fillAreaAround(shots, i, y);\n for (int i = x; inSea(i) && shots[i][y] == 4; i++) fillAreaAround(shots, i, y);\n for (int i = y; inSea(i) && shots[x][i] == 4; i--) fillAreaAround(shots, x, i);\n for (int i = y; inSea(i) && shots[x][i] == 4; i++) fillAreaAround(shots, x, i);\n }",
"public void fill() {\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tmaze[x][y] = Block.WALL;\n\t\t\t}\n\t\t}\n\t}",
"private void checkCollision() {\n\n for(int b = 1; b < snakeLength; b++){\n if(xLength[b] == xLength[0] && yLength[b] == yLength[0]) {\n right = false;\n left = false;\n down = false;\n up = false;\n gameOver = true;\n }\n }\n\n if(right){\n if(xLength[0] >= 825) {\n gameOver = true;\n }\n }\n if(left){\n if(xLength[0] <= 50) {\n gameOver = true;\n }\n }\n if(down){\n if(yLength[0] >= 600) {\n gameOver = true;\n }\n }\n if(up){\n if(yLength[0] <= 100) {\n gameOver = true;\n }\n }\n }",
"private void floodFill(Tile tile) {\r\n // Check that this tile is non clicked to prevent infinite loops\r\n if (tile.clickable()) {\r\n // Show contents and set as clicked\r\n tile.setVisibleType(tile.getType());\r\n updateClearedTiles();\r\n\r\n int row = tile.getRow();\r\n int col = tile.getCol();\r\n\r\n if (tiles[row][col] == 0) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n int tempRow = row+rowCheck;\r\n int tempCol = col+colCheck;\r\n if (tileExistAndNotMine(tempRow, tempCol)) {\r\n Tile current = tileList.get(tempRow * BOARD_MAX_WIDTH + tempCol);\r\n System.out.println(current);\r\n floodFill(current);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }",
"public void checkTileMapCollision() {\t\t\t// Works for both x and y directions. Only going to use the x-component for now but leaves room for future expansion.\n\n\t\tcurrCol = (int)x / tileSize;\n\t\tcurrRow = (int)y / tileSize;\n\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\n\t\txtemp = x;\n\t\tytemp = y;\n\n\t\tcalculateCorners(x, ydest);\n\t\tif (dy < 0) { \t\t\t// upwards\n\t\t\tif (topLeft || topRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = currRow * tileSize + height / 2;\t\t\t// Set just below where we bumped our head.\n\t\t\t} else {\n\t\t\t\tytemp += dy;\t\t// Otherwise keep going.\n\t\t\t}\n\t\t}\n\t\tif (dy > 0) { \t\t\t// downwards\n\t\t\tif (bottomLeft || bottomRight) {\n\t\t\t\tdy = 0;\n\t\t\t\tfalling = false;\n\t\t\t\tytemp = (currRow + 1) * tileSize - height / 2;\n\t\t\t} else {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\n\t\tcalculateCorners(xdest, y);\n\t\tif (dx < 0) { \t\t\t// left\n\t\t\tif (topLeft || bottomLeft) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = currCol * tileSize + width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif (dx > 0) { \t\t\t// right\n\t\t\tif (topRight || bottomRight) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (currCol + 1) * tileSize - width / 2;\n\t\t\t} else {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\n\t\tif(!falling) {\n\t\t\tcalculateCorners(x, ydest + 1);\t\t\t// Have to check the ground 1 pixel below us and make sure we haven't fallen off a cliff\n\t\t\tif(!bottomLeft && !bottomRight) {\n\t\t\t\tfalling = true;\n\t\t\t}\n\t\t}\n\n\t}",
"public void fillWithIslandTiles() {\n\t\tthis.addCard(new IslandTile(\"Breakers Bridge\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Bronze Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cliffs of Abandon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Cave of Embers\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Crimson Forest\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Copper Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Coral Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Cave of Shadows\", CardType.TILE, TreasureType.CRYSTAL_OF_FIRE));\n\t\tthis.addCard(new IslandTile(\"Dunes of Deception\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Fool's Landing\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Gold Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Howling Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Iron Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Lost Lagoon\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Misty Marsh\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Observatory\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Phantom Rock\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Silver Gate\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Moon\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Tidal Palace\", CardType.TILE, TreasureType.OCEAN_CHALICE));\n\t\tthis.addCard(new IslandTile(\"Temple of the Sun\", CardType.TILE, TreasureType.EARTH_STONE));\n\t\tthis.addCard(new IslandTile(\"Twilight Hollow\", CardType.TILE, TreasureType.NONE));\n\t\tthis.addCard(new IslandTile(\"Whispering Garden\", CardType.TILE, TreasureType.STATUE_OF_WIND));\n\t\tthis.addCard(new IslandTile(\"Watchtower\", CardType.TILE, TreasureType.NONE));\n\t}",
"private void checkIfOccupied(int row, int col) {\n if (status == MotionStatus.DOWN || AIisAttacking) {\n\n// if (player && playerAttacks != null) {\n// // Ignore touch if player has previously committed an attack on that cell.\n// for (int i = 0; i < playerAttacks.size(); i++) {\n// if (playerAttacks.get(i).equals(row,col)) {\n// Log.i(\"for\", \"You Hit this Previously!\");\n// }\n// }\n// }\n\n for (int i = 0; i < occupiedCells.size(); i++) {\n if (occupiedCells.get(i).x == row && occupiedCells.get(i).y == col) {\n Point p = new Point(row, col);\n selectedShip = findWhichShip(p); //Touching View Updated\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n setHit(true);\n break;\n }\n }\n\n if (selectedShip == null) {\n setHit(false);\n Log.i(\"checkIfOccupied getHit\", \"\" + getHit() + \", (\" + row + \", \" + col + \")\");\n }\n\n } else if (status == MotionStatus.MOVE) {//MotionStatus.MOVE\n if (selectedShip != null) {//Need to make sure none of the current ship parts will overlap another.\n int rowHolder = selectedShip.getHeadCoordinatePoint().x;\n int colHolder = selectedShip.getHeadCoordinatePoint().y;\n int tempRow, tempCol;\n selectedShip.moveShipTo(row, col);\n for (Ship s : ships) {\n if (s != selectedShip) {\n\n for (int i = 0; i < selectedShip.getShipSize(); i++) {\n tempRow = selectedShip.getBodyLocationPoints()[i].x;\n tempCol = selectedShip.getBodyLocationPoints()[i].y;\n\n for (int j = 0; j < s.getShipSize(); j++) {\n if (tempRow == s.getBodyLocationPoints()[j].x && tempCol == s.getBodyLocationPoints()[j].y) {\n selectedShip.moveShipTo(rowHolder, colHolder);\n }\n }//for\n }//for\n }\n }//for\n }\n }//Move\n }",
"public boolean fill() {\n boolean modified = false;\n for (int i = 0; i < gameBoard.getSize(); i++) {\n for (int j = gameBoard.getSize() - 1; j >= 0; j--) {\n Coordinates actualCoordinates = new Coordinates(i, j);\n if (gameBoard.getValue(actualCoordinates) == 0) {\n if (j == 0) {\n gameBoard.setValue(actualCoordinates, DiamondColor.getRandomColor());\n } else {\n Coordinates topCoordinates = new Coordinates(i, j - 1);\n gameBoard.setValue(actualCoordinates, gameBoard.getValue(topCoordinates));\n gameBoard.setValue(topCoordinates, 0);\n }\n modified = true;\n }\n }\n }\n return modified;\n }",
"public void check() {\n Ellipse2D.Double head = snakeParts.get(0);\n Food food = gameGround.getFood();\n\n // Ate itself\n for (int i = 1; i < snakeParts.size(); i++) {\n if (head.getMinX() == snakeParts.get(i).getMinX() && head.getMinY() == snakeParts.get(i).getMinY()) {\n over = true;\n return;\n }\n }\n\n // Ate food\n if (head.getMinX() == food.getShape().getMinX() && head.getMinY() == food.getShape().getMinY()) {\n scoreBoard.addPoints(1);\n food.next(this);\n snakeParts.add(ass);\n }\n }",
"public boolean isFilled(int y, int x){\n\t\tif(tile[y][x] != 0){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"private void updateTileCollisions(Mob mob) {\n\t\tif (mob instanceof Player) {\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getScreenPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setScreenPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().x, Display.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getScreenPosition().y, Display.getHeight() - mob.getHeight() / 2)));\n\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().x, mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.max(mob.getAbsPosition().y, mob.getHeight() / 2)));\r\n\t\t\tmob.setAbsPosition(\r\n\t\t\t\t\tnew Point(\r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().x, tilemap.getWidth() - mob.getWidth() / 2), \r\n\t\t\t\t\t\t\tMath.min(mob.getAbsPosition().y, tilemap.getHeight()) - mob.getHeight() / 2));\r\n\t\t}\r\n\r\n\t\tPoint center = mob.getScreenPosition().add(offset);\r\n\r\n\t\tboolean hitGround = false; // used to check for vertical collisions and determine \r\n\t\t// whether or not the mob is in the air\r\n\t\tboolean hitWater = false;\r\n\r\n\t\t//update mob collisions with tiles\r\n\t\tfor (int i = 0; i < tilemap.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < tilemap.grid[0].length; j++) {\r\n\r\n\t\t\t\tif (tilemap.grid[i][j] != null &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x > center.x - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().x < center.x + (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y > center.y - (250) &&\r\n\t\t\t\t\t\ttilemap.grid[i][j].getAbsPosition().y < center.y + (250)) {\r\n\r\n\t\t\t\t\tRectangle mobRect = mob.getBounds();\r\n\t\t\t\t\tRectangle tileRect = tilemap.grid[i][j].getBounds();\r\n\r\n\t\t\t\t\t// if mob intersects a tile\r\n\t\t\t\t\tif (mobRect.intersects(tileRect)) {\r\n\r\n\t\t\t\t\t\t// get the intersection rectangle\r\n\t\t\t\t\t\tRectangle rect = mobRect.intersection(tileRect);\r\n\r\n\t\t\t\t\t\t// if the mob intersects a water tile, adjust its movement accordingly\r\n\t\t\t\t\t\tif (tilemap.grid[i][j].type == TileMap.WATER) { \r\n\r\n\t\t\t\t\t\t\tmob.gravity = mob.defaultGravity * 0.25f;\r\n\t\t\t\t\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed * 0.35f;\r\n\t\t\t\t\t\t\tmob.moveSpeed = mob.defaultMoveSpeed * 0.7f;\r\n\r\n\t\t\t\t\t\t\tif (!mob.inWater) { \r\n\t\t\t\t\t\t\t\tmob.velocity.x *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.velocity.y *= 0.2;\r\n\t\t\t\t\t\t\t\tmob.inWater = true;\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thitWater = true;\r\n\t\t\t\t\t\t\tmob.jumping = false;\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\r\n\t\t\t\t\t\t\t// if intersection is vertical (and underneath player)\r\n\t\t\t\t\t\t\tif (rect.getHeight() < rect.getWidth()) {\r\n\r\n\t\t\t\t\t\t\t\t// make sure the intersection isn't really horizontal\r\n\t\t\t\t\t\t\t\tif (j + 1 < tilemap.grid[0].length && \r\n\t\t\t\t\t\t\t\t\t\t(tilemap.grid[i][j+1] == null || \r\n\t\t\t\t\t\t\t\t\t\t!mobRect.intersects(tilemap.grid[i][j+1].getBounds()))) {\r\n\r\n\t\t\t\t\t\t\t\t\t// only when the mob is falling\r\n\t\t\t\t\t\t\t\t\tif (mob.velocity.y <= 0) {\r\n\t\t\t\t\t\t\t\t\t\tmob.velocity.y = 0;\r\n\t\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().x, \r\n\t\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().y + rect.getHeight() - 1)));\r\n\t\t\t\t\t\t\t\t\t\tmob.inAir = false;\t\r\n\t\t\t\t\t\t\t\t\t\tmob.jumping = false;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t// if intersection is horizontal\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\tmob.velocity.x = 0;\r\n\r\n\t\t\t\t\t\t\t\tif (mobRect.getCenterX() < tileRect.getCenterX()) {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x - rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\tmob.setAbsPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getAbsPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getAbsPosition().y));\r\n\t\t\t\t\t\t\t\t\tmob.setScreenPosition(new Point(\r\n\t\t\t\t\t\t\t\t\t\t\t(float)(mob.getScreenPosition().x + rect.getWidth()), \r\n\t\t\t\t\t\t\t\t\t\t\tmob.getScreenPosition().y));\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tfloat xToCenter = Math.abs((float)(mobRect.getCenterX() - tileRect.getCenterX()));\r\n\t\t\t\t\t\t\tfloat yToCenter = Math.abs((float)(mobRect.getCenterY() - tileRect.getCenterY())); \r\n\r\n\t\t\t\t\t\t\t// Check under the mob to see if it touches a tile. If so, hitGround = true\r\n\t\t\t\t\t\t\tif (yToCenter <= (mobRect.getHeight() / 2 + tileRect.getHeight() / 2) && \r\n\t\t\t\t\t\t\t\t\txToCenter <= (mobRect.getWidth() / 2 + tileRect.getWidth() / 2))\r\n\t\t\t\t\t\t\t\thitGround = true;\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if mob doesn't intersect a tile vertically, they are in the air\r\n\t\tif (!hitGround) {\r\n\t\t\tmob.inAir = true;\r\n\t\t}\r\n\t\t// if the mob is not in the water, restore its default movement parameters\r\n\t\tif (!hitWater) {\r\n\t\t\tmob.gravity = mob.defaultGravity;\r\n\t\t\tmob.moveSpeed = mob.defaultMoveSpeed;\r\n\t\t\tmob.jumpSpeed = mob.defaultJumpSpeed;\r\n\t\t\tmob.inWater = false;\r\n\t\t}\r\n\t}",
"public void checkCollisions() {\n\t\t List<Missile> missiles = player.getMissiles();\n\t\t for(Missile n : missiles) {\n\t\t\t Rectangle r1 = n.getBounds();\n\t\t\t for(Mushroom mush : mushrooms) {\n\t\t\t\t Rectangle r2 = mush.getBounds();\n\t\t\t\t r2.x += 8;\n\t\t\t\t if(r1.intersects(r2)) {\n\t\t\t\t\t mush.hitCnt += 1;\n\t\t\t\t\t if(mush.hitCnt == 3) {\n\t\t\t\t\t\t score += 5;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t\t mush.setVisible(false);\n\t\t\t\t\t } else {\n\t\t\t\t\t\t score += 1;\n\t\t\t\t\t\t n.setVisible(false);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Missile hits Centipede\n\t\t //missiles = player.getMissiles();\n\t\t for(Missile m: missiles) {\n\t\t\t Rectangle rm = m.getBounds();\n\t\t\t for(int i = 0; i < centipede.size(); i++) {\n\t\t\t\t Segment s = centipede.get(i);\n\t\t\t\t Rectangle rs = s.getBounds();\n\t\t\t\t if(rs.intersects(rm)) {\n\t\t\t\t\ts.hit();\n\t\t\t\t\tscore = (s.hitCnt < 2 ? score +2 : score + 0);\n\t\t\t\t\tif(s.hitCnt == 2){\n\t\t\t\t\t\t//split centipede\n\t\t\t\t\t\tscore += 5;\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t\tcentipede.remove(i);\n\t\t\t\t\t\t//mushrooms.add(new Mushroom(s.getX(), s.getY()));\n\t\t\t\t\t}else {\n\t\t\t\t\t\tm.setVisible(false);\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if missile hits spider\n\t\t missiles = player.getMissiles();\n\t\t for(Missile m : missiles) {\n\t\t\t Rectangle mBound = m.getBounds();\n\t\t\t Rectangle spiderBound = spider.getBounds();\n\t\t\t if(mBound.intersects(spiderBound)) {\n\t\t\t\t spiderHitCnt += 1;\n\t\t\t\t if(spiderHitCnt == 2) {\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t\t spider.setVisible(false);\n\t\t\t\t\t score += 600;\n\t\t\t\t } else {\n\t\t\t\t\t score += 100;\n\t\t\t\t\t m.setVisible(false);\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if centipede hits mushroom\n\t\t for(Segment c : centipede) {\n\t\t\t Rectangle cB = c.getBounds();\n\t\t\t for(Mushroom m: mushrooms) {\n\t\t\t\t Rectangle mB = new Rectangle(m.getX(), m.getY() + 5, m.getWidth(), m.getHeight() - 10);\n\t\t\t\t mB.y += 3;\n\t\t\t\t if(cB.intersects(mB)) {\n\t\t\t\t\t//makes each segment to go downs\n\t\t\t\t\tc.y += 16;\n\t\t\t\t\tc.dx = -c.dx;\n\t\t\t\t }\n\t\t\t }\n\t\t }\n\n\t\t //check if Centipede hits Player\n\t\t Rectangle playerBounds = player.getBounds();\n\t\t for(Segment s : centipede) {\n\t\t\t Rectangle sB = s.getBounds();\n\t\t\t if(playerBounds.intersects(sB)) {\n\t\t\t\t playerLives -= 1;\n\t\t\t\t playerHitCnt += 1;\n\t\t\t\t if(playerHitCnt > MAX_HIT_COUNT) {\n\t\t\t\t\t// System.out.println(playerLives+\" \"+ x);\n\t\t\t\t\t player.setVisible(false);\n\t\t\t\t\t inGame = false;\n\t\t\t\t }else {\n\t\t\t\t\t\tplayer.x = 707;\n\t\t\t\t\t\tplayer.y = 708;\n\t\t\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\t\t\tplayer = new Player(300, 400);\n\t\t\t\t\t\tregenMushrooms();\n\t\t\t\t\t}\n\t\t\t }\n\t\t }\n\n\t\t //check if Spider hits Player\n\t\t playerBounds = player.getBounds();\n\t\t Rectangle spiderBounds = spider.getBounds();\n\t\t if(spiderBounds.intersects(playerBounds)) {\n\t\t\tplayerLives -= 1;\n\t\t\tplayerHitCnt += 1;\n\t\t\tif(playerLives > MAX_HIT_COUNT) {\n\t\t\t\t//System.out.println(playerLives+\" \"+ y);\n\t\t\t\tplayer.setVisible(false);\n\t\t\t\tspider.setVisible(false);\n\t\t\t}else {\n\t\t\t\tregenMushrooms();\n\t\t\t\tcentipede.clear();\n\t\t\t\tcreateCentipede();\n\t\t\t\tplayer.x = 707;\n\t\t\t\tplayer.y = 708;\n\t\t\t\tPoint location = getLocationOnScreen();\n\t\t\t\trobot.mouseMove(location.x + 250, location.y + 425);\n\t\t\t\tplayer = new Player(300, 400);\n\t\t\t}\n\t\t}\n\t }",
"private void begin(){\n for(int i = 0; i < height; i++){ //y\n for(int j = 0; j < width; j++){ //x\n for(int k = 0; k < ids.length; k++){\n if(m.getTileids()[j][i].equals(ids[k])){\n map[j][i] = Handler.memory.getTiles()[k];\n //Handler.debug(\"is tile null: \" + (Handler.memory.getTiles()[k] == null));\n \n k = ids.length;\n }else if(k == (ids.length - 1)){\n Handler.debug(\"something went wrong\", true);\n\n }\n }\n }\n }\n mt.setCleared(clear);\n mt.setMap(map);\n \n \n }",
"private void updateClearedTiles() {\r\n int count = 0;\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (!grid[r][c].isHidden() && !grid[r][c].isBomb()) {\r\n count++;\r\n }\r\n }\r\n }\r\n clearedTiles = count;\r\n }",
"private static Boolean isFilled() \n\t{\n\t\tfor(Cells[] cellList : board)\n\t\t{\n\t\t\tfor(Cells cell : cellList)\n\t\t\t{\n\t\t\t\tif(cell==Cells.VOID)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n /**\n * Check whether a certain tile is blocked for a particular Mover.\n */\n public boolean blocked(Mover mover, int x, int y) {\n if(mPathTiles == null) {\n return true;\n }\n \n // Check bounds\n if( x < 0 || y < 0 || x >= getActualWidthInTiles() || y >= getActualHeightInTiles()) {\n return true;\n }\n \n // Check whether this tile blocks the unit\n return mPathTiles[ (y * getActualWidthInTiles()) + x].isBlocking(mover);\n \n }",
"private void setMines(){\n Random random = new Random();\r\n int counter = mines;\r\n while(counter>0){\r\n int rx = random.nextInt(this.x); //without +1 because it can be 0\r\n int ry = random.nextInt(this.y);\r\n if( ! this.grid[rx][ry].isMine() ){\r\n this.grid[rx][ry].setMine();\r\n counter--; \r\n }\r\n }\r\n \r\n }",
"private static boolean makeHallway(int[][] board, int[] from, int[] to, float[] filled, Random random) {\n // ignore out of bounds attempts\n if (!(from[X] >= 0 && from[X] < board.length && from[Y] >= 0 && from[Y] < board[0].length)\n || !(to[X] >= 0 && to[X] < board.length && to[Y] >= 0 && to[Y] < board[0].length)) {\n return false;\n }\n\n int x1 = from[X];\n int x2 = to[X];\n int y1 = from[Y];\n int y2 = to[Y];\n\n board[x1][y1] = ROOM;\n board[x2][y2] = ROOM;\n\n filled[0] += 2;\n\n // keep track of directional motion\n int dirX, dirY;\n\n // find initial direction\n if (x2 > x1)\n dirX = 1; // east\n else\n dirX = -1; // west\n if (y2 > y1)\n dirY = 1; // north\n else\n dirY = -1; // south\n\n // move into random direction\n boolean firstHorizontal = random.nextBoolean();\n boolean secondHorizontal = random.nextBoolean();\n\n // making a corridor might take awhile, just continue this iterative\n // process\n while (true) {\n\n if (x1 != x2 && y1 != y2) {\n // adjust the first tile iterator\n if (firstHorizontal)\n x1 += dirX;\n else\n y1 += dirY;\n }\n\n if (x1 != x2 && y1 != y2)\n // still not equal\n {\n // adjust the second tile iterator\n if (secondHorizontal)\n x2 -= dirX;\n else\n y2 -= dirY;\n }\n\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n if (board[x2][y2] == NULL) {\n board[x2][y2] = HALL;\n filled[0]++;\n }\n // check once more if the iterators match after moving\n // if the iterators are on the same level, try connecting them\n if (x1 == x2) {\n while (y1 != y2) {\n // adjust y until we reach destination\n y1 += dirY;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n // return that we've connected the hallway successfully\n return true;\n }\n // iterators are on the same level horizontally, so we must now\n // connect across\n if (y1 == y2) {\n while (x1 != x2) {\n // adjust y until we reach destination\n x1 += dirX;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n return true;\n }\n }\n }",
"private void putTilesOnBoard() {\n boolean isWhite = true;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n Tile t = new Tile(isWhite, new Position(x, y));\n t.setOnMouseClicked(e -> {\n if (t.piece != null && this.activeTile == null && this.whitePlayer == t.piece.isWhite()) {\n this.activeTile = t;\n ArrayList<Position> moves = t.piece.getLegalMoves();\n this.highlightAvailableMoves(moves, t.isWhite);\n } else if (t.isHighlighted.getValue() && this.activeTile.piece != null ) {\n movePieces(t);\n } else {\n this.activeTile = null;\n this.clearHighlightedTiles();\n }\n this.updatePieceBoards();\n });\n t.isHighlighted.addListener((o, b, b1) -> {\n if (o.getValue() == true) {\n t.startHighlight();\n } else {\n t.clearHighlight();\n }\n });\n this.board[x][y] = t;\n this.add(this.board[x][y], x, y);\n isWhite = !isWhite;\n }\n isWhite = !isWhite;\n }\n\n }",
"public void checkCollisions(){\n for(int i=bodyParts;i>0;i--){\n if((x[0]==x[i])&&(y[0]==y[i])){\n running=false;\n }\n }\n //head with left border\n if(x[0]<0){\n running=false;\n }\n //head with right border\n if(x[0]>screen_width){\n running=false;\n }\n //head with top border\n if(y[0]<0){\n running=false;\n }\n //head with bottom border\n if(y[0]>screen_height){\n running=false;\n }\n if(!running){\n timer.stop();\n }\n }",
"public boolean checkReached(float xTile, float yTile)\r\n/* 134: */ {\r\n/* 135:149 */ if ((this.mission) && (tileReachObjectives(xTile, yTile)))\r\n/* 136: */ {\r\n/* 137:152 */ this.reach[((int)xTile)][((int)yTile)] = 0;\r\n/* 138:153 */ this.reachablePlaces -= 1;\r\n/* 139:154 */ if (this.reachablePlaces == 0) {\r\n/* 140:156 */ return true;\r\n/* 141: */ }\r\n/* 142: */ }\r\n/* 143:160 */ return false;\r\n/* 144: */ }",
"public boolean tileGrass(float xTile, float yTile)\r\n/* 212: */ {\r\n/* 213:236 */ return (tileInBounds(xTile, yTile)) && (this.grass[((int)xTile)][((int)yTile)] != 0);\r\n/* 214: */ }",
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"static void start() {\n if( flag == 1 ) return;\n for( Tile x : tiles ) {\n if( x.getBackground() == cyan ) x.setBackground(white);\n }\n Thread fill = new Thread(new FloodFill());\n fill.start();\n flag = 1;\n }",
"public void deadcheck()\n\t{\n\t\tif (this.shield <= 0)\n\t\t{\n\t\t\tthis.drawMissile = false;\n\t\t}\n\t\telse \n\t\t\tthis.drawMissile = true;\n\t}",
"private void setAllAvailable() {\r\n for (int large = 0; large < 9; large++) {\r\n for (int small = 0; small < 9; small++) {\r\n Tile tile = mSmallTiles[large][small];\r\n if (tile.getOwner() == Tile.Owner.NEITHER)\r\n addAvailable(tile);\r\n }\r\n }\r\n }",
"private static boolean tilesAreNotFilled(int[][] grid) {\n\t\tfor(int i = 0; i < BOUNDARY; i++) {\n\t\t\tfor(int j = 0; j < BOUNDARY; j++) {\n\t\t\t\tif(grid[i][j] == 0) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isFull() {\n for (int r = 0; r < 6; r++) {\n for (int c = 0; c < 7; c++) {\n if (!hasPiece(r, c)) {\n return false;\n }\n }\n }\n return true;\n }",
"public void setAllUnexplored() {\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n if (in_start(row, col) || in_goal(row, col)) {\n grid[row][col].setIsExplored(true);\n } else {\n grid[row][col].setIsExplored(false);\n }\n }\n }\n }",
"private void enableAllTiles() {\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tplayerBoard[j][i].setEnabled(true);\n\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"t\");\n\t\t\t\tplayerBoard[j][i].setForeground(Color.lightGray);\n\t\t\t\tplayerBoard[j][i].setBackground(Color.darkGray);\n\t\t\t}\n\t\t}\n\t}",
"private void decorateMountains(int xStart, int xLength, int floor, ArrayList finalListElements, ArrayList states,boolean enemyAddedBefore)\r\n\t {\n\t if (floor < 1)\r\n\t \treturn;\r\n\r\n\t // boolean coins = random.nextInt(3) == 0;\r\n\t boolean rocks = true;\r\n\r\n\t //add an enemy line above the box\r\n\t Random r = new Random();\r\n\t boolean enemyAdded=addEnemyLine(xStart + 1, xLength - 1, floor - 1);\r\n\r\n\t int s = 1;\r\n\t int e = 1;\r\n\r\n\t if(enemyAdded==false && enemyAddedBefore==false)\r\n\t {\r\n\t if (floor - 2 > 0){\r\n\t if ((xLength - e) - (xStart + s) > 0){\r\n\t for(int x = xStart + s; x < xLength- e; x++){\r\n\t \tboolean flag=true;\r\n\t \tfor(int i=0;i<states.size();i++)\r\n\t \t{\r\n\t \t\tElements element=(Elements)finalListElements.get(i);\r\n\t \t\t\tBlockNode state=(BlockNode)states.get(i);\r\n\t \t\t\t\r\n\t \t\t\tint xElement = (int)(initialStraight+state.getX());\r\n\t \t int floorC= (int)state.getY()+1;\r\n\t \t int widthElement=element.getWidth();\r\n\t \t int heigthElement=element.getHeigth()+2;\r\n\t \t \r\n\t \t int widthElementNext=1;\r\n\t \t int heigthElementNext=0;\r\n\t \t \r\n\t \t if(x+(widthElementNext-1)>=xElement && x<xElement+widthElement && (floor-1)-heigthElementNext<=floorC && (floor-1)>= floorC-heigthElement )\r\n\t \t {\r\n\t \t \tflag=false;\r\n\t \t \tbreak;\r\n\t \t }\r\n\t \t \t \t \t\t \t \r\n\t \t } \r\n\t \tif(flag==true)\r\n\t \t{\r\n\t \t\tsetBlock(x, floor - 1, COIN);\r\n\t \t}\r\n\t \r\n\t //COINS++;\r\n\t }\r\n\t }\r\n\t }\r\n\t }\r\n\r\n\t s = random.nextInt(4);\r\n\t e = random.nextInt(4);\r\n\t \r\n\t //this fills the set of blocks and the hidden objects inside them\r\n\t /*\r\n\t if (floor - 4 > 0)\r\n\t {\r\n\t if ((xLength - 1 - e) - (xStart + 1 + s) > 2)\r\n\t {\r\n\t for (int x = xStart + 1 + s; x < xLength - 1 - e; x++)\r\n\t {\r\n\t if (rocks)\r\n\t {\r\n\t if (x != xStart + 1 && x != xLength - 2 && random.nextInt(3) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_POWERUP);\r\n\t //BLOCKS_POWER++;\r\n\t }\r\n\t else\r\n\t {\t//the fills a block with a hidden coin\r\n\t setBlock(x, floor - 4, BLOCK_COIN);\r\n\t //BLOCKS_COINS++;\r\n\t }\r\n\t }\r\n\t else if (random.nextInt(4) == 0)\r\n\t {\r\n\t if (random.nextInt(4) == 0)\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (2 + 1 * 16));\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, (byte) (1 + 1 * 16));\r\n\t }\r\n\t }\r\n\t else\r\n\t {\r\n\t setBlock(x, floor - 4, BLOCK_EMPTY);\r\n\t //BLOCKS_EMPTY++;\r\n\t }\r\n\t }\r\n\t }\r\n\t //additionElementToList(\"Block\", 1,(xLength - 1 - e)-(xStart + 1 + s));\r\n\t }\r\n\t \r\n\t }*/\r\n\t }",
"private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }",
"public void checkCollisionTile(Entity entity) {\n\t\t\tint entityLeftX = entity.worldX + entity.collisionArea.x;\n\t\t\tint entityRightX = entity.worldX + entity.collisionArea.x + entity.collisionArea.width;\n\t\t\tint entityUpY = entity.worldY + entity.collisionArea.y;\n\t\t\tint entityDownY = entity.worldY + entity.collisionArea.y + entity.collisionArea.height;\n\t\t\t\n\t\t\tint entityLeftCol = entityLeftX/gamePanel.unitSize;\n\t\t\tint entityRightCol = entityRightX/gamePanel.unitSize;\n\t\t\tint entityUpRow = entityUpY/gamePanel.unitSize;\n\t\t\tint entityDownRow = entityDownY/gamePanel.unitSize;\n\t\t\t\n\t\t\tint point1;\n\t\t\tint point2;\n\t\t\t//This point is used for diagonal movement\n\t\t\tint point3;\n\t\t\t\n\t\t\tswitch(entity.direction) {\n\t\t\t\t//Lateral and longitudinal movements\n\t\t\t\tcase \"up\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"down\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"left\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"right\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t//Diagonal Movements\n\t\t\t\tcase \"upleft\":\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\t//Sets the top left and top right point to draw a line which will check for collision\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\t//If either points are touched, turn on collision stopping movement\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"upright\":\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityUpRow = (entityUpY - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase \"downleft\":\n\t\t\t\t\tentityLeftCol = (entityLeftX - entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityUpRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"downright\":\n\t\t\t\t\tentityDownRow = (entityDownY + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tentityRightCol = (entityRightX + entity.speed) / gamePanel.unitSize;\n\t\t\t\t\tpoint1 = gamePanel.tileSet.mapTileNum[entityLeftCol][entityDownRow];\n\t\t\t\t\tpoint2 = gamePanel.tileSet.mapTileNum[entityRightCol][entityDownRow];\n\t\t\t\t\tpoint3 = gamePanel.tileSet.mapTileNum[entityRightCol][entityUpRow];\n\t\t\t\t\tif(gamePanel.tileSet.tile[point1].collision == true || gamePanel.tileSet.tile[point2].collision == true || gamePanel.tileSet.tile[point3].collision == true) {\n\t\t\t\t\t\tentity.collisionOn = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"void testAllCellsFlooded(Tester t) {\r\n initData();\r\n t.checkExpect(this.game8.allCellsFlooded(), true);\r\n t.checkExpect(this.game2.allCellsFlooded(), false);\r\n }",
"public boolean tileBlocked(float xTile, float yTile)\r\n/* 117: */ {\r\n/* 118:131 */ return (!tileInBounds(xTile, yTile)) || (this.blocked[((int)xTile)][((int)yTile)] != 0);\r\n/* 119: */ }",
"void checkCol() {\n Player player = gm.getP();\n int widthPlayer = (int) player.getImg().getWidth();\n int heightPlayer = (int) player.getImg().getHeight();\n Bullet dummyBuullet = new Bullet();\n int widthBullet = (int) dummyBuullet.getImg().getWidth();\n int heightBullet = (int) dummyBuullet.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n // the bullet must be an enemy bullet\n if (bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the bullet location is inside the rectangle of player\n if ( Math.abs( bullet.getX() - player.getX() ) < widthPlayer / 2\n && Math.abs( bullet.getY() - player.getY() ) < heightPlayer / 2 ) {\n // 1) destroy the bullet\n // 2) decrease the life of a player\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n bullet.setActive(false);\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n break;\n }\n }\n }\n // 2'nd case\n // the enemy is hit with player bullet\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n for (Bullet bullet : gm.getBulletList()) {\n if (!bullet.isEnemyBullet() && bullet.isActive()) {\n // the condition when the player bullet location is inside the rectangle of enemy\n if (Math.abs(enemy.getX() - bullet.getX()) < (widthBullet / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - bullet.getY()) < (heightBullet / 2 + heightEnemy / 2)) {\n // 1) destroy the player bullet\n // 2) destroy the enemy\n if (destroyedEnemy % 3 == 0 && destroyedEnemy != 0) onlyOnce = 0;\n destroyedEnemy++;\n gm.increaseScore();\n enemy.setActive(false);\n\n\n if(enemy.hTitanium()) {\n gm.getTitaniumList()[gm.getTitaniumIndex()].setX(enemy.getX());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setY(enemy.getY());\n gm.getTitaniumList()[gm.getTitaniumIndex()].setActive(true);\n gm.increaseTitaniumIndex();\n }\n\n if(enemy.hBonus()) {\n \tgm.getBonusList()[gm.getBonusIndex()].setX(enemy.getX());\n \tgm.getBonusList()[gm.getBonusIndex()].setY(enemy.getY());\n \tgm.getBonusList()[gm.getBonusIndex()].setActive(true);\n \tgm.increaseBonusIndex();\n }\n bullet.setActive(false);\n break;\n }\n }\n }\n }\n }\n\n // 3'rd case\n // the player collided with enemy ship\n for (Enemy enemy : gm.getEnemyList()) {\n if (enemy.isActive()) {\n int widthEnemy = (int) enemy.getImg().getWidth();\n int heightEnemy = (int) enemy.getImg().getHeight();\n // the condition when the enemy rectangle is inside the rectangle of player\n if (Math.abs(enemy.getX() - player.getX()) < (widthPlayer / 2 + widthEnemy / 2)\n && Math.abs(enemy.getY() - player.getY()) < (heightPlayer / 2 + heightEnemy / 2)) {\n // 1) destroy the enemy\n // 2) decrease the player's life\n if(gm.getP().getHasShield() == false)player.decreaseLife();\n gm.getP().setHasShield(false);\n if(gm.getP().getCurDirection() == 0){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipLeft4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if(gm.getP().getCurDirection() == 1){\n try (FileInputStream inputStream = new FileInputStream(\"MediaFiles/spaceshipRight4.png\")) {\n gm.getP().setImg(new Image(inputStream)) ;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n enemy.setActive(false);\n\n break;\n }\n }\n }\n\n for (Bonus bonus : gm.getBonusList()) {\n if (bonus.isActive()) {\n int widthBonus = (int) bonus.getImg().getWidth();\n int heightBonus = (int) bonus.getImg().getHeight();\n if (Math.abs(bonus.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(bonus.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n bonus.setActive(false);\n if (bonus.getType() == 1) {\n if (player.getLives() < player.getMaxLives()) {\n player.setLives(player.getLives() + 1);\n }\n }\n else{\n superAttack = 1;\n }\n }\n }\n }\n\n for (Titanium titanium : gm.getTitaniumList()) {\n if (titanium.isActive()) {\n int widthBonus = (int) titanium.getImg().getWidth();\n int heightBonus = (int) titanium.getImg().getHeight();\n if (Math.abs(titanium.getX() - player.getX()) < (widthPlayer / 2 + widthBonus / 2)\n && Math.abs(titanium.getY() - player.getY()) < (heightPlayer / 2 + heightBonus / 2)) {\n titanium.setActive(false);\n gm.getP().increaseTitanium();\n }\n }\n }\n\n }",
"private void setShips() {\n //This clears the board. To \"Invalidate\"\n for (int x = 0; x < maxN; x++) {\n for (int y = 0; y < maxN; y++) {\n ivCell[x][y].setBackgroundResource(gridID);\n }\n }\n\n for (Ship s : ships) {\n for (int i = 0; i < s.getShipSize(); i++) {\n if(player)ivCell[s.getBodyLocationPoints()[i].x][s.getBodyLocationPoints()[i].y].setBackgroundResource(s.getBodyResources()[i]);\n updateOccupiedCells(s.getBodyLocationPoints());\n }\n }\n\n }",
"public boolean tileSand(float xTile, float yTile)\r\n/* 217: */ {\r\n/* 218:241 */ return (tileInBounds(xTile, yTile)) && (this.sand[((int)xTile)][((int)yTile)] != 0);\r\n/* 219: */ }",
"public void collision() {\n\t\tcapacity = 0;\n\t\tcolor = ColorUtil.YELLOW;\n\t}",
"public void blank() {\r\n\t\trunning = false;// sets the simulation to stopped\r\n\t\tfor (int i = 0; i < TOTAL_TILES; i++)// loops through all tiles\r\n\t\t\tnodes[i] = new Node(new Point(i / WIDTH_TILES * SIZE_TILES, i % HEIGHT_TILES * SIZE_TILES), new ImageIcon(\"empty.png\").getImage(), false, \"empty\");// sets empty tile\r\n\t}",
"public boolean tileReachable(float tx, float ty, AgentModel selectedAgent)\r\n/* 243: */ {\r\n/* 244:271 */ float x = selectedAgent.getX() - 0.5F;\r\n/* 245:272 */ float y = selectedAgent.getY() - 0.5F;\r\n/* 246:274 */ switch ((int)selectedAgent.getAngle())\r\n/* 247: */ {\r\n/* 248: */ case 0: \r\n/* 249:277 */ if ((y - 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 250:279 */ return true;\r\n/* 251: */ }\r\n/* 252: */ break;\r\n/* 253: */ case 90: \r\n/* 254:283 */ if ((x + 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 255:285 */ return true;\r\n/* 256: */ }\r\n/* 257: */ break;\r\n/* 258: */ case 180: \r\n/* 259:289 */ if ((y + 1.0F == ty) && (tx >= x - 1.0F) && (tx <= x + 1.0F)) {\r\n/* 260:291 */ return true;\r\n/* 261: */ }\r\n/* 262: */ break;\r\n/* 263: */ case 270: \r\n/* 264:295 */ if ((x - 1.0F == tx) && (ty >= y - 1.0F) && (ty <= y + 1.0F)) {\r\n/* 265:298 */ return true;\r\n/* 266: */ }\r\n/* 267: */ break;\r\n/* 268: */ }\r\n/* 269:303 */ return false;\r\n/* 270: */ }",
"public void initializeTiles(){\r\n tileBoard = new Tile[7][7];\r\n //Create the fixed tiles\r\n //Row 0\r\n tileBoard[0][0] = new Tile(false, true, true, false);\r\n tileBoard[2][0] = new Tile(false, true, true, true);\r\n tileBoard[4][0] = new Tile(false, true, true, true);\r\n tileBoard[6][0] = new Tile(false, false, true, true);\r\n //Row 2\r\n tileBoard[0][2] = new Tile(true, true, true, false);\r\n tileBoard[2][2] = new Tile(true, true, true, false);\r\n tileBoard[4][2] = new Tile(false, true, true, true);\r\n tileBoard[6][2] = new Tile(true, false, true, true);\r\n //Row 4\r\n tileBoard[0][4] = new Tile(true, true, true, false);\r\n tileBoard[2][4] = new Tile(true, true, false, true);\r\n tileBoard[4][4] = new Tile(true, false, true, true);\r\n tileBoard[6][4] = new Tile(true, false, true, true);\r\n //Row 6\r\n tileBoard[0][6] = new Tile(true, true, false, false);\r\n tileBoard[2][6] = new Tile(true, true, false, true);\r\n tileBoard[4][6] = new Tile(true, true, false, true);\r\n tileBoard[6][6] = new Tile(true, false, false, true);\r\n \r\n //Now create the unfixed tiles, plus the extra tile (15 corners, 6 t's, 13 lines)\r\n ArrayList<Tile> tileBag = new ArrayList<Tile>();\r\n Random r = new Random();\r\n for (int x = 0; x < 15; x++){\r\n tileBag.add(new Tile(true, true, false, false));\r\n }\r\n for (int x = 0; x < 6; x++){\r\n tileBag.add(new Tile(true, true, true, false));\r\n }\r\n for (int x = 0; x < 13; x++){\r\n tileBag.add(new Tile(true, false, true, false));\r\n }\r\n //Randomize Orientation\r\n for (int x = 0; x < tileBag.size(); x++){\r\n int rand = r.nextInt(4);\r\n for (int y = 0; y <= rand; y++){\r\n tileBag.get(x).rotateClockwise();\r\n }\r\n }\r\n \r\n for (int x = 0; x < 7; x++){\r\n for (int y = 0; y < 7; y++){\r\n if (tileBoard[x][y] == null){\r\n tileBoard[x][y] = tileBag.remove(r.nextInt(tileBag.size()));\r\n }\r\n }\r\n }\r\n extraTile = tileBag.remove(0);\r\n }",
"private boolean hasHitBoundry() {\r\n if (snake[HEAD].row < 0 || \r\n snake[HEAD].row >= maxRows ||\r\n snake[HEAD].column < 0 ||\r\n snake[HEAD].column >= maxColumns) {\r\n gameOver();\r\n return true;\r\n }\r\n return false;\r\n }",
"@Override\n\t protected void paintComponent(Graphics g) {\n\t super.paintComponent(g);\n\t for (int y = 0; y < MAX_Y; y++) {\n\t for (int x = 0; x < MAX_X; x++) { \n\t if(seed[x][y].isAlive) {\n\t g.setColor(FILL_COLOR);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }\n\t else{\n\t g.setColor(defaultBackground);\n\t g.fillRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end if..\n\t g.setColor(Color.GRAY);\n\t g.drawRect(x * CELL_WIDTH, y * CELL_WIDTH, CELL_WIDTH, CELL_WIDTH);\n\t }//end for x\n\t }//end for y\n\t }",
"public boolean checkGameOver(){\n\t\tfor(int x = 0; x < this.tile[3].length; x++){\n\t\t if(this.isFilled(3, x)){\n\t\t \tSystem.out.println(\"game over\");\n\t\t return true;\n\t\t }\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n public void notOnGroundTest(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{0,0},{0,0}},new byte[][]{{1,0},{1,1}}, tilepath);\n Rect cBox = new Rect(2,2,2,2);\n assertFalse(tileMap.isOnGround(cBox));\n }",
"public void setFilled(boolean filled) {\r\n this.filled = filled;\r\n }",
"private void makeMaze() {\n\t\ttry {\n\t\t\tthis.end = ImageIO.read(new File(\"images/tiles/end_locked.png\"));\n\t\t\tint w = getWidth()/gui.getModel().getDifficulty();\n\t\t\tint h = getHeight()/gui.getModel().getDifficulty();\n\t\t\tint difficulty = gui.getModel().getDifficulty();\n\t\t\tmazeImage = new BufferedImage(difficulty*(getWidth()/difficulty), difficulty*(getHeight()/difficulty), BufferedImage.TYPE_INT_RGB);\n\t\t\tGraphics2D g = mazeImage.createGraphics();\n\t\t\tString tile = \"\";\n\t\t\tfor (BaseState s: gui.getModel().getMaze()) {\n\t\t\t\tint x = s.getX(); int y = s.getY();\n\t\t\t\t\n\t\t\t\t// check walls\n\t\t\t\tint numSides = 0;\n\t\t\t\tboolean rightWall = false;\n\t\t\t\tboolean leftWall = false;\n\t\t\t\tboolean topWall = false;\n\t\t\t\tboolean bottomWall = false;\n\t\t\t\tif (s.getRight() == null) rightWall = true;\n\t\t\t\tif (s.getLeft() == null) leftWall = true;\n\t\t\t\tif (s.getUp() == null) topWall = true;\n\t\t\t\tif (s.getDown() == null) bottomWall = true;\n\t\t\t\tif (topWall) numSides++;\n\t\t\t\tif (leftWall) numSides++;\n\t\t\t\tif (bottomWall) numSides++;\n\t\t\t\tif (rightWall) numSides++;\n\t\t\t\t\n\t\t\t\t// find tile type\n\t\t\t\tif (numSides == 3) { // dead end\n\t\t\t\t\tif (!rightWall) tile = \"images/tiles/deadend_left.bmp\";\n\t\t\t\t\telse if (!leftWall) tile = \"images/tiles/deadend_right.bmp\";\n\t\t\t\t\telse if (!topWall) tile = \"images/tiles/deadend_bottom.bmp\";\n\t\t\t\t\telse if (!bottomWall) tile = \"images/tiles/deadend_top.bmp\";\n\t\t\t\t} else if (numSides == 2) { // corner or hall\n\t\t\t\t\t//hall\n\t\t\t\t\tif (rightWall && leftWall) tile = \"images/tiles/hall_vertical.bmp\";\n\t\t\t\t\telse if (topWall && bottomWall) tile = \"images/tiles/hall_horizontal.bmp\";\n\t\t\t\t\t//corner\n\t\t\t\t\telse if (topWall && leftWall) tile = \"images/tiles/corner_top_left.bmp\";\n\t\t\t\t\telse if (topWall && rightWall) tile = \"images/tiles/corner_top_right.bmp\";\n\t\t\t\t\telse if (bottomWall && leftWall) tile = \"images/tiles/corner_bottom_left.bmp\";\n\t\t\t\t\telse if (bottomWall && rightWall) tile = \"images/tiles/corner_bottom_right.bmp\";\n\t\t\t\t} else if (numSides == 1) { // single side\n\t\t\t\t\tif (leftWall) tile = \"images/tiles/wall_left.bmp\";\n\t\t\t\t\telse if (rightWall) tile = \"images/tiles/wall_right.bmp\";\n\t\t\t\t\telse if (topWall) tile = \"images/tiles/wall_top.bmp\";\n\t\t\t\t\telse if (bottomWall) tile = \"images/tiles/wall_bottom.bmp\";\n\t\t\t\t} else { // open\n\t\t\t\t\ttile = \"images/tiles/open.bmp\";\n\t\t\t\t}\n\t\t\t\t// draw tile\n\t\t\t\tg.drawImage(ImageIO.read(new File(tile)), x*w, y*h, w, h, null);\n\t\t\t\t\n\t\t\t\t// check for ending and draw if need be\n\t\t\t\tif (s.getX() == gui.getModel().getDifficulty() - 1 && s.getY() == gui.getModel().getDifficulty() - 1) {\n\t\t\t\t\tg.drawImage(ImageIO.read(new File(\"images/tiles/end_unlocked.png\")), x*w, y*h, w, h, null);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(IOException e) {System.err.println(\"Images not found.\");}\n\t}",
"public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}",
"public void hunt() {\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tif(cells[i].visited == false) {\n\t\t\t\t\n\t\t\t\tint currentIndex = i;\n\t\t\t\t\n\t\t\t\tArrayList<Integer> neighbors = setVisitedNeighbors(i);\n\t\t\t\tint nextIndex = getRandomVisitedNeighborIndex(neighbors);\n\t\t\t\t\t\t\t\t\n\t\t\t\tif(neighbors.size() != 0 ) {\n\t\t\t\t\tcells[currentIndex].visited = true;\n\t\t\t\t\t\n\t\t\t\t\tif(nextIndex == NOT_EXIST) {\n\t\t\t\t\t\tbreak; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//if there is NO not visited neighbors \n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -1) {\n\t\t\t\t\t\tcells[currentIndex].border[EAST] = NO_WALL; \t\t\t\t\t\t\t//neighbor is right \n\t\t\t\t\t\tcells[nextIndex].border[WEST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == width) {\n\t\t\t\t\t\tcells[currentIndex].border[NORTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is up\n\t\t\t\t\t\tcells[nextIndex].border[SOUTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == -width) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[SOUTH] = NO_WALL;\t\t\t\t\t\t\t//neighbor is down\n\t\t\t\t\t\tcells[nextIndex].border[NORTH] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\telse if(currentIndex - nextIndex == 1) {\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tcells[currentIndex].border[WEST] = NO_WALL;\t\t\t\t\t\t\t\t//neighbor is left\n\t\t\t\t\t\tcells[nextIndex].border[EAST] = NO_WALL;\n\t\t\t\t\t}\n\t\t\t\t\tkill(nextIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }",
"private void drawTiles(Graphics g)\n {\n for (int x = 0; x < 19; x++)\n {\n for (int y = 0; y < 15; y++)\n {\n tileset.getSprite(5, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n switch(board[x][y])\n {\n case 1:\n {\n tileset.getSprite(4, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 2:\n {\n tileset.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n break;\n }\n case 3:\n {\n if (bombs[x][y].getTimeLeft() > 80)\n {\n bombImage.getSprite(0, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 80 && bombs[x][y].getTimeLeft() > 50)\n {\n bombImage.getSprite(1, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 50 && bombs[x][y].getTimeLeft() > 20)\n {\n bombImage.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n if (bombs[x][y].getTimeLeft() <= 20)\n {\n bombImage.getSprite(3, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n //4 is player\n case 5:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(2, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n case 6:\n {\n if (fire[x][y] == null)\n {\n tileset.getSprite(15, 0).draw(x * 32 + jitterX, y * 32 + jitterY);\n }\n break;\n }\n }\n }\n }\n }",
"public boolean allCellsFlooded() {\r\n for (ACell c : this.board) {\r\n if (!c.floodCheck()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private void setTable(){\r\n\t\tfor(int i=0;i<100;++i)\r\n\t\t{\r\n\t\t\tfor(int j=0;j<100;++j)\r\n\t\t\t{\r\n\t\t\t\tif(game.checkCell(i,j)==true)\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.black);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tmap[i][j].setBackground(Color.blue);\r\n\t\t\t\t\tmap[i][j].setBounds(j*5,i*5, 5, 5);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setTiles() {\n\t\tTileStack names = new TileStack();\n\t\tfor(int x=0; x < theBoard.getCols(); x++) {\n\t\t\tfor(int y=0; y < theBoard.getRows(); y++) {\n\t\t\t\tp = new Point(x,y);\n\t\t\t\tif(p.equals(new Point(0,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,0)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,1)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,4)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(0,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(1,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(4,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse if(p.equals(new Point(5,5)))\n\t\t\t\t\ttheBoard.setTile(p, TilesEnums.SEA);\n\n\t\t\t\telse \n\t\t\t\t\ttheBoard.setTile(p, names.pop());\n\t\t\t}\n\t\t}\n\t}",
"public boolean isFull(){\r\n\t\tfor(int i = 0; i < boardSize; i++){\r\n\t\t\tif(board[i] == Box.EMPTY){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public void checkHealth(){\n if (this.getHealth() < this.initialHealth/2){\n this.setImgSrc(\"/students/footballstudent1.png\");\n this.getTile().setImage(\"/students/footballstudent1.png\");\n }\n }",
"public void setFilled(boolean filled) \n\t{\n\t\tthis.filled = filled;\n\t}",
"public void spawnEnemy(){\n\t\tint initTile = 0;\n\t\n\t\tfor(int i=0; i<screen.maps[screen.currentMap].path.getHeight(); i++){\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(0, i).getTile().getProperties().containsKey(\"ground\") == true){\n\t\t\t\tinitTile = i;\n\t\t\t}\n\t\t}\n\t\t\n\t\txCoor = 2;\n\t\tyCoor = (initTile)*64 + 2;\n\t\tbound = new Circle(xCoor+30, yCoor+30, 30);\n\t\tinGame = true;\n\t}",
"public static void FillBoard(Board building, int n){\n Room[][] map = building.getMap();\n\n //Where the user starts\n map[n/2][n/2] = new Cornucopia(n/2,n/2);\n\n if(building.isHardLevel()){\n for (int x = 0; x<n; x++)\n {\n for (int y = 0; y<(n/2)-1; y++) {\n map[x][y] = new Lake(x, y);\n map[x][y+(n/2)+2] = new Forest(x, y);\n }\n }\n\n for(int y=1; y<n-1;y++){\n for(int x = 0; x<(n/2)-1; x++) {\n map[x][y] = new Lake(x, y);\n map[x+(n/2)+2][y] = new Forest(x+(n/2)+2, y);\n }\n }\n }\n else{\n //Fill half of the remaining rooms with Lake or Forest rooms\n for (int x = 0; x<n/2; x++)\n {\n map[x][n/2] = new Lake(x,0);\n map[x+(n/2)+1][n/2] = new Forest(x,n-1);\n }\n\n for(int x=0; x<n;x++){\n for(int y=0; y<n/2;y++){\n map[x][y] = new Lake(x,y);\n map[x][y+(n/2)+1] = new Forest(x,y);\n }\n }\n }\n }",
"public void setFilled(boolean filled) {\n this.filled = filled;\n }",
"public void updateBoard() {\r\n\t\tfor(int i = 0, k = 0; i < board.getWidth(); i+=3) {\r\n\t\t\tfor(int j = 0; j < board.getHeight(); j+=3) {\r\n\t\t\t\t//Check that there are pieces to display\r\n\t\t\t\tif(k < bag.size()) {\r\n\t\t\t\t\tboard.setTile(bag.get(k), i, j);\r\n\t\t\t\t\tk++;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tboard.fillSpace(GridSquare.Type.EMPTY, i, j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public boolean tileReachObjectives(float xTile, float yTile)\r\n/* 122: */ {\r\n/* 123:136 */ return (!tileInBounds(xTile, yTile)) || \r\n/* 124:137 */ (this.reach[((int)xTile)][((int)yTile)] != 0);\r\n/* 125: */ }",
"public static boolean isFull() {\n return (board[0][0] > 0 && board[0][1] > 0 && board[0][2] > 0\n && board[1][0] > 0 && board[1][1] > 0 && board[1][2] > 0\n && board[2][0] > 0 && board[2][1] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][0] > 0 && board[2][0] > 0\n && board[0][1] > 0 && board[1][1] > 0 && board[2][1] > 0\n && board[0][2] > 0 && board[1][2] > 0 && board[2][2] > 0\n && board[0][0] > 0 && board[1][1] > 0 && board[2][2] > 0\n && board[0][2] > 0 && board[1][1] > 0 && board[2][0] > 0);\n }",
"public boolean isFull(){\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n if(!gameBoard[i][j].equals(\"O\") && !gameBoard[i][j].equals(\"X\")){\n return false;\n }\n }\n }\n return true;\n }",
"public void drawCell()\n {\n // if mouse is not inside tile area dont draw anything\n if(showHover)\n {\n noStroke();\n \n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n \n if(brushSize == 1)\n {\n if(!pattern[hover[0]][hover[1]])\n {\n pattern[hover[0]][hover[1]] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]][hover[1]] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+hover[0]*cellSize,firstCellPosition[1]+hover[1]*cellSize,cellSize-1,cellSize-1);\n }\n if(brushSize == 2)\n {\n for(int i = 0; i < 2; i++)\n {\n for(int j = 0; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells)\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n if(brushSize == 3)\n {\n for(int i = -1; i < 2; i++)\n {\n for(int j = -1; j < 2; j++)\n {\n if(hover[0]+i < xCells && hover[1]+j < yCells &&\n hover[0]+i >= 0 && hover[1]+j >= 0 )\n {\n if(!pattern[hover[0]+i][hover[1]+j])\n {\n pattern[hover[0]+i][hover[1]+j] = true;\n fill(0);\n }\n else\n {\n pattern[hover[0]+i][hover[1]+j] = false;\n fill(255);\n }\n rect(firstCellPosition[0]+(hover[0]+i)*cellSize,firstCellPosition[1]+(hover[1]+j)*cellSize,cellSize-1,cellSize-1);\n }\n }\n }\n }\n }\n }",
"private void tileSetSurroundingBombs() {\r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n int neighborBombs = neighborBombCount(grid[r][c]);\r\n grid[r][c].setSurroundingBombs(neighborBombs);\r\n }\r\n } \r\n }",
"public void setDead(boolean dead) {\n this.dead = dead;\n Graphics g = image.getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n g = getCoveredImage().getGraphics();\n g.setColor(Color.BLACK);\n g.fillRect(0,0,pieceSize,pieceSize);\n }",
"public boolean check(double xDelt,double yDelt) {\r\n \tBounds pBound= player1.player.getBoundsInParent();\r\n \t\r\n \tfor( Node object: enemy1.hostileG.getChildren()) {\r\n \t\t\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\t\teHealth -= inventory.getpDamage();\r\n \t\t\tpHealth -= 1;\r\n\r\n \t\t\tSystem.out.println(\"eHealth \"+ eHealth);\r\n \t\t\tSystem.out.println(\"pHealth \"+ pHealth);\r\n \t\t\t\r\n \t\t\t//\"Deaths of the sprites\"\r\n \t\t\tif(pHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(player1.player);\r\n \t\t\t\tSystem.out.println(\"You died!\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif(eHealth <=0) {\r\n \t\t\t\tlayout.getChildren().remove(enemy1.enemy);\r\n \t\t\t\tenemy1.enemy.setLayoutX(-10000);\r\n \t\t\t\tenemy1.enemy.setLayoutY(-10000);\r\n \t\t\t}\r\n \t\treturn false;\r\n \t\t}\r\n }\r\n \t\r\n \tfor( Node object: map1.walls.getChildren()) {\r\n \t\tif(object.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())) return false;\r\n \t}\r\n \t\r\n \tfor( Node chest: map1.chests.getChildren()) {\r\n \tif(chest.getBoundsInParent().intersects(pBound.getMinX()+xDelt, pBound.getMinY()+yDelt, pBound.getWidth(), pBound.getHeight())){\r\n \t\tmap1.chests.getChildren().remove(chest);\r\n \t chestchose=inventory.getchestchose();\r\n \t \r\n \t if(chestchose==1) {\r\n \t \tinventory.sworda.setVisible(true);\r\n \t \tinventory.setpDamage(3);\r\n \t }\r\n \t if(chestchose==2) {\r\n \t \tinventory.healthbag.setVisible(true);\r\n \t }\r\n \t \r\n \t return false;\r\n \t} \r\n }\t\r\n \t\r\n return true;\r\n }",
"@Override\r\n public void update() {\r\n super.update();\r\n hero.checkForTileCollision(getXOverlap(hero.oldx,hero.oldx+width,hero.x,hero.x+width), getYOverlap(hero.oldy,hero.oldy+hero.height,hero.y, hero.y+hero.height));\r\n int i = 0;\r\n\r\n while (turningPoints[i]!= null)\r\n {\r\n if (intersects(turningPoints[i].x,turningPoints[i].y, turningPoints[i].width,turningPoints[i].height))\r\n {\r\n vx = -vx;\r\n vy = -vy;\r\n }\r\n i++;\r\n }\r\n }",
"private void notdrawy()\n\t{\n\t\t// check if a flag for a item has been set to see if the item has died and remove it from the arraylist\n\t\tfor (int i =0; i < drawableItems.size();i++)\n\t\t\tif (drawableItems.get(i).isDead())\n\t\t\t{\n\t\t\t\t//remove the corps\n\t\t\t\tdrawableItems.remove(i);\n\t\t\t\t//add to score\n\t\t\t\tscore += +100;\n\t\t\t}\n\t\t\n\t\t//check if any enterties enter each others bounds and if so means they have collided and will trigger the collision on the entitie\n\t\tfor (int i = 0; i < drawableItems.size();i++)\n\t\t\tfor (int j = 0; j < drawableItems.size();j++)\n\t\t\t\tif (j != i)\n\t\t\t\t\tif (drawableItems.get(j).getBounds().intersect(drawableItems.get(i).getBounds()))\n\t\t\t\t\t\tif (drawableItems.get(i).equals(player))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdrawableItems.get(j).collision();\n\t\t\t\t\t\t\tdrawableItems.get(i).collision();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tdrawableItems.get(j).collision();\n\t\t\n\t\t//sets have bullets\n\t\tfor (int i = 0; i < player.getGun().getBullets().size();i++)\n\t\t\tfor (int j = 0; j<drawableItems.size();j++)\n\t\t\t\tif (!drawableItems.get(j).equals(player))\n\t\t\t\t\tif (drawableItems.get(j).getBounds().intersect(player.getGun().getBullets().get(i).getBounds()))\n\t\t\t\t\t{\n\t\t\t\t\t\tdrawableItems.get(j).hit(player.getGun().getBullets().get(i).getDamage());\n\t\t\t\t\t\t//tell the bullet it has collided\n\t\t\t\t\t\tplayer.getGun().getBullets().get(i).collision();\n\t\t\t\t\t\t// we want to add to score\n\t\t\t\t\t\tscore++;\n\t\t\t\t\t}\n\t\t\n\t\t// {debug} add new zombies to fight\n\t\tif (drawableItems.size() < 20)\n\t\t\tdrawableItems.add(new ObjectItem(Statics.getScreenWidth() - 100,Statics.getScreenHeight() - 300));\n\t\t\n\t\t//update player p\n\t\tsettarget(player.getPosX(),player.getPosY());\n\t}",
"public void startGameState(){\n\n ArrayList<Integer> checkeredSpaces = new ArrayList<Integer>(Arrays.asList(1, 3, 5, 7, 8, 10, 12, 14, 17, 19, 21,\n 23, 24, 26, 28, 30, 33, 35, 37, 39, 41, 42, 44, 46, 48,\n 51, 53, 55, 56, 58, 60, 62));\n\n\n\n for(int i =0; i < 63; i++){\n if(!checkeredSpaces.contains(i)){\n //set all black spaces to null on the board\n mCheckerBoard.add(null);\n }\n else if(i < 24){\n //set first three rows to red checkers\n mCheckerBoard.add(new Checker((i/2), true));\n }\n else if(i < 40){\n //set middle two rows to null\n mCheckerBoard.add(null);\n }\n else{\n //set top three row to black checkers\n mCheckerBoard.add(new Checker((i/2), false));\n }\n }\n\n }",
"private boolean collision(double xa, double ya) {\n\t\t\n\t\tint xMin = 2;\n int xMax = 15;\n int yMin = 15;\n int yMax = 19;\n if(Player.isSwimming){\n \tyMax = 1;\n \txMax = 18;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 30) {\n \txMax = 18;\n \txMin = 20;\n }\n if (level.getTile((int)this.x / 32, (int)this.y / 32).getId() == 25) {\n \txMax = 32;\n \txMin = 32;\n \tyMax = 7;\n }\n \n \n int yMinWater = 0;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa, (int)ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile((int)xa,(int) ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, xMax, y)) {\n return true;\n }\n }\n if(Player.isSwimming || Player.isClimbing){\n \t for (int y = yMinWater; y < yMax; y++) {\n if (isSolidTile((int)xa, (int)ya, yMinWater, y)) {\n return true;\n }\n }\n }\n \n return false;\n\t}",
"public void generateAntHill(int x, int y, String colour) {\n for (int i = 0; i < 11; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[x*130+y+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[x*130+y+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next change the two rows above and below the centre\n for (int i = 0; i < 10; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-1)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next rows inset by one on the right\n for (int i = 0; i < 9; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-2)*130+y+1+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left none on the right\n for (int i = 0; i < 8; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-3)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the right and none on the left\n for (int i = 0; i < 7; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-4)*130+y+2+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n \n // Next Row inset by one more on the left and none on the right\n for (int i = 0; i < 6; i++) {\n if (colour.equals(\"red\")) {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.REDANTHILL);\n } else {\n worldGrid[(x+5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n worldGrid[(x-5)*130+y+3+i].setType(Cell.Type.BLACKANTHILL);\n }\n }\n }",
"protected void calculatePathfindingGrid(Tile[] tiles) {\n \n if(tiles == null) {\n return;\n }\n \n /**\n * Problem:\n * Because the tile size used by the path finding engine will most likely be\n * different from that of the visual effect size, we have to\n * look at all the visual tiles and judge whether they are blocking of\n * particular kinds of unit.\n * \n * Algorithm:\n * For land, air and sea take a look at the number of blocking/non-blocking\n * tiles there are and if there is over 50% either way then that will be the\n * PathTiles result.\n */\n \n // First get the size of the map in PathTile(s)\n int rows = getActualHeightInTiles();\n int cols = getActualWidthInTiles();\n \n // Calculate the number of tiles to a PathTile\n int tilesPerActualTilesX = getActualTileWidth() / getTileWidth();\n int tilesPerActualTilesY = getActualTileHeight() / getTileHeight();\n int tileCount = tilesPerActualTilesX * tilesPerActualTilesY;\n \n int tileCols = getWidthInTiles();\n \n // Create an array\n mPathTiles = new PathTile[ rows * cols ];\n \n // Iterate through these tiles\n for(int x = 0; x < cols ; x++) {\n for(int y = 0; y < rows; y++) {\n \n // Setup some variables\n int blockSea, blockAir, blockLand;\n blockAir = blockLand = blockSea = 0;\n \n // Figure out the percentage of each block\n for(int tx = 0; tx < tilesPerActualTilesX; tx++) {\n for(int ty = 0; ty < tilesPerActualTilesY; ty++) {\n \n int tileX = (x * tilesPerActualTilesX) + tx;\n int tileY = (y * tilesPerActualTilesY) + ty;\n \n Tile thisTile = tiles[ (tileY * tileCols) + tileX ];\n \n if(thisTile.blockAir()) {\n blockAir++;\n }\n \n if(thisTile.blockLand()) {\n blockLand++;\n }\n \n if(thisTile.blockSea()) {\n blockSea++;\n }\n \n }\n }\n \n // Calculate percentage\n float a,b,c;\n a = (float)blockAir / (float)tileCount;\n b = (float)blockLand / (float)tileCount;\n c = (float)blockSea / (float)tileCount;\n \n // Set the new tile\n mPathTiles[ (y * cols) + x ] = new PathTile( (a >= .5f), (b >= .5f), (c >= .5f) );\n \n // System.out.println(\"Grid \" + ((y * cols) + x) + \" (\" + x + \", \" + y + \") Air: \" + a + \" Land: \" + b + \" Sea: \" + c);\n \n }\n }\n \n }",
"static void fill() {\n int xRef, yRef, height;\n\n while (true) {\n System.out.print(\"Enter reference point: \");\n xRef = scan.nextInt();\n yRef = scan.nextInt();\n scan.nextLine(); // flush\n // calcs\n if ( pointInPgm(xRef, yRef) ) break;\n System.out.println(\"WARNING: reference point is not in terrain.\");\n }\n\n height = pgmInf.img[yRef][xRef];\n System.out.printf(\"Marking all pixels below %d as 0, and others as %d.\\n\", height, (pgmInf.maxValue / 2) );\n fillGt( height );\n System.out.println(\"Done.\");\n }",
"public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent e) {\n\t\tif (shipsToPlace > 0) {\n\t\t\tchar isTileEnabled = (\"\" + e.getComponent()).charAt(22);\n\n\t\t\tif (isTileEnabled == 't') {\n\n\t\t\t\tint x = Integer.parseInt((\"\" + e.getComponent()).charAt(20) + \"\");\n\t\t\t\tint y = Integer.parseInt((\"\" + e.getComponent()).charAt(21) + \"\");\n\t\t\t\tplayerBoard[x][y].setBackground(Color.yellow);\n\n\t\t\t\tif (shipsToPlace == 3) {\n\t\t\t\t\tfor (int i = 1; i < 5; i++) {\n\t\t\t\t\t\tif ((x + i) < 10)\n\t\t\t\t\t\t\tplayerBoard[x + i][y].setBackground(Color.yellow);\n\t\t\t\t\t}\n\t\t\t\t} else if (shipsToPlace == 2) {\n\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\tplayerBoard[x][y + 1].setBackground(Color.yellow);\n\t\t\t\t\tif (y + 2 < 10)\n\t\t\t\t\t\tplayerBoard[x][y + 2].setBackground(Color.yellow);\n\t\t\t\t} else if (shipsToPlace == 1) {\n\t\t\t\t\tif (y + 1 < 10)\n\t\t\t\t\t\tplayerBoard[x][y + 1].setBackground(Color.yellow);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean hasCollided(int xa, int ya) {\n int xMin = 0;//This is based on the character sprite... soo like near the legs is the collision box\n int xMax = 7;\n int yMin = 3;\n int yMax = 7;\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMin)) {\n return true;\n }\n }\n for (int x = xMin; x < xMax; x++) {\n if (isSolidTile(xa, ya, x, yMax)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMin, y)) {\n return true;\n }\n }\n for (int y = yMin; y < yMax; y++) {\n if (isSolidTile(xa, ya, xMax, y)) {\n return true;\n }\n }\n return false;\n }",
"void updateBoard() {\r\n\t\tfor (int x = 0; x < length; x++) {\r\n\t\t\tfor (int y = 0; y < length; y++) {\r\n\t\t\t\tif (filled[x][y]) {\r\n\t\t\t\t\t// Draw filled square\r\n\t\t\t\t\tdouble rand = Math.random();\r\n\t\t\t\t\tColor use = new Color(0, 0, 0);\r\n\t\t\t\t\tif (rand < .25) {\r\n\t\t\t\t\t\tuse = a;\r\n\t\t\t\t\t} else if (rand < .50) {\r\n\t\t\t\t\t\tuse = b;\r\n\t\t\t\t\t} else if (rand < .75) {\r\n\t\t\t\t\t\tuse = c;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tuse = d;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length, use, true);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// Draw empty square\r\n\t\t\t\t\tJSquare element = new JSquare(this.getWidth() / length, this.board.getHeight() / length,\r\n\t\t\t\t\t\t\tnew Color(192, 192, 192), false);\r\n\t\t\t\t\telement.addMouseListener(this);\r\n\t\t\t\t\tboard.add(element);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private boolean checkFloodFill(int[][] map, int x, int y, int xTarget, int yTarget, int rows, int columns) {\n\t\tfinal int FILL_COLOUR = 5;\n\t\tif (x < 0 || x > rows || y < 0 || y > columns) {\n\t\t\treturn false;\n\t\t}\n\t\tif (x == xTarget && y == yTarget) {\n\t\t\treturn true;\n\t\t}\n\t\tmap[x][y] = FILL_COLOUR;\n\t\tif (map[x][y + 1] == 0) {\n\t\t\tif (checkFloodFill(map, x, y + 1, xTarget, yTarget, rows, columns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (map[x + 1][y] == 0) {\n\t\t\tif (checkFloodFill(map, x + 1, y, xTarget, yTarget, rows, columns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (map[x][y - 1] == 0) {\n\t\t\tif (checkFloodFill(map, x, y - 1, xTarget, yTarget, rows, columns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tif (map[x - 1][y] == 0) {\n\t\t\tif (checkFloodFill(map, x - 1, y, xTarget, yTarget, rows, columns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private void addMountains() {\n int randRow = 0;\n int randColumn = 0;\n int randValue = 0;\n do {\n randRow = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n randColumn = (int)(Math.round(Math.random()*(MAP_LENGTH-4))) + 2;\n for (int i = (randRow - 2); i < (randRow + 2); i++) {\n for (int j = (randColumn - 2); j < (randColumn + 2); j++) {\n if ((tileMap[i][j].getTerrain() instanceof Grass) && (tileMap[i][j].isEmpty())) {\n randValue = (int)(Math.round(Math.random()));\n if (randValue == 0) {\n tileMap[i][j] = new Space(new Mountain(i, j)); //Create a mountain\n }\n }\n }\n }\n } while (!checkMountainCoverage());\n }",
"@Test\n public void isCollidingTestNoCollision(){\n TileMap tileMap = new TileMap(24, 24, new byte[][]{{1,1},{1,1},{1,1},{1,1}},new byte[][]{{1,1},{1,1},{1,1},{1,1}}, tilepath);\n Rect cBox = new Rect(0, 0, 0, 0);\n assertFalse(tileMap.isColliding(cBox));\n assertEquals(false, tileMap.isColliding(cBox));\n }",
"private boolean isFull() {\n for (int i = 0; i < 6; i++)\n for (int j = 0; j < 7; j++)\n if (cell[i][j] == ' ')\n return false; // At least one cell is not filled\n\n // All cells are filled\n return true;\n }",
"public boolean tileInBounds(float xTile, float yTile)\r\n/* 111: */ {\r\n/* 112:124 */ return (xTile >= 0.0F) && (xTile < getWidthInTiles()) && (yTile >= 0.0F) && (\r\n/* 113:125 */ yTile < getHeightInTiles());\r\n/* 114: */ }",
"@Override\n public void indicateValidTiles(JointMap jointMap) {\n int rangeAhead = getEntitySource().getXGrid() + getXRange();\n int rangeBehind = getEntitySource().getXGrid() - getXRange();\n int rangeDown = getEntitySource().getYGrid() + getYRange();\n int rangeUp = getEntitySource().getYGrid() - getYRange();\n\n indicateValidTileHelper(jointMap, rangeAhead, rangeBehind, rangeDown, rangeUp, false, false);\n }",
"public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n public void init() {\n Image bgImage = assets().getImage(\"images/bg.png\");\r\n ImageLayer bgLayer = graphics().createImageLayer(bgImage);\r\n graphics().rootLayer().add(bgLayer);\r\n\r\n // Create tiles\r\n tiles = new int[BOARD_MAX_WIDTH][BOARD_MAX_HEIGHT];\r\n printTiles();\r\n\r\n // Place mines at random positions\r\n int placedMines = 0;\r\n Random r = new Random();\r\n while (placedMines < MINES) {\r\n int row = r.nextInt(BOARD_MAX_WIDTH);\r\n int col = r.nextInt(BOARD_MAX_HEIGHT);\r\n if (tiles[row][col] == TILE_EMPTY) {\r\n tiles[row][col] = TILE_MINE;\r\n placedMines++;\r\n }\r\n }\r\n printTiles();\r\n\r\n // Count number of mines around blank tiles\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n // Check surrounding tiles if mine\r\n if (tiles[row][col] == TILE_MINE) {\r\n for (int rowCheck = -1; rowCheck <= 1; rowCheck++) {\r\n for (int colCheck = -1; colCheck <= 1; colCheck++) {\r\n if (tileExistAndNotMine(row+rowCheck, col+colCheck)) {\r\n tiles[row+rowCheck][col+colCheck]++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n printTiles();\r\n\r\n // Create tile map\r\n Map<Integer, TileType> tileMap = new HashMap<Integer, TileType>();\r\n tileMap.put(0, TileType.EMPTY);\r\n tileMap.put(1, TileType.ONE);\r\n tileMap.put(2, TileType.TWO);\r\n tileMap.put(3, TileType.THREE);\r\n tileMap.put(4, TileType.FOUR);\r\n tileMap.put(5, TileType.FIVE);\r\n tileMap.put(6, TileType.SIX);\r\n tileMap.put(7, TileType.SEVEN);\r\n tileMap.put(8, TileType.EIGHT);\r\n tileMap.put(9, TileType.MINE);\r\n\r\n // Create a GroupLayer to hold the sprites\r\n GroupLayer groupLayer = graphics().createGroupLayer();\r\n graphics().rootLayer().add(groupLayer);\r\n\r\n // Create graphic tiles\r\n tileList = new ArrayList<Tile>();\r\n for (int row = 0; row < BOARD_MAX_WIDTH; row++) {\r\n for (int col = 0; col < BOARD_MAX_WIDTH; col++) {\r\n Tile tile = new Tile(groupLayer, col*Tile.SIZE, row*Tile.SIZE, tileMap.get(tiles[row][col]), row, col);\r\n tileList.add(tile);\r\n }\r\n }\r\n\r\n // Timer text\r\n CanvasImage canvasImage = graphics().createImage(160, 70);\r\n timerLabel = canvasImage.canvas();\r\n ImageLayer countDownLayer = graphics().createImageLayer(canvasImage);\r\n countDownLayer.setTranslation(180, 10);\r\n graphics().rootLayer().add(countDownLayer);\r\n\r\n // Cleared tiles text\r\n CanvasImage clearedTilesImage = graphics().createImage(160, 70);\r\n clearedTilesLabel = clearedTilesImage.canvas();\r\n ImageLayer clearedTilesLayer = graphics().createImageLayer(clearedTilesImage);\r\n clearedTilesLayer.setTranslation(180, 30);\r\n graphics().rootLayer().add(clearedTilesLayer);\r\n updateClearedTiles();\r\n }",
"private void disableRestrictedTiles(int x, int y) {\n\t\tif (shipsToPlace == 3) {\n\t\t\tfor (int i = 6; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[i][j].setEnabled(false);\n\t\t\t\t\tplayerBoard[i][j].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[i][j].setName((j) + \"\" + (i) + \"f\");\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else if (shipsToPlace == 2) {\n\t\t\t// disables long ship tiles\n\t\t\tfor (int i = 0; i < 3; i++) {\n\t\t\t\tif (y - i >= 0) {\n\t\t\t\t\tfor (int j = 0; j < 5; j++) {\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[x + j][y - i].setName((x + j) + \"\" + (y - i) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disables restricted tiles\n\t\t\tfor (int i = 8; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the second ship\");\n\t\t} else if (shipsToPlace == 1) {\n\t\t\t// disable medium ship tiles\n\t\t\tif (y - 1 >= 0) {\n\t\t\t\tplayerBoard[x][y - 1].setEnabled(false);\n\t\t\t\tplayerBoard[x][y - 1].setBackground(Color.lightGray);\n\t\t\t\tplayerBoard[x][y - 1].setName(x + \"\" + (y - 1) + \"f\");\n\t\t\t}\n\t\t\tplayerBoard[x][y].setEnabled(false);\n\t\t\tplayerBoard[x][y + 1].setEnabled(false);\n\t\t\tplayerBoard[x][y + 2].setEnabled(false);\n\n\t\t\tplayerBoard[x][y].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 1].setBackground(Color.lightGray);\n\t\t\tplayerBoard[x][y + 2].setBackground(Color.lightGray);\n\n\t\t\tplayerBoard[x][y].setName(x + \"\" + y + \"f\");\n\t\t\tplayerBoard[x][y + 1].setName(x + \"\" + (y + 1) + \"f\");\n\t\t\tplayerBoard[x][y + 2].setName(x + \"\" + (y + 2) + \"f\");\n\n\t\t\t// disables long ship tiles\n\t\t\tfor (int counter1 = 0; counter1 < 2; counter1++) {\n\t\t\t\tif (longShipCoords[1] - counter1 >= 0) {\n\n\t\t\t\t\tfor (int longcount = 0; longcount < 5; longcount++) {\n\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1].setEnabled(false);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setBackground(Color.lightGray);\n\t\t\t\t\t\tplayerBoard[longShipCoords[0] + longcount][longShipCoords[1] - counter1]\n\t\t\t\t\t\t\t\t.setName((longShipCoords[0] + longcount) + \"\" + (longShipCoords[1] - counter1) + \"f\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// disable restricted tiles\n\t\t\tfor (int i = 9; i < 10; i++) {\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\tplayerBoard[j][i].setEnabled(false);\n\t\t\t\t\tplayerBoard[j][i].setBackground(Color.lightGray);\n\t\t\t\t\tplayerBoard[j][i].setName(j + \"\" + i + \"f\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatus.setText(\" Click to place the third ship\");\n\t\t} else {\n\t\t\tenableAllTiles();\n\t\t}\n\t}",
"public void checkBlankSpace() {\n\t\tif (xOffset < 0) {\n\t\t\txOffset = 0;\n\t\t} else if (xOffset > handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth()) {\n\t\t\txOffset = handler.getWorld().getWidth() * Tile.TILEWIDTH - handler.getWidth();\n\t\t}\n\t\t\n\t\tif (yOffset < 0) {\n\t\t\tyOffset = 0;\n\t\t} else if (yOffset > handler.getWorld().getHeight() * Tile.TILEHEIGHT - handler.getHeight()) {\n\t\t\tyOffset = handler.getWorld().getHeight() * Tile.TILEWIDTH - handler.getHeight();\n\t\t}\n\t}",
"private boolean checkLine(int line) {\n\t\tfor(int col = 0; col < COL_COUNT; col++) {\n\t\t\tif(!isOccupied(col, line)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//remove the line if it is filled.\n\t\tfor(int row = line - 1; row >= 0; row--) {\n\t\t\tfor(int col = 0; col < COL_COUNT; col++) {\n\t\t\t\tsetTile(col, row + 1, getTile(col, row));\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"void collide() {\n for (Target t : this.helicopterpieces) {\n if (!t.isHelicopter && ((t.x == this.player.x && t.y == this.player.y)\n || (t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected--;\n t.isCollected = true;\n }\n if (t.isHelicopter && this.collected == 1\n && ((t.x == this.player.x && t.y == this.player.y) || (t.isHelicopter\n && this.collected == 1 && t.x == this.player2.x && t.y == this.player2.y))) {\n this.collected = 0;\n this.helicopter.isCollected = true;\n }\n }\n }"
]
| [
"0.65183455",
"0.64601797",
"0.64212644",
"0.6270122",
"0.6160191",
"0.61099195",
"0.6097728",
"0.60694677",
"0.60652214",
"0.60302794",
"0.60084355",
"0.59775424",
"0.5974332",
"0.5947602",
"0.58726615",
"0.58674407",
"0.5860672",
"0.58600664",
"0.584838",
"0.58389825",
"0.58375716",
"0.58236754",
"0.5808299",
"0.58075047",
"0.57996356",
"0.57926357",
"0.5778243",
"0.5767596",
"0.57440126",
"0.5742958",
"0.5739421",
"0.57343286",
"0.57252866",
"0.57233745",
"0.5712374",
"0.56834817",
"0.56789535",
"0.5676264",
"0.56747246",
"0.56731325",
"0.5671108",
"0.565147",
"0.5635592",
"0.5634672",
"0.56330454",
"0.5628867",
"0.56285995",
"0.56178385",
"0.56131494",
"0.56048775",
"0.5600026",
"0.55938953",
"0.5583656",
"0.55758286",
"0.55746955",
"0.5564366",
"0.5560788",
"0.5558813",
"0.5548785",
"0.5546825",
"0.5533705",
"0.55332494",
"0.5526761",
"0.55264837",
"0.5522142",
"0.552045",
"0.55200773",
"0.5519612",
"0.5518265",
"0.55180687",
"0.55151343",
"0.5513438",
"0.55104923",
"0.54974145",
"0.5497177",
"0.5494482",
"0.5493813",
"0.54903024",
"0.54812706",
"0.5474307",
"0.5472177",
"0.5469188",
"0.5464094",
"0.5463632",
"0.5462682",
"0.5461939",
"0.5461599",
"0.5458921",
"0.54562694",
"0.54558283",
"0.54546887",
"0.54513264",
"0.54500073",
"0.5449311",
"0.544815",
"0.5446391",
"0.54399794",
"0.5439557",
"0.5438869",
"0.5438562"
]
| 0.75997186 | 0 |
Function called every turn | @Override
public DirType getMove(GameState state) {
if (print) System.out.println("\n\n");
this.gb.update(state); // Must be done every turn
this.findEnemySnake(); // Update Enemy Snake's head Location
this.markDangerTiles(); // Mark tiles the Enemy Snake can reach and filled
if (print) this.gb.printBoard();
if (print) System.out.println("DIVEBOMB ENTER -> Us_X: " + this.us_head_x + ", Us_Y: " + this.us_head_y + " -> " + this.us_num);
Tile target = this.diveBomb();
if (print) System.out.print("DIVEBOMB EXIT -> Target_X: " + target.getX() + " Target_Y: " + target.getY());
DirType retVal = getDir(target);
if (print) System.out.println(" Dir: " + retVal);
if (this.us_num == 0) {
System.out.println("\n\n\n");
GameBoard gb= new GameBoard(state, 1,0);
gb.update(state);
float val = USuckUnless.grade(state, this.us_num, DirType.South);
System.out.println(val);
this.gb.printBoard();
}
return retVal;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void runEachSecond() {\n \n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"@Override\n public void run() {\n systemTurn();\n }",
"private void humanTurn() \n {\n \n playTurn();\n }",
"public void teleopPeriodic() {\n Scheduler.getInstance().run();\n rumbleInYourPants();\n turnSpindleIfNeeded();\n turnWinchIfNeeded();\n if (arcadeDrive != null) \n arcadeDrive.start();\n }",
"public void onTurnBegin() {\n\n\t}",
"public void nextTurn() {\n\t\tLog.d(TAG, \"nextTurn()\");\t\t\n\t\ttickPeople();\n\t\t//doEvents();\n\t\tupdateBar();\n\t}",
"public void Turn(){\r\n \r\n }",
"void onTurn();",
"@Override\r\n\tpublic void startTurn() {\n\t\t\r\n\t}",
"protected void runEachHour() {\n \n }",
"@Override\r\n\tpublic void doTimeStep() {\n\t\tthis.run(Critter.getRandomInt(8));\r\n\t}",
"public void run() {\n\t\tdice.turnos(turn, this);\n\t}",
"@Override\n public void run() {\n computerTurn();\n }",
"public void playerTurnStart() {\n\r\n\t}",
"public void nextTurn(){\r\n removeIceAndFire();\r\n currentTurn++;\r\n }",
"@Override\n protected void execute() {\n double timePassed = Timer.getFPGATimestamp() - timePoint;\n\n boolean rumbleOver = (state == RUMBLE && timePassed > timeOn);\n boolean breakOver = (state == BREAK && timePassed > timeOff);\n\n if (rumbleOver) {\n rumble(false);\n if (repeatCount >= 0)\n repeatCount--;\n } else if (breakOver)\n rumble(true);\n }",
"@Override\n public void run() {\n computerTurn();\n }",
"public void nextTurn() {\n visionChanged = true;\n SoundPlayer.playEndTurn();\n // Check if any protection objectives have failed\n gameState.updateAllHeroProtectionGoals(getHeroManager());\n // hook the next turn\n if (!multiplayerGameManager.hookNextTurn()) {\n\n if (map.enemyPerformingMove()) {\n return;\n }\n // Enemy action was made\n if (playerTurn && map.hasEnemy()) {\n try {\n map.enemyTurn(this);\n } catch (InterruptedException e) {\n logger.error(\"ayylmao at the GameManager.nextTurn(..) Method\");\n Platform.exit();\n Thread.currentThread().interrupt();\n }\n } else {\n map.playerTurn(this);\n updateBuffIcons();\n updateTempVisiblePoints();\n map.turnTick();\n for(CurrentHeroChangeListener listener:heroChangeListeners){\n \tlistener.onHeroChange(getHeroManager().getCurrentHero());\n }\n }\n\n } else {\n moveViewTo(getHeroManager().getCurrentHero().getX(), getHeroManager().getCurrentHero().getY());\n updateBuffIcons();\n updateTempVisiblePoints();\n }\n\n map.updateVisibilityArray();\n dayNightClock.tick();\n turnTickLiveTiles();\n abilitySelected = AbilitySelected.MOVE;\n abilitySelectedChanged = true;\n backgroundChanged = true;\n gameChanged = true;\n minimapChanged = true;\n saveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n // update(this.tracker,null);\n }",
"protected void runEachMinute() {\n \n }",
"@Override\r\n\tpublic void gameLoopLogic(double time) {\n\r\n\t}",
"public void playTurn() {\r\n\r\n }",
"public void loop(){\n \n \n }",
"@Override\n public void run() {\n if (plugin.getGm().getPlayersInGame().size() < plugin.getAm().getMinPlayers()) {\n plugin.getGm().setCheckStart(true);\n plugin.getServer().getOnlinePlayers().forEach(pl -> pl.setLevel(0));\n GameState.state = GameState.LOBBY;\n cancel();\n return;\n }\n \n plugin.getGm().getPlayersInGame().stream().forEach(players -> {\n plugin.getMsg().sendActionBar(players, \"&a&lEl juego empieza en: \" + count);\n });\n\n switch (count){\n case 30:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c30 &7segundos\");\n break;\n case 5:\n GameState.state = GameState.GAME;\n plugin.getGm().getPlayersInGame().forEach(p -> {\n plugin.getAm().teleport(p);\n TntWars.getPlayer(p).setCleanPlayer(GameMode.SURVIVAL);\n });\n break;\n case 4:\n case 3:\n case 2:\n case 1:\n plugin.getMsg().sendBroadcast(\"&7El juego empezará en &c\" + count + \" &7segundos\");\n plugin.getGm().getPlayersInGame().forEach(p -> p.playSound(p.getLocation(), Sound.NOTE_PLING, 1F, 1F));\n break;\n case 0:\n plugin.getGm().setDañoEnCaida(false);\n\n //Iniciar hilo de la fase de esconder (Ja, still nope)\n new GameTask(plugin).runTaskTimer(plugin, 20, 20);\n cancel();\n break;\n }\n --count; \n }",
"public void beginTurn(){\n }",
"public void enemyTurnStart() {\n\r\n\t}",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"public void inTurn() {\n\t\tthis.timer = new Timer();\n\t\ttimer.schedule(new TimerTask() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinishTurn();\n\t\t\t}\n\t\t}, turnMaxSeconds * 1000);\n\n\t}",
"private void random() {\n\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\t\tNoteInJson[] pattern=gpt.getPattern();\r\n\t\t\t\t\t\t\t\t\t\tif(change_tempo){\r\n\t\t\t\t\t\t\t\t\t\t\tPatternMaker.changeSpeed(pattern, ratio);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tgotoPractice(pattern);\r\n\t\t\t\t\t\t\t\t\t}",
"public void run() {\n\t\tfor(int Index=0;Index<pac.getPath().size();Index++) { //run on the path arraylist of every pacman\n\t\t\tfullGamePath(pac, pac.getPath().get(Index).getFruit(),Index); //call the function\n\t\t\tpac.getPath().get(Index).setTime();\n\t\t}\n\t\t\n\t}",
"public void itsYourTurn();",
"private void start(){\n character.fillEnergy();\n piles.getDrawPile().shuffle();\n for(int i = 1 ; i <= 5 ; i++ ){\n piles.drawCard();\n }\n effectHandler.startFight();\n\n }",
"@Override\n\tpublic void turnOn() {\n\n\t}",
"public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"@Override\n public void periodic() {\n\n }",
"public void preGame() {\n\n\t}",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"public void yourTurn();",
"public void act() {\n if (System.currentTimeMillis() - lastTime > 5000) {\n lastTime = System.currentTimeMillis();\n int y = (int)(Math.random() * ((BackGround1.height-30)+1)+30);\n int x = (int)(Math.random() * ((BackGround1.width-15)+1)+15);\n addObject(new Coin(),x ,y);\n }\n }",
"protected void execute() {\n \t\n \tcurrent_time = System.currentTimeMillis();\n \t\n \tlift.liftDown(LIFT_SPEED);\n }",
"public void newTurn() {\n int[] playersAlive = GameEngine.playersAlive();\n if (playersAlive[0] > 0) {\n turnData.clear();\n Die dice = new Die();\n thrown = dice.main();\n turnOnePlayer();\n\n } else {\n GameEngine.theEnd(playersAlive[1]);\n }\n }",
"public void newTurnCountdown() {\n newTurn = true;\n newTurnTimer = 77;\n }",
"private void randomMove() {\n }",
"private void playAI (int actualAI) {\n }",
"public void run() {\r\n\t\tcount = 270;\r\n\t\twhile(!gameOver()) {\r\n\t\t\tmoveGame();\r\n\t\t}\r\n\t\tif (laser != null)\r\n\t\t\tremove(laser);\r\n\t\tdisplayResults();\r\n\t}",
"@Override\r\n public void periodic() {\n }",
"void gameStarted();",
"void gameStarted();",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"@Override\n public void periodic() {\n }",
"private void doLastTurn()\n\t{\n\t\tInteger time = turn;\n\n\t\tstartEnterScore(time);\n\t\tdisposeFrameMap();\n\n\t\ttimer.cancel();\n\t}",
"protected void runEachDay() {\n \n }",
"void provideNewTurn();",
"@Override\n\tpublic void periodic()\n\t{\n\t}"
]
| [
"0.6657651",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.66370636",
"0.65833306",
"0.6520113",
"0.6520009",
"0.64971167",
"0.64675444",
"0.6447917",
"0.64343184",
"0.64314824",
"0.642743",
"0.6414",
"0.63539076",
"0.63492954",
"0.6335789",
"0.6330833",
"0.63000435",
"0.6295097",
"0.6250425",
"0.6247214",
"0.62373567",
"0.6215283",
"0.62094456",
"0.6191076",
"0.6171359",
"0.6169474",
"0.6169474",
"0.61683476",
"0.61626124",
"0.6156875",
"0.6146748",
"0.6136036",
"0.6133248",
"0.6121323",
"0.6110829",
"0.61084956",
"0.61084956",
"0.61084956",
"0.61084956",
"0.6090513",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6088053",
"0.6083235",
"0.60797346",
"0.6076106",
"0.6074598",
"0.60726166",
"0.60464805",
"0.6042818",
"0.602993",
"0.6012643",
"0.6001937",
"0.6001937",
"0.5997861",
"0.5997861",
"0.5997861",
"0.5992764",
"0.5991848",
"0.5990042",
"0.5989676"
]
| 0.0 | -1 |
Using a tile it chooses the Dir to reach that tile, updates this.Head vars | public DirType getDir(Tile target) {
// If the target is the same as our current location, that means no targets were reachable
// We get all open tiles next to our head
if (target.getX() == this.us_head_x && target.getY() == this.us_head_y) {
if (print) System.out.println(" PANIC!!");
List<Tile> options = this.gb.panicOpenTiles(target);
// There are no open tiles next to our head
if (options.size() == 0) { // Accept Death
if (print) System.out.println(" WE DIE!");
return DirType.South;
// There are open tiles, so we find the one that results in the longest path
} else {
int longestPath = -1;
Tile newTarget = target;
// For every tile next to our head, find the longest path to a tile near us.
// TODO maybe find a better target to aim for during this panic state?
for (Tile t : options) {
this.dk.setPanicMode();
LinkedList<Tile> path = this.dk.path(target, t, gb);
this.dk.undoPanicMode();
// If a path exists, see if its longer than what we had before
// TODO the idea of going for longest might mean it's easier to circle around us and kill us
if (path == null) continue;
int pathLength = path.size();
if (this.print) System.out.println(pathLength);
if (pathLength > longestPath) {
newTarget = t;
longestPath = pathLength;
}
}
if (this.print) System.out.println();
target = newTarget;
}
}
// just use our head and target location to figure out which direction to move
int dist_x = this.us_head_x - target.getX();
int dist_y = this.us_head_y - target.getY();
assert(dist_x != 0 && dist_y != 0);
if (abs(dist_x) > abs(dist_y)) {
if (dist_x > 0) {
this.us_head_x -= 1;
return DirType.West;
} else {
this.us_head_x += 1;
return DirType.East;
}
} else if(dist_y > 0) {
this.us_head_y -= 1;
return DirType.North;
} else {
this.us_head_y += 1;
return DirType.South;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setTile(Tile tile) {\n _tile = tile;\n }",
"private void setMainTankDir() {\n Dir dir = myTank.getDir();\n\n if(!bL&&!bU&&!bR&&!bD){\n myTank.setMoving(false);\n Client.INSTANCE.send(new TankStopMsg(getMyTank()));\n }else {\n if (bL) myTank.setDir(Dir.LEFT);\n if (bU) myTank.setDir(Dir.UP);\n if (bR) myTank.setDir(Dir.RIGHT);\n if (bD) myTank.setDir(Dir.DOWN);\n if (bL && bU) myTank.setDir(Dir.LEFT_UP);\n if (bL && bD) myTank.setDir(Dir.LEFT_DOWN);\n if (bR && bU) myTank.setDir(Dir.RIGHT_UP);\n if (bR && bD) myTank.setDir(Dir.RIGHT_DOWN);\n if(!myTank.isMoving())\n Client.INSTANCE.send(new TankStartMovingMsg(getMyTank()));\n myTank.setMoving(true);\n\n if(dir != myTank.getDir()) {\n Client.INSTANCE.send(new TankDirChangedMsg(myTank));\n }\n }\n }",
"private void move() {\n System.out.println(\"current dir= \" + head.dir);\n addToHead();\n deleteFromTail();\n }",
"public void setTile(Tile tile) {\n\t\tthis.tile = tile;\n\t}",
"public void setNext(Tile next){\n\t\tthis.next=next;\n\t}",
"protected abstract void setTile( int tile, int x, int y );",
"void setPosition(Tile t);",
"TileItem getCurrentTile();",
"public void initTiles() {\n\t\ttileList.add(new Go());\n\n\t\t// Brown properties\n\t\tProperty mediterranean = new Property(\"Mediterranean\");\n\t\tProperty balticAve = new Property(\"Baltic Avenue\");\n\n\t\t// Light blue properties\n\t\tProperty orientalAve = new Property(\"Oriental Avenue\");\n\t\tProperty vermontAve = new Property(\"Vermont Avenue\");\n\t\tProperty connecticutAve = new Property(\"Connecticut Avenue\");\n\n\t\t// Magenta properties\n\t\tProperty stCharles = new Property(\"St. Charles Place\");\n\t\tProperty statesAve = new Property(\"States Avenue\");\n\t\tProperty virginiaAve = new Property(\"Virginia Avenue\");\n\n\t\t// Orange properties\n\t\tProperty stJames = new Property(\"St. James Place\");\n\t\tProperty tennesseeAve = new Property(\"Tennessee Avenue\");\n\t\tProperty newYorkAve = new Property(\"New York Avenue\");\n\n\t\t// Red properties\n\t\tProperty kentuckyAve = new Property(\"Kentucky Avenue\");\n\t\tProperty indianaAve = new Property(\"Indiana Avenue\");\n\t\tProperty illinoisAve = new Property(\"Illinois Avenue\");\n\n\t\t// Yellow Properties\n\t\tProperty atlanticAve = new Property(\"Atlantic Avenue\");\n\t\tProperty ventnorAve = new Property(\"Ventnor Avenue\");\n\t\tProperty marvinGard = new Property(\"Marvin Gardins\");\n\n\t\t// Green Properties\n\t\tProperty pacificAve = new Property(\"Pacific Avenue\");\n\t\tProperty northCar = new Property(\"North Carolina Avenue\");\n\t\tProperty pennsylvannia = new Property(\"Pennsylvania Avenue\");\n\n\t\t// Dark blue properties\n\t\tProperty parkPlace = new Property(\"Park Place\");\n\t\tProperty boardWalk = new Property(\"Boardwalk\");\n\n\t\t// Tax tiles\n\t\tTaxTile incomeTax = new TaxTile(\"Income Tax\", 200);\n\t\tTaxTile luxuryTax = new TaxTile(\"Luxury Tax\", 100);\n\n\t\t// Utilities\n\t\tUtility electric = new Utility(\"Electric Company\");\n\t\tUtility water = new Utility(\"Water Works\");\n\n\t\t// Railroads\n\t\tRailroad reading = new Railroad(\"Reading\");\n\t\tRailroad pennRail = new Railroad(\"Pennsylvania\");\n\t\tRailroad bno = new Railroad(\"B & O\");\n\t\tRailroad shortLine = new Railroad(\"Short Line\");\n\n\t\t// Chance and community chest\n\t\tChance chance = new Chance();\n\t\tCommunity chest = new Community();\n\n\t\t// Adds the properties by color in accordance with their position on the board\n\t\t// adds color + placement of piece to a list of their respective colors\n\t\tbrown.add(1);\n\t\tbrown.add(3);\n\t\trailroads.add(5);\n\t\tlightBlue.add(6);\n\t\tlightBlue.add(8);\n\t\tlightBlue.add(9);\n\t\tmagenta.add(11);\n\t\tutilities.add(12);\n\t\tmagenta.add(13);\n\t\tmagenta.add(14);\n\t\trailroads.add(15);\n\t\torange.add(16);\n\t\torange.add(18);\n\t\torange.add(19);\n\t\tred.add(21);\n\t\tred.add(23);\n\t\tred.add(24);\n\t\trailroads.add(25);\n\t\tyellow.add(26);\n\t\tyellow.add(27);\n\t\tutilities.add(28);\n\t\tyellow.add(29);\n\t\tgreen.add(31);\n\t\tgreen.add(32);\n\t\tgreen.add(34);\n\t\trailroads.add(35);\n\t\tdarkBlue.add(37);\n\t\tdarkBlue.add(39);\n\n\t\t// tileList is the list of tiles of the board where each tile is representative of a place on the board\n\t\t// adds each tile is chronological order beginning of the board \"go\"\n\t\t//this list includes: properties, taxes, railroads, chance, community chest\n\t\t\n\t\ttileList.add(new Go());\n\n\t\ttileList.add(mediterranean);\n\t\ttileList.add(chest);\n\t\ttileList.add(balticAve);\n\t\ttileList.add(incomeTax);\n\t\ttileList.add(reading);\n\t\ttileList.add(orientalAve);\n\t\ttileList.add(chance);\t\n\t\ttileList.add(vermontAve);\n\t\ttileList.add(connecticutAve);\n\n\t\ttileList.add(new Jail());\n\t\t\t\n\t\ttileList.add(stCharles);\n\t\ttileList.add(electric);\t\t\t\n\t\ttileList.add(statesAve);\t\t\t\n\t\ttileList.add(virginiaAve);\n\t\ttileList.add(pennRail);\n\t\ttileList.add(stJames);\t\n\t\ttileList.add(chest);\n\t\ttileList.add(tennesseeAve);\t\t\t\n\t\ttileList.add(newYorkAve);\n\n\t\ttileList.add(new FreeParking());\n\t\t\t\n\t\ttileList.add(kentuckyAve);\t\t\n\t\ttileList.add(chance);\t\n\t\ttileList.add(indianaAve);\t\t\t\n\t\ttileList.add(illinoisAve);\n\t\ttileList.add(bno);\n\t\ttileList.add(atlanticAve);\t\t\t\n\t\ttileList.add(ventnorAve);\n\t\ttileList.add(water);\n\t\ttileList.add(marvinGard);\n\n\t\ttileList.add(new GoToJail());\n\t\t\t\t\t\n\t\ttileList.add(pacificAve);\t\t\t\n\t\ttileList.add(northCar);\n\t\ttileList.add(chest);\t\t\t\n\t\ttileList.add(pennsylvannia);\n\t\ttileList.add(shortLine);\n\t\ttileList.add(chance);\n\t\ttileList.add(parkPlace);\n\t\ttileList.add(luxuryTax);\n\t\ttileList.add(boardWalk);\n\t}",
"public void setPath(Tile path) {\n\t\tthis.path = path;\n\t}",
"File getTilePathBase();",
"private void addToHead() {\n Node currentNode = null;\n switch (head.dir) {\n case LEFT:\n currentNode = new Node(head.row - 1, head.col, head.dir);\n break;\n case RIGHT:\n currentNode = new Node(head.row + 1, head.col, head.dir);\n break;\n case UP:\n currentNode = new Node(head.row, head.col - 1, head.dir);\n break;\n case DOWN:\n currentNode = new Node(head.row, head.col + 1, head.dir);\n break;\n }\n currentNode.next = head;\n head.pre = currentNode;\n head = currentNode;\n size++;\n }",
"private void move() {\n\t\t\tx += Math.PI/12;\n\t\t\thead.locY = intensity * Math.cos(x) + centerY;\n\t\t\thead.yaw = spinYaw(head.yaw, 3f);\n\t\t\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, head.getId(), \n\t\t\t\tnew Location(player.getWorld(), head.locX, head.locY, head.locZ, head.yaw, 0));\n\t\t}",
"private void tileViewUpdate(TileView tv) {\n\n\t\tswapTileWithBlank(tv);\n\n\t\t// int i = 0;\n\t\t// for (Tile tile : tiles) {\n\t\t// Log.v(\"log_tag\", \"current location= \" + (i++) + \" \"\n\t\t// + tile.getCurrentLocation());\n\t\t// }\n\n\t}",
"public void addTileOnBeginning(Tile tile);",
"public void initTiles()\n {\n PropertiesManager props = PropertiesManager.getPropertiesManager(); \n String imgPath = props.getProperty(MahjongSolitairePropertyType.IMG_PATH);\n int spriteTypeID = 0;\n SpriteType sT;\n \n // WE'LL RENDER ALL THE TILES ON TOP OF THE BLANK TILE\n String blankTileFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_IMAGE_NAME);\n BufferedImage blankTileImage = miniGame.loadImageWithColorKey(imgPath + blankTileFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileImage(blankTileImage);\n \n // THIS IS A HIGHLIGHTED BLANK TILE FOR WHEN THE PLAYER SELECTS ONE\n String blankTileSelectedFileName = props.getProperty(MahjongSolitairePropertyType.BLANK_TILE_SELECTED_IMAGE_NAME);\n BufferedImage blankTileSelectedImage = miniGame.loadImageWithColorKey(imgPath + blankTileSelectedFileName, COLOR_KEY);\n ((MahjongSolitairePanel)(miniGame.getCanvas())).setBlankTileSelectedImage(blankTileSelectedImage);\n \n // FIRST THE TYPE A TILES, OF WHICH THERE IS ONLY ONE OF EACH\n // THIS IS ANALOGOUS TO THE SEASON TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeATiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_A_TILES);\n for (int i = 0; i < typeATiles.size(); i++)\n {\n String imgFile = imgPath + typeATiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_A_TYPE);\n spriteTypeID++;\n }\n \n // THEN THE TYPE B TILES, WHICH ALSO ONLY HAVE ONE OF EACH\n // THIS IS ANALOGOUS TO THE FLOWER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeBTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_B_TILES);\n for (int i = 0; i < typeBTiles.size(); i++)\n {\n String imgFile = imgPath + typeBTiles.get(i); \n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID);\n initTile(sT, TILE_B_TYPE);\n spriteTypeID++;\n }\n \n // AND THEN TYPE C, FOR WHICH THERE ARE 4 OF EACH \n // THIS IS ANALOGOUS TO THE CHARACTER AND NUMBER TILES IN FLAVORLESS MAHJONG\n ArrayList<String> typeCTiles = props.getPropertyOptionsList(MahjongSolitairePropertyType.TYPE_C_TILES);\n for (int i = 0; i < typeCTiles.size(); i++)\n {\n String imgFile = imgPath + typeCTiles.get(i);\n sT = initTileSpriteType(imgFile, TILE_SPRITE_TYPE_PREFIX + spriteTypeID); \n for (int j = 0; j < 4; j++)\n {\n initTile(sT, TILE_C_TYPE);\n }\n spriteTypeID++;\n }\n }",
"public void changeHeadState() {\n //tracking the head with the player\n if(moveUp && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveUp && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveDown && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown || shootDown || (!moving && !shooting && this.getPicY() == 0)){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((moveUp || (shootUp && moveUp))|| (!moving && this.getPicY() == 211)){\n playerHead.setxPos(this.getxPos()+9);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((!moving && shootUp && this.getPicY() == 0) ){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if(shootLeft && moveRight || shootLeft){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveLeft ||(!moving && !shooting && this.getPicY() == 141)){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveRight||(shootRight && !moving)||(shootRight && moveRight)||(!moving && !shooting && this.getPicY() == 74)){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n else if(shootUp && !moving){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n //left right and shooting up\n \n //head faces the direction of the player while moving\n if (moveDown && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveDown && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveUp && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveUp && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveDown) {\n playerHead.setPicX(102);//down\n } else if (moveUp) {\n playerHead.setPicX(158);//up\n } else if (moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveLeft) {\n playerHead.setPicX(0);//left\n }\n\n //head faces the direction of shooting while moving or standing in place\n if (shootDown) {\n playerHead.setPicX(102);\n } else if (shootUp) {\n playerHead.setPicX(158);\n } else if (shootRight) {\n playerHead.setPicX(52);\n } else if (shootLeft) {\n playerHead.setPicX(0);\n }\n\n if (shootLeft && shootRight) {\n playerHead.setPicX(52);//right\n } else if (shootUp && shootDown) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootRight) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootLeft) {\n playerHead.setPicX(102);//down\n } else if (shootUp && shootRight) {\n playerHead.setPicX(158);//up\n } else if (shootUp && shootLeft) {\n playerHead.setPicX(158);//up\n }\n\n if (!moving && !shooting) {\n if (this.getPicY() == 0) {\n playerHead.setPicX(102);//down\n } else if (this.getPicY() == 211) {\n playerHead.setPicX(158);//up\n } else if (this.getPicY() == 74) {\n playerHead.setPicX(52);//right\n } else if (this.getPicY() == 141) {\n playerHead.setPicX(0);//left\n }\n }\n }",
"public Tile getTile() { return tile; }",
"private void fetchTile() {\n\t\t\tif (tile.getRequest().isCancelled() || tile.isFinal()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tMapSource source = tile.getRequest().getSource();\n\t\t\tProjObj proj = tile.getRequest().getProjection();\n\t\t\tfinal int ppd = tile.getRequest().getPPD();\n\t\t\t\n\t\t\tfor (int fuzzyPPD = ppd/2 ; fuzzyPPD > 1 ; fuzzyPPD /= 2){\t\t\t\t\n\t\t\t\tint ratio = ppd / fuzzyPPD;\n\t\t\t\t\n\t\t\t\t// A tile has 256 pixels on a side.\n\t\t\t\t// Using this method, we can't upscale data to be fuzzy if it's more than 256 times larger \n\t\t\t\t// than the area we are looking to fill. Upscaling data more than 16 times seems unlikely to provide\n\t\t\t\t// any real benefit to the user, so we will quit our search at this point\n\t\t\t\tif (ratio>16) break;\n\t\t\t\t\n\t\t\t\tString tileName = CacheManager.getTileName(\n\t\t\t\t\tsource.getName(), proj, fuzzyPPD,\n\t\t\t\t\ttile.getXtile()/ratio, tile.getYtile()/ratio,\n\t\t\t\t\tsource.hasNumericKeyword());\n\t\t\t\t\n\t\t\t\tBufferedImage tileImage = CacheManager.getTile(source, tileName);\n\t\t\t\t\n\t\t\t\tif (tileImage==null) {\t\t\t\t\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint xtileindex = tile.getXtile() % ratio;\n\t\t\t\tint ytileindex = ratio - (tile.getYtile() % ratio) - 1;\n\t\t\t\t\n\t\t\t\tdouble fuzzyxstep = MapRetriever.tiler.getPixelWidth() / ratio;\n\t\t\t\tdouble fuzzyystep = MapRetriever.tiler.getPixelHeight() / ratio;\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\ttileImage = tileImage.getSubimage((int)(xtileindex * fuzzyxstep), (int)(ytileindex * fuzzyystep), (int)fuzzyxstep, (int)fuzzyystep);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog(e);\n\t\t\t\t\tlog(\"xtileindex:\"+xtileindex+\" fuzzyxstep:\"+fuzzyxstep+\" ytileindex:\"+ytileindex+\" fuzzyystep:\"+fuzzyystep);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong outputImageSize = (tileImage.getWidth()*ratio)*(tileImage.getHeight()*ratio);\n\t\t\t\tif (outputImageSize <= 0 || outputImageSize > Integer.MAX_VALUE){\n\t\t\t\t\tlog(\"Scaling tile from \"+fuzzyPPD+\" to \"+ppd+\" will result in image size overflow.\"+\n\t\t\t\t\t\t\t\" Stopping further search for lower PPDs for this tile.\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttileImage = CacheManager.scaleImage(tileImage, ratio);\n\t\t\t\t\n\t\t\t\tmyRetriever.fuzzyResponse(tile, tileImage);\n\t\t\t}\t\t\t\t\t\t\n\t\t}",
"TileDirectoryExtended(GvrsFileSpecification spec) {\n this.nRowsOfTiles = spec.nRowsOfTiles;\n this.nColsOfTiles = spec.nColsOfTiles;\n }",
"public void nextTile() {\n/* 779 */ this.e.nextTile();\n/* 780 */ this.k = getTileIdx();\n/* */ \n/* */ \n/* 783 */ String str = (String)this.f.f(this.k);\n/* 784 */ if (str.equals(\"none\")) {\n/* 785 */ this.h = 0;\n/* */ }\n/* 787 */ else if (str.equals(\"rct\")) {\n/* 788 */ this.h = 1;\n/* 789 */ c();\n/* */ }\n/* 791 */ else if (str.equals(\"ict\")) {\n/* 792 */ this.h = 2;\n/* 793 */ d();\n/* */ } else {\n/* */ \n/* 796 */ throw new IllegalArgumentException(\"Component transformation not recognized\");\n/* */ } \n/* */ }",
"public Tile getTile() {\n return tile;\n }",
"public Tile getTile() {\n return tile;\n }",
"@Override\n\tpublic boolean step(Tile newTile) {\n\t\tif(newTile==null) return false;\n\t\tTile temp=tile;\n\n\t\tboolean success = newTile.receiveAnimal(this); //NULLPTR\n\t\tif(success) {\n\t\t\ttile.removePandaFromNeighborSubbedPandas(this); //Panda eltavolitasa a szomszedokrol.\n\t\t\tsubbedTiles.clear(); //Panda feliratkozasainak torlese\n\t\t\tfor(Tile newTileNeighbor:newTile.getNeighbors()) {\n\t\t\t\tif(map.getSpecificTiles(hatesEntity).contains(newTileNeighbor)) {\n\t\t\t\t\taddSubbedTile(newTileNeighbor); //Az uj helyen szomszedok felirasa pandara\n\t\t\t\t\tnewTileNeighbor.addSubbedPanda(this); //Az uj helyen szomszedokra feliratkozasok\n\t\t\t\t}\n\t\t\t}\n\t\t\t//animate(temp,newTile);\n\t\t\tif(isFollowedBy())\n\t\t\t\tfollowedBy.step(temp);\n\t\t}\n\n\t\treturn success;\n\t}",
"public void updateDHT(Packet packet) {\r\n\t\t// If there are neighbors, insert file search for peer to enter the file into their DHT\r\n\t\tif(peerNode.peerList.size() >= 2) {\r\n\t\t\ttry {\r\n\t\t\t\tpeerNode.findPeer(peerNode);\r\n\t\t\t\t// Create Packet\r\n\t\t\t\tPacket insertPacket = new Packet();\r\n\t\t\t\tinsertPacket.eventCode = 2;\r\n\t\t\t\tinsertPacket.packetSenderID = peerNode.peerClientID;\r\n\t\t\t\tinsertPacket.peerClientIP = peerNode.peerClientIP;\r\n\t\t\t\tinsertPacket.peerClientListenPort = peerNode.peerClientListenPort;\r\n\t\t\t\tinsertPacket.fileName = packet.fileName.toLowerCase();\r\n\t\t\t\tinsertPacket.packetRecipientID = peerNode.succPeerID;\r\n\t\t\t\t\r\n\t\t\t\tpeerNode.peer2Peer = new Socket(peerNode.succPeerIP, peerNode.succPeerPort);\r\n\t\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\t\r\n\t\t\t\tpeerNode.peer2PeerOutStream.writeObject(insertPacket);\r\n\t\t\t\t\r\n\t\t\t\tcloseConnection();\r\n\t\t\t\t\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Check if there are any neighboring peers and if not, enter into own DHT\r\n\t\telse {\r\n\t\t\tArrayList<InetSocketAddress> fileLocationList = new ArrayList<InetSocketAddress>();\r\n\t\t\tInetSocketAddress fileLocation = new InetSocketAddress(peerNode.peerClientIP, peerNode.peerClientListenPort);\r\n\t\t\tjava.util.Date date = new java.util.Date();\r\n\t\t\tif(peerNode.distributedHashTable.containsKey(packet.fileName)) {\r\n\t\t\t\tpeerNode.distributedHashTable.get(packet.fileName).add(fileLocation);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tfileLocationList.add(fileLocation);\r\n\t\t\t\tpeerNode.distributedHashTable.put(packet.fileName, fileLocationList);\r\n\t\t\t\tSystem.out.println(date + \": Entered file: \" + packet.fileName + \" into Distributed Hash Table\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private synchronized void doSetWiperTiles()\n {\n // Setup tiling paths\n if((bWiperAvailable) && (bNetworkPvdEnabled != true))\n {\n // create the XPS instance, passing in our Context\n if (Config.LOGV) Log.v(TAG,\"Wiper Setting Tiles\");\n\n if((null==szUsername) ||(null==szRealm))\n {\n Log.e(TAG,\"Username /Realm not set\");\n bWiperAvailable = false;\n }\n }\n else\n {\n if(Config.LOGD) Log.d(TAG,\"Skip Tile Setup\");\n }\n }",
"@Override\n\tpublic void move(){\n\t\tSector tail = null;\n\t\tif(hit){\n\t\t\ttail = getNext();\n\t\t\tif(tail == null){\t\n\t\t\t\tselfDestruct();\n\t\t\t} else {\t\t\n\t\t\t\tsector.setInhabitant(null);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tsectors.add(sector);\n\t\tSector nextSector = quadrant.getNext(sector, velocity[0]);\t\n\t\tif(nextSector == null){\n\t\t\thit = true;\n\t\t} else {\n\t\t\tSpaceObject object = nextSector.getInhabitant();\n\t\t\tif(object != null) {\n\t\t\t\tobject.bump(this);\n\t\t\t} else {\n\t\t\t\tsetSector(nextSector); \n\t\t\t}\n\t\t} \n\t}",
"private Tile getLaserTarget(Tile tile, Direction direction) {\n if (isOccupied(tile) || wallCollision(tile, direction) || outOfBounds(tile, direction)) {\n return tile;\n } else {\n return getLaserTarget(getNextTile(tile, direction), direction);\n }\n }",
"private void addNewHead() {\t\t\n\t\tif(currentDirection == Direction.RIGHT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() + SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(),\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.RIGHT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.LEFT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() - SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(), \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.LEFT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.DOWN) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()+SnakeComponent.imageSize, \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.DOWN;\n\t\t\t\n\t\t} else if(currentDirection == Direction.UP) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()-SnakeComponent.imageSize,\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.UP;\n\t\t}\n\t}",
"@Override\n\tprotected void updateTiles() {\n\n\t\tfinal byte tileId = getPlanetType().mainTileId;\n\n\t\tfor (int i = 0; i < tiles.length; i++) {\n\t\t\t// if (random.NextDouble() > 0.95f)\n\t\t\t// tiles[i] = 0;\n\t\t\t// else\n\t\t\ttiles[i] = tileId;\n\t\t}\n\t}",
"protected void setTile( Tile[] tiles, int x, int y, Tile tile ) {\n tiles[ (y * getHeightInTiles()) + x ] = tile;\n }",
"void Setup(int type){\r\n\t\t/*Rock Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\tif (id == 1){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = 0.0f*Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = -2f/64f*Tile.TILEHEIGHT;\r\n\t\t\tthis.width = Tile.TILEWIDTH;\r\n\t\t\tthis.height = Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int)((4f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int)((15f / 64f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((56f / 64f) * Tile.TILEWIDTH) ;\r\n\t\t\tbounds.height = (int)((36f / 64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/*Tree Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 2){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = (-2 + 9f/64f) * Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-3 - 32f/64f) * Tile.TILEHEIGHT;\r\n\t\t\tthis.width = 5*Tile.TILEWIDTH;\r\n\t\t\tthis.height = 5*Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int) ((128f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int) ((240f/64f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((48f /64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((48f/64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/*Table Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 3){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = (9f/64f - .2f) * Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-40f/64f) * Tile.TILEHEIGHT;\r\n\t\t\tthis.width = 1.f*Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2.10f*Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int) (Tile.TILEHEIGHT/5.3f);\r\n\t\t\tbounds.y = (int) (.75*Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((48f /64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((48f/64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/*Toilet Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 4){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = (13f/64f - .2f) * Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-70f/64f) * Tile.TILEHEIGHT;\r\n\t\t\tthis.width = 1.f*Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2.10f*Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int) (Tile.TILEHEIGHT/5.65f);\r\n\t\t\tbounds.y = (int) (1.3*Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((48f /64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((48f/64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/*Chair Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 5){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = (13f/64f - .2f) * Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-70f/64f) * Tile.TILEHEIGHT;\r\n\t\t\tthis.width = Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2*Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int) (Tile.TILEHEIGHT/5.65f);\r\n\t\t\tbounds.y = (int) (1.3*Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((48f /64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((48f/64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/*Bush Specific*/\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 6){\r\n\t\t\t/*Tile centering*/\r\n\t\t\tthis.xoffset = (13f/64f - .6f) * Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-70f/64f) * Tile.TILEHEIGHT;\r\n\t\t\tthis.width = 2*Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2*Tile.TILEHEIGHT;\r\n\t\t\t/*Bounds*/\r\n\t\t\tbounds.x = (int) (.55f*Tile.TILEHEIGHT);\r\n\t\t\tbounds.y = (int) (1.5*Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int)((48f /64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((40f/64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/* Sunflower Specific */\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 7) {\r\n\t\t\t/* Tile centering */\r\n\t\t\tthis.xoffset = (-.1f)*Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-.2f - 32f / 64f) * Tile.TILEHEIGHT ;\r\n\t\t\tthis.width = 1.5f * Tile.TILEWIDTH;\r\n\t\t\tthis.height = 1.5f * Tile.TILEHEIGHT;\r\n\t\t\t/* Bounds */\r\n\t\t\tbounds.x = (int) ((32f / 64f ) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int) ((32f / 64f + .6f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int) ((32f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((32f / 64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/* Pumpkin Specific */\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 8) {\r\n\t\t\t/* Tile centering */\r\n\t\t\tthis.xoffset = (-.85f)*Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-144f / 64f +.4f) * Tile.TILEHEIGHT ;\r\n\t\t\tthis.width = 2.75f * Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2.75f * Tile.TILEHEIGHT;\r\n\t\t\t/* Bounds */\r\n\t\t\tbounds.x = (int) ((64f / 64f -.1f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int) ((140f / 64f-.3f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int) ((64f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((64f / 64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/* Watermelon Specific */\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 9) {\r\n\t\t\t/* Tile centering */\r\n\t\t\tthis.xoffset = (-.85f)*Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-144f / 64f +.4f) * Tile.TILEHEIGHT ;\r\n\t\t\tthis.width = 2.75f * Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2.75f * Tile.TILEHEIGHT;\r\n\t\t\t/* Bounds */\r\n\t\t\tbounds.x = (int) ((64f / 64f -.1f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int) ((140f / 64f-.3f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int) ((64f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((64f / 64f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\t/* Corn Specific */\r\n\t\t/*----------------------------------------------------------------------------------*/\r\n\t\telse if (id == 10) {\r\n\t\t\t/* Tile centering */\r\n\t\t\tthis.xoffset = (-.45f)*Tile.TILEWIDTH;\r\n\t\t\tthis.yoffset = (-80f / 64f ) * Tile.TILEHEIGHT ;\r\n\t\t\tthis.width = 2f * Tile.TILEWIDTH;\r\n\t\t\tthis.height = 2f * Tile.TILEHEIGHT;\r\n\t\t\t/* Bounds */\r\n\t\t\tbounds.x = (int) ((64f / 64f -.3f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.y = (int) ((80f / 64f +.1f) * Tile.TILEHEIGHT);\r\n\t\t\tbounds.width = (int) ((32f / 64f) * Tile.TILEWIDTH);\r\n\t\t\tbounds.height = (int) ((64f / 64f - .2f) * Tile.TILEHEIGHT);\r\n\t\t}\r\n\t\t/*----------------------------------------------------------------------------------*/\t\r\n\t}",
"public void setSelectedTile(TileEnum tile) {\n selectedTile = tile;\n }",
"public void setTile(int x, int y) {\n/* 748 */ this.e.setTile(x, y);\n/* 749 */ this.k = getTileIdx();\n/* */ \n/* */ \n/* 752 */ String str = (String)this.f.f(this.k);\n/* 753 */ if (str.equals(\"none\")) {\n/* 754 */ this.h = 0;\n/* */ }\n/* 756 */ else if (str.equals(\"rct\")) {\n/* 757 */ this.h = 1;\n/* 758 */ c();\n/* */ }\n/* 760 */ else if (str.equals(\"ict\")) {\n/* 761 */ this.h = 2;\n/* 762 */ d();\n/* */ } else {\n/* */ \n/* 765 */ throw new IllegalArgumentException(\"Component transformation not recognized\");\n/* */ } \n/* */ }",
"@Override\r\n public void onTileAdded() {\r\n super.onTileAdded();\r\n //Log.d(TAG, \"on tile added running\");\r\n initTileState();\r\n }",
"public void updateOpenTiles(){\r\n\t\tthis.openTiles = getOpenTiles() - 1;\r\n\t}",
"public void addTile(Tile tile) {\n ownedTiles.add(tile);\n }",
"@Override\n\tpublic void move() {\n\t\tCoordinate currPos = new Coordinate(control.getPosition());\n\t\t\n\t\t// if we have enough packages head to the exit\n\t\tif (control.numParcels() <= control.numParcelsFound()) {\n\t\t\t// if we don't have a path to the exit\n\t\t\tif (control.currentPath == null || !control.isHeadingToFinish) {\t\n\t\t\t\t// find path to exit\n\t\t\t\tArrayList<Coordinate> tempPath = null;\n\t\t\t\t// See if there's a path without needing to go through hazards\n\t\t\t\ttempPath = control.findPath(currPos, control.finish.get(0), control.hazardsMap.keySet());\n\t\t\t\tSet<Coordinate> tempHazards = new HashSet<>(control.hazardsMap.keySet());\n\t\t\t\t// If no path without going through hazards, just go through them\n\t\t\t\tif (tempPath == null || tempPath.size() == 0) {\n\t\t\t\t\tfor (Coordinate coord : control.hazardsMap.keySet()) {\n\t\t\t\t\t\ttempHazards.remove(coord);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If it's a valid map, there should be a path now\n\t\t\t\tcontrol.setPath(control.findPath(currPos, control.finish.get(0), tempHazards));\n\t\n\t\t\t\tcontrol.isHeadingToFinish = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\theadTowardsPackages(currPos);\n\t\t\n\t\texploreUnseenMap(currPos);\n\t\t\n\t\tMapTile currTile = control.getView().get(currPos);\n\t\tboolean isHealth = false;\n\t\tif (currTile.getType() == MapTile.Type.TRAP) {\n\t\t\tTrapTile trap = (TrapTile) currTile;\n\t\t\tif (trap.getTrap().equals(\"health\")) {\n\t\t\t\tisHealth = true;\n\t\t\t}\n\t\t}\n\t\tif (isHealth && (control.getHealth() < HEALTH_TRAP_THRESHOLD)) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t} else {\n\t\t\tisHealth = false;\n\t\t\tcontrol.moveTowards(control.dest);\n\t\t}\n\t\t\n\t}",
"public void setCellToPath(int pos){//how to check for the end???\n\t\t\n\t\tif(pos<0||pos>width*height-1||getCompletePath())\n\t\t\treturn;// the position entered is not valid or the path has already been completed\n\t\t\n\t\telse if(temp.isEmpty()){//no path tile have been defined\n\t\t\tif(currentPos<0){//start hasn't been placed\t\t\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\n\t\t\t\tsetEntryPoint(currentPath);\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tint d = currentPath.getDirection(pos);\n\t\t\t\tif (d<0||d>=4)\n\t\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\tPathType type =Map.createPathTileOfType(d, caseEdge);\n\t\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\t\n\t\t\t\t//fix direction of tile\n\t\t\t\tif(p.getEntry()==pos)\n\t\t\t\t\tp.rotate();\n\t\t\t\t//validate spot (for entry/exit)\n\t\t\t\t\n\t\t\t\t//set as Path entry point \n\t\t\t\tp.setStart();\n\t\t\t\tsetEntryPoint(p);\n\t\t\t\t\n\t\t\t\t//add to grid and list\n\t\t\t\tp.storePathTile();\n\n\t\t\t\t//update current\n\t\t\t\tcurrentPos=pos;\n\t\t\t\tcurrentPath=new Path(currentPos);\t\t\n\t\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t\t}\t\t\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\tif (getGrid(pos/width, pos%width)!=null)\n\t\t\t\tif(getGrid(pos/width, pos%width).isPath())\n\t\t\t\t\treturn;//causes intersection\n\t\t\t\n\t\t\tint dExit = currentPath.getDirection(pos);\n\t\t\tint lastPos= temp.peekLast().getPos();\n\t\t\tint dEntry= currentPath.getDirection(lastPos);\n\n\t\t\t\n\t\t\tif (dExit<0||dExit>3||dEntry<0||dEntry>3)\n\t\t\t\treturn; //the two tiles are not connected\n\t\t\t\n\t\t\t\n\t\t\tPathType type =Map.createPathTileOfType(dExit,dEntry);\n\t\t\tPath p =PathFactory.makePath(type, currentPos);\n\t\t\t\n\t\t\t//fix direction of tile\n\t\t\tif(p.getEntry()==pos)\n\t\t\t\tp.rotate();\n\t\t\t\n\t\t\tif(!inValidSpot(p))\n\t\t\t\treturn; //\n\t\t\t\n\t\t\t//add to grid and list\n\t\t\tp.storePathTile();\n\t\t\t\n\t\t\t//update current\n\t\t\tcurrentPos=pos;\n\t\t\tcurrentPath=new Path(currentPos);\t\n\t\t\tsetGrid(currentPath.getRow(),currentPath.getCol(),currentPath);\n\t\t}\n\t}",
"@JsonIgnore\n\tpublic void setPositionByTile(Tile tile) {\n\t\tposition = new Position(tile.getXpos(),tile.getYpos(),tile.getTilex(),tile.getTiley());\n\t}",
"public void setAdjacent()\r\n {\n \t\r\n adjacentTiles = new Tile[6];\r\n \r\n \r\n //Driver.map[VERT][HOR]\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos > 1) //topleft\r\n {\r\n \ttopLeft = Driver.map[verticalPos + 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \ttopLeft = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length - 2) //top\r\n {\r\n \ttop = Driver.map[verticalPos + 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \ttop = null;\r\n }\r\n \r\n if(verticalPos < Driver.map.length && horizontalPos < Driver.map[0].length) //topright\r\n {\r\n \ttopRight = Driver.map[verticalPos + 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \ttopRight = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos < Driver.map[0].length) //bottomright\r\n {\r\n \tbottomRight = Driver.map[verticalPos - 1][horizontalPos + 1];\r\n }\r\n else\r\n {\r\n \tbottomRight = null;\r\n }\r\n \r\n if(verticalPos > 2) //bottom\r\n {\r\n \tbottom = Driver.map[verticalPos - 2][horizontalPos];\r\n }\r\n else\r\n {\r\n \tbottom = null;\r\n }\r\n \r\n if(verticalPos > 1 && horizontalPos > 1) //botttomLeft\r\n {\r\n \tbottomLeft = Driver.map[verticalPos - 1][horizontalPos - 1];\r\n }\r\n else\r\n {\r\n \tbottomLeft = null;\r\n }\r\n \t\r\n \r\n adjacentTiles[0] = topLeft;\r\n adjacentTiles[1] = top;\r\n adjacentTiles[2] = topRight;\r\n adjacentTiles[3] = bottomRight;\r\n adjacentTiles[4] = bottom;\r\n adjacentTiles[5] = bottomLeft;\r\n \r\n \r\n// System.out.print(\"main tile \" + getHor() + \", \" + getVert() + \" \");\r\n// for(int i = 0; i < adjacentTiles.length; i++)\r\n// {\r\n// \tif( adjacentTiles[i] != null)\r\n// \t\tSystem.out.print(adjacentTiles[i].getHor() + \", \" + adjacentTiles[i].getVert() + \" | \");\r\n// \telse\r\n// \t\tSystem.out.print(\"null \");\r\n// }\r\n// System.out.println();\r\n \r\n }",
"public void moveTileForward()\n {\n if(!(activeTile+1 > tiles.length-1) && tiles[activeTile+1] != null)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile+1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile+1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile+1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile+1].getEndColor());\n \n tiles[activeTile+1].setTileLevel(tiles[activeTile+1].getTileLevel()-1);\n tiles[activeTile] = tiles[activeTile+1];\n previews[activeTile] = previews[activeTile+1];\n previewGradients[activeTile] = previewGradients[activeTile+1];\n previewHover[activeTile] = previewHover[activeTile+1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()+1);\n tiles[activeTile+1] = tmpTile;\n tiles[activeTile+1].setStartColor(tiles[activeTile+1].getStartColor());\n previews[activeTile+1] = tmpPreview;\n previewGradients[activeTile+1] = tmpPreviewGradients;\n previewHover[activeTile+1] = tmpPreviewHover;\n \n activeTile += 1;\n createPreviewGradients();\n }\n }",
"public Tile getTile() {\n return _tile;\n }",
"public Tile getTile(){\n\t\treturn currentTile;\n\t}",
"public void refresh()\n\t{\n\t\tNode master = new Node(\"Tyler\");\n\t\t//master.add(new Node(\"Test\"));\n\t\tmaster.addParent(new Node(\"Clinton\"));\n\t\tmaster.addParent(new Node(\"Terry\"));\n\t\t\n\t\tmaster.add(\"Justin\", \"Terry\"); \n\t\tmaster.add(\"Justin\", \"Clinton\"); \n\t\t//this adds directly under Terry\n\t\t//maybe do this differently...\n\t\t\n\t\t\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"Diana\"));\n\t\tmaster.findNode(\"Terry\").addParent(new Node(\"George\"));\n\t\t\n\t\tmaster.add(new Node(\"Tyler 2.0\"));\n\t\tmaster.add(new Node(\"Tyler 3.0\"));\n\t\tmaster.add(new Node(\"Tyler Jr\"));\n\t\t\n\n\t\tmaster.add(\"Tyler Jr Jr\", \"Tyler 2.0\");\n\t\t\n\t\tmaster.add(\"Tyler 3.0\", \"Tyler Jr 2.0\");\n\t\t\n\t\tmaster.findNode(\"Clinton\").addParent(new Node(\"Eric\"));\n\t\tmaster.findNode(\"Eric\").addParent(new Node(\"Eric's Dad\"));\n\t\t\n\t\t\n\t\tmaster.findNode(\"Tyler Jr Jr\", 6).add(new Node(\"Mini Tyler\"));\n\t\t//master.findNode(\"Clinton\", 2).add(new Node(\"Justin\"));\n\t\t\n\t\t\n\t\tmaster.getParent().get(0).findNode(\"Justin\", 3).add(new Node(\"Mini Justin\"));\n\t\t\n\t\tmaster.add(new Node(\"Laptop\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Keyboard\"));\n\t\tmaster.findNode(\"Laptop\").add(new Node(\"Mouse\"));\n\t\t\n\t\tmaster.add(\"Touchpad\", \"Laptop\");\n\t\t//master.add(\"Justin\", \"Eric\");\n\t\t\n\t\tmaster.add(\"Hunger\", \"Tyler\");\n\t\t\n\t\tselectedNode = master;\n\t\tselect(selectedNode);\n\t}",
"void buildDome(Tile t);",
"public boolean connectTo(Hextile hexTile, Config.IncompleteRoadwayDirection relativePosition) {\r\n\t\tConfig.IncompleteRoadwayDirection head = null;\r\n\t\tConfig.IncompleteRoadwayDirection tail = null;\r\n\t\t\r\n\t\tConfig.IncompleteRoadwayDirection directions[] = new Config.IncompleteRoadwayDirection[] { Config.IncompleteRoadwayDirection.TOP, Config.IncompleteRoadwayDirection.TOP_RIGHT, Config.IncompleteRoadwayDirection.BOTTOM_RIGHT, Config.IncompleteRoadwayDirection.BOTTOM, Config.IncompleteRoadwayDirection.BOTTOM_LEFT, Config.IncompleteRoadwayDirection.TOP_LEFT};\r\n\t\tConfig.IncompleteRoadwayDirection relativePositionArray[] = new Config.IncompleteRoadwayDirection[directions.length];\r\n\t\t\r\n\t\tint startingLocation = -1;\r\n\t\t\r\n\t\t// Find relativePosition in direction array\r\n\t\tfor (int i = 0; i < directions.length; i++) {\r\n\t\t\tif (directions[i] == relativePosition) {\r\n\t\t\t\tstartingLocation = i;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (startingLocation == -1) {\r\n\t\t\tSystem.out.println(\"ERROR: startingLocation = -1\");\r\n\t\t}\r\n\t\t\r\n\t\t// Create new array which starts in the middle of the direction array with all the same content\r\n\t\tfor (int i = 0; i < relativePositionArray.length; i++) {\r\n\t\t\trelativePositionArray[i] = directions[(startingLocation + i) % 6];\r\n\t\t}\r\n\t\t\r\n\t\tswitch (rotation) {\r\n case 0: \r\n \thead = relativePositionArray[0]; break;\r\n case 60: \r\n \thead = relativePositionArray[5]; break;\r\n case 120:\r\n \thead = relativePositionArray[4]; break;\r\n case 180:\r\n \thead = relativePositionArray[3]; break;\r\n case 240:\r\n \thead = relativePositionArray[2]; break;\r\n case 300:\r\n \thead = relativePositionArray[1]; break;\r\n default: System.out.println(\"ERROR: Function connectTo - switch(rotation) does not handle value\" + rotation); break;\r\n\t\t}\r\n\t\t\r\n\t\tswitch (hexTile.getRotation()) {\r\n\t\t\tcase 0: \r\n\t \ttail = relativePositionArray[3]; break;\r\n\t case 60: \r\n\t \ttail = relativePositionArray[2]; break;\r\n\t case 120:\r\n\t \ttail = relativePositionArray[1]; break;\r\n\t case 180:\r\n\t \ttail = relativePositionArray[0]; break;\r\n\t case 240:\r\n\t \ttail = relativePositionArray[5]; break;\r\n\t case 300:\r\n\t \ttail = relativePositionArray[4]; break;\r\n\t default: System.out.println(\"ERROR: Function connectTo - switch(hexTile.getRotation()) does not handle value\" + rotation);\r\n\t\t}\r\n\t\t\r\n\r\n\t\tRoadway headRoadway = this.findRoadway(head);\r\n\t\tRoadway tailRoadway = hexTile.findRoadway(tail);\r\n\t\t\r\n\t\tif (this.name.equals(\"Deep Woods\") && hexTile.name.equals(\"Oak Woods\")) {\r\n\t\t\tSystem.out.println(headRoadway);\r\n\t\t\tSystem.out.println(tailRoadway);\r\n\t\t}\r\n\r\n\t\t// The roadways line up\r\n\t\tif ((headRoadway != null) && (tailRoadway != null)) {\r\n\t\t\theadRoadway.setTailClearing(tailRoadway.getHeadClearing());\r\n\t\t\ttailRoadway.setTailClearing(headRoadway.getHeadClearing());\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t// The roadways do not line up\r\n\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t//System.out.println(\"Warning: No path found when connecting the \" + relativePosition + \" of \" + this.name + \" to \" + hexTile.name);\r\n\t\t}\r\n\t}",
"public TilePanel(CoordinatesTile coordTile) {\r\n\t\tthis(getPath(coordTile));\r\n\t}",
"public void setNextDirectionAndTick(Snake enemy, BonusTile bonusTile) {\n\t\tcollision = false;\n\n\t\tList<Tile> nextTilesStraight = new ArrayList<>();\n\t\tList<Tile> nextTilesLeft = new ArrayList<>();\n\t\tList<Tile> nextTilesRight = new ArrayList<>();\n\t\t/**\n\t\t * every ciclus for one side... better that one ciclus for all sides..\n\t\t */\n\t\tswitch (direction) {\n\t\tcase DOWN:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight\n\t\t\t\t\t\t.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase UP:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX(), head.getY() - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase LEFT:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX() - GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(Math.round(head.getX()), (head.getY()) - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tbreak;\n\t\tcase RIGHT:\n\t\t\t// generate 3 straight and 2 on sides\n\t\t\tfor (int i = 1; i < 3; i++) {\n\t\t\t\tnextTilesStraight.add(new CollisionTile(head.getX() + GameCanvas.TILESIZE * i, head.getY()));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesRight.add(new CollisionTile(Math.round(head.getX()), (head.getY()) + GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tfor (int i = 1; i < 2; i++) {\n\t\t\t\tnextTilesLeft.add(new CollisionTile(Math.round(head.getX()), (head.getY()) - GameCanvas.TILESIZE * i));\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t// next step colison\n\t\tcollision = collisonCheck(nextTilesStraight, enemy);\n\t\t// right tiles colision\n\t\tboolean colisonRight = collisonCheck(nextTilesRight, enemy);\n\t\t// left ties colision\n\t\tboolean colisonLeft = collisonCheck(nextTilesLeft, enemy);\n\n\t\t// if not colision go for the bonus\n\t\tif (!collision) {\n\t\t\tint x = head.getX() - bonusTile.getX();\n\t\t\tint y = head.getY() - bonusTile.getY();\n\t\t\t// can change direction if not 180 degree\n\t\t\tif (x > 0 && direction != Direction.RIGHT) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.UP && !colisonLeft || direction == Direction.DOWN && !colisonRight) {\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (x < 0 && direction != Direction.LEFT) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.UP && !colisonRight || direction == Direction.DOWN && !colisonLeft) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (y < 0 && direction != Direction.UP) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.RIGHT && !colisonRight || direction == Direction.LEFT && !colisonLeft) {\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t}\n\t\t\t\t// can change direction if not 180 degree\n\t\t\t} else if (y > 0 && direction != Direction.DOWN) {\n\t\t\t\t// can change direction if not colision\n\t\t\t\tif (direction == Direction.RIGHT && !colisonLeft || direction == Direction.LEFT && !colisonRight) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if colision try fix it\n\t\tif (collision) {\n\t\t\t// by direction can try fix collision\n\t\t\tswitch (direction) {\n\t\t\tcase DOWN:\n\t\t\t\tif (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t} else if (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tSystem.out.println(2);\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tSystem.out.println(4);\n\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase LEFT:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tSystem.out.println(6);\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tif (!collisonCheck(nextTilesRight, enemy)) {\n\t\t\t\t\tdirection = Direction.DOWN;\n\t\t\t\t} else if (!collisonCheck(nextTilesLeft, enemy)) {\n\t\t\t\t\tdirection = Direction.UP;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * and finally tick\n\t\t */\n\t\ttick();\n\t}",
"public void explore() {\n\t\t\tif(getSpeed() < CAR_MAX_SPEED){ // Need speed to turn and progress toward the exit\n\t\t\t\tapplyForwardAcceleration(); // Tough luck if there's a wall in the way\n\t\t\t}\n\t\t\tif (isFollowingWall) {\n\t\t\t\t// if already been to this tile, stop following the wall\n\t\t\t\tif (travelled.contains(new Coordinate(getPosition()))) {\n\t\t\t\t\tisFollowingWall = false;\n\t\t\t\t} else {\n\t\t\t\t\tif(!checkFollowingWall(getOrientation(), map)) {\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// If wall on left and wall straight ahead, turn right\n\t\t\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\t\t\tif (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Start wall-following (with wall on left) as soon as we see a wall straight ahead\n\t\t\t\tif(checkWallAhead(getOrientation(), map)) {\n\t\t\t\t\tif (!checkWallRight(getOrientation(), map) && !checkWallLeft(getOrientation(), map)) {\n\t\t\t\t\t\t// implementing some randomness so doesn't get stuck in loop\n\t\t\t\t\t\tRandom rand = new Random();\n\t\t\t\t\t\tint n = rand.nextInt(2);\n\t\t\t\t\t\tif (n==0) {\n\t\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (!checkWallRight(getOrientation(), map))\t{\n\t\t\t\t\t\tturnRight();\n\t\t\t\t\t\tisFollowingWall = true;\n\t\t\t\t\t} else if (!checkWallLeft(getOrientation(), map)){\n\t\t\t\t\t\tturnLeft();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyReverseAcceleration();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public UISnake(int startW, int startH) {\n\t\tsuper(startW, startH);\n\t\thead = new HeadTile(startW, startH, direction, this);\n\t\tlastTile = new BodyTile(800, 800, this);\n\t}",
"@Override\r\n\tpublic void tileLoadedHandler(Tile tile) {\n\r\n\t}",
"public void install(GridTile tile) {\n NameTile = tile;\n if ( (NameTile != null) && (NameFrill != null)) {\n NameTile.addFrill(NameFrill);\n }\n }",
"void sethead(ElementNode head){\r\n\t\t\tthis.head = head;\r\n\t\t}",
"public void placeTile(Tile t){\n\t\t//System.out.println(t.toString() + \" was placed\");\n\t\toccupied = true;\n\t\tcurrentTile = t;\n\t}",
"public void updateMount();",
"public Tile getPath() {\n\t\treturn path;\n\t}",
"public void loadTileImages() {\n // keep looking for tile A,B,C, etc. this makes it\n // easy to drop new tiles in the images/ directory\n tiles = new ArrayList();\n char ch = 'A';\n while (true) {\n String name = \"tile_\" + ch + \".png\";\n File file = new File(\"images/\" + name);\n if (!file.exists()) {\n break;\n }\n tiles.add(loadImage(name));\n ch++;\n }\n }",
"private void setDirInternal(File dir) {\n if (dir == null) {\n baseDir = null;\n return;\n }\n\n ReplicaDirInfo dirInfo = parseBaseDir(dir, getBlockId());\n this.hasSubdirs = dirInfo.hasSubidrs;\n\n synchronized (internedBaseDirs) {\n if (!internedBaseDirs.containsKey(dirInfo.baseDirPath)) {\n // Create a new String path of this file and make a brand new File object\n // to guarantee we drop the reference to the underlying char[] storage.\n File baseDir = new File(dirInfo.baseDirPath);\n internedBaseDirs.put(dirInfo.baseDirPath, baseDir);\n }\n this.baseDir = internedBaseDirs.get(dirInfo.baseDirPath);\n }\n }",
"private void headTowardsPackages(Coordinate currPos) {\n\t\tHashMap<Coordinate,MapTile> view = control.getView();\n\t\tif (!control.isHeadingToFinish) {\n\t\t\t// if we don't have a path to a parcel\n\t\t\tif (control.currentPath == null || !( view.get(control.currentPath.get(0)) instanceof ParcelTrap )) {\n\t\t\t\tfor (Coordinate coord: view.keySet()) {\n\t\t\t\t\t// if the tile in view is a parcel make a path to it\n\t\t\t\t\tif (view.get(coord) instanceof ParcelTrap) {\n\t\t\t\t\t\thazardFindPath(currPos, coord);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (Coordinate coord3 : view.keySet()) {\n\t\t\t\t\tif (view.get(coord3) instanceof HealthTrap && control.getHealth() < WATER_TRAP_THRESHOLD) {\n\t\t\t\t\t\thazardFindPath(currPos, coord3);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor (Coordinate coord2 : view.keySet()) {\n\t\t\t\t\tif (view.get(coord2) instanceof WaterTrap && control.getHealth() < WATER_TRAP_THRESHOLD) {\n\t\t\t\t\t\thazardFindPath(currPos, coord2);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void selectTile(MahjongSolitaireTile selectTile)\n {\n // IF IT'S ALREADY THE SELECTED TILE, DESELECT IT\n if (selectTile == selectedTile)\n {\n selectedTile = null;\n selectTile.setState(VISIBLE_STATE);\n return;\n }\n \n // IF THE TILE IS NOT AT THE TOP OF ITS STACK, DO NOTHING\n int col = selectTile.getGridColumn();\n int row = selectTile.getGridRow();\n int index = tileGrid[col][row].indexOf(selectTile);\n if (index != (tileGrid[col][row].size() - 1))\n return;\n \n // IF THE TILE IS NOT FREE, DO NOTHING, BUT MAKE SURE WE GIVE FEEDBACK\n if ((col > 0) && (col < (gridColumns - 1)))\n {\n int leftZ = tileGrid[col-1][row].size();\n int z = tileGrid[col][row].size();\n int rightZ = tileGrid[col+1][row].size();\n if ((z <= leftZ) && (z <= rightZ))\n {\n // IF IT'S ALREADY INCORRECTLY SELECTED, DEACTIVATE THE FEEDBACK\n if (selectTile.getState().equals(INCORRECTLY_SELECTED_STATE))\n {\n selectTile.setState(VISIBLE_STATE);\n redTile = null;\n return;\n }\n else if(selectTile.getState().equals(VISIBLE_STATE))\n {\n //check if there's another red tile\n if(redTile != null)\n {\n //then make previous red tile visible instead\n redTile.setState(VISIBLE_STATE);\n redTile = null;\n }\n //make it red and give it audio\n selectTile.setState(INCORRECTLY_SELECTED_STATE);\n miniGame.getAudio().play(MahjongSolitairePropertyType.BLOCKED_TILE_AUDIO_CUE.toString(), false);\n redTile = selectTile;\n return;\n }\n }\n }\n\n // IT'S FREE\n if (selectedTile == null)\n {\n selectedTile = selectTile;\n selectedTile.setState(SELECTED_STATE);\n miniGame.getAudio().play(MahjongSolitairePropertyType.SELECT_AUDIO_CUE.toString(), false);\n }\n //they match\n else if(selectedTile.match(selectTile))\n {\n //remove\n MahjongSolitaireMove move = new MahjongSolitaireMove();\n move.col1 = selectedTile.getGridColumn();\n move.row1 = selectedTile.getGridRow();\n move.col2 = selectTile.getGridColumn();\n move.row2 = selectTile.getGridRow();\n processMove(move);\n redTile.setState(VISIBLE_STATE);\n redTile = null;\n }\n // THEY DON'T MATCH, GIVE SOME AUDIO FEEDBACK\n else\n {\n miniGame.getAudio().play(MahjongSolitairePropertyType.NO_MATCH_AUDIO_CUE.toString(), false); \n }\n }",
"public TileSet(String path, int TILE_SIZE) {\n // A tile set requires only a relative path and the tileSize (32 fixed for now)\n // See if tileSet already exists\n boolean sameFound = false;\n int sameIndex = 0;\n for(int i=0; i<tileSetCache.size(); i++) {\n if(tileSetCache.get(i).getTileSetPath().equals(path)) {\n sameFound = true;\n sameIndex = i;\n break;\n }\n }\n if(sameFound) {\n // If it exists we will copy already existing info over.\n tileSetPath = path;\n tileSetSrc = tileSetCache.get(sameIndex).getTileSetSrc();\n tiles = tileSetCache.get(sameIndex).getTiles();\n blank = tileSetCache.get(sameIndex).getBlank();\n Integer[] boxedArray = Arrays.stream(tileSetCache.get(sameIndex).getRemovedTileID()).boxed().toArray(Integer[]::new);\n Collections.addAll(removedTileIDList, boxedArray);\n totalTiles = tileSetCache.get(sameIndex).getTotalTiles();\n } else {\n // If it doesn't already exist in cache then attempt to load from disk\n tileSetPath = path;\n tileSetSrc = new Image(\"file:\"+ Run.GAME_DATA_PATH + \"/Art/\" + path);\n tiles = makeTiles(tileSetSrc, TILE_SIZE);\n // The last tile of a tileset should be the 'blank' tile for the set\n // To compare other tiles with for reducing Image[] size\n if (tiles.length == 0) {\n // Something has gone horribly wrong.\n System.err.println(\"NO TILES DETECTED\");\n } else {\n // If nothing bad happened from makeTiles() then we should be good\n blank = tiles[tiles.length - 1];\n int sizeOriginal = tiles.length;\n for (int step = 0; step < tiles.length; step++) {\n if (areImagesSame(tiles[step], blank)) {\n removedTileIDList.add(step);\n }\n }\n tiles = removeSameElements(tiles, blank);\n int removedTilesCount = sizeOriginal - tiles.length;\n totalTiles = tiles.length;\n if(Run.DEBUG_OUTPUT) {\n System.out.println(String.format(\"Tiles Removed: %d\", removedTilesCount));\n }\n }\n TileSet.tileSetCache.add(this); // After finishing the tileSet we add to master cache\n tileSetCache.trimToSize();\n }\n }",
"public Location getLocation() {\n return ((Location) tile);\n }",
"void move(Tile t);",
"@Raw @Model\r\n\tvoid setDir(Directory dir) {\r\n\t\tthis.dir = dir;\r\n\t\tthis.move(dir);\r\n\t\t\r\n\t}",
"protected void repaint() {\n if (_tile!=null)\n _tile.repaint();\n }",
"private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }",
"private void moveTile()\n {\n int[] moveIndices = null;\n \n int sourceRow = moveIndices[0];\n int sourceCol = moveIndices[1];\n int destRow = moveIndices[2] - 1;\n int destCol = moveIndices[3];\n \n if (sourceRow == 0) \n {\n try\n {\n game.playTileFromHand(sourceCol, destRow, destCol);\n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n else\n {\n sourceRow--;\n try\n {\n game.moveTileInBoard(sourceRow, sourceCol, destRow, destCol); \n }\n catch(ArrayIndexOutOfBoundsException ex)\n {\n // TODO: ConsoleUtils.message(\"Unable to complete your play, wrong indices!\");\n }\n }\n }",
"public void selectTile(CardTile ct){\n\t\tif(ct.getCard() != null){ \n\t\t\t/*For Viewing Selected Card information*/\n//\t\t\tint HP;\n//\t\t\tArrayList<Card> attached;\n//\t\t\tString cards_att = \"\";\n//\t\t\tif (ct.getCard() instanceof Pokemon){\n//\t\t\t\tHP = ((Pokemon)ct.getCard()).getHP();\n//\t\t\t\tattached = ((Pokemon)ct.getCard()).getAttachedCards(); \n//\t\t\t\tfor (int l=0; l< attached.size(); l++){\n//\t\t\t\t\tcards_att += l+1 + \": \" + attached.get(l).getName() + \"<br />\";\n//\t\t\t\t}\n//\t\t\t} else {\n//\t\t\t\tHP = 0;\n//\t\t\t\tattached = new ArrayList<Card>();\n//\t\t\t\tcards_att = \"NA\";\n//\t\t\t}\n//\t\t\tboard.updateInfo(\"<html><p>\" + \"Card location: \"+ ct.getPlace() + \"<br />\" \n//\t\t\t\t\t\t\t\t+ \"Seq No: \"+ ct.getSeqNo() + \"<br />\" \n//\t\t\t\t\t\t\t\t+ \"Card Name: \"+ ct.getCard().getName() + \"<br />\"\n//\t\t\t\t\t\t\t\t+ \"Card Type: \"+ ct.getCard().getType() + \"<br />\"\n//\t\t\t\t\t\t\t\t+ \"Attached cards: \" + \"<br />\" + cards_att + \"<br />\" \n//\t\t\t\t\t\t\t\t+ \"HP: \"+ HP + \"<br />\"\n//\t\t\t\t\t\t\t\t+ \"</p></html>\");\n\t\t\t/*EO For Viewing Selected Card information*/\n\t\t\t\n\t\t\t// we can in the normal case select cards from the hand or the bench or the active\n\t\t\t// later we can add more cases as needed but this is for normal play\n\t\t\tif(ct.getPlace() == Place.MY_ACTIVE || ct.getPlace() == Place.MY_BENCH || ct.getPlace() == Place.MY_HAND){\n\t\t\t\tselectedTile = ct;\n\t\t\t\tct.setSelected(true);\n\t\t\t\tdisplayCardInfo(ct);\n\t\t\t}\n\t\t}\n\t}",
"public void addSubbedTile(Tile t) { subbedTiles.add(t); }",
"public void goToEntry() {\n this.step(GameMap.instance().getEntryTile());\n }",
"void updateBranch(Commit newt) {\n String nextBranch = null;\n Commit theNext = null;\n File parent = new File(\".gitlet/current\");\n for (File file : parent.listFiles()) {\n nextBranch = file.getName();\n }\n try {\n File getHead = new File(\".gitlet/heads/\" + nextBranch);\n FileOutputStream fieOut = new FileOutputStream(getHead);\n ObjectOutputStream obetOut = new ObjectOutputStream(fieOut);\n obetOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n try {\n File hideous = new File(\".gitlet/current/\" + nextBranch);\n FileOutputStream ieOut = new FileOutputStream(hideous);\n ObjectOutputStream betOut = new ObjectOutputStream(ieOut);\n betOut.writeObject(newt);\n } catch (IOException e) {\n System.out.println(\"Didn't work.\");\n }\n }",
"public abstract void setInternal(int head, int ct, int t, int arm, int leg);",
"private void setUpStartPosition()\n {\n \tthis.xPos = startTile.xPos;\n this.yPos = startTile.yPos - startTile.tileHeight;\n yPos--;\n \n System.out.println(\"Player is on level \" + level + \n \" at position x: \" + xPos + \", y: \" + yPos); \n }",
"@Override\r\n\t\tpublic void setDir(String dir)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public void setHead(String head) {\n _head = head;\n }",
"public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }",
"public static void moveEntity(int direction){\n int tileSize = SpriteHandler.tileSize;\n switch(direction){\n case 0:\n if((userY-tileSize) >= MapManager.offset){\n userY -= tileSize;\n }\n break;\n case 1:\n if((userX+tileSize) <= (MapManager.width_X * tileSize)){\n userX += tileSize; \n }\n break;\n case 2:\n if((userY+tileSize) <= (MapManager.height_Y * tileSize)){\n userY += tileSize; \n }\n break;\n case 3:\n if((userX-tileSize) >= MapManager.offset){\n userX -= tileSize; \n }\n break;\n }\n }",
"public void initTiles() throws IOException \n\t{\n\t\n\t}",
"public void setHead(Node head) {\n\t\tthis.head = head;\n\t}",
"private void initTile(SpriteType sT, String tileType)\n {\n // CONSTRUCT THE TILE\n MahjongSolitaireTile newTile = new MahjongSolitaireTile(sT, unassignedTilesX, unassignedTilesY, 0, 0, INVISIBLE_STATE, tileType);\n \n // AND ADD IT TO THE STACK\n stackTiles.add(newTile); \n }",
"public void setFirstNode(byte[] hash)\n {\n if (!this.isInitialized)\n {\n this.initialize();\n }\n this.firstNode = hash;\n this.firstNodeHeight = this.maxHeight;\n this.isFinished = true;\n }",
"public TownTile(float x, float y, int type, int index) {\n\t\tsuper(x, y);\n\t\tthis.type = type;\n\t\tthis.initialize(index);\n\t}",
"@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}",
"public void initDirBotMove(final IBot bot) {\r\n if (bot.getMoves().size() == 0) {\r\n this.cloneBotAttrs(bot);\r\n bot.makeMove(this.getLastMove()); \r\n } // End of the if //\r\n }",
"public static void showTownMapScreen(LandMapTile tile, Constants.Dir dir) {\n townMapScreen.setupTown(tile, dir);\n showScreen(townMapScreen);\n }",
"private static void reposition(Bullet blt) {\n\t\tswitch (blt.directory) {\n\t\tcase leftDown:\n blt.setPositionX( blt.getPositionX() + 10);\n blt.setPositionY(blt.getPositionY() + 100);\n\t\t\tbreak;\n\t\tcase left:\n\t\t\tblt.setPositionX( blt.getPositionX() - 10);\n\t blt.setPositionY(blt.getPositionY() + 22);\n\t\t\tbreak;\n\t\tcase down:\n\t\t\tblt.setPositionX( blt.getPositionX() + 24);\n\t blt.setPositionY(blt.getPositionY() + 110);\n\t\t\tbreak;\n\t\tcase up:\n\t\t\tblt.setPositionX( blt.getPositionX() + 20);\n\t blt.setPositionY(blt.getPositionY() - 10);\n\t\t\tbreak;\n\t\tcase right:\n\t\t\tblt.setPositionX( blt.getPositionX() + 110);\n\t blt.setPositionY(blt.getPositionY() + 23);\n\t\t\tbreak;\n\t\tcase rightDown:\n\t\t\tblt.setPositionX( blt.getPositionX() + 100);\n\t blt.setPositionY(blt.getPositionY() + 98);\n\t\t\tbreak;\n\t\tcase leftUp:\n\t\t\tblt.setPositionX( blt.getPositionX() + 10);\n\t blt.setPositionY(blt.getPositionY() + 12);\n\t\t\tbreak;\n\t\tcase rightUp:\n\t\t\tblt.setPositionX( blt.getPositionX() + 100);\n\t blt.setPositionY(blt.getPositionY() + 8);\n\t\t\tbreak;\n\t\t}\n\t\tblt.justCreated = false;\n\t}",
"private void updateSkiTreeLevel(SkiNode head) {\n\t\tfor (SkiNode nextNode : head.next) {\n\t\t\tif (nextNode != null) {\n\t\t\t\tupdateSkiTreeLevel(nextNode);\n\t\t\t\thead.level = Math.max(head.level, nextNode.level + 1);\n\t\t\t}\n\t\t}\n\t\thead.level = Math.max(head.level, 1);\n\t\thMap[head.i][head.j] = head.level;\n\t}",
"private void updateLruWithNewNode(PageId pid, Page retrievedPage) {\n Node node = new Node(pid, retrievedPage);\n changeHead(node);\n bufferedPages.put(pid, node);\n }",
"public void initRobotPath() {\n for (int i = 0; i < my_game.getRobot_size(); i++) {\n Robot robot = my_game.getRobots().get(i);\n // Fruit fruit = my_game.getFruits().get(i);\n Fruit fruit = findClosestFruit(robot);\n List<node_data> tmp = algo_g.shortestPath(robot.getSrc(), fruit.getEdge().getDest());\n robots_paths.put(robot.getId(), tmp);\n fruits_status.put(robot.getId(),fruit);\n }\n }",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }",
"private void setLocation() {\n switch (getKey()) {\n case UP:\n this.y_location = -136.8 - 6;\n this.y_tile = -1;\n this.positive = false;\n break;\n case DOWN:\n this.y_location = 136.8 + 6;\n this.y_tile = 1;\n break;\n case LEFT:\n this.x_location = -140.6 - 6;\n this.x_tile = -1;\n this.positive = false;\n break;\n case RIGHT:\n this.x_location = 140.6 + 6;\n this.x_tile = 1;\n break;\n default:\n break;\n }\n }",
"private static String randomDir() {\n int tileNum = random.nextInt(4);\n switch (tileNum) {\n case 0:\n return \"up\";\n case 1:\n return \"down\";\n case 2:\n return \"left\";\n case 3:\n return \"right\";\n default:\n return \"\";\n }\n }",
"@Override\n public void update() {\n head.setRadius(getSize() / 2);\n body.setFill(getColor());\n\n if (isTail()) {\n\n // TAIL\n\n if (getP().getDirection() == Direction.EAST) {\n tail(getX() * getSize(), getY() * getSize() + getSize() - MARGIN / 2, getSize() - (MARGIN / 2), getSize() - MARGIN, 0.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.WEST) {\n tail(getX() * getSize() + getSize(), getY() * getSize() + getSize() - MARGIN / 2, getSize() - MARGIN / 2, getSize() - MARGIN, 90.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.NORTH) {\n tail(getX() * getSize() + MARGIN / 2, getY() * getSize() + getSize(), getSize() - MARGIN, getSize() - MARGIN, 0.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.SOUTH) {\n tail(getX() * getSize() + MARGIN / 2, getY() * getSize(), getSize() - MARGIN, getSize() - MARGIN, 270.0F);\n }\n\n return;\n }\n\n if (isHead()) {\n\n // HEAD\n\n switch (getDirection()) {\n case EAST:\n head.setCenterX(getX() * getSize() + (getSize() / 2));\n head.setCenterY(getY() * getSize() + (getSize() / 2));\n\n body.setX(getX() * getSize() + getSize() / 2 + 2);\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize() / 2);\n body.setHeight(getSize() - MARGIN);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + (getSize() / 2) - 5),\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + (getSize() / 2) + 5)\n );\n break;\n case WEST:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize());\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize() / 2);\n body.setHeight(getSize() - MARGIN);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + getSize() / 2 - 5),\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + getSize() / 2 + 5)\n );\n break;\n case NORTH:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize() - 2);\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize() / 2);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2 - 5, getY() * getSize() + getSize() / 2),\n eye(getX() * getSize() + getSize() / 2 + 5, getY() * getSize() + getSize() / 2)\n );\n break;\n case SOUTH:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize() + getSize() / 2 + 2);\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize() / 2);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2 - 5, getY() * getSize() + getSize() / 2),\n eye(getX() * getSize() + getSize() / 2 + 5, getY() * getSize() + getSize() / 2)\n );\n break;\n }\n return;\n }\n\n // BODY\n\n if (getDirection() == getP().getDirection()) {\n if (getDirection() == Direction.WEST || getDirection() == Direction.EAST) {\n body.setX(getX() * getSize());\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize());\n body.setHeight(getSize() - MARGIN);\n } else {\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize());\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize());\n }\n add(body);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.WEST && getP().getDirection() == Direction.SOUTH) {\n arc(getX() * getSize(), getY() * getSize(), 270.0F);\n return;\n }\n if (getDirection() == Direction.NORTH && getP().getDirection() == Direction.EAST) {\n arc(getX() * getSize(), getY() * getSize(), 270.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.WEST && getP().getDirection() == Direction.NORTH) {\n arc(getX() * getSize(), getY() * getSize() + getSize(), 0.0F);\n return;\n }\n if (getDirection() == Direction.SOUTH && getP().getDirection() == Direction.EAST) {\n arc(getX() * getSize(), getY() * getSize() + getSize(), 0.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.EAST && getP().getDirection() == Direction.SOUTH) {\n arc(getX() * getSize() + getSize(), getY() * getSize(), 180.0F);\n return;\n }\n if (getDirection() == Direction.NORTH && getP().getDirection() == Direction.WEST) {\n arc(getX() * getSize() + getSize(), getY() * getSize(), 180.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.EAST && getP().getDirection() == Direction.NORTH) {\n arc(getX() * getSize() + getSize(), getY() * getSize() + getSize(), 90.0F);\n return;\n }\n if (getDirection() == Direction.SOUTH && getP().getDirection() == Direction.WEST) {\n arc(getX() * getSize() + getSize(), getY() * getSize() + getSize(), 90.0F);\n }\n }",
"void use(ATile clickedTile, GodSim g);",
"protected PropagationComponent(Tile tile) {\n\t\tthis.tile = tile;\n\t\tinitialize();\n\t}",
"public void setHead(Connector<T> head) {\n\t\tthis.head = head;\n\t}",
"@Override\n public void updateTileEntity(IBlockAccess world, int x, int y, int z) {\n }",
"public void MoveTileSelf(Integer position){\n /**\n * if opponent activated confusion - move to a random tile\n */\n if(confused){\n //random tile for confusion\n Integer tile;\n do{\n Integer tile1 = returnRandom(getNthDigit(position,1)-1,getNthDigit(position,1)+2);\n Integer tile2 = returnRandom(getNthDigit(position,2)-1,getNthDigit(position,2)+2); // between 0 and 2\n tile = Integer.parseInt(tile1.toString() + tile2.toString());\n }while (tile==myTile || tile==opponentTile || getNthDigit(tile,1)<1 || getNthDigit(tile,1)>7 || getNthDigit(tile,2)<1 || getNthDigit(tile,2)>7);\n position = tile;\n showTimedAlertDialog(\"You are confused!\", \"moving at a random direction\", 5);\n confused = false;\n }\n\n /**\n * send message to opponent\n */\n MultiplayerManager.getInstance().SendMessage(position.toString());\n\n if(!is_debug){\n HandleLejos(myTile, position);\n }\n\n ImageView player1 = findImageButton(\"square_\"+position.toString());\n ImageView player1_old = findImageButton(\"square_\"+myTile.toString());\n player1.setImageDrawable(getResources().getDrawable(R.drawable.tank_blue));\n player1_old.setImageDrawable(getResources().getDrawable(android.R.color.transparent));\n myTile = position;\n myTurn = false;\n turnNumber = turnNumber + 1;\n }",
"private void updateTileState(int tileState, Tile tile) {\r\n CharSequence name = \"LTE\";\r\n switch (tileState){\r\n case Tile.STATE_ACTIVE:\r\n name = name + \" on\";\r\n break;\r\n case Tile.STATE_INACTIVE:\r\n name = name + \" off\";\r\n break;\r\n }\r\n\r\n Icon icon = Icon.createWithResource(getApplicationContext(), R.drawable.lte_text);\r\n tile.setIcon(icon);\r\n tile.setLabel(name);\r\n tile.setState(tileState);\r\n tile.updateTile();\r\n }"
]
| [
"0.58402",
"0.5753984",
"0.5618813",
"0.5573186",
"0.5369425",
"0.53252953",
"0.5317182",
"0.52478194",
"0.5207775",
"0.511067",
"0.5097684",
"0.5071323",
"0.50652266",
"0.505349",
"0.5033898",
"0.5019683",
"0.50029427",
"0.500002",
"0.49906674",
"0.49679226",
"0.4935227",
"0.4885462",
"0.4885462",
"0.48802742",
"0.4876816",
"0.4860766",
"0.48554856",
"0.48471183",
"0.4844454",
"0.4841195",
"0.4817148",
"0.4811439",
"0.48109782",
"0.48091686",
"0.48068702",
"0.48005757",
"0.47800407",
"0.4778223",
"0.47750527",
"0.47728753",
"0.47561556",
"0.4748192",
"0.4747368",
"0.4742333",
"0.47227144",
"0.47173035",
"0.4707112",
"0.46996757",
"0.46972293",
"0.46881524",
"0.46863765",
"0.46850136",
"0.46839496",
"0.46699917",
"0.4667974",
"0.46635956",
"0.46594676",
"0.46511957",
"0.4639766",
"0.4635848",
"0.46336994",
"0.4608682",
"0.45990533",
"0.45907697",
"0.4589704",
"0.4588652",
"0.45872757",
"0.45733106",
"0.45715648",
"0.45684978",
"0.45670182",
"0.4563426",
"0.45456025",
"0.45443514",
"0.45427117",
"0.45424557",
"0.4536607",
"0.45300418",
"0.45247734",
"0.45242292",
"0.45171028",
"0.45134065",
"0.45075715",
"0.45071167",
"0.4505974",
"0.4503745",
"0.45036745",
"0.44960034",
"0.4485696",
"0.44849145",
"0.4484768",
"0.44829604",
"0.44718564",
"0.44680908",
"0.44630665",
"0.4458412",
"0.44576025",
"0.44561547",
"0.4453531",
"0.44450107"
]
| 0.5327411 | 5 |
The goal of this is to cut off our opponent and make them run into us and that's it no food Returns Our Snake Head's Current Location When No Targets Are Reachable. | public Tile diveBomb() {
List<Tile> targets = this.findTargets();
Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);
LinkedList<Tile> shortestPath = null;
// Chose the shortest path
//System.out.println("HeadX: " + this.us_head_x + " HeadY: " + this.us_head_y);
//System.out.println("EnemyX: " + this.enemy_head_x + " EnemyY: " + this.enemy_head_y);
// System.out.println("Targets - " + targets);
for (Tile target : targets) {
LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);
if (path != null) { // means we couldn't reach the desired target
// System.out.println("Path - " + path);
if (shortestPath == null) {
shortestPath = path;
} else if (path.size() < shortestPath.size()) {
shortestPath = path;
}
}
}
// System.out.println("Shortest Path - " + shortestPath);
if (shortestPath == null) return us_tile;
return shortestPath.get(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void targetLostResponse(){\n\t\tswitch(state){\r\n\t\tcase(PURSUIT):\r\n\t\t\tstate=HUNTING;\r\n\t\t\tTile[] targetChoices=adjacentUnseenTiles(level(),targetTile);\r\n\t\t\tif(targetChoices[0]==null)\r\n\t\t\t\tstate=IDLE;\r\n\t\t\ttargetLostResponse();\r\n\t\t\tbreak;\r\n\t\tcase(HUNTING):\t//TODO: after reaching target tile, guess a new target tile, up to a point. (define what that point is) Eventually resume wandering.\r\n\t\t\tif(targetTile!=null){\r\n\t\t\t\tif(!targetTile.equalTo(monster.currentTile)){\r\n\t\t\t\t\tsaveMove();\r\n\t\t\t\t\tmonster.moveTowards(targetTile);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t//if(!monster.currentTile.equalTo(plannedPath[0]))\r\n\t\t\t\t\t//\tmonster.moveTowards(plannedPath[0]);\r\n\t\t\t\t\tstate=IDLE;\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tstate=IDLE;\r\n\t\t\t\ttargetLostResponse();\r\n\t\t\t\t}\r\n\t\t\tbreak;\r\n\t\tcase(IDLE):\r\n\t\t\twander();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"private void target() {\n\t\t// find distance to flower\n\t\tdouble dist = grid.getDistance(grid.getLocation(this),\n\t\t\t\t\t\t\t\t\t grid.getLocation(targetFlower));\n\t\t// if close to flower start harvesting nectar\n\t\tif(dist < 3) {\n\t\t\tstate = \"HARVESTING\";\n\t\t}\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\telse if(dist > 200){\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// else keep moving toward flower\n\t\telse{\n\t\t\tmoveTowards(grid.getLocation(targetFlower), 3);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public void findEnemySnake() {\n // Cheap fix to GameState spawning a food on a person's HeadPiece\n if (this.gb.heads.size() == 1) {\n if (print) System.out.println(\" ONLY 1 HEAD FOUND IN GAME BOARD!\");\n HeadPiece h1 = this.gb.heads.get(0);\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n // fucking panic i guess\n if (print) System.out.println(\" CANNOT FIND ENEMY HEAD?????\");\n this.enemy_head_x = 0;\n this.enemy_head_y = 0;\n } else {\n // Correctly found enemy head\n this.enemy_head_x = h1.getX();\n this.enemy_head_y = h1.getY();\n }\n return;\n }\n\n // Find the enemy snake head and update member variables\n HeadPiece h1 = this.gb.heads.get(0);\n HeadPiece h2 = this.gb.heads.get(1);\n HeadPiece enemyHead;\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n enemyHead = h2;\n } else {\n enemyHead = h1;\n }\n this.enemy_head_x = enemyHead.getX();\n this.enemy_head_y = enemyHead.getY();\n }",
"static String pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n \n //doesn't let you pick up things where McDowell is, and doesn't let you pickup McDowell\n if (thing != null && !player.getLocation().contains(\"Charlie McDowell\") && !what.equals(\"Charlie McDowell\")) {\n return \"-You have picked up the \" + thing;\n } else if(player.getLocation().contains(\"Charlie McDowell\") && !what.equals(\"Charlie McDowell\")){\n return \"-Charlie Bot: The transmitter is currently in McDowell's possession. You can't safely\\n\" +\n \"retrieve it without him noticing, 525. You'll have to use something to take it from him\\n\" +\n \"by force.\";\n } else if(what.equals(\"Charlie McDowell\") || what.equals(\"charlie mcdowell\")){ //you can't pickup McDowell\n return \"-Charlie Bot: You can't just shove the professor into your bag and call it a day, 525.\\n\" +\n \"Nice try though.\";\n } else {\n return \"-Your bag is full, 525. You need to drop something else first.\";\n }\n } else {\n return \"-Charlie Bot: There doesn't seem to be any \" + what + \" in the room, 525.\";\n }\n }",
"void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }",
"protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }",
"public void dropItLikeItsHot(){\n\t\tint score_increment = 0;\n\t\tPoint test_location = new Point(pieceOrigin);\n\t\twhile(true){\n\t\t\ttest_location.y += 1;\n\t\t\tif(!collides(test_location, currentPiece)){\n\t\t\t\tpieceOrigin.y += 1;\n\t\t\t\tscore_increment += 1;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscore += score_increment*100;\n\t\tgossipGirl();\n\t\trepaint();\n\t}",
"private static void soldierCode() throws GameActionException {\n\t\tRobotInfo[] visibleEnemyArray = rc.senseHostileRobots(rc.getLocation(), 1000000);\n\t\tSignal[] incomingSignals = rc.emptySignalQueue();\n\t\tfor(Signal s:incomingSignals){\n\t\t\tint[] message = s.getMessage();\n\t\t\tif(s.getTeam()==rc.getTeam()){\n\t\t\t\tif(message!=null){\n\t\t\t\t\tif(message[0]%10==0){\n\t\t\t\t\t\tint x = message[1]/100000;\n\t\t\t\t\t\tint y = message[1]%100000;\n\t\t\t\t\t\tcenter= new MapLocation(x,y);\n\t\t\t\t\t\tint r = message[0]/10;\n\t\t\t\t\t\tradius=r;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint dist = rc.getLocation().distanceSquaredTo(center);\n\t\tif (visibleEnemyArray.length==0) {\n\t\t\tif (goal!=null&&(rc.senseRubble(goal)<100 || rc.senseRobotAtLocation(goal)!=null)) {\n\t\t\t\tgoal = null;\n\t\t\t\trc.setIndicatorString(0, \"done clearing\");\n\t\t\t}\t\n\t\t\tif(goal==null) {\n\t\t\t\tMapLocation[] locs = MapLocation.getAllMapLocationsWithinRadiusSq(rc.getLocation(), 8);\n\t\t\t\tArrayList<MapLocation> inside = new ArrayList<MapLocation>();\n\t\t\t\tfor(MapLocation loc: locs) {\n\t\t\t\t\tif (loc.distanceSquaredTo(center)<=1.5*radius) {\n\t\t\t\t\t\tinside.add(loc);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor(MapLocation l: inside) {\n\t\t\t\t\tif (rc.senseRubble(l)>99 && rc.senseRobotAtLocation(l)==null) {\n\t\t\t\t\t\tgoal = l;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tUtility.tryToMove(goal);\n\t\t\t}\n\t\t\t\n\t\t\tif (dist>radius && dist< 4*radius) { //Explore\n\t\t\t\tMapLocation travel = soldierFind();\n\t\t\t\tUtility.tryToMove(travel);\n\t\t\t}else{ //Move back\n\t\t\t\tMapLocation loc = center.add(center.directionTo(rc.getLocation()), (int)Math.pow(radius, 0.5)+1);\n\t\t\t\tUtility.tryToMove(loc);\n\t\t\t}\n\t\t} else { //Kite\n\t\t\tkite(visibleEnemyArray);\n\t\t}\n\t}",
"private void harvest() {\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\tif(grid.getDistance(grid.getLocation(targetFlower),grid.getLocation(this)) > 200) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// if crop storage is full, return to hive with information\n\t\telse if(food >= maxCrop) {\n\t\t\tif(targetFlower != null) {\n\t\t\t\tlastFlowerNectar = targetFlower.food;\n\t\t\t}\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if daylight is diminishing, return to hive\n\t\telse if(clock.time > (endForagingTime + 1.0)){\n\t\t\tlastFlowerNectar = 0;\n\t\t\tstate = \"RETURNING\";\n\t\t}\n\t\t// if flower loses all nectar, start scouting for new flower\n\t\telse if(targetFlower.food <= 0){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// semi-random decision to scout for new flower if current flower has low food\n\t\telse if(RandomHelper.nextIntFromTo(0,(int)(maxFlowerNectar/4)) > targetFlower.food &&\n\t\t\t\tRandomHelper.nextDoubleFromTo(0,1) < forageNoise){\n\t\t\tstate = \"AIMLESSSCOUTING\";\n\t\t\ttempTime = clock.time;\n\t\t}\n\t\t// otherwise continue harvesting current flower\n\t\telse{\n\t\t\thover(grid.getLocation(targetFlower));\n\t\t\ttargetFlower.food -= foragingRate;\n\t\t\tfood += foragingRate;\n\t\t\tfood -= lowMetabolicRate;\n\t\t}\n\t}",
"private void remindGoal()\n {\n System.out.println(\"you have to Pick up all three items and get back outside!\");\n }",
"public void makesNotHere(){this.piece.unAffect();}",
"public void NPSShot()\n\t{\n\t\t//can only occur if a friendly missile and \n\t\t//a NPS are spawned\n\t\tif(gameObj[2].size() > 0 && gameObj[4].size() > 0)\n\t\t{\n\t\t\tint nps = new Random().nextInt(gameObj[2].size());\n\t\t\tint mis = new Random().nextInt(gameObj[4].size());\n\t\t\tgameObj[2].remove(nps);\n\t\t\tgameObj[4].remove(mis);\n\t\t\tscore += 500;\n\t\t\tSystem.out.println(\"A player misile has struck a NPS! +500 points\");\n\t\t}else\n\t\t\tSystem.out.println(\"An NPS and a friendly missile are not spawned\");\n\t}",
"public void foodLocated() {\n ArrayList<Creature> creatures = world.getCreatureList();\n for (Creature c : creatures) {\n if (c.creatureLocation().equals(predatorLocation())) {\n //System.out.println(\"Eating Creature: \" + c.creatureLocation());\n c.removed();\n eaten++;\n }\n }\n for (int j = 0; j < world.getCreatureList().size(); j++) {\n if (!world.getCreatureList().get(j).isSpawned()) {\n world.despawnCreature(world.getCreatureList().get(j));\n }\n }\n }",
"private void returnToHive() {\n\t\tGridPoint hiveLoc = grid.getLocation(hive);\n\t\t// if bee is inside hive\n\t\tif(grid.getDistance(grid.getLocation(this), hiveLoc) < 10) {\n\t\t\t// decide whether or not to dance (biased by nectar of last resource)\n\t\t\tif((RandomHelper.nextIntFromTo((int)(maxFlowerNectar/3), \n\t\t\t (int)(maxFlowerNectar/danceProbability)) < lastFlowerNectar)\n\t\t\t && waggle && targetFlower != null){\n\t\t\t\tdanceDuration = lastFlowerNectar/5;\n\t\t\t\thive.dancingBees.add(this);\n\t\t\t\tstate = \"DANCING\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstate = \"SLEEPING\";\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t// otherwise continue toward hive\n\t\t\tmoveTowards(hiveLoc, 5);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"private void returnPlayerHome(Player player_to_be_eaten)\n {\n player_to_be_eaten.setX_cordinate(player_to_be_eaten.getInitial_x());\n player_to_be_eaten.setY_cordinate(player_to_be_eaten.getInitial_y());\n player_to_be_eaten.setSteps_moved(0);\n }",
"public void doAi(){\n\t\t\tif(MathHelper.getRandom(0, Game.FRAMERATE * 5) == 5){\n\t\t\t\tsetScared(true);\n\t\t\t}\n\t\t\n\t\t//Update rectangle\n\t\tsetRectangle(getX(), getY(), getTexture().getWidth(), getTexture().getHeight());\n\t\t\n\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\n\t\tif(rect.intersects(getRectangle())){\n\t\t\t\n\t\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\t\t\n\t\t\t\t\tsetDestinationX(StateGame.player.getX());\n\t\t\t\t\t\n\t\t\t\t\tsetDestinationY(StateGame.player.getY());\n\t\t\t\t\t\n\t\t\t\t\trect = new Rectangle(getDestinationX(), getDestinationY(), 10, 10);\n\t\t\t\t\treachedDestination = (true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Check for collision with jelly\n\t\tint checkedJelly = (0);\n\t\twhile(checkedJelly < EntityJelly.JELLY.size() && EntityJelly.JELLY.get(checkedJelly) != null){\n\t\t\tif(EntityJelly.JELLY.get(checkedJelly).getDead() == false){\n\t\t\t\tif(getRectangle().intersects(EntityJelly.JELLY.get(checkedJelly).getRectangle())){\n\t\t\t\t\tsetHealth(getHealth() - 2);\n\t\t\t\t\tif(MathHelper.getRandom(1, 10) == 10){\n\t\t\t\t\tAnnouncer.addAnnouncement(\"-2\", 60, EntityJelly.JELLY.get(checkedJelly).getX(), EntityJelly.JELLY.get(checkedJelly).getY());\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tcheckedJelly++;\n\t\t}\n\t\t\n\t\t//If we're out of health, kill the entity\n\t\tif(getHealth() < 0){\n\t\t\tsetDead(true);\n\t\t}\n\t\t\n\t\tif(StateManager.getState() == StateManager.STATE_BOSSTWO){\n\t\t\tif(reachedDestination == true){\n\t\t\t\tif(getScared() == false){\n\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(getScared() == false){\n\t\t\t\tif(getX() < getDestinationX())\n\t\t\t\t\tsetX(getX() + getSpeed());\n\t\t\t\tif(getX() > getDestinationX())\n\t\t\t\t\tsetX(getX() - getSpeed());\n\t\t\t\tif(getY() < getDestinationY())\n\t\t\t\t\tsetY(getY() + getSpeed());\n\t\t\t\tif(getY() > getDestinationY())\n\t\t\t\t\tsetY(getY() - getSpeed());\n\t\t\t\t}else{\n\t\t\t\t\t\tsetY(getY() - getSpeed() * 3);\n\t\t\t\t\t\tsetX(getX() - getSpeed() * 3);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static boolean runAway(Critter foo){\n\t\tif(foo.moved) {\n\t\t\tfoo.energy = foo.getEnergy() - Params.walk_energy_cost;\n\t\t\tif (foo.getEnergy() <= 0) {\n\t\t\t\tfoo.isAlive=false;\n\t\t\t}\n\t\t\treturn false;\n\t\t} else {\n\t\t\tint dir = getRandomInt(8);\n\t\t\tif(canMove(foo, dir)) {\n\t\t\t\tfoo.walk(dir);\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\tfoo.energy = foo.getEnergy() - Params.walk_energy_cost;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public void act(){\n food = theWorld.getCloseFood(this);\n queenAnt = theWorld.getCloseQueen(this);\n if(getF){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n start = false;\n hunger += 50;\n hasFood = false;\n //eat the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving up\");\n setDirection(Location.NORTH);\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n System.out.println(\"moving up left\");\n setDirection(Location.NORTH_WEST);\n //go up left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving left\");\n setDirection(Location.WEST);\n //go left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down left\");\n setDirection(Location.SOUTH_WEST);\n //go down left\n move(new Location(this.getLocation().getX() - 1, this.getLocation().getY() + 1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n System.out.println(\"moving down\");\n setDirection(Location.SOUTH);\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n System.out.println(\"moving down right\");\n setDirection(Location.SOUTH_EAST);\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() == food.getLocation().getY()){\n System.out.println(\"moving right\");\n setDirection(Location.EAST);\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n System.out.println(\"moving up right\");\n setDirection(Location.NORTH_EAST);\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n //get the food\n start = false;\n getF = false;\n food.giveFood(this);\n }\n }else if(getQ){\n if(start){\n if(getLocation().isSameLocation(food.getLocation())){\n food.giveFood(this);\n start = false;\n //get the food\n }else{\n if(getLocation().getY() > food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(), this.getLocation().getY() - 1));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() > food.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < food.getLocation().getY() && getLocation().getX() == food.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && getLocation().getY() < food.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < food.getLocation().getX() && food.getLocation().getY() == getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }else{\n if(getLocation().isSameLocation(queenAnt.getLocation())){\n giveQueenFood(queenAnt);\n //give the queen the food\n }else{\n if(getLocation().getY() > queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go up\n move(new Location(this.getLocation().getX(),this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() > queenAnt.getLocation().getY()){\n //go up left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()-1));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()));\n }else if(getLocation().getX() > queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down left\n move(new Location(this.getLocation().getX()-1,this.getLocation().getY()+1));\n }else if(getLocation().getY() < queenAnt.getLocation().getY() && getLocation().getX() == queenAnt.getLocation().getX()){\n //go down\n move(new Location(this.getLocation().getX(),this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() < queenAnt.getLocation().getY()){\n //go down right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()+1));\n }else if(getLocation().getX() < queenAnt.getLocation().getX() && getLocation().getY() == queenAnt.getLocation().getY()){\n //go right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()));\n }else{\n //go up right\n move(new Location(this.getLocation().getX()+1,this.getLocation().getY()-1));\n }\n }\n }\n }else{\n if(hunger > 30){\n getQ = true;\n start = true;\n //assign closest queen location\n }else{\n getF = true;\n start = true;\n //assign closest food location\n }\n }\n }",
"private void unintelligentDecideMove() {\n\t\twander();\r\n\t}",
"private static void defineInitialAttackTarget() {\n\t\tUnit buildingToAttack = MapExploration.getNearestEnemyBuilding();\n\n\t\t// We know some building of CPU that we can attack.\n\t\tif (buildingToAttack != null) {\n\t\t\tchangeNextTargetTo(buildingToAttack);\n\t\t}\n\n\t\t// No building to attack found, safely decide not to attack.\n\t\telse {\n\t\t\tchangeStateTo(STATE_PEACE);\n\t\t}\n\t}",
"public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }",
"@Override\n public void doAction() {\n String move = agent.getBestMove(currentPosition);\n execute(move);\n\n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n\n if (w.hasWumpus(cX, cY)) {\n System.out.println(\"Wampus is here\");\n w.doAction(World.A_SHOOT);\n } else if (w.hasGlitter(cX, cY)) {\n System.out.println(\"Agent won\");\n w.doAction(World.A_GRAB);\n } else if (w.hasPit(cX, cY)) {\n System.out.println(\"Fell in the pit\");\n }\n\n// //Basic action:\n// //Grab Gold if we can.\n// if (w.hasGlitter(cX, cY)) {\n// w.doAction(World.A_GRAB);\n// return;\n// }\n//\n// //Basic action:\n// //We are in a pit. Climb up.\n// if (w.isInPit()) {\n// w.doAction(World.A_CLIMB);\n// return;\n// }\n//\n// //Test the environment\n// if (w.hasBreeze(cX, cY)) {\n// System.out.println(\"I am in a Breeze\");\n// }\n// if (w.hasStench(cX, cY)) {\n// System.out.println(\"I am in a Stench\");\n// }\n// if (w.hasPit(cX, cY)) {\n// System.out.println(\"I am in a Pit\");\n// }\n// if (w.getDirection() == World.DIR_RIGHT) {\n// System.out.println(\"I am facing Right\");\n// }\n// if (w.getDirection() == World.DIR_LEFT) {\n// System.out.println(\"I am facing Left\");\n// }\n// if (w.getDirection() == World.DIR_UP) {\n// System.out.println(\"I am facing Up\");\n// }\n// if (w.getDirection() == World.DIR_DOWN) {\n// System.out.println(\"I am facing Down\");\n// }\n//\n// //decide next move\n// rnd = decideRandomMove();\n// if (rnd == 0) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 1) {\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 2) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 3) {\n// w.doAction(World.A_TURN_RIGHT);\n// w.doAction(World.A_MOVE);\n// }\n }",
"private void notWorthy(final Player player) {\n\t\tplayer.getInterfaceManager().closeChatBoxInterface();\n\t\tplayer.lock(15);\n\t\tplayer.setNextFaceWorldTile(new WorldTile(3084, 3483, 0));\n\t\tWorldTasksManager.schedule(new WorldTask() {\n\t\t\tint phase = 0;\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tfinal int[] randomNPC = { 6935, 3283, 4344, 6966 };\n\t\t\t\tswitch (phase) {\n\t\t\t\tcase 0:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(915));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tplayer.setNextAnimation(new Animation(857));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(randomNPC[Utils.random(randomNPC.length - 1)]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tplayer.setNextForceTalk(new ForceTalk(\".... what in Helwyr is going on..!?\"));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tplayer.setNextGraphics(new Graphics(86));\n\t\t\t\t\tplayer.getGlobalPlayerUpdater().transformIntoNPC(-1);\n\t\t\t\t\tplayer.setNextAnimation(new Animation(10070));\n\t\t\t\t\t//player.setNextForceMovement(new ForceMovement(new WorldTile(3084, 3485, 0), 0, 2));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t//player.setNextWorldTile(new WorldTile(3084, 3485, 0)); TODO find out why force movement doesn't work <.>\n\t\t\t\t\tNPC guard = World.findNPC(5941);\n\t\t\t\t\tsendNPCDialogue(4405, GOOFY_LAUGH, \"Looks like Dahmaroc had a sense of humour!\");\n\t\t \t // player.faceEntity(guard);\n\t\t \t // guard.faceEntity(player);\n\t\t\t\t\tplayer.unlock();\n\t\t\t\t\tstage = 99;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tphase++;\n\t\t\t}\n\t\t}, 0, 2);\n\t}",
"@Override\r\n\tpublic void uniqueOnStartInteraction() {\n\t\tif (Main.clientPlayer.getNumWood() < cost) {\r\n\t\t\tMain.clientPlayer.stopInteraction();\r\n\t\t}\r\n\r\n\t}",
"public void infect() {\n\t\tPlagueAgent current = this;\n\t\tif (!current.infected) {\n\t\t\tfor (PlagueAgent a : plagueWorld.getNeighbors(current, 5)) {\n\t\t\t\tif (a.infected) {\n\t\t\t\t\tint luck = Utilities.rng.nextInt(100);\n\t\t\t\t\tif (luck < plagueWorld.VIRULENCE) {\n\t\t\t\t\t\tthis.infected = true;\n\t\t\t\t\t\tplagueWorld.newInfection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tplagueWorld.changed();\n\t}",
"public void defensive_act()\r\n\t{\r\n\t\tBullet closestBullet = IMAGINARY_BULLET;\r\n\t//\tBullet secondClosestBullet = IMAGINARY_BULLET;\r\n\t\t\r\n\t\tActor machines;\r\n\t\tEnumeration<Actor> opponent = ((MachineInfo)data.get(TankFrame.PLAYER_1)).getHashtable().elements();\r\n\t\twhile(opponent.hasMoreElements())\r\n\t\t{\r\n\t\t\tmachines = (Actor) opponent.nextElement();\r\n\t\t\tif(machines instanceof Bullet)\r\n\t\t\t{\r\n\t\t\t\tif(machines.getPoint().distance(getPoint()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t{\r\n\t\t\t\t\tclosestBullet = (Bullet)machines;\r\n\t\t\t\t\tLine2D aim = new Line2D.Double(getCenterX(), getCenterY(), closestBullet.getPosX(), closestBullet.getPosY() );\r\n\t\t\t\t\tSystem.out.println(aim.getP1().distance(aim.getP2()));\r\n\t\t\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\t\t\taimAndShoot(aim);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t/*\tif(machines.getPoint().distance(getPoint()) > secondClosestBullet.getPoint().distance(getPoint()) \r\n\t\t\t\t\t&& machines.getPoint().distance(getPoint()) < closestBullet.getPoint().distance(getPoint()))\r\n\t\t\t\t\tsecondClosestBullet = (Bullet)machines;*/\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * Find the line\r\n\t\t */\r\n\t\t/*if(!closestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), closestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(getCenterX(), getCenterY(), (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim) && aim.getP1().distance(aim.getP2()) < MIN_SHOOT_DISTANCE)\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\t/*bulletPath = new Line2D(getRightPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t\tbulletPath = new Line2D(getPoint(), closestBullet.getPoint());\r\n\t\t\taim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);*/\r\n\t\t\t\r\n\t\t//}\r\n\t/*\tif(!secondClosestBullet.equals(IMAGINARY_BULLET))\r\n\t\t{\r\n\t\t\tLine2D bulletPath = new Line2D(getLeftPoint(), secondClosestBullet.getPoint());\r\n\t\t\tLine2D aim = new Line2D(posX, posY, (bulletPath.getX2()+bulletPath.getX1())/2,(bulletPath.getY2()+bulletPath.getY1())/2 );\r\n\t\t\tif(hasClearPath(aim))\r\n\t\t\t\taimAndShoot(aim);\r\n\t\t}*/\r\n\r\n\t}",
"private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }",
"public void prisonerUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tcreature.setAttacking(false);\r\n\t\troamArea();\r\n\t\tif (!checkCollision(x, y)) {\r\n\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"ConstantConditions\")\n private void moveToFoodSource() throws AntArtException {\n AntArea.Cell forward = getCellInDirection(directionVector);\n AntArea.Cell left = getCellInDirection(AntDirections.moveCounterClockwise(directionVector));\n AntArea.Cell right = getCellInDirection(AntDirections.moveClockWise(directionVector));\n\n //Try to move to a food cell.\n List<AntArea.Cell> cellList = Arrays.asList(forward, left, right);\n if (moveToFoodCell(cellList)) {\n return;\n }\n //Sort according to food pheromone levels\n cellList.sort((o1, o2) -> {\n float fp1 = o1.getFoodPheromone();\n float fp2 = o2.getFoodPheromone();\n if (fp1 == fp2) {\n return 0;\n }\n return fp1 > fp2 ? -1 : 1;\n });\n //Do a random action based on a probability\n if (random.nextInt(Configuration.ANT_SELECTION_SEED) == 0) {\n Collections.shuffle(cellList);\n }\n //Try to move to a cell\n for (AntArea.Cell cell : cellList) {\n if (moveTo(cell)) {\n break;\n }\n }\n }",
"private static void decisionWhenAttacking() {\n\t\tif (isNewAttackState()) {\n\t\t\tchangeStateTo(STATE_ATTACK_PENDING);\n\n\t\t\t// We will try to define place for our army where to attack. It\n\t\t\t// probably will be center around a crucial building like Command\n\t\t\t// Center. But what we really need is the point where to go, not the\n\t\t\t// unit. As long as the point is defined we can attack the enemy.\n\n\t\t\t// If we don't have defined point where to attack it means we\n\t\t\t// haven't yet decided where to go. So it's the war's very start.\n\t\t\t// Define this assault point now. It would be reasonable to relate\n\t\t\t// it to a particular unit.\n\t\t\t// if (!isPointWhereToAttackDefined()) {\n\t\t\tStrategyManager.defineInitialAttackTarget();\n\t\t\t// }\n\t\t}\n\n\t\t// Attack is pending, it's quite \"regular\" situation.\n\t\tif (isGlobalAttackInProgress()) {\n\n\t\t\t// Now we surely have defined our point where to attack, but it can\n\t\t\t// be so, that the unit which was the target has been destroyed\n\t\t\t// (e.g. just a second ago), so we're standing in the middle of\n\t\t\t// wasteland.\n\t\t\t// In this case define next target.\n\t\t\t// if (!isSomethingToAttackDefined()) {\n\t\t\tdefineNextTarget();\n\t\t\t// }\n\n\t\t\t// Check again if continue attack or to retreat.\n\t\t\tboolean shouldAttack = decideIfWeAreReadyToAttack();\n\t\t\tif (!shouldAttack) {\n\t\t\t\tretreatsCounter++;\n\t\t\t\tchangeStateTo(STATE_RETREAT);\n\t\t\t}\n\t\t}\n\n\t\t// If we should retreat... fly you fools!\n\t\tif (isRetreatNecessary()) {\n\t\t\tretreat();\n\t\t}\n\t}",
"public void action() {\r\n\t\tLCD.drawString(\"Avoid Behavior!\", 0, 7);\r\n\r\n\t\tMapUpdate.updateWithoutObject(0);\r\n\t\tMapUpdate.updateWithObject(StandardRobot.us.getRange());\r\n\r\n\t\tif (StandardRobot.ts.isPressed()) {\r\n\t\t\tStandardRobot.pilot.setTravelSpeed(7);\r\n\t\t\tStandardRobot.pilot.travel(-5);\r\n\t\t\tcounter.countTravel();\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\tif (store.getFlag() == 0) {\r\n\t\t\t\tStandardRobot.pilot.rotate(-90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t} else {\r\n\t\t\t\tStandardRobot.pilot.rotate(90);\r\n\t\t\t\tcounter.countTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void action() {\r\n moveSnake();\r\n if (hasEatenPowerUp() == false) checkForCollisionWithSelf();\r\n if (hasHitBoundry() == false) redraw();\r\n }",
"@Override\n\tpublic BoardLocation findBestLocWhenStuck() {\n\t\treturn null;\n\t}",
"@Override\n protected void doCheckEffect ()\n {\n // check all the stationary spells in the location of the projectile for a Colloportus\n List<O2StationarySpell> inside = new ArrayList<>();\n for (O2StationarySpell spell : Ollivanders2API.getStationarySpells(p).getStationarySpellsAtLocation(location))\n {\n if (spell instanceof COLLOPORTUS)\n {\n inside.add(spell);\n }\n }\n\n // remove the colloportus spells found\n if (inside.size() > 0)\n {\n for (O2StationarySpell spell : inside)\n {\n spell.kill();\n spell.flair(10);\n }\n\n kill();\n }\n\n // if the spell has hit a solid block, the projectile is stopped and wont go further so kill the spell\n if (hasHitTarget())\n kill();\n }",
"@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t\ttarget = pointEntity(caster,50);\r\n\t\tif (target == null) {\r\n\t\t\t\r\n\t\t\t\r\n\t\t\trefund = true;\r\n\t\t\tdead = true;\r\n\t\t\tif (refined)\r\n\t\t\t\tsteprange = 240;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_DEACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tplaySound(Sound.BLOCK_CONDUIT_ACTIVATE,caster.getLocation(),5,2F);\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tParUtils.parKreisDot(Particles.END_ROD, caster.getLocation(), 0, 1, 0.3F, randVector());\r\n\t\t\tdist = target.getLocation().distance(caster.getLocation());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public int performAction()\n {\n if(stunCountdown > 0) \n {\n ERROR_LOG.writeToLog(\"The saboteur is not supposed to call performAction() while stuunned. Remaining time stunned: \" + stunCountdown + '.');\n \n chasingPlayer = false;\n return stunCountdown;\n }\n \n if(chasingPlayer)\n {\n setRoom(Game.getInstance().getPlayer().getCurrentRoom());\n }\n else\n {\n if(((getCurrentRoom().isOperating() && getCurrentRoom() instanceof ItemRoom) || Game.getInstance().getGameInfo().getHackedExit() == null) && Math.random() < chanceOfSabotage)\n {\n if(!getCurrentRoom().isOperating() || !(getCurrentRoom() instanceof ItemRoom))\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else if(Game.getInstance().getGameInfo().getHackedExit() != null)\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n else if(Math.random() < CHANCE_OF_DOOR_SABOTAGE)\n {\n int sabotageExit = (int) Math.floor(Math.random() * getCurrentRoom().getCollectionOfExits().size());\n getCurrentRoom().getCollectionOfExits().get(sabotageExit).setOperating(false);\n Game.getInstance().getGameInfo().setHackedExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit));\n ACTION_LOG.writeToLog(\"Sabotaged the exit between \\\"the \" + getCurrentRoom().getName() + \"\\\" and \\\"the \" + getCurrentRoom().getExit(getCurrentRoom().getCollectionOfExits().get(sabotageExit)).getName() + \"\\\".\");\n }\n else\n {\n getCurrentRoom().setOperating(false);\n ACTION_LOG.writeToLog(\"Sabotaged the room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n }\n \n chanceOfSabotage = DEFAULT_CHANCE_OF_SABOTAGE;\n }\n else\n {\n List<Exit> neighbors = getCurrentRoom().getCollectionOfExits();\n \n for(int i = neighbors.size() - 1; i >= 0; i--)\n if(getCurrentRoom().getExit(neighbors.get(i)).isControlRoom() || !neighbors.get(i).isOperating())\n neighbors.remove(i);\n \n if (neighbors.isEmpty())\n {\n ACTION_LOG.writeToLog(\"Saboteur tried to move, but all exits where removed. Current room: \\\"\" + getCurrentRoom().getName() + \"\\\".\");\n return -1;\n }\n \n int exitIndex = (int) (Math.floor(Math.random() * neighbors.size()));\n \n setRoom(getCurrentRoom().getExit(neighbors.get(exitIndex)));\n \n chanceOfSabotage += CHANCE_OF_SABOTAGE_GROWTH;\n \n //ACTION_LOG.writeToLog(\"Moved to \\\"the \" + getCurrentRoom().getName() + \"\\\".\");\n \n checkChasingPlayer();\n }\n }\n \n return(5 + (int) Math.floor(Math.random() * 6));\n }",
"public void duelmode(ScannedRobotEvent e) {\r\n //run predictive_shooter()\r\n if(e.getEnergy() <= 20) {\r\n //shoot things\r\n engage(e);\r\n } runaway(e);\r\n }",
"@Test\n public void test_chooseBadTargetOnSacrifice_WithoutTargets_AI() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Atarka Monument\", 1); // {T}: Add {R} or {G}.\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); no lands to sacrifice\n\n //setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }",
"@Override\n\tpublic String attack(Game game) {\n\t\tString text = \"\";\n\t\tremoved_laketile = new ArrayList<LakeTile>();\n\t\tremoved_position = new ArrayList<Position>();\n\t\tLakeTile[][] board = game.getPlayArea().getLakeTilesOnBoard();\n\t\tRandom r = new Random();\n\t\tint number_laketile_onboard = countLakeTileOnBoard(board);\n\t\tif (number_laketile_onboard == 0) {\n\t\t\treturn \"Passing Power Boat attacking but there is nothing on the board\";\n\t\t} else {\n\t\t\tint number_remove_laketile = r.nextInt(number_laketile_onboard) + 1;\n\t\t\tfor (int i = 0; i < number_remove_laketile; i++) {\n\t\t\t\tremoveALakeTile(game);\n\t\t\t}\n\t\t\ttext += showText();\n\t\t\treturn \"Passing Power Boat attacking on position ::\\n\" + text + \"\\n\";\n\t\t}\n\t}",
"public void runaway(ScannedRobotEvent e){\r\n if(didenemyshoot(e)){\r\n //moves away from the enemy\r\n setTurnRight(5 * turndir);\r\n setAhead(e.getVelocity() * movedir);\r\n //tell where it is heading\r\n movedir *= -1;\r\n }\r\n }",
"private void intelligentDecideMove() {\n\t\tMonster target=nearestEnemy();\r\n\t\tif(target!=null){\t\t\t\t//FIRST PRIORITY: pursue the target if it can be seen.\r\n\t\t\tswitchStates(PURSUIT);\r\n\t\t\ttargetTile=new Tile(target.currentTile);\r\n\t\t\t//saveMove();\r\n\t\t\tmonster.moveTowards(target);\r\n\t\t}\r\n\t\t\t\r\n\t\telse{\r\n\t\t\ttargetLostResponse();\r\n\t\t\t}\r\n\t}",
"public void PSShot()\n\t{\n\t\t//collision can only occur if an enemy missile and a PlayerShip are spawned\n\t\tif(gameObj[1].size() > 0 && gameObj[3].size() > 0)\n\t\t{\n\t\t\tint mis = new Random().nextInt(gameObj[3].size());\n\t\t\tgameObj[1].remove(0);\n\t\t\tgameObj[3].remove(mis);\n\t\t\tlives--;\n\t\t\tSystem.out.println(\"An enemy missile has struck a PS -1 life\");\n\t\t\tif(lives >0) \n\t\t\t\tSystem.out.println(\"you have \" + lives + \" left\");\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Game over\");\n\t\t\t\tgameOver();\n\t\t\t}\n\t\t}else\n\t\t\tSystem.out.println(\"A player ship and an enemy missile are not spawned\");\t\t\n\t}",
"public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }",
"@Test\n public void test_chooseBadTargetOnSacrifice_WithoutTargets_User() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Atarka Monument\", 1); // {T}: Add {R} or {G}.\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); no lands to sacrifice\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }",
"@Override\n public void action() {\n while (turn.getPlayer().getFightDecision() == null){\n ;\n }\n FightDecision decision = turn.getPlayer().getFightDecision();\n if (decision== FightDecision.IGNORE){\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new MovePhase(y));\n }else{\n turn.getPlayer().setFightDecision(null);\n turn.setPhase(new FightPhase());\n }\n }",
"@Override\npublic Action actionChoosed(Player joueur) {\n WarPlayer player = this.castPlayer(joueur);\n int index = ((WarStrategy)(player.getStrategy())).skipOrDeploy();\n Action action = new SkipAction(player);\n if (index == 0) {\n Army army = this.inputArmy(player);\n Tile tile = ((WarStrategy)player.getStrategy()).inputTileStrategy();\n if(army != null && tile != null) {\n if (army.getArmySize() > 3 && tile.equals(new MountainTile(0, 0, 1, 0))) {\n System.out.println(\" Army of size \" + army.getArmySize() + \" can't be deployed on a mountain tile ! \");\n player.addWarrior(army.getArmySize());\n } else {\n action = new WarActionDeploy(player, this.board, tile.getPosX(), tile.getPosY(), army);\n }\n } else if (army != null && tile == null) {\n player.addWarrior(army.getArmySize());\n }\n }\n return action;\n}",
"private void prepareWorkplace() throws GameActionException {\r\n\t\tFluxDeposit[] fluxDeposits = myRC.senseNearbyFluxDeposits();\r\n\t\tfor (FluxDeposit deposit : fluxDeposits) {\r\n\t\t\tFluxDepositInfo info = myRC.senseFluxDepositInfo(deposit);\r\n\t\t\tif (fluxInfo == null)\r\n\t\t\t\tfluxInfo = info;\r\n\t\t\tif (fluxInfo.location.distanceSquaredTo(myRC.getLocation()) > info.location.distanceSquaredTo(myRC.getLocation()))\r\n\t\t\t\tfluxInfo = info;\r\n\t\t}\r\n\t}",
"private void reviveAttacker() {\n\t\tString type = (mRandom.nextFloat() > mKnightSpawnChance) ? \"normal\" : \"knight\";\n\t\treviveAttacker(type);\n\t}",
"public void lostBattle()\n\t{\n\t\t/* Heal the players Pokemon */\n\t\thealPokemon();\n\t\t/* Make the Pokemon unhappy */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tm_pokemon[i].setHappiness((int) (m_pokemon[i].getHappiness() * 0.8));\n\t\t/* Now warp them to the last place they were healed */\n\t\tm_x = m_healX;\n\t\tm_y = m_healY;\n\t\tif(getSession() != null && getSession().getLoggedIn())\n\t\t\tsetMap(GameServer.getServiceManager().getMovementService().getMapMatrix().getMapByGamePosition(m_healMapX, m_healMapY), null);\n\t\telse\n\t\t{\n\t\t\tm_mapX = m_healMapX;\n\t\t\tm_mapY = m_healMapY;\n\t\t}\n\t\t/* Turn back to normal sprite */\n\t\tif(isSurfing())\n\t\t\tsetSurfing(false);\n\t}",
"public void hyperSpace()\n\t{\n\t\t//only return the ship if a PlayerShip is currently spawned\n\t\tif(gameObj[1].size() > 0)\n\t\t{\n\t\t\t//invoke resetShip() method from PlayerShip\n\t\t\t((PlayerShip)gameObj[1].get(0)).resetShip();\n\t\t\tSystem.out.println(\"PS location reset\");\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"There is no playership spawned\");\n\t}",
"static void pickup(Player player, String what) {\n if (player.getLocation().contains(what)) {\n Thing thing = player.pickup(what);\n if (thing != null) {\n System.out.println(\"You now have \" + thing);\n }\n else {\n System.out.println(\"You can't carry that. You may need to drop something first.\");\n }\n }\n else {\n System.out.println(\"I don't see a \" + what);\n }\n }",
"private static void turnAwayFromWall() {\n while (true) {\n if (readUsDistance() > OPEN_SPACE) {\n leftMotor.stop();\n rightMotor.stop();\n // re-calibrate theta, offset will be added to this angle\n odometer.setTheta(0);\n System.out.println(\"starting localization...\");\n prevDist = 255;\n dist = prevDist;\n break;\n }\n }\n }",
"@Override\n public void action(){\n\n Position move=this.findWeed();\n if(move.getX()==0 && move.getY()==0){\n super.action();\n }\n else{\n System.out.println(this.getClass().getSimpleName());\n int actualX = this.position.getX();\n int actualY = this.position.getY();\n int xAction = actualX+move.getX();\n int yAction = actualY+move.getY();\n Organism tmpOrganism = this.WORLD.getOrganism(xAction, yAction);\n if(tmpOrganism==null){\n this.move(move.getX(), move.getY());\n this.WORLD.erasePosition(actualX,actualY);\n }\n else{\n tmpOrganism.collision(this, actualX, actualY, move);\n }\n }\n }",
"public Location spread()\n {\n // plant needs to be alive, ready to reproduce (# of turns) \n // square needs to have fewer than 10 plants, BUT a tree can kill \n // a grass plant\n }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}",
"private String hardMove() {\n return super.makeAMove(getBestMoveForBlack(FORESEEN_MOVES * 2));\n }",
"private void planDynamicStairs() throws GameActionException, HungryException {\r\n\t\tInteger fluxHeight = gameMap.get(fluxInfo.location).totalHeight;\r\n\t\tif (fluxHeight == fluxHeightWhenStairsPlanned){\r\n\t\t\tif (DEBUG) System.out.println(\"No need to plan stairs now\");\r\n\t\t\t//return; /* No return for now. Always plan stairs, so no stupid block lockups will occur */\r\n\t\t}\r\n\t\t\r\n\t\tif (DEBUG) System.out.println(\"-----TOWER-----\");\r\n\t\tDirection randDir = navigation.getRandomDirection();\r\n\t\tMapLocation start1 = fluxInfo.location.add(randDir).add(randDir);\r\n\t\tMapLocation start2 = fluxInfo.location.subtract(randDir).subtract(randDir);\r\n\t\tif ((gameMap.get(start1) == null) || (gameMap.get(start2) == null))\r\n\t\t\t/* unlucky - start position wasn't scanned yet */\r\n\t\t\treturn;\r\n\t\t\r\n\t\tfluxHeightWhenStairsPlanned = fluxHeight;\r\n\t\t\r\n\t\tList<MapLocation> fluxPath1 = navigation.findPathUsingAStar(gameMap, start1, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath1);\r\n\t\tList<MapLocation> fluxPath2 = navigation.findPathUsingAStar(gameMap, start2, fluxInfo.location, false);\r\n\t\t//if (DEBUG) System.out.println(fluxPath2);\r\n\t\tCollections.reverse(fluxPath1);\r\n\t\tCollections.reverse(fluxPath2);\r\n\t\tList<MapLocation> result = new ArrayList<MapLocation>();\r\n\t\twhile ((fluxPath1.size() > 0) && (fluxPath2.size() > 0) && (fluxPath1.get(0).equals(fluxPath2.get(0)))){\r\n\t\t\tresult.add(fluxPath1.remove(0));\r\n\t\t\tfluxPath2.remove(0);\r\n\t\t}\r\n\t\tCollections.reverse(result);\r\n\t\tif (result.size() >= stairs.size())\r\n\t\t\t/* prefer fresh data, but not too short */\r\n\t\t\tstairs = result;\r\n\t\tif (DEBUG) System.out.println(result);\r\n\t\tif (DEBUG) System.out.println(navigation.changePathToDirections(result));\r\n\t\tif (DEBUG) System.out.println(\"----/TOWER-----\");\r\n\t}",
"public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}",
"private void penguinStormReaction(){\n if(obstacle.getUserData().getAssetId().equals(OBSTACLE_CLOUD_ASSETS_ID)){\n if(penguin.isFrightStopped()){\n obstacle.setStormRaining(false);\n }else{\n obstacle.setStormRaining(true);\n }\n }\n }",
"@Override\n\tpublic void act() {\n\n\t\t//Location symbol of a Droid (Stack Overflow 2010)\n\t\tchar locationSymbol = this.world.getEntityManager().whereIs(this).getSymbol();\n\t\t\n\t\t//Begin act\n\t\tsay(describeLocation());\t\t\n\t\t\n\t\t//Check for the lose condition that R2 is disassembled\n\t\t//If R2's HP is <=0\n\t\tif (this.isDead())\n\t\t{\n\t\t\t//If R2 is disassembled\n\t\t\tif(this.getIsDisassembled())\n\t\t\t{\n\t\t\t\t//Is the symbol of the disassembled Droid is R2's\n\t\t\t\tif(this.getSymbol().contains(\"{R2}\"))\n\t\t\t\t{\n\t\t\t\t\t//Message stating R2 was disassembled\n\t\t\t\t\tthis.messageRenderer.render(\"\\n\\nR2-D2 has been disassembled!\");\n\t\t\t\t\t\n\t\t\t\t\t//Scheduler schedules the loss\n\t\t\t\t\tscheduler.lossSchedule(this.messageRenderer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//If a Droid is immobile (Dead)\n\t\tif (this.getIsImmobile() == true) {\n\t\t\tsay(this.getShortDescription() + \" is immobile. \");\n\t\t\t\t\t\t\n\t\t\tif(this.getOwner() != null)\n\t\t\t{\n\t\t\t\tsay(\"Owned. checking in owners follow list\");\n\t\t\t\t\n\t\t\t\tString thisDroidNoBraces = this.getSymbol().substring(1, this.getSymbol().length()-1);\n\n\t\t\t\tint indexofDroid = this.getOwner().getFollowerList().indexOf(thisDroidNoBraces);\n\t\t\t\t\n\t\t\t\tif (this.getOwner().getFollowerList().get(indexofDroid).equals(thisDroidNoBraces))\n\t\t\t\t{\n\t\t\t\t\tsay(\"Removing\");\n\t\t\t\t\tthis.getOwner().getFollowerList().remove(thisDroidNoBraces);\n\t\t\t\t\tthis.getOwner().getFollowerListSWActors().remove(this);\n\t\t\t\t\tthis.setOwner(null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t//If a Droid is mobile and human controlled\n\t\telse if (this.humanControlled == true) {\n\t\t\t\n\t\t\t//Following Owner - since humancontrolled.\n\t\t\t\n\t\t\t\n\t\t\tif (isDead()) \n\t\t\t{\n\t\t\t\tthis.setIsImmobile(true);\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Get owners' location\n\t\t\t\tSWLocation ownerloc = this.world.getEntityManager().whereIs(this.getOwner());\n\t\t\t\t\n\t\t\t\t//Set Droids' position to owners' location (follow)\n\t\t\t\tthis.world.getEntityManager().setLocation(this, ownerloc);\n\t\t\t\t\n\t\t\t\t//Take damage if moving to the Badlands\n\t\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\t\n\t\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tselfHeal();\n\t\t\t}\t\n\t\t} \n\t\t\n\t\t//C-3PO Droid specific act ()code\n\t\telse if (this.getSymbol() == \"C3\") {\n\t\t\t\n\t\t\t//Double precision number to represenet C-3PO's chance of speaking\n\t\t\tdouble c3Speak = Math.random();\n\t\t\t\n\t\t\t//10% chance of occuring a 0.9 or above\n\t\t\tif (c3Speak >= 0.9) {\n\t\t\t\t//Call C-3PO speak method (he talks!)\n\t\t\t\tc3POSpeaks();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//R2-D2 Repair droid specific act() code\n\t\telse if (this.getSymbol() == \"R2\") {\n\t\t\t\n\t\t\tthis.messageRenderer.render(\"R2 DISS: \" + this.isDisassembled);\n\t\t\t\n\t\t\t//Describe who R2 can see\n\t\t\t//get the contents of the location\n\t\t\tList<SWEntityInterface> r2contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (r2contents.size() > 1) { // if it is equal to one, the only thing here is R2, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface r2entity : r2contents) {\n\t\t\t\t\tif (r2entity.getSymbol().contains(\"D\")) { // If R2 comes across a Droid (Stack Overflow 2010)\n\t\t\t\t\t\tsay(this.getShortDescription() + \" has come accross a Droid!\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Cast target entity as a Droid for checking what it needs from R2\n\t\t\t\t\t\tDroid targetr2 = (Droid) r2entity;\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to disassemble the Droid if its immobile\n\t\t\t\t\t\tif (targetr2.isImmobile && targetr2.isDisassembled == false) {\n\t\t\t\t\t\t\tDisassemble r2diss = new Disassemble(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2diss, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 tries to repair a droid who is immobile and disassembled\n\t\t\t\t\t\telse if (targetr2.isImmobile && targetr2.isDisassembled) {\n\t\t\t\t\t\t\tif (this.getItemCarried() != null) {\n\t\t\t\t\t\t\t\tRepair r2rep = new Repair(r2entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(r2rep, this, 1);\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//R2 attempts to Heal a Droid if active and not disassembled\n\t\t\t\t\t\telse if (targetr2.isDisassembled == false && targetr2.isImmobile == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tHealDroid r2heal = new HealDroid(r2entity, messageRenderer);\n\t\t\t\t\t\t\tscheduler.schedule(r2heal, this, 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\t\n\t\t\t//Heals himself if he can\n\t\t\t\n\t\t\tHealDroid droidHealR2 = new HealDroid(this, messageRenderer);\n\t\t\tscheduler.schedule(droidHealR2, this, 1);\n\t\t\t\n\t\t\t//R2 moves\n\t\t\tDirection R2Direction = this.getDroidPatrol().getNext();\n\t\t\tsay(getShortDescription() + \" moves \" + R2Direction);\n\t\t\tMove myMove = new Move(R2Direction, messageRenderer, world);\n\n\t\t\tscheduler.schedule(myMove, this, 1);\n\t\n\t\t}\n\t\t\n\t\t//If a Droid is not immobile, and not human controlled (roaming)\n\t\telse {\t\n\t\t\t\n\t\t\t//Picking up an oil can\n\t\t\t//Get contents of the current location\n\t\t\tList<SWEntityInterface> contents = this.world.getEntityManager().contents(this.world.getEntityManager().whereIs(this));\n\t\t\t\n\t\t\t//and describe the contents\n\t\t\tif (contents.size() > 1) { // if it is equal to one, the only thing here is this Player, so there is nothing to report\n\t\t\t\tfor (SWEntityInterface entity : contents) {\n\t\t\t\t\tif (entity != this) { // don't include self in scene description\n\t\t\t\t\t\tif (entity.getSymbol() == \"x\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//The Droid is standing over a oil can. Does it pick it up?\n\t\t\t\t\t\t\tif (Math.random() > 0.5){ //Half a chance...\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided to pick up \" + entity.getShortDescription());\n\t\n\t\t\t\t\t\t\t\t//Droid takes the oil can. Scheduler implements the Take.\n\t\t\t\t\t\t\t\tTake droidTakes = new Take(entity, messageRenderer);\n\t\t\t\t\t\t\t\tscheduler.schedule(droidTakes, this, 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse { //The Droid passes over the oil can.\n\t\t\t\t\t\t\t\tsay(this.getShortDescription() + \" decided not to pick up\" + entity.getShortDescription());\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (Math.random() > 0.8){\n\t\t\t\trandomMovement();\n\t\t\t}\n\t\t\t\n\t\t\t//If a Roaming Droid is at the Badlands, they lose health\n\t\t\t\n\t\t\tif (locationSymbol == 'b') { //IF the Droid is at the Badlands\n\t\t\t\tint NewHP = this.getHitpoints() - 2;\t//Take 2 from the Droids' health\n\t\t\t\tthis.setHitpoints(NewHP);\n\t\t\t\n\t\t\t\tsay(this.getShortDescription() + \" has lost health by moving into the Badlands!\");\n\t\t\t}\n\t\t\t\n\t\t\t/*Self healing\n\t\t\tImplementation that if a Droids' health gets below half, they will attempt to heal themselves IF they \n\t\t\tare carrying an oil can\n\t\t\t*/\n\t\t\tselfHeal();\n\t\t\t\n\t\t\t\n\t\t}\t\n\t}",
"public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }",
"public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }",
"private void stateReturnToHomeBase() {\n\t\tif (isCloserToBall()) {\n\t\t\tstate = State.ATTACKING;\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isCloseTo(playerDeafaultPosition)) {\n\t\t\tif (isAlignedTo(playerDeafaultPosition)) {\n\t\t\t\tcommander.doDashBlocking(50.0d);\n\t\t\t} else {\n\t\t\t\tturnTo(playerDeafaultPosition);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void steppedOn(Player p) {\n standingHere++;\n Game.log.format(\"# SnowyHole>steppedOn : Stepped on SnowyHole(%d, %d)\\n\", x, y);\n p.fallInWater();\n }",
"private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}",
"@Override\n public void use(Game game) {\n\n // ChooseTarget chooseTarget=new ChooseTarget(\"Select where do you want to move\",availableSquare);\n // game.notifyObservers(chooseTarget);\n game.getController().setGoOn(false);\n\n Worker worker = (Worker) game.getTargetInUse();\n game.getController().setCanSkip(true);\n\n if (game.getTargetSelected().getSquare().getWorker() != null && ((Worker) game.getTargetInUse()).getMandatorySquare() == null) {\n game.setTargetSelected(game.getTargetSelected().getSquare().getWorker());\n Worker w1 = (Worker) game.getTargetSelected();\n w1.setMandatorySquare(((Worker) game.getTargetInUse()).getHistoryPos().get(0));\n game.getController().setCanSkip(false);\n }\n\n if (worker.getMandatorySquare() != null) {\n //game.getTargetInUse().getSquare().removeWorker();\n game.getController().setCanSkip(false);\n game.getCurrentPlayer().setHasBeenMoved(true);\n worker.getMandatorySquare().setWorker((Worker) game.getTargetInUse());\n UpdateEvent event = new UpdateEvent(game.squareToJsonArrayGenerator());\n game.notifyObservers(event);\n // worker.setMandatorySquare(null);\n return;\n }\n\n if (worker.getCanBeMoved()) {\n if (availableSquare.contains(game.getTargetSelected().getSquare())) {\n game.getTargetInUse().getSquare().removeWorker();\n game.getCurrentPlayer().setHasBeenMoved(true);\n game.getTargetSelected().getSquare().setWorker((Worker) game.getTargetInUse());\n availableSquare.clear();\n UpdateEvent event = new UpdateEvent(game.squareToJsonArrayGenerator());\n game.notifyObservers(event);\n\n if (worker.getSquare().getLevel() == 3 && worker.getHistoryPos().get(worker.getHistoryPos().size() - 2).getLevel() < 3) {\n for (Worker w : game.getCurrentPlayer().getWorkers())\n if (w.equals(worker)) {\n game.setWinner(game.getCurrentPlayer());\n TurnState state = new NotifyVictoryState();\n game.getController().setState(state);\n state.executeState(game.getController());\n break;\n }\n }\n // availableSquare.add((worker.getHistoryPos().get(0));\n } else { game.notifyCurrent(new ExceptionEvent(\"target not available\"));\n game.getController().apply(new UndoCommand(), (VirtualView) game.getCurrentView());\n }\n } else new ExceptionEvent(\"you can't move\");\n //worker.setActualPos(target.getSquare());\n // worker.getHistoryPos().add(target.getSquare());\n\n //creazione evento+gestione skippable\n //game.getCurrentPlayer().setInQue(false);\n }",
"public void move() {\n int direction;\n int energy = maxEnergy;\n while (energy > 0) {\n energy -= speed;\n direction = (int) (4 * Math.random());\n for (int i = 0; i < speed; i++) {\n if (foodDetection()) {\n ArrayList<Creature> creatures = world.getCreatureList();\n //System.out.println(\"Moving to food, My Location: \" + x + \",\" + y);\n for (Creature c : creatures) {\n if (c.isStealth()) break;\n else if (c.getX() - x == - 1) { x--; break; }\n else if (c.getX() - x == 1) { x++; break; }\n else if (c.getY() - y == -1) { y--; break; }\n else if (c.getY() - y == 1) { y++; break; }\n }\n foodLocated();\n } else {\n if (direction == 0 && paths(\"up\")) { y++; }\n else if (direction == 1 && paths(\"down\")) { y--; }\n else if (direction == 2 && paths(\"left\")) { x--; }\n else if (direction == 3 && paths(\"right\")) { x++; }\n else direction = (int) (4 * Math.random());\n }\n }\n }\n }",
"public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }",
"public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}",
"private boolean attempt2GetPlayerFromHomeSucceds(Player player)\n {\n boolean blu = false;\n boolean red = false;\n boolean green = false;\n boolean yellow = false;\n if (player.getSteps_moved() == 0 && getValue_from_die() == 6)\n {\n if (getPerson_to_play() == 1)\n {\n blu = try2GetBluePlayerFromHome(player);\n if (blu)\n {\n BlueEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 2)\n {\n red = try2GetRedPlayerFromHome(player);\n if (red)\n {\n RedEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 3)\n {\n green = try2GetGreenPlayerFromHome(player);\n if (green)\n {\n GreenEatsPlayer(player);\n }\n }\n else if (getPerson_to_play() == 4)\n {\n yellow = try2GetYellowPlayerFromHome(player);\n if (yellow)\n {\n YellowEatsPlayer(player);\n }\n }\n\n\n if (blu || red || green || yellow)\n {\n value_from_die = 0;\n ludo.setDrawScoreAllowed(false);\n playPlayerHasMovedMusic();\n return true;\n }\n }\n return false;\n }",
"protected void pickupFood() {\r\n\t\tif(this.food > 0){\r\n\t\t\tthis.food--;\r\n\t\t}\r\n\t}",
"public Location attack() {\n resetBoard();\n\n if (getHits().isEmpty()) {\n// System.out.println(\"Hunting\");\n\n for (final int[] r : board) {\n for (int c = 0; c < r.length; c++) {\n if (getIntegers().contains(5) && (c < (r.length - 4)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3]) && (-1 != r[c + 4])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n ++r[c + 4];\n }\n\n if (getIntegers().contains(4) && (c < (r.length - 3)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2]) && (-1 != r[c + 3])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n ++r[c + 3];\n }\n if (getIntegers().contains(3) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (c < (r.length - 2)))\n if ((-1 != r[c]) && (-1 != r[c + 1]) && (-1 != r[c + 2])) {\n ++r[c];\n ++r[c + 1];\n ++r[c + 2];\n\n }\n if (getIntegers().contains(2) && (c < (r.length - 1)))\n if ((-1 != r[c]) && (-1 != r[c + 1])) {\n ++r[c];\n ++r[c + 1];\n }\n }\n }\n\n for (int c = 0; c < board[0].length; c++) {\n for (int r = 0; r < board.length; r++) {\n if (getIntegers().contains(5) && (r < (board.length - 4)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n\n if (getIntegers().contains(4) && (r < (board.length - 3)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n if (getIntegers().contains(3) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(3) && (2 == Collections.frequency(getIntegers(), 3)) && (r < (board.length - 2)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n\n\n }\n if (getIntegers().contains(2) && (r < (board.length - 1)))\n if ((-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n }\n }\n } else {\n// System.out.println(\"Hitting\");\n\n for (final Location hit : getHits()) {\n final int r = hit.getRow();\n final int c = hit.getCol();\n\n if (getIntegers().contains(2)) {\n if ((0 <= (c - 1)) && (-1 != board[r][c]) && (-1 != board[r][c - 1])) {\n ++board[r][c];\n ++board[r][c - 1];\n }\n\n\n if (((c + 1) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1])) {\n ++board[r][c];\n ++board[r][c + 1];\n }\n\n if ((0 <= (r - 1)) && (-1 != board[r][c]) && (-1 != board[r - 1][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n }\n\n if (((r + 1) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n }\n\n\n }\n if (getIntegers().contains(3)) {\n final int inc = Collections.frequency(getIntegers(), 3);\n\n if ((0 <= (c - 2)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2])) {\n board[r][c] += inc;\n board[r][c - 1] += inc;\n board[r][c - 2] += inc;\n }\n if (((c + 2) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2])) {\n board[r][c] += inc;\n board[r][c + 1] += inc;\n board[r][c + 2] += inc;\n }\n if ((0 <= (r - 2)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c])) {\n board[r][c] += inc;\n board[r - 1][c] += inc;\n board[r - 2][c] += inc;\n }\n if (((r + 2) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c])) {\n board[r][c] += inc;\n board[r + 1][c] += inc;\n board[r + 2][c] += inc;\n }\n\n\n }\n if (getIntegers().contains(4)) {\n if ((0 <= (c - 3)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n }\n if (((c + 3) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n }\n if ((0 <= (r - 3)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n }\n if (((r + 3) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n }\n\n\n }\n if (getIntegers().contains(5)) {\n if ((0 <= (c - 4)) && (-1 != board[r][c]) && (-1 != board[r][c - 1]) && (-1 != board[r][c - 2]) && (-1 != board[r][c - 3]) && (-1 != board[r][c - 4])) {\n ++board[r][c];\n ++board[r][c - 1];\n ++board[r][c - 2];\n ++board[r][c - 3];\n ++board[r][c - 4];\n }\n if (((c + 4) < board[0].length) && (-1 != board[r][c]) && (-1 != board[r][c + 1]) && (-1 != board[r][c + 2]) && (-1 != board[r][c + 3]) && (-1 != board[r][c + 4])) {\n ++board[r][c];\n ++board[r][c + 1];\n ++board[r][c + 2];\n ++board[r][c + 3];\n ++board[r][c + 4];\n }\n if ((0 <= (r - 4)) && (-1 != board[r][c]) && (-1 != board[r - 1][c]) && (-1 != board[r - 2][c]) && (-1 != board[r - 3][c]) && (-1 != board[r - 4][c])) {\n ++board[r][c];\n ++board[r - 1][c];\n ++board[r - 2][c];\n ++board[r - 3][c];\n ++board[r - 4][c];\n }\n if (((r + 4) < board.length) && (-1 != board[r][c]) && (-1 != board[r + 1][c]) && (-1 != board[r + 2][c]) && (-1 != board[r + 3][c]) && (-1 != board[r + 4][c])) {\n ++board[r][c];\n ++board[r + 1][c];\n ++board[r + 2][c];\n ++board[r + 3][c];\n ++board[r + 4][c];\n }\n }\n }\n\n for (final Location hit : getHits()) {\n board[hit.getRow()][hit.getCol()] = 0;\n }\n }\n\n// for (int[] i : board)\n// System.out.println(Arrays.toString(i));\n return findLargest();\n }",
"@Override\n public void move() {\n System.out.println(\"I like to burrow around in the ground and avoid rocky areas.\");\n }",
"public void simulation(){\n GameInformation gi = this.engine.getGameInformation();\n Point ball = gi.getBallPosition();\n Player playerSelected;\n int xTemp;\n team = gi.getTeam(ball.x , ball.y);\n\n //Attack\n if(team == gi.activeActor){\n selectAttackerPlayer(gi.getPlayerTeam(gi.activeActor));\n doAttackMoove(playerOne.getPosition(), gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectProtectPlayer(gi.getPlayerTeam(gi.activeActor));\n doProtectMoove(playerTwo.getPosition(), playerOne.getPosition() ,gi.cells[(int) playerTwo.getPosition().getX()][(int) playerTwo.getPosition().getY()].playerMoves);\n playerOne = null;\n playerTwo = null;\n this.engine.next();\n }\n else{//Defense\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n selectCloserPlayer(gi.getPlayerTeam(gi.activeActor));\n doDefenseMoove(playerOne.getPosition(), this.engine.getGameInformation().getBallPosition() ,gi.cells[(int) playerOne.getPosition().getX()][(int) playerOne.getPosition().getY()].playerMoves);\n TacklAction tackl = new TacklAction();\n tackl.setSource(playerOne.getPosition());\n VisualArea[] area;\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n\n tackl.setSource(playerTwo.getPosition());\n\n if ( area = tackl.getVisualArea(this.engine.getGameInformation() ) != null ){\n tackl.setDestination(area[0]);\n this.engine.performAction( tackl );\n }\n playerOne = null;\n playerTwo = null;\n }\n }",
"private void sleep() {\n\t\ttargetFlower = null;\n\t\tif(startForaging()) {\n\t\t\t// add food to bee's crop for upcoming foraging run\n\t\t\tif(food < startingCrop){\n\t\t\t\thive.food -= (startingCrop - food);\n\t\t\t\tfood = startingCrop;\n\t\t\t}\n\t\t\tif(startScouting() || hive.dancingBees.size() <= 0) {\n\t\t\t\tstate = \"SCOUTING\";\n\t\t\t\tcurrentAngle = RandomHelper.nextDoubleFromTo(0, 2*Math.PI);\n\t\t\t}\n\t\t\telse{ // else follow a dance\n\t\t\t\t// if bee follows dance, store angle and distance in the bee object\n\t\t\t\tint index = RandomHelper.nextIntFromTo(0, hive.dancingBees.size() - 1);\n\t\t\t\tNdPoint flowerLoc = space.getLocation(hive.dancingBees.get(index).targetFlower);\n\t\t\t\tNdPoint myLoc = space.getLocation(this);\n\t\t\t\tdouble ang = SpatialMath.calcAngleFor2DMovement(space, myLoc, flowerLoc);\n\t\t\t\tdouble dist = space.getDistance(flowerLoc, myLoc);\n\t\t\t\t\n\t\t\t\t// start following dance at correct angle\n\t\t\t\tcurrentAngle = ang;\n\t\t\t\tfollowDist = dist;\n\t\t\t\tstate = \"FOLLOWING\";\n\t\t\t}\n\t\t}\n\t\telse { // continue sleeping\n\t\t\thive.food -= lowMetabolicRate/2;\n\t\t\thover(grid.getLocation(hive));\n\t\t\t// update energy and food storage\n\t\t\tif(food > startingCrop){\n\t\t\t\tfood -= foodTransferRate;\n\t\t\t\thive.food += foodTransferRate;\n\t\t\t}\n\t\t}\n\t}",
"public void doOffensiveMicro(RobotInfo[] engageableEnemies, MapLocation rallyPoint) throws GameActionException {\n\n if (engageableEnemies.length > 0) {\n // returns {is winning, is lowest health and not alone}\n int[] metrics = getBattleMetrics(engageableEnemies);\n if (metrics[0] > 0) {\n //rc.setIndicatorString(1, \"winning...\" + Clock.getRoundNum());\n\n if (metrics[1] != -1 || metrics[2] != -1) {\n Messaging.setBattleFront(new MapLocation(metrics[1], metrics[2]));\n }\n MapLocation nearestBattle = Messaging.getClosestBattleFront(rc.getLocation());\n RobotInfo[] attackableEnemies = Cache.getAttackableEnemies();\n if (attackableEnemies.length > 0) {\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(attackableEnemies);\n }\n } else {\n if (metrics[1] != -1 || metrics[2] != -1) {\n if (nearestBattle != null && nearestBattle.distanceSquaredTo(rc.getLocation()) <= 50) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n } else {\n // \"are we definitely going to die?\"\n if (metrics[1] > 0) {\n SupplyDistribution.setDyingMode();\n SupplyDistribution.manageSupply();\n if (rc.isWeaponReady()) {\n attackLeastHealthPrioritized(Cache.getAttackableEnemies());\n }\n \n // Retreat\n } else {\n if (rc.isCoreReady()) {\n int[] attackingEnemyDirs = calculateNumAttackingEnemyDirs();\n Nav.retreat(attackingEnemyDirs);\n }\n }\n }\n } else {\n if (rc.isCoreReady()) {\n MapLocation nearestBattle = Messaging.getClosestBattleFront(curLoc);\n if (nearestBattle != null ) {\n //rc.setIndicatorString(1, \"Going to battlefront: \" + nearestBattle + \", \" + Clock.getRoundNum());\n Nav.goTo(nearestBattle, Engage.UNITS);\n } else if (rallyPoint != null) {\n Nav.goTo(rallyPoint, Engage.NONE);\n }\n }\n }\n }",
"public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }",
"private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }",
"private static void attack(RobotInfo target) throws GameActionException {\n if (SOLDIER_DEBUG) {\n System.out.println(\"attacking\");\n }\n BulletInfo[] bullets = rc.senseNearbyBullets(EvasiveSoldier.BULLET_DETECT_RADIUS);\n RobotInfo[] robots = rc.senseNearbyRobots(EvasiveSoldier.ENEMY_DETECT_RADIUS);\n MapLocation targetLocation = target.getLocation();\n move(bullets, robots, targetLocation);\n //RobotUtils.tryMoveDestination(targetLocation);\n if (TargetingUtils.clearShot(here, target) || (rc.getType() == RobotType.GARDENER && rc.getOpponentVictoryPoints() > 10)) {\n if (SOLDIER_DEBUG) {\n System.out.println(\"clearShot to target\");\n }\n Direction towardsEnemy = here.directionTo(targetLocation);\n float distanceEnemy = here.distanceTo(targetLocation);\n if (distanceEnemy <= 3.5 && rc.canFirePentadShot() && rc.getTeamBullets() > 200) {\n rc.firePentadShot(towardsEnemy);\n }\n else {\n if (rc.canFireTriadShot() && rc.getTeamBullets() > 50) {\n rc.fireTriadShot(towardsEnemy);\n }\n else if (rc.canFireSingleShot()) {\n rc.fireSingleShot(towardsEnemy);\n }\n }\n }\n }",
"public void touchGhost() \n { \n if (getOneIntersectingObject(Ghosts.class) != null)\n Level1.transitionToGameLoseWorld(); \n // transfer to game lose would when the main character thouch the ghost\n }",
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"void playerHit() {\n if (lives == 0) {//if no lives left\n isDead = true;\n } else {//remove a life and reset positions\n lives -=1;\n immortalityTimer = 100;\n resetPositions();\n }\n }",
"@Override\r\n\tpublic void doAction(MedcivGame game) {\n\t\ttry {\r\n\t\t\t((Livestock)game.matchingVillager(ownerId).getItemById(targetId)).setTendedToThisTurn(true);\r\n\t\t}catch(NullPointerException e) {\r\n\t\t\t//do nothing; the cow is dead, or you are\r\n\t\t}\r\n\t}",
"private void wentOffWall() {\n //random location\n b.numX = r.nextInt(2400) + 100;\n b.numY = r.nextInt(1400) + 100;\n //random speed\n b.xSpeed = this.newSpeed();\n b.ySpeed = this.newSpeed();\n }",
"public void pave() {\n if (!world[position.x][position.y].equals(Tileset.NOTHING)) {\n System.out.println(\"I cannot pave at this place.\");\n return;\n }\n world[position.x][position.y] = Tileset.FLOOR;\n }",
"private boolean UpdateWithoutCarriedBlock()\r\n {\r\n if ( rand.nextInt(20) == 0 )\r\n {\r\n int i = MathHelper.floor_double( ( posX - 3D ) + rand.nextDouble() * 6D );\r\n int j = MathHelper.floor_double( posY - 1D + rand.nextDouble() * 7D );\r\n int k = MathHelper.floor_double( ( posZ - 3D ) + rand.nextDouble() * 6D );\r\n \r\n int l1 = worldObj.getBlockId( i, j, k );\r\n\r\n if ( CanPickUpBlock( i, j, k ) )\r\n {\r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderBlockCollectAuxFXID, i, j, k, l1 + ( worldObj.getBlockMetadata( i, j, k ) << 12 ) );\r\n\t\t \r\n setCarried( worldObj.getBlockId( i, j, k ) );\r\n setCarryingData( worldObj.getBlockMetadata( i, j, k ) );\r\n worldObj.setBlockToAir( i, j, k );\r\n }\r\n }\r\n else if ( worldObj.provider.dimensionId == 1 )\r\n {\r\n \t// Endermen in the end without a block in hand will eventually teleport back to the overworld\r\n \t\r\n \t\tif ( rand.nextInt( 9600 ) == 0 )\r\n \t\t{\r\n \t\t\t// play dimensional travel effects\r\n \t\t\t\r\n int i = MathHelper.floor_double( posX );\r\n int j = MathHelper.floor_double( posY ) + 1;\r\n int k = MathHelper.floor_double( posZ );\r\n \r\n\t\t worldObj.playAuxSFX( FCBetterThanWolves.m_iEnderChangeDimensionAuxFXID, i, j, k, 0 );\r\n\t\t \r\n setDead();\r\n \r\n return false;\r\n \t\t}\r\n }\r\n \r\n return true;\r\n }",
"private void hatch(Location currentLocation) {\n GameWorld.getPlayer().earnEcoPoints(hatchEarnings);\n currentLocation.addActor(babyDinosaur);\n currentLocation.removeItem(this);\n }",
"@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }",
"public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}",
"static void defending() throws GameActionException {\n\n\t\trc.setIndicatorLine(myLocation, myLocation.add(robotDirection), 0, 0, 0);\n\n\t\tif (rc.canBuildRobot(RobotType.SOLDIER, robotDirection)\n\t\t\t\t&& rc.readBroadcast(Channels.COUNT_SOLDIER) < Constants.MAX_COUNT_SOLDIER) {\n\t\t\trc.buildRobot(RobotType.SOLDIER, robotDirection);\n\t\t\tCommunication.countMe(RobotType.SOLDIER);\n\t\t}\n\n\t}",
"public void initialTroopSpread() throws IOException {\r\n\t\t\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\t//Get the name of the country they are clicking\r\n\t\tString s = \"\";\r\n\t\tfor (Country c : players.get(turnCounter).getCountries()) {\r\n\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\ts = c.getName();\r\n\t\t\t}\r\n\t\t\t//If the player own that country, increment that country's troops, and deincrement the total amount of remaining troops\r\n\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)) {\r\n\t\t\t\tc.setTroops(c.getTroops() + 1);\r\n\t\t\t\tinitialtroops--;\r\n\r\n\t\t\t\t//incrememnt the turn counter to the next player\r\n\t\t\t\t\r\n\t\t\t\tdo {\t\t\t\t\t\r\n\t\t\t\t\tturnCounter++;\r\n\t\t\t\t\tif (turnCounter >= players.size()) {\r\n\t\t\t\t\t\tturnCounter = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}while(players.get(turnCounter).getCountries().size() == 0);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t//if there are no remaining troops left to deploy, start the game by running the first deploy\r\n\t\tif (initialtroops == 0) {\r\n\t\t\ttry {\r\n\t\t\t\trender();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// Catch\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tturnCounter = 0;\r\n\t\t\tphaseButton.setVisible(true);\r\n\t\t\tdeploy();\r\n\t\t}\r\n\r\n\t}",
"public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }",
"@Override\n @SuppressWarnings(\"empty-statement\")\n public void attack(){\n\n if (myTerritory.getAlpha() <= 0.5){\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getSoldiers()/4;\n defendingSoldiers = myTerritory.getSoldiers()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }\n else\n myTerritory.produceSoldiers(myTerritory.getNatRes(), myTerritory.getPeasants());\n attackingSoldiers = myTerritory.getFoodGrowth()/4;\n defendingSoldiers = myTerritory.getFoodGrowth()*3/4;\n attackedTerritoryID = (new Random()).nextInt(myTerritory.getNeighbors().numObjs) + 1;\n }",
"@Test\n public void bestowEnchantmentWillNotBeTapped() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n // Enchantment {1}{W}\n // Creatures your opponents control enter the battlefield tapped.\n addCard(Zone.BATTLEFIELD, playerB, \"Imposing Sovereign\");\n\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n // because cast with bestow, Boon Satyr may not be tapped\n assertTapped(\"Boon Satyr\", false);\n\n }",
"void gettingBackToInitial(){\n robot.setDrivetrainPosition(-hittingMineralDistance, \"translation\", 1.0);\n }",
"private static void runHQ() throws GameActionException {\n\t\tif (Clock.getRoundNum() < 3) {\t\t\t\n\t\t\tif (rc.isActive()) {\n\t\t\t\tDirection spawnDir = dir[rand.nextAnd(7)];\n\t\t\t\tif (rc.senseObjectAtLocation(curLoc.add(spawnDir)) == null) {\n\t\t\t\t\trc.spawn(spawnDir);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tif (pastrLocations[0] == null) {\n\t\t\t\tpastrLocations[0] = getBestPastrLocNearMeBasedOnCowGrowthRate();\n\t\t\t\trc.broadcast(0, pastrLocations[0].x * 100 + pastrLocations[0].y);\n\t\t\t}\n\t\t}\n\t\tdouble d = rc.senseCowsAtLocation(new MapLocation(8,11));\n\t\tSystem.out.println(d);\n\t}",
"private int end_round() {\n if(gameClock.displayTime() <= 0) {\n return 2;\n }\n \n for(target t : targets) {\n if(!t.is_hit()) return 0;\n }\n \n return 1;\n }"
]
| [
"0.6582824",
"0.6543927",
"0.64969707",
"0.6382267",
"0.6323258",
"0.63198406",
"0.62595713",
"0.625769",
"0.6253198",
"0.61674047",
"0.61625427",
"0.6119706",
"0.60443205",
"0.6017288",
"0.6017098",
"0.6011583",
"0.60100245",
"0.5999143",
"0.5994347",
"0.59731793",
"0.5955136",
"0.59550065",
"0.59386265",
"0.5934792",
"0.5933879",
"0.59332925",
"0.592242",
"0.59139055",
"0.59039396",
"0.5902978",
"0.58924997",
"0.5883567",
"0.5876099",
"0.58747727",
"0.58653563",
"0.58633804",
"0.5861873",
"0.5853514",
"0.5850614",
"0.5841983",
"0.5825931",
"0.58186555",
"0.58170724",
"0.5816561",
"0.5815762",
"0.5814851",
"0.5810039",
"0.5806997",
"0.5800774",
"0.57961553",
"0.57953113",
"0.5790773",
"0.5782811",
"0.57816505",
"0.57606107",
"0.5756167",
"0.5738754",
"0.5738335",
"0.5734425",
"0.5731538",
"0.5729299",
"0.57250834",
"0.57211626",
"0.571855",
"0.5711566",
"0.57102203",
"0.56967825",
"0.56947595",
"0.56908476",
"0.56857216",
"0.56829643",
"0.5682716",
"0.566893",
"0.56648964",
"0.5655967",
"0.5654814",
"0.56471974",
"0.56394154",
"0.563923",
"0.5632",
"0.56315225",
"0.56309366",
"0.56303906",
"0.5627399",
"0.5625476",
"0.56246513",
"0.5620043",
"0.5616477",
"0.5610151",
"0.5602799",
"0.56010944",
"0.559491",
"0.55912656",
"0.5590846",
"0.5581669",
"0.5581318",
"0.55809575",
"0.5575855",
"0.55756176",
"0.5575213",
"0.55751705"
]
| 0.0 | -1 |
Find targets 2 spots away from the enemy snake's head | public List<Tile> findTargets() {
List<Tile> targets = new ArrayList<>(); // our return value
int fearDistance = 2; // Ideally we're 2 spots away from their head, increases when we can't do that.
int foodDistance = 3; // We look at a distance 3 for food.
// If fearDistance gets this big, then its just GG i guess
while (targets.size() == 0 && fearDistance < 15) {
// Get the tiles around the Enemy's head
targets = this.gb.nearByTiles(this.enemy_head_x, this.enemy_head_y, fearDistance);
fearDistance += 1;
}
// Get the food tiles near us
for (int i=0; i < foodDistance; i++) {
List<Tile> nearBy = this.gb.nearByTiles(this.us_head_x, this.us_head_y, i);
for (Tile t : nearBy) {
if (t.isFood() && !targets.contains(t)) targets.add(t);
}
}
return targets;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void findEnemySnake() {\n // Cheap fix to GameState spawning a food on a person's HeadPiece\n if (this.gb.heads.size() == 1) {\n if (print) System.out.println(\" ONLY 1 HEAD FOUND IN GAME BOARD!\");\n HeadPiece h1 = this.gb.heads.get(0);\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n // fucking panic i guess\n if (print) System.out.println(\" CANNOT FIND ENEMY HEAD?????\");\n this.enemy_head_x = 0;\n this.enemy_head_y = 0;\n } else {\n // Correctly found enemy head\n this.enemy_head_x = h1.getX();\n this.enemy_head_y = h1.getY();\n }\n return;\n }\n\n // Find the enemy snake head and update member variables\n HeadPiece h1 = this.gb.heads.get(0);\n HeadPiece h2 = this.gb.heads.get(1);\n HeadPiece enemyHead;\n if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {\n enemyHead = h2;\n } else {\n enemyHead = h1;\n }\n this.enemy_head_x = enemyHead.getX();\n this.enemy_head_y = enemyHead.getY();\n }",
"int getTargetPos();",
"@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}",
"@Test\r\n\tpublic void testTargetsTwoSteps() {\r\n\t\tboard.calcTargets(10, 1, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\t\r\n\t\tboard.calcTargets(17, 13, 2);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 14)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 14)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(16, 12)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(15, 13)));\r\n\t}",
"private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }",
"@Test\n\tpublic void testTargetsTwoSteps() {\n\t\tboard.calcTargets(7, 6, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(5, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 5)));\n\t\tassertTrue(targets.contains(board.getCellAt(9, 6)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 4)));\n\t\tboard.calcTargets(14, 24, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t}",
"public XYPoint getSnakeHeadStartLocation();",
"@Override\n public ControllerViewEvent getTargetEffectTwo() {\n ArrayList<Square> possibleTargets = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquarePlayers().isEmpty())\n possibleTargets.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTargets), Encoder.encodeSquareTargetsY(possibleTargets));\n }",
"@Test \r\n\tpublic void testTargetsIntoRoom()\r\n\t{\r\n\t\t// One room is exactly 2 away\r\n\t\tboard.calcTargets(19, 8, 2);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(5, targets.size());\r\n\t\t// directly left (can't go right 2 steps)\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 6)));\r\n\t\t// directly up and down\r\n\t\tassertTrue(targets.contains(board.getCellAt(17, 8)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 8)));\r\n\t\t// one up/down, one left/right\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 7)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 7)));\r\n\t}",
"public void attack(Creature target) {\r\n\t\t//Check if attacker is within 1 tile\r\n\t\tint destx = (int) (target.getXlocation()/Tile.TILEWIDTH);\r\n\t\tint desty = (int) (target.getYlocation()/Tile.TILEHEIGHT);\r\n\t\tVector2i start = new Vector2i((int) (creature.getXlocation() / Tile.TILEWIDTH), (int) (creature.getYlocation()/ Tile.TILEHEIGHT));\r\n\t\t//FIND SHORTEST DISTANCE\r\n\t\tVector2i destination = null; \t\t\r\n\t\tdouble shortest = 100000; \t\t\t\t\t\t\t\t\t\t //Set huge\r\n\t\tbyte Direction = 2;\t\t\t\t\t\t\t\t\t\t\t\t //default Look DOWN\r\n\t\tdouble temp = getDistance(start, new Vector2i(destx+1, desty)); //Check first\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx+1, desty).isSolid() && !checkCollision(destx+1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx+1, desty);\r\n\t\t\tDirection = 1;\t\t\t\t\t\t\t\t\t\t\t\t //Look LEFT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx-1, desty)); \t\t //Check second\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx-1, desty).isSolid() && !checkCollision(destx-1, desty)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx-1, desty);\r\n\t\t\tDirection = 3;\t\t\t\t\t\t\t\t\t\t\t\t //Look RIGHT\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty+1)); \t\t //Check third\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty+1).isSolid() && !checkCollision(destx, desty+1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty+1);\r\n\t\t\tDirection = 0;\t\t\t\t\t\t\t\t\t\t\t\t //Look UP\r\n\t\t}\r\n\t\ttemp = getDistance(start, new Vector2i(destx, desty-1)); \t\t //Check fourth\r\n\t\tif (shortest > temp && !handler.getWorld().getTile(destx, desty-1).isSolid() && !checkCollision(destx, desty-1)) {\r\n\t\t\tshortest = temp;\r\n\t\t\tdestination = new Vector2i(destx, desty-1);\r\n\t\t\tDirection = 2;\t\t\t\t\t\t\t\t\t\t\t\t //Look DOWN\r\n\t\t}\r\n\t\t//SET PATH FOR SHORTEST DISTANCE\r\n\t\tList<Node> path = pf.findPath(start, destination);\r\n\t\t//FOLLOW SHORTEST DISTANCE PATH\r\n\t\tfollowPath(path);\r\n\t\t//IF ATTACKER HAS ARRIVED\r\n\t\tif (creature.getxMove() == 0 && creature.getyMove() == 0) {\r\n\t\t\t//face target -> \r\n\t\t\tcreature.setLastDirection(Direction);\r\n\t\t\t//attack\r\n\t\t\tcreature.setAttacking(true);\r\n\t\t} else {\r\n\t\t\tcreature.setAttacking(false);\r\n\t\t}\r\n\t}",
"@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"private int end_round() {\n if(gameClock.displayTime() <= 0) {\n return 2;\n }\n \n for(target t : targets) {\n if(!t.is_hit()) return 0;\n }\n \n return 1;\n }",
"@Test \n\tpublic void testTargetsIntoRoom()\n\t{\n\t\t// One room is exactly 2 away\n\t\tboard.calcTargets(5, 24, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(3, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(6, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(5, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(4, 23)));\n\t}",
"private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}",
"protected boolean findTarget(){\n\t\t// shoot units\n\t\tfloat tmpDist = -1;\n\t\tUnit tmpUnit = null;\n\t\tfor(Unit u:Game.map.get(tileId).unitMap){ // loop through units on\n\t\t\t\t\t\t\t\t\t\t\t\t\t// maptile\n\t\t\tif(this.id == u.id)\n\t\t\t\tcontinue;\n\t\t\tif(this.ownerId == u.ownerId)\n\t\t\t\tcontinue;\n\t\t\tif(u.dead)\n\t\t\t\tcontinue;\n\t\t\tVector3f tmp = Vector3f.sub(this.modelPos, u.modelPos, null);\n\t\t\tif(tmpDist == -1 || tmp.length() < tmpDist){\n\t\t\t\ttmpUnit = u;\n\t\t\t\ttmpDist = tmp.length();\n\t\t\t}else\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(tmpDist != -1 && tmpDist <= range && tmpUnit != null){\n\t\t\tthis.hostile = tmpUnit;\n\t\t\tthis.target = this.hostile.modelPos;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Test\r\n\tpublic void testTargetsOneStep() {\r\n\t\tboard.calcTargets(24, 17, 1);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 18)));\t\r\n\t\t\r\n\t\tboard.calcTargets(10, 24, 1);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 24)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 23)));\t\t\t\r\n\t}",
"@Test\r\n\tpublic void testTargets22_2() {\r\n\t\tBoardCell cell = board.getCell(2, 2);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 3)));\r\n\r\n\t}",
"private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }",
"@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}",
"@Test\r\n\tpublic void testTargetsIntoRoomShortcut() \r\n\t{\r\n\t\tboard.calcTargets(11, 24, 3);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(6, targets.size());\r\n\t\t//up and then left\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 22)));\r\n\t\t//up left down\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 23)));\r\n\t\t//left up right\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 24)));\r\n\t\t//left only\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 21)));\r\n\t\t// into the rooms\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 23)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 22)));\t\t\t\r\n\t}",
"@Test\n\tpublic void testTargetsIntoRoomShortcut() \n\t{\n\t\tboard.calcTargets(9, 18, 2);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(6, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(9, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 19)));\n\t\tassertTrue(targets.contains(board.getCellAt(11, 18)));\n\t\tassertTrue(targets.contains(board.getCellAt(10, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(8, 17)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 18)));\n\t}",
"public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }",
"private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}",
"private void checkTargetsReachable(){\n\t\tPathfinder pathfinder = new Pathfinder(collisionMatrix);\n\t\tLinkedList<Node> removeList = new LinkedList<Node>();\n\t\tboolean pathWasFound = false;\n\t\tLinkedList<Node> currentPath;\n\t\tLinkedList<Node> reversePath;\n\t\t\n\t\t//Go through all starting positions\n\t\tfor(LinkedList<Node> startList : targets){\n\t\t\tprogress += 8;\n\t\t\tsetProgress(progress);\n\t\t\tfor(Node startNode : startList){\n\t\t\t\t\n\t\t\t\tboolean outsideMap = (startNode.getCollisionXPos(scaleCollision) < 0 || startNode.getCollisionXPos(scaleCollision) >= (collisionMatrix.length-1) || startNode.getCollisionYPos(scaleCollision) < 0 || startNode.getCollisionYPos(scaleCollision) >= (collisionMatrix.length-1));\n\t\t\t\t\n\t\t\t\tpathWasFound = false;\n\t\t\t\t//Make sure that target is inside of map\n\t\t\t\tif(!outsideMap){\n\t\t\t\t\t//Check against all target positions\n\t\t\t\t\tfor(LinkedList<Node> targetList : targets){\n\t\t\t\t\t\tfor(Node targetNode : targetList){\n\t\t\t\t\t\t\t//Only check against targets that have not already been marked as unreachable\n\t\t\t\t\t\t\tboolean selfCheck = (targetNode.getXPos() != startNode.getXPos() || targetNode.getYPos() != startNode.getYPos());\n\t\t\t\t\t\t\tif(!removeList.contains(targetNode) && selfCheck){\n\t\t\t\t\t\t\t\t//Check if this path has already been checked\n\t\t\t\t\t\t\t\tif(!preCalculatedPaths.containsKey(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision))){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcurrentPath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t//Check if a path can be found for this start and target node\n\t\t\t\t\t\t\t\t\tif(pathfinder.findPath(startNode.getCollisionXPos(scaleCollision), startNode.getCollisionYPos(scaleCollision), targetNode.getCollisionXPos(scaleCollision), targetNode.getCollisionYPos(scaleCollision), currentPath)){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tif(Frame.USE_PRECALCULATED_PATHS)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(startNode.toStringCollision(scaleCollision) + \"-\" + targetNode.toStringCollision(scaleCollision), currentPath);\n\t\t\t\t\t\t\t\t\t\t\treversePath = new LinkedList<Node>();\n\t\t\t\t\t\t\t\t\t\t\treversePath.addAll(currentPath);\n\t\t\t\t\t\t\t\t\t\t\tCollections.reverse(reversePath);\n\t\t\t\t\t\t\t\t\t\t\treversePath.removeFirst();\n\t\t\t\t\t\t\t\t\t\t\treversePath.add(startNode);\n\t\t\t\t\t\t\t\t\t\t\tpreCalculatedPaths.put(targetNode.toStringCollision(scaleCollision) + \"-\" + startNode.toStringCollision(scaleCollision) ,reversePath);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\tpathWasFound = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Remove nodes which we cannot find a path from\n\t\t\t\tif(!pathWasFound){\n\t\t\t\t\tremoveList.add(startNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Go through the remove list and remove unreachable nodes\n\t\tfor(Node node : removeList){\n\t\t\tfor(LinkedList<Node> startList : targets){\n\t\t\t\tstartList.remove(node);\n\t\t\t}\n\t\t}\n\t}",
"private Cell getSnowballTarget() {\n Cell[][] blocks = gameState.map;\n int mostWormInRange = 0;\n Cell chosenCell = null;\n\n for (int i = currentWorm.position.x - 5; i <= currentWorm.position.x + 5; i++) {\n for (int j = currentWorm.position.y - 5; j <= currentWorm.position.y + 5; j++) {\n if (isValidCoordinate(i, j)\n && euclideanDistance(i, j, currentWorm.position.x, currentWorm.position.y) <= 5) {\n List<Cell> affectedCells = getSurroundingCells(i, j);\n affectedCells.add(blocks[j][i]);\n int wormInRange = 0;\n for (Cell cell : affectedCells) {\n for (Worm enemyWorm : opponent.worms) {\n if (enemyWorm.position.x == cell.x && enemyWorm.position.y == cell.y\n && enemyWorm.roundsUntilUnfrozen == 0 && enemyWorm.health > 0)\n wormInRange++;\n }\n for (Worm myWorm : player.worms) {\n if (myWorm.position.x == cell.x && myWorm.position.y == cell.y && myWorm.health > 0)\n wormInRange = -5;\n }\n }\n if (wormInRange > mostWormInRange) {\n mostWormInRange = wormInRange;\n chosenCell = blocks[j][i];\n }\n }\n }\n }\n\n return chosenCell;\n }",
"public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }",
"@Test\n\tpublic void testTargetsOneStep() {\n\t\tboard.calcTargets(7, 6, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(4, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(7, 7)));\n\t\tassertTrue(targets.contains(board.getCellAt(7, 5)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(6, 6)));\t\n\t\tassertTrue(targets.contains(board.getCellAt(8, 6)));\t\n\n\n\t\tboard.calcTargets(14, 24, 1);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(2, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(15, 24)));\n\t\tassertTrue(targets.contains(board.getCellAt(14, 23)));\t\t\t\n\t}",
"public static void hint(int[][] map, int x, int y) {\n\t\t// show neighbor of this shot\n\t\tfor (int i = -1; i < 2; i++) {\n\t\t\tfor (int j = -1; j < 2; j++) {\n\n\t\t\t\tif (x + i < 0 || y + j < 0 || x + i > 9 || y + j > 9) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (map[x + i][y + j] == 0) {\n\t\t\t\t\tmap[x + i][y + j] = 3;\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[x + i][y + j] == 1) {\n\t\t\t\t\t// map[x + i][y + j] = MINE_FOUND;\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"x axis is \" + (x + i) + \" and y axis is \" + (y + j) + \"\" + \", this is a target!\");\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------\");\n\t\t// print all the previous shots.\n\t\tfor (int i = 0; i < map.length; i++) {\n\t\t\tfor (int j = 0; j < map[i].length; j++) {\n\t\t\t\tif (map[i][j] == 3) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is not the target!\");\n\t\t\t\t} else if (map[i][j] == 2) {\n\t\t\t\t\tSystem.out.println(\"x axis is \" + i + \" and y axis is \" + j + \"\" + \", it is a found target!\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private TargetInformation findHighGoal(Mat image) {\r\n\t\tTargetInformation ret = new TargetInformation();\r\n\t\tret.targetingPeg = false;\r\n\t\t\r\n long[] xsums = sums(image, true);\r\n long[] ysums = sums(image, false);\r\n \r\n\t List<PeakLoc> xpeaks = findPeaks(xsums, 10);\r\n\t List<PeakLoc> ypeaks = findPeaks(ysums, 10);\r\n\r\n\t if (ypeaks.size() == 2 && xpeaks.size() > 0) {\r\n\t \tret.targetFound = true;\r\n\t \tret.x = (xpeaks.get(0).getStop() - xpeaks.get(0).getStart()) / 2;\r\n\t \tret.gap = ypeaks.get(1).getStart() - ypeaks.get(0).getStop();\r\n\t \tret.width = xpeaks.get(0).getStop() - xpeaks.get(0).getStart();\r\n\t \tret.height = ypeaks.get(1).getStop() - ypeaks.get(0).getStart();\r\n\t \tret.y = (ypeaks.get(0).getStop() + ypeaks.get(1).getStart())/2;\r\n\t \t\r\n\t \tdouble pixelsPerInch = ret.gap / highGoalGapInches;\r\n\t \tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t{\r\n\t \t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalWidthInches) / 2;\r\n\t \t}\r\n\t \tif (ypeaks.get(0).isTruePeak())\r\n\t \t{\r\n\t \t\tif (xpeaks.get(0).isTruePeak() && xpeaks.get(1).isTruePeak())\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch * 2 + ret.width / highGoalHeightInches) / 3;\r\n\t \t\t}\r\n\t \t\telse\r\n\t \t\t{\r\n\t \t\t\tpixelsPerInch = (pixelsPerInch + ret.width / highGoalHeightInches) / 2;\r\n\t \t\t}\r\n\t \t} \t\r\n\t \t\r\n\t \tret.aimX = ret.x + (cameraOffsetInches - shooterOffsetInches) * pixelsPerInch;\r\n\t \t\r\n\t \tret.correctionAngle = (double)((ret.aimX - image.cols() / 2)) / pixelsPerXDegree;\r\n\t }\r\n\t else\r\n\t {\r\n\t \tret.targetFound = false;\r\n\t }\r\n\t \r\n\t return ret;\r\n\t}",
"int getHitpoints(Unit unit);",
"@Test\r\n\tpublic void testTargets11_2() {\r\n\t\tBoardCell cell = board.getCell(1, 1);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(6, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(3, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(0, 0)));\r\n\r\n\t}",
"@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}",
"public void gettingAttacked(HitByBulletEvent e) {\r\n\t\tif (gotTarget) {\r\n\t\t\tfor (int i = 0; i < enemyTracker.getEnemyList().size(); i++) {\r\n\t\t\t\tif (enemyTracker.getEnemyList().get(i).getName().equals(e.getName()) && (!e.getName().equals(radarTarget.getName()))) {\r\n\t\t\t\t\t\tmrRobot.sendMessage(5, \"2\");\r\n\t\t\t\t\t\tradarTarget = enemyTracker.getEnemyList().get(getIndexForEnemy(e.getName()));\r\n\t\t\t\t\t\ttargetTracking.get(getIndexForName(mrRobot.getName())).updateTarget(radarTarget);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\r\n\tpublic void testTargets00_2() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tboard.calcTargets(cell, 2);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(3, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 2)));\r\n\t\tassertTrue(targets.contains(board.getCell(2, 0)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 1)));\r\n\r\n\t}",
"public void unFollowing() {\n\t\tdouble newTargetX, newTargetY, xValue, yValue;\n\t\tdouble slope = (kin.target.y - kin.position.y) / (kin.target.x - kin.position.x);\n\t\t\n\t\t// off to the left of the screen\n\t\tif (kin.position.x < kin.target.x) {\n\t\t\tnewTargetY = (MainPanel.PWIDTH + img.getWidth() - kin.target.x) * slope + kin.target.y;\n\t\t\txValue = MainPanel.PWIDTH + img.getWidth();\n\t\t} else { // off the right of the screen\n\t\t\tnewTargetY = (-kin.target.x - img.getWidth()) * slope + kin.target.y;;\n\t\t\txValue = -img.getWidth();\n\t\t}\n\t\t\n\t\t// off to the top of the screen\n\t\tif (kin.position.y < kin.target.y) {\n\t\t\tnewTargetX = (MainPanel.PHEIGHT + img.getHeight() - kin.target.y) / slope + kin.target.x;\n\t\t\tyValue = MainPanel.PHEIGHT + img.getHeight();\n\t\t} else { // off the bottom of the screen\n\t\t\tnewTargetX = (-kin.target.y - img.getHeight()) / slope + kin.target.x;\n\t\t\tyValue = -img.getHeight();\n\t\t}\n\t\t\n\t\t// compare distances and use the minimum as target\n\t\tif (getDistance(kin.position.x, kin.position.y, xValue, newTargetY) < getDistance(kin.position.x, kin.position.y, newTargetX, yValue)) {\n\t\t\tkin.target = new Vector2d(xValue, newTargetY);\n\t\t} else {\n\t\t\tkin.target = new Vector2d(newTargetX, yValue);\n\t\t} // end else\n\t}",
"public static final List<EntityMob> acquireAllLookMobTargets(EntityLivingBase seeker, int distance, double radius) \r\n\t{\r\n\t\tif (distance < 0 || distance > MAX_DISTANCE) \r\n\t\t{\r\n\t\t\tdistance = MAX_DISTANCE;\r\n\t\t}\r\n\r\n\t\tList<EntityMob> targets = new ArrayList<EntityMob>();\r\n\t\tVec3d vec3 = seeker.getLookVec();\r\n\t\tdouble targetX = seeker.posX;\r\n\t\tdouble targetY = seeker.posY + seeker.getEyeHeight() - 0.10000000149011612D;\r\n\t\tdouble targetZ = seeker.posZ;\r\n\t\tdouble distanceTraveled = 0;\r\n\r\n\t\twhile ((int) distanceTraveled < distance) \r\n\t\t{\r\n\t\t\ttargetX += vec3.x;\r\n\t\t\ttargetY += vec3.y;\r\n\t\t\ttargetZ += vec3.z;\r\n\t\t\tdistanceTraveled += vec3.lengthVector();\r\n\r\n\t\t\tList<EntityMob> list = seeker.world.getEntitiesWithinAABB(EntityMob.class,\r\n\t\t\t\t\tnew AxisAlignedBB(targetX-radius, targetY-radius, targetZ-radius, targetX+radius, targetY+radius, targetZ+radius));\r\n\r\n\t\t\tfor (EntityMob target : list) \r\n\t\t\t{\r\n\t\t\t\tif (target != seeker && target.canBeCollidedWith() && isTargetInSight(vec3, seeker, target)) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (!targets.contains(target)) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttargets.add(target);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn targets;\r\n\t}",
"public MovingObjectPosition rayTraceEntities(World world, Vector3 target)\n {\n MovingObjectPosition pickedEntity = null;\n Vec3 startingPosition = this.toVec3();\n Vec3 look = target.toVec3();\n double reachDistance = this.distance(target);\n Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance);\n\n double checkBorder = 1.1 * reachDistance;\n AxisAlignedBB boxToScan = AxisAlignedBB.getAABBPool().getAABB(-checkBorder, -checkBorder, -checkBorder, checkBorder, checkBorder, checkBorder).offset(this.x, this.y, this.z);\n\n @SuppressWarnings(\"unchecked\")\n List<Entity> entitiesHit = world.getEntitiesWithinAABBExcludingEntity(null, boxToScan);\n double closestEntity = reachDistance;\n\n if (entitiesHit == null || entitiesHit.isEmpty())\n {\n return null;\n }\n for (Entity entityHit : entitiesHit)\n {\n if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null)\n {\n float border = entityHit.getCollisionBorderSize();\n AxisAlignedBB aabb = entityHit.boundingBox.expand(border, border, border);\n MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, reachPoint);\n\n if (hitMOP != null)\n {\n if (aabb.isVecInside(startingPosition))\n {\n if (0.0D < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n if (pickedEntity != null)\n {\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = 0.0D;\n }\n }\n }\n else\n {\n double distance = startingPosition.distanceTo(hitMOP.hitVec);\n\n if (distance < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = distance;\n }\n }\n }\n }\n }\n return pickedEntity;\n }",
"boolean hasTargetPos();",
"public ArrayList<Target> getAlienPlaces(BlipModel model)\r\n/* 434: */ {\r\n/* 435:515 */ int angle = (int)model.getAngle();\r\n/* 436:516 */ float x = model.getX() - 0.5F;\r\n/* 437:517 */ float y = model.getY() - 0.5F;\r\n/* 438: */ \r\n/* 439:519 */ ArrayList<Target> targets = new ArrayList();\r\n/* 440:521 */ if (checkAlienPlacementTile(x, y)) {\r\n/* 441:523 */ targets.add(new Target(x, y));\r\n/* 442: */ }\r\n/* 443:525 */ if (checkAlienPlacementTile(x, y + 1.0F)) {\r\n/* 444:527 */ targets.add(new Target(x, y + 1.0F));\r\n/* 445: */ }\r\n/* 446:529 */ if (checkAlienPlacementTile(x, y - 1.0F)) {\r\n/* 447:531 */ targets.add(new Target(x, y - 1.0F));\r\n/* 448: */ }\r\n/* 449:533 */ if (checkAlienPlacementTile(x + 1.0F, y)) {\r\n/* 450:535 */ targets.add(new Target(x + 1.0F, y));\r\n/* 451: */ }\r\n/* 452:537 */ if (checkAlienPlacementTile(x - 1.0F, y)) {\r\n/* 453:539 */ targets.add(new Target(x - 1.0F, y));\r\n/* 454: */ }\r\n/* 455:541 */ if (checkAlienPlacementTile(x + 1.0F, y + 1.0F)) {\r\n/* 456:543 */ targets.add(new Target(x + 1.0F, y + 1.0F));\r\n/* 457: */ }\r\n/* 458:545 */ if (checkAlienPlacementTile(x - 1.0F, y + 1.0F)) {\r\n/* 459:547 */ targets.add(new Target(x - 1.0F, y + 1.0F));\r\n/* 460: */ }\r\n/* 461:549 */ if (checkAlienPlacementTile(x + 1.0F, y - 1.0F)) {\r\n/* 462:551 */ targets.add(new Target(x + 1.0F, y - 1.0F));\r\n/* 463: */ }\r\n/* 464:553 */ if (checkAlienPlacementTile(x - 1.0F, y - 1.0F)) {\r\n/* 465:555 */ targets.add(new Target(x - 1.0F, y - 1.0F));\r\n/* 466: */ }\r\n/* 467:558 */ return targets;\r\n/* 468: */ }",
"void playRoadCard(EdgeLocation spot1, EdgeLocation spot2);",
"@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}",
"@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}",
"public void onUpdate()\n {\n super.onUpdate();\n this.jumpMovementFactor = 0.0F;\n this.renderYawOffset = this.rotationPitch = this.rotationYaw = 0.0F;\n\n if (this.target != null && this.target instanceof EntityLiving)\n {\n EntityLiving var1 = (EntityLiving) this.target;\n\n if (var1.getHealth() <= 0 || !this.canEntityBeSeen(var1))\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n } else\n {\n if (this.target != null && this.target.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n return;\n }\n\n if (this.target == null)\n {\n this.target = this.worldObj.getClosestPlayerToEntity(this, -1.0D);\n\n if (this.target == null)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n\n return;\n }\n }\n }\n\n if (this.posX == (double) this.getOrgX() && this.posY == (double) this.getOrgY() && this.posZ == (double) this.getOrgZ())\n {\n if (!this.isReformed())\n {\n this.setReformed(true);\n }\n\n this.stop();\n this.moveTimer = 0;\n }\n\n if (this.slider == null)\n {\n Vec3 var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n Vec3 var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n MovingObjectPosition var18 = this.worldObj.rayTraceBlocks(var16, var2);\n var16 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);\n var2 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);\n\n if (var18 != null)\n {\n var2 = Vec3.createVectorHelper(var18.hitVec.xCoord, var18.hitVec.yCoord, var18.hitVec.zCoord);\n }\n\n if (!this.worldObj.isRemote)\n {\n Object var4 = null;\n List var15 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(4.0D, 4.0D, 4.0D));\n double var6 = 0.0D;\n\n for (int var8 = 0; var8 < var15.size(); ++var8)\n {\n Entity var9 = (Entity) var15.get(var8);\n\n if (var9.canBeCollidedWith() && var9 != this)\n {\n float var10 = 0.3F;\n\n if (var9 instanceof EntitySlider)\n {\n this.slider = (EntitySlider) var9;\n var18 = null;\n }\n\n AxisAlignedBB var11 = var9.boundingBox.expand((double) var10, (double) var10, (double) var10);\n MovingObjectPosition var12 = var11.calculateIntercept(var16, var2);\n\n if (var12 != null)\n {\n double var13 = var16.distanceTo(var12.hitVec);\n\n if (var13 < var6 || var6 == 0.0D)\n {\n var6 = var13;\n }\n }\n }\n }\n }\n\n if (this.slider == null || this.slider.isDead)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n }\n } else if (this.slider.target != this.target)\n {\n this.target = null;\n this.stop();\n this.moveTimer = 0;\n\n if (!this.worldObj.isRemote)\n {\n this.setDead();\n }\n } else\n {\n this.fallDistance = 0.0F;\n double var17;\n double var5;\n double var3;\n\n if (this.gotMovement)\n {\n if (this.isCollided)\n {\n var17 = this.posX - 0.5D;\n var3 = this.boundingBox.minY + 0.75D;\n var5 = this.posZ - 0.5D;\n\n if (this.crushed)\n {\n this.worldObj.playSoundEffect(this.posX, this.posY, this.posZ, \"random.explode\", 3.0F, (0.625F + (this.worldObj.rand.nextFloat() - this.worldObj.rand.nextFloat()) * 0.2F) * 0.7F);\n this.worldObj.playSoundAtEntity(this, \"aeboss.slider.collide\", 2.5F, 1.0F / (this.rand.nextFloat() * 0.2F + 0.9F));\n }\n\n this.stop();\n } else\n {\n if (this.speedy < 2.0F)\n {\n this.speedy += 0.035F;\n }\n\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n\n if (this.direction == 0)\n {\n this.motionY = (double) this.speedy;\n\n if (this.boundingBox.minY > (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY + 0.35D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 1)\n {\n this.motionY = (double) (-this.speedy);\n\n if (this.boundingBox.minY < (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY - 0.25D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 2)\n {\n this.motionX = (double) this.speedy;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 3)\n {\n this.motionX = (double) (-this.speedy);\n\n if (this.posX < (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 4)\n {\n this.motionZ = (double) this.speedy;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ + 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n } else if (this.direction == 5)\n {\n this.motionZ = (double) (-this.speedy);\n\n if (this.posZ < (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ - 0.125D))\n {\n this.stop();\n this.moveTimer = 8;\n }\n }\n }\n } else\n {\n this.motionY = 0.0D;\n\n if (this.moveTimer > 0)\n {\n --this.moveTimer;\n this.motionX = 0.0D;\n this.motionY = 0.0D;\n this.motionZ = 0.0D;\n } else\n {\n var17 = Math.abs(this.posX - (this.reform ? (double) this.getOrgX() : this.target.posX));\n var3 = Math.abs(this.boundingBox.minY - (this.reform ? (double) this.getOrgY() : this.target.boundingBox.minY));\n var5 = Math.abs(this.posZ - (this.reform ? (double) this.getOrgZ() : this.target.posZ));\n\n if (var17 > var5)\n {\n this.direction = 2;\n\n if (this.posX > (this.reform ? (double) this.getOrgX() - 1.0D : this.target.posX))\n {\n this.direction = 3;\n }\n } else\n {\n this.direction = 4;\n\n if (this.posZ > (this.reform ? (double) this.getOrgZ() - 1.0D : this.target.posZ))\n {\n this.direction = 5;\n }\n }\n\n if (var3 > var17 && var3 > var5 || var3 > 0.25D && this.rand.nextInt(5) == 0)\n {\n this.direction = 0;\n\n if (this.posY > (this.reform ? (double) this.getOrgY() : this.target.posY))\n {\n this.direction = 1;\n }\n }\n\n this.gotMovement = true;\n }\n }\n\n if (this.harvey > 0.01F)\n {\n this.harvey *= 0.8F;\n }\n }\n }",
"public void onScannedRobot(ScannedRobotEvent e) {\r\n\t\tif (isFriend(e.getName())) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tEnemy en;\r\n\t\tif (targets.containsKey(e.getName())) {\r\n\t\t\ten = (Enemy) targets.get(e.getName());\r\n\t\t} else {\r\n\t\t\ten = new Enemy();\r\n\t\t\ttargets.put(e.getName(), en);\r\n\t\t}\r\n\t\t// the next line gets the absolute bearing to the point where the bot is\r\n\t\tdouble absbearing_rad = (getHeadingRadians() + e.getBearingRadians())\r\n\t\t\t\t% (2 * PI);\r\n\t\t// this section sets all the information about our target\r\n\t\ten.name = e.getName();\r\n\t\tdouble h = normaliseBearing(e.getHeadingRadians() - en.heading);\r\n\t\th = h / (getTime() - en.ctime);\r\n\t\ten.changehead = h;\r\n\t\ten.x = getX() + Math.sin(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the x\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// target is\r\n\t\ten.y = getY() + Math.cos(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the y\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// target is\r\n\t\ten.bearing = e.getBearingRadians();\r\n\t\ten.heading = e.getHeadingRadians();\r\n\t\ten.ctime = getTime(); // game time at which this scan was produced\r\n\t\ten.speed = e.getVelocity();\r\n\t\ten.distance = e.getDistance();\r\n\t\ten.live = true;\r\n\t\tif ((en.distance < target.distance) || (target.live == false)) {\r\n\t\t\ttarget = en;\r\n\t\t}\r\n\t}",
"public static final List<EntityMob> acquireNearestLookMobTargetList(EntityLivingBase seeker, int distance, double radius, int numberOfTargets) \r\n\t{\r\n\t\tList<EntityMob> targets = new ArrayList<EntityMob>();\r\n\r\n\t\ttargets = acquireAllLookMobTargets(seeker, distance, radius);\r\n\r\n\t\tList<EntityMob> closestMobsArray = new ArrayList<EntityMob>();\r\n\r\n\t\tint counter = 0;\r\n\t\tboolean isListExhausted = false;\r\n\r\n\t\twhile(counter < numberOfTargets && !isListExhausted)\r\n\t\t{\r\n\t\t\tdouble currentDistance = MAX_DISTANCE_SQ;\r\n\r\n\t\t\tEntityMob currentTarget = null;\r\n\r\n\t\t\tfor (EntityMob target : targets) \r\n\t\t\t{\r\n\t\t\t\tif(!closestMobsArray.contains(target))\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble newDistance = target.getDistanceSq(seeker);\r\n\r\n\t\t\t\t\tif (newDistance < currentDistance) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcurrentTarget = target;\r\n\t\t\t\t\t\tcurrentDistance = newDistance;\r\n\r\n\t\t\t\t\t\t//System.out.println( \"Test Entity Detected By Dance of Arrows\" );\r\n\t\t\t\t\t\t//System.out.println( \"Target Found \" + Integer.toString( target.getEntityId() ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif(currentTarget != null)\r\n\t\t\t{\r\n\t\t\t\tclosestMobsArray.add(currentTarget);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tisListExhausted = true;\r\n\t\t\t}\r\n\r\n\t\t\tcounter++;\r\n\t\t}\r\n\r\n\t\treturn closestMobsArray;\r\n\t}",
"public static Vec3 findRandomTargetBlockTowards(EntityCreature aWaterMob, int xzFleeZoneSize, int yFleeZoneSize, Vec3 aTargetVectorPos, int aMinRangeXZ, int aMinDepth)\r\n{\r\n\r\n Vec3 _fleeingVector = Vec3.createVectorHelper(aTargetVectorPos.xCoord - aWaterMob.posX,aTargetVectorPos.yCoord - aWaterMob.posY,aTargetVectorPos.zCoord - aWaterMob.posZ);\r\n return findRandomTargetBlock(aWaterMob, xzFleeZoneSize, yFleeZoneSize,_fleeingVector,aMinRangeXZ,aMinDepth);\r\n}",
"public Vector getTargets(){\n return targets;\n }",
"private boolean shouldSnakeSeekTruman(Point snake, int trux, int truy){\n\t\treturn (Math.abs(snake.x - trux) < SNAKE_ATTACK_RANGE && Math.abs(snake.y - truy) < SNAKE_ATTACK_RANGE);\n\t}",
"@Override\n public Point getAdvancedMove(Point[] dogs, Point[] whiteSheep,\n Point[] blackSheep) {\n return null;\n }",
"public Position findWeed() {\n int xVec =0;\n int yVec=0;\n int sum = 0;\n Position move = new Position(0, 0);\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD.getOrganism(i, j);\n if(organism!=null){\n Class c = organism.getClass();\n if (c.getSimpleName().equals(\"Parnsip\")) {\n int tmpX = Math.abs(this.position.getX() - i);\n int tmpY = Math.abs(this.position.getY() - j);\n if (!(xVec == 0 && yVec == 0)) {\n int tmpSum = tmpX + tmpY;\n if (sum > tmpSum) {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpSum;\n this.setMove(move, j, i);\n }\n }\n else {\n xVec=tmpX;\n yVec=tmpY;\n sum = tmpX + tmpY;\n this.setMove(move, j, i);\n }\n }\n }\n\n }\n }\n return move;\n }",
"public int getShotsOnTarget () {\r\n\t\treturn shotsOnTarget;\r\n\t}",
"public int TakeStep()\n\t\t{\n\t\t// the eventual movement command is placed here\n\t\tVec2\tresult = new Vec2(0,0);\n\n\t\t// get the current time for timestamps\n\t\tlong\tcurr_time = abstract_robot.getTime();\n\n\n\t\t/*--- Get some sensor data ---*/\n\t\t// get vector to the ball\n\t\tVec2 ball = abstract_robot.getBall(curr_time);\n\n\t\t// get vector to our and their goal\n\t\tVec2 ourgoal = abstract_robot.getOurGoal(curr_time);\n\t\tVec2 theirgoal = abstract_robot.getOpponentsGoal(curr_time);\n\n\t\t// get a list of the positions of our teammates\n\t\tVec2[] teammates = abstract_robot.getTeammates(curr_time);\n\n\t\t// find the closest teammate\n\t\tVec2 closestteammate = new Vec2(99999,0);\n\t\tfor (int i=0; i< teammates.length; i++)\n\t\t\t{\n\t\t\tif (teammates[i].r < closestteammate.r)\n\t\t\t\tclosestteammate = teammates[i];\n\t\t\t}\n\n\n\t\t/*--- now compute some strategic places to go ---*/\n\t\t// compute a point one robot radius\n\t\t// behind the ball.\n\t\tVec2 kickspot = new Vec2(ball.x, ball.y);\n\t\tkickspot.sub(theirgoal);\n\t\tkickspot.setr(abstract_robot.RADIUS);\n\t\tkickspot.add(ball);\n\n\t\t// compute a point three robot radii\n\t\t// behind the ball.\n\t\tVec2 backspot = new Vec2(ball.x, ball.y);\n\t\tbackspot.sub(theirgoal);\n\t\tbackspot.setr(abstract_robot.RADIUS*5);\n\t\tbackspot.add(ball);\n\n\t\t// compute a north and south spot\n\t\tVec2 northspot = new Vec2(backspot.x,backspot.y+0.7);\n\t\tVec2 southspot = new Vec2(backspot.x,backspot.y-0.7);\n\n\t\t// compute a position between the ball and defended goal\n\t\tVec2 goaliepos = new Vec2(ourgoal.x + ball.x,\n\t\t\t\tourgoal.y + ball.y);\n\t\tgoaliepos.setr(goaliepos.r*0.5);\n\n\t\t// a direction away from the closest teammate.\n\t\tVec2 awayfromclosest = new Vec2(closestteammate.x,\n\t\t\t\tclosestteammate.y);\n\t\tawayfromclosest.sett(awayfromclosest.t + Math.PI);\n\n\n\t\t/*--- go to one of the places depending on player num ---*/\n\t\tint mynum = abstract_robot.getPlayerNumber(curr_time);\n\n\t\t/*--- Goalie ---*/\n\t\tif (mynum == 0)\n\t\t\t{\n\t\t\t// go to the goalie position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = goaliepos;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.1) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- midback ---*/\n\t\telse if (mynum == 1)\n\t\t\t{\n\t\t\t// go to a midback position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = backspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 2)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = northspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.30) \n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\telse if (mynum == 4)\n\t\t\t{\n\t\t\t// go to a the northspot position if far from the ball\n\t\t\tif (ball.r > 0.5) \n\t\t\t\tresult = southspot;\n\t\t\t// otherwise go to kick it\n\t\t\telse if (ball.r > 0.3 )\n\t\t\t\tresult = kickspot;\n\t\t\telse \n\t\t\t\tresult = ball;\n\t\t\t// keep away from others\n\t\t\tif (closestteammate.r < 0.3)\n\t\t\t\t{\n\t\t\t\tresult = awayfromclosest;\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*---Lead Forward ---*/\n\t\telse if (mynum == 3)\n\t\t\t{\n\t\t\t// if we are more than 4cm away from the ball\n\t\t\tif (ball.r > .3)\n\t\t\t\t// go to a good kicking position\n\t\t\t\tresult = kickspot;\n\t\t\telse\n\t\t\t\t// go to the ball\n\t\t\t\tresult = ball;\n\t\t\t}\n\n\n\t\t/*--- Send commands to actuators ---*/\n\t\t// set the heading\n\t\tabstract_robot.setSteerHeading(curr_time, result.t);\n\n\t\t// set speed at maximum\n\t\tabstract_robot.setSpeed(curr_time, 1.0);\n\n\t\t// kick it if we can\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\tabstract_robot.kick(curr_time);\n\n\t\t/*--- Send message to other robot ---*/\n\t\t// COMMUNICATION\n\t\t// if I can kick\n\t\tif (abstract_robot.canKick(curr_time))\n\t\t\t{\n\t\t\t// and I am robot #3\n\t\t\tif ((mynum==3))\n\t\t\t\t{\n\t\t\t\t// construct a message\n\t\t\t\tStringMessage m = new StringMessage();\n\t\t\t\tm.val = (new Integer(mynum)).toString();\n\t\t\t\tm.val = m.val.concat(\" can kick\");\n\n\t\t\t\t// send the message to robot 2\n\t\t\t\t// note: broadcast and multicast are also\n\t\t\t\t// available.\n\t\t\t\ttry{abstract_robot.unicast(2,m);}\n\t\t\t\tcatch(CommunicationException e){}\n\t\t\t\t}\n\t\t\t}\n\n\t\t/*--- Look for incoming messages ---*/\n\t\t//COMMUNICATION\n\t\twhile (messagesin.hasMoreElements())\n\t\t\t{\n\t\t\tStringMessage recvd = \n\t\t\t\t(StringMessage)messagesin.nextElement();\n\t\t\tSystem.out.println(mynum + \" received:\\n\" + recvd);\n\t\t\t}\n\n\t\t// tell the parent we're OK\n\t\treturn(CSSTAT_OK);\n\t\t}",
"@Override\n public void runMovingTest() {\n long now;\n int count, search;\n elapsedTime.clear();\n expandedCells.clear();\n GraphPath<Integer,DefaultWeightedEdge> agentPath=null;\n GraphPath<Integer,DefaultWeightedEdge> targetPath=null;\n //Integer agentNode, targetNode;\n List<Integer> pathToFollow = null;\n for(Point[] p : points){\n pathfinder = new LazyMovingTargetAdaptiveAStarShortestPath<Integer, DefaultWeightedEdge>(map);\n count=0;\n search=0;\n agentNode = p[0].toNode();\n targetNode = p[1].toNode();\n LinkedList<Integer> movingExpCell = new LinkedList<>();\n LinkedList<Long> movingElapsTime = new LinkedList<>();\n targetThread r = new targetThread();\n evadeThread = new Thread(r);\n evadeThread.start();\n while(!agentNode.equals(targetNode)){\n if(pathToFollow==null || !agentPath.getEndVertex().equals(targetNode)) {\n agentPath = pathfinder.getShortestPath(agentNode, targetNode, new OctileDistance());\n if(pathfinder.getElapsedTime() > Long.valueOf(1900))\n continue;\n movingElapsTime.add(pathfinder.getElapsedTime());\n movingExpCell.add(pathfinder.getNumberOfExpandedNodes());\n search++;\n }\n Integer targetNext = null;\n Integer agentNext = null;\n if(count%2==0) {\n /*targetPath = new Trailmax<Integer,DefaultWeightedEdge>(map).getShortestPath(agentNode,targetNode,null);\n pathToFollow = Graphs.getPathVertexList(targetPath);\n if (!pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n if (targetNext.equals(targetNode) && !pathToFollow.isEmpty()) targetNext = pathToFollow.remove(0);\n targetNode = targetNext;*/\n synchronized(moveTarget) {\n moveTarget = new Boolean(true);\n }\n\n try {\n Thread.sleep(12);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n pathToFollow=Graphs.getPathVertexList(agentPath);\n if(!pathToFollow.isEmpty()){\n int i = pathToFollow.lastIndexOf(agentNode);\n agentNext=pathToFollow.remove(i+1);\n }\n agentNode = agentNext;\n count++;\n //System.out.println(agentNode+\",\"+targetNode);\n\n }\n\n r.terminate();\n try {\n evadeThread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n pathToFollow=null;\n movingElapsedTime.put(p, movingElapsTime);\n movingExpandedCells.put(p, movingExpCell);\n movesMap.put(p, count);\n searchesMap.put(p, search);\n if(verbose) {\n Long totElaps = Long.valueOf(0);\n Integer totExp = 0;\n for (Long l : movingElapsTime) totElaps += l;\n for (Integer i : movingExpCell) totExp += i;\n System.out.println(\"total elapsed: \" + totElaps + \" total expanded \" + totExp);\n }\n }\n }",
"@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}",
"@Test\n public void testTargetSquares_cannotEnterGate() {\n Board board = new Board(p1, p2);\n Token ant = p1.getFromSupply(BugType.SPIDER);\n board.addToken(ant, 0, 3);\n board.addToken(p2.getFromSupply(BugType.QUEEN_BEE), 1, 0);\n board.addToken(p2.getFromSupply(BugType.SPIDER), 2, 0);\n board.addToken(p2.getFromSupply(BugType.GRASSHOPPER), 2, 1);\n board.addToken(p2.getFromSupply(BugType.SOLDIER_ANT), 0, 1);\n board.addToken(p2.getFromSupply(BugType.BEETLE), 0, 2);\n\n List<Hex> targets = Rules.getInstance().getTargetHexes(ant, board);\n assertEquals(2, targets.size());\n assertTrue(targets.contains(board.getHex(-1, 1)));\n assertTrue(targets.contains(board.getHex(3, 1)));\n }",
"public MapLocation findNearestAction() {\n MapLocation origin = rc.getLocation();\n MapLocation nearestHelp = findNearestHelp();\n MapLocation nearestArchon = findNearestArchon();\n\n if (nearestArchon == null && nearestHelp == null) {\n return rc.getInitialArchonLocations(rc.getTeam().opponent())[0]; // when no target is known, go to enemy archon initial position\n } else if (nearestArchon == null) { // when some of the targets is not present, just return the other one\n return nearestHelp; // is not null\n } else if (nearestHelp == null) {\n return nearestArchon; // is not null\n }\n\n if (origin.distanceSquaredTo(nearestHelp) < origin.distanceSquaredTo(nearestArchon)) {\n return nearestHelp;\n } else {\n return nearestArchon;\n }\n }",
"protected List<Target> createTargets(Relation segs)\r\n {\r\n List<Target> targets = new ArrayList<Target>();\r\n for (Item s = segs.getHead(); s != null; s = s.getNext()) {\r\n Element maryxmlElement = (Element) s.getFeatures().getObject(\"maryxmlElement\");\r\n String segName = s.getFeatures().getString(\"name\");\r\n targets.add(new HalfPhoneTarget(segName+\"_L\", maryxmlElement, s, true)); // left half\r\n targets.add(new HalfPhoneTarget(segName+\"_R\", maryxmlElement, s, false)); // right half\r\n }\r\n return targets;\r\n }",
"@Override\r\n\tpublic int calculateDistance(Attackable target, Attackable attacker) {\r\n\t\tint attackerPosX = attacker.getPosition().getX();\r\n\t\tint attackerPosY = attacker.getPosition().getY();\r\n\t\tint targetPosX = target.getPosition().getX();\r\n\t\tint targetPosY = target.getPosition().getY();\r\n\t\tif ((targetPosX <= attackerPosX+2 && targetPosY == attackerPosY) || (targetPosX <= attackerPosX-2 && targetPosY == attackerPosY)\r\n\t\t\t\t|| (targetPosX == attackerPosX && targetPosY <= attackerPosY+2) || (targetPosX == attackerPosX && targetPosY <= attackerPosY-2)\r\n\t\t\t\t|| (targetPosX <= attackerPosX+2 && targetPosY <= attackerPosY-2) || (targetPosX <= attackerPosX+2 && targetPosY <= attackerPosY+2)\r\n\t\t\t\t|| (targetPosX <= attackerPosX-2 && targetPosY <= attackerPosY-2) || (targetPosX <= attackerPosX-2 && targetPosY <= attackerPosY+2)){\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public boolean moveForward(){\n \n int[] last = (int[]) this.snake.elementAt(this.snake.size() -1);\n int[] sLast = (int[]) this.snake.elementAt(this.snake.size() -2);\n int[] diff = new int[2];\n int[] diff2 = new int[2];\n \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n \n //left\n if( direction == 1){\n diff2[0]--;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff = diff2; \n }\n \n //down\n }else if(direction == 2){\n \n diff2[1]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n //System.out.println(\"first one: \" + diff[0] + \", \" + diff[1]);\n }\n \n //right\n }else if(direction == 3){\n diff2[0]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n \n //up\n }else if(direction == 4){\n \n diff2[1]--;\n //System.out.println(\"\" + diff[0] + \", \" + diff[1]);\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n }else{ \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n }\n \n int[] newPoint = new int[2];\n newPoint[0] = last[0] + diff[0];\n newPoint[1] = last[1] + diff[1];\n \n //if it hits the snake itself\n boolean hits = false;\n Enumeration enu = this.snake.elements();\n int[] temp = new int[2];\n while(enu.hasMoreElements()){\n temp = (int[]) enu.nextElement();\n if(temp[0] == newPoint[0] && temp[1] == newPoint[1]){\n hits = true; \n }\n }\n if(hits){\n return false; \n }\n //if it hits the wall\n if( newPoint[0] >50 || newPoint[0] <0 || newPoint[1] >50 || newPoint[1] <0){\n return false; \n }else{\n if(newPoint [0] == this.apple[0] && newPoint[1] == this.apple[1]){\n this.snake.add(newPoint);\n this.ateApple();\n }else{\n this.snake.add(newPoint);\n this.snake.remove(0);\n \n \n }\n return true;\n }\n }",
"public float distanceToSprite(Sprite target) { \n return distanceToXY((int)target.pos.x, (int)target.pos.y);\n }",
"public Balloon acquireTarget() {\r\n\r\n\t\tBalloon closest = null;\r\n\t\tfloat closestDistance = 1000;\r\n\t\tif (balloons != null) {\r\n\t\t\tfor (Balloon balloons : balloons) {\r\n\t\t\t\tif (isInRange(balloons) && findDistance(balloons) < closestDistance && balloons.getHiddenHealth() > 0) {\r\n\t\t\t\t\tclosestDistance = findDistance(balloons);\r\n\t\t\t\t\tclosest = balloons;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (closest != null) {\r\n\t\t\t\ttargeted = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn closest;\r\n\r\n\t}",
"public int move(String direction) {\n int h = snake.getFirst() / width, w = snake.getFirst() % width;\n if (direction.equals(\"U\")) h--;\n else if (direction.equals(\"D\")) h++;\n else if (direction.equals(\"L\")) w--;\n else w++;\n if (w < 0 || w == width || h < 0 || h == height) return -1;\n int head = h*width + w;\n snake.addFirst(head); // move head\n if (idx < food.length && h == food[idx][0] && w == food[idx][1]) {\n score++; // and still keep the tail\n idx++;\n } else\n body.remove(snake.removeLast()); // move tail\n if (!body.add(head)) return -1;\n return score;\n}",
"public static int[] isMonsterInSight(Player curr) {\n int[] ans = {-1, -1};\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n String name = curr.getName();\n if (bodyDir == UP) {\n dirs.add(UP);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(DOWN);\n }\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(LEFT);\n }\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(UP);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(RIGHT);\n }\n }\n\n if (dirs == null || dirs.size() == 0)\n return ans; //{-1,-1}\n for (int m = 0; m < players.length; m++) { //skip player if Vehicle is not mind controlled and the player is not a monster\n //skip player if Vehicle is mind controlled and the player is a monster\n if (players[m] == null || players[m].getName().equals(\"NONE\") || curr == players[m] ||\n ((curr instanceof Vehicle && !((Vehicle) (curr)).isMindControlled()) && !(players[m] instanceof Monster)) ||\n ((curr instanceof Vehicle && ((Vehicle) (curr)).isMindControlled()) && (players[m] instanceof Monster)))\n continue;\n int mR = players[m].getRow();\n int mC = players[m].getCol();\n\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 0; r--) { //coastguard, destroyer, fighter planes and artillery have the monsters position known - the monster is not hidden by structures\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length; c++) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 0; c--) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n }\n if (skip)\n continue;\n }\n }\n return ans;\n }",
"@Test\r\n\tpublic void testTargets33_1() {\r\n\t\tBoardCell cell = board.getCell(3, 3);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(2, 3)));\r\n\t\tassertTrue(targets.contains(board.getCell(3, 2)));\r\n\r\n\t}",
"TrgPlace getTarget();",
"private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Directions.of(targetPosition.getDirection(), targetGridElement.getTargetVelocity());\r\n\r\n // Source-Position & velocity-Vector\r\n double angleBetweenSourceAndTarget = sourcePos.calcAngleRelativeTo(targetPosition);\r\n sourcePos = sourcePos.rotate(angleBetweenSourceAndTarget);\r\n Direction sourcePosDirection = Directions.of(sourcePos.getDirection(), velocity);\r\n\r\n Float64Vector targetVMinusSourceV = targetPosition.getVector().minus(sourcePos.getVector());\r\n double a = targetPosDirection.getVector().normValue() * targetPosDirection.getVector().normValue()\r\n - (sourcePosDirection.getVector().normValue() * sourcePosDirection.getVector().normValue());\r\n double b = 2 * targetVMinusSourceV.times(targetPosDirection.getVector()).doubleValue();\r\n double c = targetVMinusSourceV.normValue() * targetVMinusSourceV.normValue();\r\n\r\n if (a >= 0) {\r\n return targetPosition;\r\n }\r\n double sqrt = Math.sqrt(b * b - 4 * a * c);\r\n double dt1 = solveQuadraticFormula(a, b, sqrt, -1);\r\n double dt = computeDeltaT(a, b, sqrt, dt1);\r\n Float64Vector targetDirVectorWithTime = targetPosDirection.getVector().times(dt);\r\n return Positions.of(targetPosition.getX() + targetDirVectorWithTime.getValue(0), targetPosition.getY() + targetDirVectorWithTime.getValue(1),\r\n sourcePos.getZ());\r\n }",
"private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }",
"public void throwAt(Player target);",
"public void chase(int targetX, int targetY, ArrayList<Wall> listOfWalls, ArrayList<Point> intersections) {\n double minDistance = 5000000000.0; //no distance is greater than this 4head\r\n double upDistance = 500000000.0;\r\n double downDistance = 5000000.0;\r\n double leftDistance = 50000000.0;\r\n double rightDistance = 5000000.0;\r\n boolean isIntersection = checkIntersection(intersections);\r\n boolean isRightCollision = checkWallCollision(listOfWalls, 2);\r\n boolean isLeftCollision = checkWallCollision(listOfWalls, 3);\r\n boolean isUpCollision = checkWallCollision(listOfWalls, 0);\r\n boolean isDownCollision = checkWallCollision(listOfWalls, 1);\r\n\r\n if (isIntersection) {\r\n if (!isRightCollision && this.direction != 3) {\r\n rightDistance = Math.pow((xPos + 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isLeftCollision && this.direction != 2) {\r\n leftDistance = Math.pow((xPos - 20) - targetX, 2) + Math.pow(yPos - targetY, 2);\r\n }\r\n if (!isUpCollision && this.direction != 1) {\r\n upDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos - 20) - targetY, 2);\r\n }\r\n if (!isDownCollision && this.direction != 0) {\r\n downDistance = Math.pow((xPos) - targetX, 2) + Math.pow((yPos + 20) - targetY, 2);\r\n }\r\n if (upDistance <= downDistance && upDistance <= leftDistance && upDistance <= rightDistance) {\r\n this.direction = 0;\r\n } else if (downDistance <= upDistance && downDistance <= leftDistance && downDistance <= rightDistance) {\r\n this.direction = 1;\r\n } else if (rightDistance <= leftDistance && rightDistance <= downDistance && rightDistance <= upDistance) {\r\n this.direction = 2;\r\n } else if (leftDistance <= rightDistance && leftDistance <= upDistance && leftDistance <= downDistance) {\r\n this.direction = 3;\r\n }\r\n\r\n\r\n }\r\n\r\n if (this.direction == 0) {\r\n yPos = yPos - 5;\r\n }\r\n if (this.direction == 1) {\r\n yPos = yPos + 5;\r\n }\r\n if (this.direction == 2) {\r\n xPos = xPos + 5;\r\n }\r\n if (this.direction == 3) {\r\n xPos = xPos - 5;\r\n }\r\n\r\n }",
"private void setTargetCosts(){\n\t\t//Check which targets that are inside of this building\n\t\tfor(LinkedList<Node> list : targets){\n\t\t\tfor(Node node : list){\n\t\t\t\t//Make a walkable square at the position so that the target is reachable\n\t\t\t\tfor(int k = node.getXPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; k < node.getXPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; k++) {\n\t\t\t\t\tif(Math.round(scaleCollision * k) >= 0 && Math.round(scaleCollision * k) < COLLISION_ROWS){\n\t\t\t\t\t\tfor(int l = node.getYPos()-PedestriansSimulator.PEDESTRIAN_RADIUS; l < node.getYPos()+PedestriansSimulator.PEDESTRIAN_RADIUS; l++) {\n\t\t\t\t\t\t\tif(Math.round(scaleCollision * l) >= 0 && Math.round(scaleCollision * l) < COLLISION_ROWS){\n\t\t\t\t\t\t\t\tcollisionMatrix[Math.round(scaleCollision * k)][Math.round(scaleCollision * l)] = FOOTWAY_COST;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void updateGoalPositions() {\n // Convert angle to unit vector\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n // Create troops and set starting positions for each troop\n double topX = anchorX - (width - 1) * unitStats.spacing * sideUnitX / 2;\n double topY = anchorY - (width - 1) * unitStats.spacing * sideUnitY / 2;\n\n // Update troops goal positions\n for (int row = 0; row < aliveTroopsFormation.length; row++) {\n for (int col = 0; col < aliveTroopsFormation[0].length; col++) {\n BaseSingle troop = aliveTroopsFormation[row][col];\n if (troop == null) continue;\n double xGoalSingle;\n double yGoalSingle;\n // If the person is the flanker, go straight to the assigned position in flankers offset.\n if (state == UnitState.FIGHTING) {\n if (row < flankersCount[col]) {\n double offsetSide = flankerOffsets[col].get(row)[0];\n double offsetDown = flankerOffsets[col].get(row)[1];\n xGoalSingle = this.unitFoughtAgainst.getAverageX() + offsetSide * sideUnitX + offsetDown * downUnitX;\n yGoalSingle = this.unitFoughtAgainst.getAverageY() + offsetSide * sideUnitY + offsetDown * downUnitY;\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + (row - flankersCount[col]) * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + (row - flankersCount[col]) * unitStats.spacing * downUnitY;\n }\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + row * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + row * unitStats.spacing * downUnitY;\n }\n // Set the goal and change the state\n troop.setxGoal(xGoalSingle);\n troop.setyGoal(yGoalSingle);\n troop.setAngleGoal(anchorAngle);\n }\n }\n }",
"public double[] getTargetDistanceFromCenter()\n\t{\n\t\t// watch for no valid target, in which case give no displacement\n\t\tdouble[] distance = new double[2];\n\t\tif (currentBestTarget != null)\n\t\t{\n\t\t\t// x increases to right, but y increased downwards, so invert y\n\t\t\tdistance[0] = (currentBestTarget.centerX - IMAGE_WIDTH/2.0 ) / (IMAGE_WIDTH/2);\n\t\t\tdistance[1] = -(currentBestTarget.centerY - IMAGE_HEIGHT/2.0) / (IMAGE_HEIGHT/2);\n\t\t}\n\t\treturn distance;\n\t}",
"public MapLocation getEnemySwarmTarget() {\n\t\tdouble a = Math.sqrt(vecEnemyX * vecEnemyX + vecEnemyY * vecEnemyY) + .001;\n\n\t\treturn new MapLocation((int) (vecEnemyX * 7 / a) + br.curLoc.x,\n\t\t\t\t(int) (vecEnemyY * 7 / a) + br.curLoc.y);\n\n\t}",
"@Override\n\tpublic Direction nextMove(State state)\n\t{\n\t\t\n\t\tthis.direction = Direction.STAY;\n\t\tthis.hero = state.hero();\n\t\tthis.position = new Point( this.hero.position.right, this.hero.position.left ); //x and y are reversed, really\n\t\t\n\t\tthis.pathMap = new PathMap( state, this.position.x, this.position.y );\n\n\t\t//find the richest hero\n\t\tHero richestHero = state.game.heroes.get(0);\n\t\tif( richestHero == this.hero ) { richestHero = state.game.heroes.get(1); } //just grab another hero if we are #0\n\t\t\n\t\tfor( Hero hero : state.game.heroes )\n\t\t{\n\t\t\tif( hero != this.hero && hero.gold > richestHero.gold )\n\t\t\t{\n\t\t\t\trichestHero = hero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//get all interesting sites\n\t\tList<TileInfo> minesInRange = this.pathMap.getSitesInRange( TileType.FREE_MINE, 20 );\t//mines in vicinity\n\t\tList<TileInfo> takenMinesInRange = this.pathMap.getSitesInRange( TileType.TAKEN_MINE, (100-richestHero.life)/2 );\t//mines in vicinity\n\t\tList<TileInfo> pubsInRange = this.pathMap.getSitesInRange( TileType.TAVERN, (int)(Math.pow(100-this.hero.life,2)*state.game.board.size/5000) );\t\t//pubs in vicinity\n\t\t\n\t\t//first visit pubs (apparently we need it)\n\t\tif( pubsInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( pubsInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit the mines\n\t\telse if( minesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( minesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then visit taken mines\n\t\telse if( takenMinesInRange.size() != 0 )\n\t\t{\n\t\t\tthis.direction = this.pathMap.getDirectionTo( takenMinesInRange.get(0) );\n\t\t}\n\t\t\n\t\t//then hunt for players\n\t\telse\n\t\t{\n\t\t\t//kill the richest hero! (but first full health)\n\t\t\tif( this.hero.life > 85 )\n\t\t\t{\n\t\t\t\tthis.direction = this.pathMap.getDirectionTo( richestHero.position.right, richestHero.position.left );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//run away!!!\n\t\t\t\tthis.direction = intToDir( (int)(Math.random()*4) );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//VisualPathMap.getInstance( pathMap );\n\t\t\n\t\treturn this.direction;\n\t}",
"float distTo(Sprite s) {\n return dist(_x, _y, s._x, s._y);\n }",
"@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }",
"N getTarget();",
"@Test\r\n\tpublic void testTargets00_1() {\r\n\t\tBoardCell cell = board.getCell(0, 0);\r\n\t\tboard.calcTargets(cell, 1);\r\n\t\tSet<BoardCell> targets = board.getTargets();\r\n\t\tassertTrue(targets != null);\r\n\t\tassertEquals(2, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCell(0, 1)));\r\n\t\tassertTrue(targets.contains(board.getCell(1, 0)));\r\n\r\n\t}",
"private Location[] overrunsTop () {\n Location nextLocation;\n Location nextCenter;\n \n // exact calculation for exact 90 degree heading directions (don't want trig functions\n // handling this)\n if (getHeading() == THREE_QUARTER_TURN_DEGREES) {\n nextLocation = new Location(getX(), 0);\n nextCenter = new Location(getX(), myCanvasBounds.getHeight());\n return new Location[] { nextLocation, nextCenter };\n }\n \n double angle = FULL_TURN_DEGREES - getHeading();\n if (getHeading() < THREE_QUARTER_TURN_DEGREES) {\n angle = -(getHeading() - HALF_TURN_DEGREES);\n }\n angle = Math.toRadians(angle);\n nextLocation = new Location(getX() + getY() / Math.tan(angle), 0);\n nextCenter = new Location(getX() + getY() / Math.tan(angle),\n myCanvasBounds.getHeight());\n \n // eliminates race condition - if next location overruns left/right AND top/bottom it checks\n // to see which is overrun first and corrects\n if (nextLocation.getX() > myCanvasBounds.getWidth())\n // right\n return overrunRight();\n else if (nextLocation.getX() < 0) // left\n return overrunLeft();\n \n return new Location[] { nextLocation, nextCenter };\n }",
"protected Unit target() {\n\t\tUnit closest = null; // this variable will contain the closest Unit\n\t\tDouble min = (double) projectile_range; // this will contain the lowest distance\n\t\tList<Entity> entities = level.getEntities();\n\n\t\tfor (int i = 0; i < entities.size(); i++) {\n\t\t\tEntity e = entities.get(i);\n\t\t\tUnit u = (Unit) e; // casts e to Unit\n\t\t\tif (u.equals(this)) continue; // discounts self\n\t\t\tif (u.UNIT_R != UNIT_G && u.UNIT_G != UNIT_R) continue; // discounts Units from own team\n\t\t\tif (!(e instanceof Unit)) continue; // discounts non-Unit entities\n\n\t\t\tdouble distance = MathMachine.distance((u.getX() - x), (u.getY() - y));\n\t\t\t/*\n\t\t\t * int r = 0; int g = 0; for (int y = 0; y < level.getHeight() * 16; y++) { for (int x = 0; x < level.getWidth() * 16; x++) { if (level.redPixels[x + y * level.getWidth() * 16] == true) r++; if (level.greenPixels[x + y * level.getWidth() * 16] == true )g++; System.out.println(\"r: \" + r + \", \" + g); } }\n\t\t\t */\n\t\t\tif (UNIT_R) { // if it is a red unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tint xt = (int) Math.round(u.getX());\n\t\t\t\t\tint yt = (int) Math.round(u.getY());\n\t\t\t\t\tif (level.redPixels[(int) Math.round(xt + level.getWidth() * 16.0 * yt)]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (UNIT_G) { // if it is a green unit\n\t\t\t\tif (distance < min) {\n\t\t\t\t\tSystem.out.println(level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]);\n\n\t\t\t\t\tif (level.greenPixels[(int) Math.round(u.getX() + level.getWidth() * 16.0 * u.getY())]) {\n\t\t\t\t\t\tclosest = u;\n\t\t\t\t\t\tmin = distance;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\treturn closest; // the program is fucked if null happens. just a headsup. hopefully you will remember if you get a null pointer exception.\n\t}",
"private static double EclosestEnemy(StateView s, int fId, int eId, List<UnitView> friendlies, List<UnitView> enemies){\n\t\tfor(UnitView e : enemies){\n\t\t\tif((eId != e.getID()) && dist(s, e.getID(), fId) < dist(s, eId, fId))\n\t\t\t\treturn 0;\n\t\t}\n\t\treturn 1;\n }",
"@Test\n\tpublic void testRoomExit()\n\t{\n\t\t// Take one step, essentially just the adj list\n\t\tboard.calcTargets(18, 21, 1);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\t// Ensure doesn't exit through the wall\n\t\tassertEquals(1, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 21)));\n\t\t// Take two steps\n\t\tboard.calcTargets(18, 21, 2);\n\t\ttargets= board.getTargets();\n\t\tassertEquals(3, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(17, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 20)));\n\t}",
"public boolean touchingSprite(Sprite target) {\n if (!visible || !target.visible) return false;\n boolean touchingX, touchingY;\n PVector testVector;\n touchingX=false; \n touchingY=false;\n testVector=new PVector(target.pos.x, pos.y);\n if (pos.dist(testVector) < ((target.costumes.get(target.costumeNumber).width*(target.size/100))/2)+(costumes.get(costumeNumber).width*(size/100))/2) {\n touchingX = true;\n }\n testVector=new PVector(pos.x, target.pos.y);\n if (pos.dist(testVector) < ((target.costumes.get(target.costumeNumber).height*(target.size/100))/2)+(costumes.get(costumeNumber).height*(size/100))/2) {\n touchingY = true;\n }\n if (touchingX & touchingY) return true;\n else return false;\n }",
"public boolean moveAfter(int[] target, Random choiceGen){\n\tint xDiff = target[0] - position[0], yDiff = target[1] - position[1];\n\tint choice = 0;\n\tif(Math.abs(xDiff) > 0 && Math.abs(yDiff) > 0){\n\t choice = choiceGen.nextInt(2);\n\t if(choice == 1){\n\t\tposition[1] += yDiff/(Math.abs(yDiff));\n\t }\n\t else{\n\t\tposition[0] += xDiff/(Math.abs(xDiff));\n\t }\n\t}\n\telse if(Math.abs(xDiff) > 0){\n\t position[0] += xDiff/(Math.abs(xDiff));\n\t if(position[0] == target[0]){\n\t\ttrackTime = 0;\n\t\treturn true;\n\t }\n\t}\n\telse if(Math.abs(yDiff) > 0){\n\t position[1] += yDiff/(Math.abs(yDiff));\n\t if(position[1] == target[1]){\n\t\ttrackTime = 0;\n\t\treturn true;\n\t }\n\t}\n\telse{\n\trandomMove(choiceGen);\n\ttrackTime = 0;\n\t}\n\treturn false;\n }",
"private static final boolean isTargetInSight(Vec3d vec3, EntityLivingBase seeker, Entity target) \r\n\t{\r\n\t\treturn seeker.canEntityBeSeen(target) && isTargetInFrontOf(seeker, target, 60);\r\n\t}",
"public int pacmanMoves(List<Integer> target){\n int numOfmoves = 0;\n //counts the steps to get to the target\n for(int i=target.get(0);i>0;i--){\n numOfmoves++;\n }\n for(int i=target.get(1);i>0;i--){\n numOfmoves++;\n }\n return numOfmoves;\n }",
"public static List<Target> createTargetsWithPauses(Relation segs) {\r\n List<Target> targets = new ArrayList<Target>();\r\n \r\n boolean first = true;\r\n Item s = segs.getHead();\r\n Voice v = FreeTTSVoices.getMaryVoice(s.getUtterance().getVoice());\r\n String silenceSymbol = v.sampa2voice(\"_\");\r\n Target lastTarget = null;\r\n Item lastItem = s;\r\n for (; s != null; s = s.getNext()) {\r\n Element maryxmlElement = (Element) s.getFeatures().getObject(\"maryxmlElement\");\r\n //create next target\r\n String segName = s.getFeatures().getString(\"name\");\r\n Target nextLeftTarget = new HalfPhoneTarget(segName+\"_L\", maryxmlElement, s, true); \r\n Target nextRightTarget = new HalfPhoneTarget(segName+\"_R\", maryxmlElement, s, false);\r\n //if first target is not a pause, add one\r\n if (first){\r\n first = false;\r\n //if (! segName.equals(silenceSymbol)){\r\n if (! nextLeftTarget.isSilence()){\r\n //System.out.println(\"Adding two pause targets: \"\r\n // +silenceSymbol+\"_L and \"\r\n // +silenceSymbol+\"_R\");\r\n //build new pause item\r\n Item newPauseItem = s.prependItem(null);\r\n newPauseItem.getFeatures().setString(\"name\", silenceSymbol);\r\n \r\n //add new targets for item\r\n targets.add(new HalfPhoneTarget(silenceSymbol+\"_L\", null, newPauseItem, true)); \r\n targets.add(new HalfPhoneTarget(silenceSymbol+\"_R\", null, newPauseItem, false));\r\n }\r\n }\r\n targets.add(nextLeftTarget);\r\n targets.add(nextRightTarget);\r\n lastTarget = nextRightTarget;\r\n lastItem = s;\r\n } \r\n if (! lastTarget.isSilence()){\r\n //System.out.println(\"Adding pause target \"\r\n // +silenceSymbol);\r\n //build new pause item\r\n Item newPauseItem = lastItem.appendItem(null);\r\n newPauseItem.getFeatures().setString(\"name\", silenceSymbol);\r\n \r\n //add new targets for item\r\n targets.add(new HalfPhoneTarget(silenceSymbol+\"_L\", null, newPauseItem, true)); \r\n targets.add(new HalfPhoneTarget(silenceSymbol+\"_R\", null, newPauseItem, false));\r\n }\r\n return targets;\r\n }",
"protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\n }\n }",
"private double[] getGoalPointAtLookaheadDistance(\n double[] initialPointOfLine, double[] finalPointOfLine, double[] nearestPoint) {\n\n // TODO: use lookahead distance proportional to robot max speed -> 0.5 * getRobotMaxSpeed()\n return Geometry.getPointAtDistance(\n initialPointOfLine, finalPointOfLine, nearestPoint, lookaheadDistance);\n }",
"Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);",
"private void target() {\n\t\t// find distance to flower\n\t\tdouble dist = grid.getDistance(grid.getLocation(this),\n\t\t\t\t\t\t\t\t\t grid.getLocation(targetFlower));\n\t\t// if close to flower start harvesting nectar\n\t\tif(dist < 3) {\n\t\t\tstate = \"HARVESTING\";\n\t\t}\n\t\t// if VERY far from flower, it must have died. start scouting\n\t\telse if(dist > 200){\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// else keep moving toward flower\n\t\telse{\n\t\t\tmoveTowards(grid.getLocation(targetFlower), 3);\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}",
"@Override\n public float distanceAdjacent(int x1, int y1, int x2, int y2) {\n float duration = 0;\n\n if (x1 == x2 || y1 == y2) {\n MapTile.Instance fromTile = getTileData(x1, y1);\n MapTile.Instance toTile = getTileData(x2, y2);\n assert fromTile != null && toTile != null;\n\n Direction move = Direction.get(x2 - x1, y2 - y1);\n\n int fromHeight = fromTile.heightOf(move);\n int toHeight = toTile.heightOf(move.inverse());\n\n // steepness\n float t1inc = (fromHeight - fromTile.getHeight()) / (TILE_SIZE / 2);\n float t2inc = (toHeight - toTile.getHeight()) / (TILE_SIZE / 2);\n\n // actual duration of walking\n float walkSpeedT1 = (1f / hypoLength(t1inc)) * walkSpeed;\n float walkSpeedT2 = (1f / hypoLength(t2inc)) * walkSpeed;\n\n // duration += walkspeed(steepness_1) * dist + walkspeed(steepness_2) * dist\n duration += (walkSpeedT1 + walkSpeedT2) * TILE_SIZE;\n\n // height difference on the sides of the tiles\n float cliffHeight = (toHeight - fromHeight) * TILE_SIZE_Z;\n\n // climbing if more than 'an acceptable height'\n if (cliffHeight > 0) {\n duration += (cliffHeight / climbSpeed);\n }\n\n } else {\n // TODO allow diagonal tracing\n Logger.WARN.print(String.format(\n \"Pathfinding (%s) asked for non-adjacent tiles (%d, %d) (%d, %d)\",\n getClass(), x1, y1, x2, y2\n ));\n\n return Float.POSITIVE_INFINITY;\n }\n\n return duration;\n }",
"private MovingEntity nextTarget(MovingEntity currTarget, ArrayList<MovingEntity> availableTargets, ArrayList <MovingEntity> battlers){\n int currIndex = availableTargets.indexOf(currTarget);\n\n if (currTarget.getCurrHP() > 0) {\n return currTarget;\n }\n\n // currTarget is now dead, remove from availableTargets and battlers\n availableTargets.remove(currTarget);\n battlers.remove(currTarget);\n \n if(currIndex < availableTargets.size()){\n System.out.println(currTarget.getID() + \" is dead, moving on to next target is \" + availableTargets.get(currIndex).getID());\n return availableTargets.get(currIndex);\n } else {\n return null;\n }\n }",
"public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}",
"@Test\n public void GivenTwoRobotsInLaserBeamThenOnlyClosestOneGetsHitByLaser() {\n int healthRobot1BeforeLaser = robot.getRobotHealthPoint();\n int healthRobot2BeforeLaser = robot2.getRobotHealthPoint();\n\n //fire lasers\n game.checkevent.checkLaserBeams(game.allLasers);\n\n //health after laser\n int healthrobot1afterlaser = robot.getRobotHealthPoint();\n int healthrobot2afterlaser = robot2.getRobotHealthPoint();\n\n //only the assert for robot close to laser should fail (this is intentional)\n assertNotEquals(healthRobot1BeforeLaser, healthrobot1afterlaser);\n assertEquals(healthRobot2BeforeLaser, healthrobot2afterlaser);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic double getTargetHeight(Target t) {\n \tdouble h = 0;\n \tdouble T = 0, B = 0;\n\t\tArrayList<Integer> YLocal;\n\t\tArrayList<Integer> XLocal;\n\t\tArrayList<Integer> heightLocal;\n\t\tsynchronized(YLock){\n\t\t\tYLocal = (ArrayList<Integer>) Y.clone();\n\t\t}\n\t\t\n\t\tsynchronized(XLock){\n\t\t\tXLocal = (ArrayList<Integer>) X.clone();\n\t\t}\n\t\t\n\t\tsynchronized(heightLock){\n\t\t\theightLocal = (ArrayList<Integer>) Y.clone();\n\t\t}\n\t\t\n \tif (targets.length > 1) {\n \t\tfor (int i = 0; i < targets.length; i++) {\n \t\t\tswitch (t) {\n \t\t\tcase Boiler:\n \t\t\t\t//TODO: Fix this stuff\n \t\t\t\tbreak;\n \t\t\tcase Gear:\n \t\t\t\tif (Math.abs(XLocal.get(i) - XLocal.get(i+1)) <= 5) {\n \t\t\t\t\tT = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t\tB = (YLocal.get(targets[i+1]) + heightLocal.get(targets[i+1]) / 2);\n \t\t\t\t} else if (Math.abs(XLocal.get(i+1) - XLocal.get(i+2)) <= 5) {\n \t\t\t\t\tT = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t\tB = (YLocal.get(targets[i]) + heightLocal.get(targets[i]) / 2);\n \t\t\t\t} else {\n \t\t\t\t\treturn heightLocal.get(i);\n \t\t\t\t}\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t}\n \t\t}\n \t}\n \th = T - B;\n\t\treturn h;\n }",
"static int minStepToReachTarget(int knightPos[], int targetPos[], int N) {\n // x and y direction, where a knight can move\n int dx[] = {-2, -1, 1, 2, -2, -1, 1, 2};\n int dy[] = {-1, -2, -2, -1, 1, 2, 2, 1};\n\n // queue for storing states of knight in board\n Queue<Cell> q = new LinkedList<>();\n\n // push starting position of knight with 0 distance\n q.add(new Cell(knightPos[0], knightPos[1], 0));\n\n Cell t;\n int x, y;\n boolean[][] visit = new boolean[N + 1][N + 1];\n\n // loop untill we have one element in queue\n while (!q.isEmpty()) {\n t = q.poll();\n if (visit[t.x][t.y]) \n continue;\n visit[t.x][t.y] = true;\n\n // if current cell is equal to target cell,\n // return its distance\n if (t.x == targetPos[0] && t.y == targetPos[1]) {\n return t.dis;\n }\n\n // loop for all reahable states\n for (int i = 0; i < 8; i++) {\n x = t.x + dx[i];\n y = t.y + dy[i];\n\n // If rechable state is not yet visited and\n // inside board, push that state into queue\n if (isInside(x, y, N) && !visit[x][y]) {\n q.add(new Cell(x, y, t.dis + 1));\n }\n }\n }\n return 0;\n }",
"private boolean player2Wins() {\n\n boolean p2inTriangle = false;\n int target[] = new int[]{0, 1, 2, 3, 9, 10, 11, 18, 19, 27};\n for (int i : target) {\n if (board[i] == 0)\n return false;\n if (board[i] == 2)\n p2inTriangle = true;\n }\n\n return p2inTriangle;\n }",
"public static int isVehicleInSight(Player curr) {\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n if (bodyDir == UP) {\n dirs.add(UP);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(DOWN);\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(LEFT);\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(UP);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(RIGHT);\n }\n\n if (dirs == null || dirs.size() == 0)\n return -1;\n for (int vi = 0; vi < players.length; vi++) {\n if (players[vi] == null || players[vi].getName().equals(\"NONE\") || (players[vi] instanceof Monster)) //we don't want the AI monster to consider itself or other monsters a target\n continue;\n Player veh = players[vi];\n boolean isAir = veh.isFlying();\n int vR = veh.getRow();\n int vC = veh.getCol();\n if (veh.getName().endsWith(\"civilian\"))\n continue;\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 1; r--) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length - 1; c++) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 1; c--) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n }\n if (skip)\n continue;\n }\n }\n return -1;\n }"
]
| [
"0.6350167",
"0.6016832",
"0.59310204",
"0.59078693",
"0.59077966",
"0.5856197",
"0.5852436",
"0.58374375",
"0.58325934",
"0.5817191",
"0.5796935",
"0.5740817",
"0.5688893",
"0.5670011",
"0.5649649",
"0.5622473",
"0.5617024",
"0.5614631",
"0.55903065",
"0.55620146",
"0.55382466",
"0.551629",
"0.5503793",
"0.54903954",
"0.5463166",
"0.5434314",
"0.54146177",
"0.54047483",
"0.5394434",
"0.53364635",
"0.5331567",
"0.53300655",
"0.5329978",
"0.5329435",
"0.5323378",
"0.5315074",
"0.53150296",
"0.53118706",
"0.53072804",
"0.5306041",
"0.5282649",
"0.52764046",
"0.52725244",
"0.5265715",
"0.5263709",
"0.5246148",
"0.523201",
"0.5231743",
"0.52256703",
"0.52181256",
"0.52036643",
"0.5201434",
"0.5199436",
"0.5198929",
"0.5193745",
"0.51912147",
"0.5183054",
"0.51801413",
"0.5180031",
"0.51793486",
"0.5163317",
"0.515627",
"0.5154424",
"0.5153669",
"0.51448035",
"0.51364124",
"0.51062346",
"0.51000464",
"0.5095834",
"0.50938153",
"0.50766635",
"0.50718534",
"0.5065447",
"0.5045754",
"0.5037527",
"0.50354487",
"0.50348455",
"0.50338095",
"0.5029047",
"0.5024587",
"0.50195783",
"0.501612",
"0.5014523",
"0.5014492",
"0.5012881",
"0.5004836",
"0.5004077",
"0.50027424",
"0.500007",
"0.49877027",
"0.49852824",
"0.49812806",
"0.49809888",
"0.49788857",
"0.4978574",
"0.4975769",
"0.4967325",
"0.49672854",
"0.49658665",
"0.49587595"
]
| 0.64650494 | 0 |
Find the enemy snake head | public void findEnemySnake() {
// Cheap fix to GameState spawning a food on a person's HeadPiece
if (this.gb.heads.size() == 1) {
if (print) System.out.println(" ONLY 1 HEAD FOUND IN GAME BOARD!");
HeadPiece h1 = this.gb.heads.get(0);
if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {
// fucking panic i guess
if (print) System.out.println(" CANNOT FIND ENEMY HEAD?????");
this.enemy_head_x = 0;
this.enemy_head_y = 0;
} else {
// Correctly found enemy head
this.enemy_head_x = h1.getX();
this.enemy_head_y = h1.getY();
}
return;
}
// Find the enemy snake head and update member variables
HeadPiece h1 = this.gb.heads.get(0);
HeadPiece h2 = this.gb.heads.get(1);
HeadPiece enemyHead;
if ((h1.getX() == this.us_head_x) && (h1.getY() == this.us_head_y)) {
enemyHead = h2;
} else {
enemyHead = h1;
}
this.enemy_head_x = enemyHead.getX();
this.enemy_head_y = enemyHead.getY();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public XYPoint getSnakeHeadStartLocation();",
"public Pair GetHead() {\n return snake.get(head);\n }",
"public HeadComponent getHead() {\n\t\treturn (HeadComponent) snake.getLast();\n\t}",
"Entity getShooter();",
"public int move(String direction) {\n int h = snake.getFirst() / width, w = snake.getFirst() % width;\n if (direction.equals(\"U\")) h--;\n else if (direction.equals(\"D\")) h++;\n else if (direction.equals(\"L\")) w--;\n else w++;\n if (w < 0 || w == width || h < 0 || h == height) return -1;\n int head = h*width + w;\n snake.addFirst(head); // move head\n if (idx < food.length && h == food[idx][0] && w == food[idx][1]) {\n score++; // and still keep the tail\n idx++;\n } else\n body.remove(snake.removeLast()); // move tail\n if (!body.add(head)) return -1;\n return score;\n}",
"public abstract void hitOnHead(Nana nana, boolean head);",
"SmilHead getHead();",
"private Point getHeadLocation (Note note)\r\n {\r\n return new Point(tailLocation.x, note.getReferencePoint().y);\r\n }",
"public Snake getSnake() { return _snake; }",
"private static boolean ateBody(int[] head) {\r\n\t\tfor (int i = snake.size() - 1; i > 0; i--) {\r\n\t\t\tif (head[0] == snake.get(i)[0] && head[1] == snake.get(i)[1]) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public TapeHead preparePlayer() {\n \treturn this.table.createHead(1);\t\n }",
"private void addNewHead() {\t\t\n\t\tif(currentDirection == Direction.RIGHT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() + SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(),\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.RIGHT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.LEFT) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX() - SnakeComponent.imageSize, \n\t\t\t\t\tsnake.getLast().getY(), \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.LEFT;\n\t\t\t\n\t\t} else if(currentDirection == Direction.DOWN) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()+SnakeComponent.imageSize, \n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.DOWN;\n\t\t\t\n\t\t} else if(currentDirection == Direction.UP) {\n\t\t\tsnake.addLast(new HeadComponent(\n\t\t\t\t\tsnake.getLast().getX(), \n\t\t\t\t\tsnake.getLast().getY()-SnakeComponent.imageSize,\n\t\t\t\t\tcurrentDirection\n\t\t\t));\n\t\t\tsnakeDirection = Direction.UP;\n\t\t}\n\t}",
"public Point getHeadLocation ()\r\n {\r\n if (headLocation == null) {\r\n computeLocations();\r\n }\r\n\r\n return headLocation;\r\n }",
"public TransformNR getHeadLocation(){\n\t\treturn headLocation;\n\t}",
"@Nullable\r\n public AnimalTamer getFirstTrustedPlayer();",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"private void findFirstPlayer() { \n if(isFirstTurn) {\n for(PlayerId p: PlayerId.ALL) {\n if(handsOfCards.get(p).contains(Card.of(Color.DIAMOND, Rank.SEVEN))) {\n firstPlayer = p;\n }\n }\n }\n else {\n firstPlayer = PlayerId.ALL.get((firstPlayer.ordinal()+1)%PlayerId.COUNT);\n }\n }",
"protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }",
"private void checkForCollisionWithSelf() {\r\n if (isInSnake(snake[0].row,snake[0].column,true)) {\r\n gameOver();\r\n }\r\n }",
"@Override\n public ResourceLocation getTextureLocation(DroneEntity entity) {\n return entity.isAttacking() ? mobShootingTexture : mobTexture;\n }",
"protected Entity findPlayerToAttack() {\n/* 339 */ double var1 = 8.0D;\n/* 340 */ return getIsSummoned() ? null : this.field_70170_p.func_72890_a(this, var1);\n/* */ }",
"public Tile diveBomb() {\n List<Tile> targets = this.findTargets();\n Tile us_tile = this.gb.get(this.us_head_x, this.us_head_y);\n LinkedList<Tile> shortestPath = null;\n\n // Chose the shortest path\n //System.out.println(\"HeadX: \" + this.us_head_x + \" HeadY: \" + this.us_head_y);\n //System.out.println(\"EnemyX: \" + this.enemy_head_x + \" EnemyY: \" + this.enemy_head_y);\n // System.out.println(\"Targets - \" + targets);\n for (Tile target : targets) {\n LinkedList<Tile> path = this.dk.path(us_tile, target, this.gb);\n\n if (path != null) { // means we couldn't reach the desired target\n // System.out.println(\"Path - \" + path);\n if (shortestPath == null) {\n shortestPath = path;\n } else if (path.size() < shortestPath.size()) {\n shortestPath = path;\n }\n }\n }\n // System.out.println(\"Shortest Path - \" + shortestPath);\n if (shortestPath == null) return us_tile;\n return shortestPath.get(1);\n }",
"private void setSnake() {\r\n length = 1;\r\n snake = new Location[maxRows*maxColumns];\r\n for (int i = 0; i < snake.length; i++) {\r\n snake[i] = new Location(BLANK,BLANK,STOP);\r\n }\r\n int startRow = maxRows / 2;\r\n int startColumn = maxColumns / 2;\r\n snake[HEAD] = new Location(startRow,startColumn,STOP);\r\n }",
"protected void createDebugSnake() {\n int freespaces = 5;\n snakeSize = maxX - freespaces;\n int segmentnum = 0;\n\n int cur_x_square = freespaces;\n int cur_y_square = 0;\n snakeHeadX = cur_x_square;\n snakeHeadY = cur_y_square;\n\n\n // build first row:\n for (cur_x_square = freespaces; cur_x_square < snakeSize + freespaces; cur_x_square++) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n //fill in body of snake\n while (cur_y_square < maxY - 1) {\n cur_y_square++;\n if (cur_y_square % 2 == 0) {\n for (cur_x_square = maxX - 1; cur_x_square > 0; cur_x_square--) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n } else {\n for (cur_x_square = 1; cur_x_square < maxX; cur_x_square++) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[cur_x_square][cur_y_square] = ++segmentnum;\n }\n }\n }\n\n //fill in tail so it can be chased by the player as they eat the last few\n // kibbles that appear\n for (cur_y_square = maxY - 1; cur_y_square > 0; cur_y_square--) {\n //System.out.println(segmentnum + \": \" + cur_x_square + \",\" + cur_y_square);\n snakeSquares[0][cur_y_square] = ++segmentnum;\n }\n\n snakeSize = segmentnum;\n\n currentHeading = DIRECTION_LEFT;\n lastHeading = DIRECTION_LEFT;\n\n justAteMustGrowThisMuch = 0;\n }",
"private boolean isInSnake(int row, int column, boolean isHead) {\r\n int i = 0;\r\n if (isHead) i = 1;\r\n while (i < length) {\r\n if (snake[i].row == row && \r\n snake[i].column == column) \r\n return true;\r\n i++;\r\n }\r\n return false;\r\n }",
"public synchronized void moveSnake() {\n\t\tif(!this.isDead()) { // as long as the snake is alive\n\t\t\tSegment temp = tail; // set a temp segment to have a handle on the head\n\t\t\t\n\t\t\twhile(temp!=null) { // while temp is not null\n\t\t\t\ttemp.move(); // move temp\n\t\t\t\ttemp = temp.getSeg(); // make temp the segment temp has a handle on (i.e. the segment in front of it)\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public static void main(String[] args) throws InterruptedException\r\n {\n\t\t int[] XposT = {5,5,5,5,5}; //XposT and YposT are the Tail positions of the robot\r\n int[] YposT = {5,4,3,2,1}; // all the same, no ititial tail. 5,4,3,2 would give initial tail.\r\n\t\t // we have a variable that sets up the boundries of our snake and his environment.\r\n\t\t int blockSize = 20;\r\n boolean more = true;\r\n Scanner keyboard = new Scanner(System.in);\r\n char direction = ' ';\r\n\r\n\t\t //System.out.println(\"\\033[H\\033[2J\"); //Clear Screen\r\n\r\n cls.cs();\r\n\t\t //print initial instructions\r\n\t\t System.out.println( \"w up, s down, a left, d right, q to quit\");\r\n // direction = keyboard.next().charAt(0);\r\n\r\n while(more){\r\n\r\n\r\n\r\n //Draw:\r\n //System.out.println(\"\\033[H\\033[2J\"); //Clear Screen\r\n\t\t cls.cs();\r\n for(int y=0; y < blockSize; y++) //\r\n {\r\n for(int x=0; x < blockSize; x++) // Print a column\r\n {\r\n if(((x == XposT[0]) && (y == YposT[0])) )\r\n {\r\n System.out.print(\"H\" );\r\n\t\t\t\t //Print Head\r\n }\r\n else if (((x == XposT[1]) && (y == YposT[1]))\r\n\t\t\t || ((x == XposT[2]) && (y == YposT[2])) || ((x == XposT[3]) && (y == YposT[3])) ||\r\n\t\t\t ((x == XposT[4]) && (y == YposT[4]))) {\r\n\t\t\t \tSystem.out.print( \"T\" );\r\n\t\t\t\t// Print Tail\r\n\t\t\t }\r\n\t\t\t else\r\n {\r\n System.out.print(\" \");\r\n }\r\n System.out.print(\" \");\r\n }\r\n System.out.println();\r\n\r\n }//End Draw\r\n System.out.println( \"use: w up, s down, a left, d right, q to quit, then press enter.\");\r\n\r\n\r\n\r\n\t\t for(int i=4; i > 0; i--){\r\n\t\t\tXposT[i] = XposT[i-1];\r\n\t\t\tYposT[i] = YposT[i-1];\r\n\t\t }\r\n\r\n\t\t//XposT[0] = Xpos;\r\n\t\t//YposT[0] = Ypos;\r\n\r\n\t //User Input (Get New Head)\r\n\t\tswitch ( keyboard.next().charAt(0)) {\r\n case 'w': // UP\r\n\t\t case 'W':\r\n YposT[0]--;\r\n\t\t\tif(YposT[0] == -1) YposT[0] = blockSize-1; //9 for raparound, -1 for bounce\r\n break;\r\n case 's': // down\r\n\t\t case 'S':\r\n YposT[0]++;\r\n\t\t\t if(YposT[0] == blockSize) YposT[0] = 0; //1 for raparound, 10 for bounce\r\n break;\r\n case 'a': // Left\r\n XposT[0]--;\r\n\t\t\tif(XposT[0] == -1) XposT[0] = 0; //10 for raparound, 1 for bounce\r\n break;\r\n case 'd': // Right\r\n XposT[0]++;\r\n\t\t\tif(XposT[0] == blockSize) XposT[0] = blockSize - 1; //1 for raparound, 10 for bounce\r\n break;\r\n case 'q': // quit\r\n System.out.println(\"Thank you for playing.\");\r\n\t\t\tmore = false;\r\n break;\r\n\t\t default :\r\n\t\t System.out.println( \" oops, use: w up, s down, a left, d right, q to quit\");\r\n\t\t System.out.println(\"Yikes, an incorrect letter nips at my tail.\");\r\n\t\t System.out.println(\"Hit any letter then enter to continue.\");\r\n\t\t keyboard.next();\r\n\t\t }\r\n } //end while\r\n\t System.out.println(ANSI_RESET);\r\n }",
"public Entity getShoulderEntityLeft ( ) {\n\t\treturn extract ( handle -> handle.getShoulderEntityLeft ( ) );\n\t}",
"public void changeHeadState() {\n //tracking the head with the player\n if(moveUp && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveUp && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-34);\n }\n else if(moveDown && moveRight){\n playerHead.setxPos(this.getxPos()+14);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown && moveLeft){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveDown || shootDown || (!moving && !shooting && this.getPicY() == 0)){\n playerHead.setxPos(this.getxPos()+2);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((moveUp || (shootUp && moveUp))|| (!moving && this.getPicY() == 211)){\n playerHead.setxPos(this.getxPos()+9);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if((!moving && shootUp && this.getPicY() == 0) ){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28); \n }\n else if(shootLeft && moveRight || shootLeft){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveLeft ||(!moving && !shooting && this.getPicY() == 141)){\n playerHead.setxPos(this.getxPos()+3);\n playerHead.setyPos(this.getyPos()-28);\n }\n else if(moveRight||(shootRight && !moving)||(shootRight && moveRight)||(!moving && !shooting && this.getPicY() == 74)){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n else if(shootUp && !moving){\n playerHead.setxPos(this.getxPos()+10);\n playerHead.setyPos(this.getyPos()-29);\n }\n //left right and shooting up\n \n //head faces the direction of the player while moving\n if (moveDown && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveDown && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveUp && moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveUp && moveLeft) {\n playerHead.setPicX(0);//left\n } else if (moveDown) {\n playerHead.setPicX(102);//down\n } else if (moveUp) {\n playerHead.setPicX(158);//up\n } else if (moveRight) {\n playerHead.setPicX(52);//right\n } else if (moveLeft) {\n playerHead.setPicX(0);//left\n }\n\n //head faces the direction of shooting while moving or standing in place\n if (shootDown) {\n playerHead.setPicX(102);\n } else if (shootUp) {\n playerHead.setPicX(158);\n } else if (shootRight) {\n playerHead.setPicX(52);\n } else if (shootLeft) {\n playerHead.setPicX(0);\n }\n\n if (shootLeft && shootRight) {\n playerHead.setPicX(52);//right\n } else if (shootUp && shootDown) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootRight) {\n playerHead.setPicX(102);//down\n } else if (shootDown && shootLeft) {\n playerHead.setPicX(102);//down\n } else if (shootUp && shootRight) {\n playerHead.setPicX(158);//up\n } else if (shootUp && shootLeft) {\n playerHead.setPicX(158);//up\n }\n\n if (!moving && !shooting) {\n if (this.getPicY() == 0) {\n playerHead.setPicX(102);//down\n } else if (this.getPicY() == 211) {\n playerHead.setPicX(158);//up\n } else if (this.getPicY() == 74) {\n playerHead.setPicX(52);//right\n } else if (this.getPicY() == 141) {\n playerHead.setPicX(0);//left\n }\n }\n }",
"private static Sprite makeHuman() {\n Sprite torso = new RectangleSprite(0, 0, 200, 350, 20.0F, false, \"torso\");\n Sprite head = new RectangleSprite(0, 0, 150, 200, 200.0F, true, \"head\");\n Sprite leftUpperLeg = new RectangleSprite(0, 0, 50, 225, 20.0F, true, \"leftupperleg\");\n Sprite rightUpperLeg = new RectangleSprite(0, 0, 50, 225, 20.0F, true, \"rightupperleg\");\n Sprite leftLowerLeg = new RectangleSprite(0, 0, 50, 200, 20.0F, true, \"leftlowerleg\");\n Sprite rightLowerLeg = new RectangleSprite(0, 0, 50, 200, 20.0F, true, \"rightlowerleg\");\n Sprite leftFoot = new RectangleSprite(0, 0, 80, 35, 20.0F, true, \"leftfoot\");\n Sprite rightFoot = new RectangleSprite(0, 0, 80, 35, 20.0F, true, \"rightfoot\");\n Sprite leftUpperArm = new RectangleSprite(0,0, 200, 50, 20.0F, true,\"leftupperarm\");\n Sprite rightUpperArm = new RectangleSprite(0,0, 200, 50, 20.0F, true,\"rightupperarm\");\n Sprite leftLowerArm = new RectangleSprite(0,0, 175, 50, 20.0F, true,\"leftlowerarm\");\n Sprite rightLowerArm = new RectangleSprite(0,0, 175, 50, 20.0F, true,\"rightlowerarm\");\n Sprite leftHand = new RectangleSprite(0, 0, 50, 50, 20.0F, true, \"lefthand\");;\n Sprite rightHand = new RectangleSprite(0, 0, 50, 50, 20.0F, true, \"righthand\");;\n\n // Translate Torso\n Matrix torsoMatrix = new Matrix();\n torsoMatrix.postTranslate(700, 500);\n torso.transform(torsoMatrix);\n\n // Translate Head\n Matrix headMatrix = new Matrix();\n headMatrix.postTranslate(30, -200);\n head.transform(headMatrix);\n\n // Translate Left hand\n Matrix leftHandMatrix = new Matrix();\n leftHandMatrix.postTranslate(-50, 0);\n leftHand.transform(leftHandMatrix);\n\n // Translate Right hand\n Matrix rightHandMatrix = new Matrix();\n rightHandMatrix.postTranslate(175, 0);\n rightHand.transform(rightHandMatrix);\n\n // Translate Left Upper Arm\n Matrix leftUpperArmMatrix = new Matrix();\n leftUpperArmMatrix.postTranslate(-200, 0);\n leftUpperArm.transform(leftUpperArmMatrix);\n\n // Translate Right Upper Arm\n Matrix rightUpperArmMatrix = new Matrix();\n rightUpperArmMatrix.postTranslate(200, 0);\n rightUpperArm.transform(rightUpperArmMatrix);\n\n // Translate Left Lower Arm\n Matrix leftLowerArmMatrix = new Matrix();\n leftLowerArmMatrix.postTranslate(-175, 0);\n leftLowerArm.transform(leftLowerArmMatrix);\n\n // Translate Right Lower Arm\n Matrix rightLowerArmMatrix = new Matrix();\n rightLowerArmMatrix.postTranslate(200, 0);\n rightLowerArm.transform(rightLowerArmMatrix);\n\n // Translate Left Upper Leg\n Matrix leftUpperLegMatrix = new Matrix();\n leftUpperLegMatrix.postTranslate(10, 350);\n leftUpperLeg.transform(leftUpperLegMatrix);\n\n // Translate Right Upper Leg\n Matrix rightUpperLegMatrix = new Matrix();\n rightUpperLegMatrix.postTranslate(140, 350);\n rightUpperLeg.transform(rightUpperLegMatrix);\n\n // Translate Left Lower Leg\n Matrix leftLowerLegMatrix = new Matrix();\n leftLowerLegMatrix.postTranslate(0, 225);\n leftLowerLeg.transform(leftLowerLegMatrix);\n\n // Translate Right Lower Leg\n Matrix rightLowerLegMatrix = new Matrix();\n rightLowerLegMatrix.postTranslate(0, 225);\n rightLowerLeg.transform(rightLowerLegMatrix);\n\n // Translate Left Foot\n Matrix leftFootMatrix = new Matrix();\n leftFootMatrix.postTranslate(-50, 190);\n leftFoot.transform(leftFootMatrix);\n\n // Translate Right Foot\n Matrix rightFootMatrix = new Matrix();\n rightFootMatrix.postTranslate(20, 190);\n rightFoot.transform(rightFootMatrix);\n\n\n // Set Min/Max Rotation for all body parts\n head.max_degree = 50;\n head.min_degree = -50;\n leftUpperLeg.min_degree = -90;\n leftUpperLeg.max_degree = 90;\n rightUpperLeg.min_degree = -90;\n rightUpperLeg.max_degree = 90;\n leftLowerLeg.min_degree = -90;\n leftLowerLeg.max_degree = 90;\n rightLowerLeg.min_degree = -90;\n rightLowerLeg.max_degree = 90;\n leftFoot.min_degree = -35;\n leftFoot.max_degree = 35;\n rightFoot.max_degree = 35;\n rightFoot.min_degree = -35;\n leftLowerArm.min_degree = -135;\n leftLowerArm.max_degree = 135;\n rightLowerArm.min_degree = -135;\n rightLowerArm.max_degree = 135;\n leftHand.min_degree = -35;\n leftHand.max_degree = 35;\n rightHand.min_degree = -35;\n rightHand.max_degree = 35;\n //leftUpperArm.min_degree = -360;\n //leftUpperArm.max_degree = 360;\n\n // Define Torso's children\n torso.addChild(head);\n torso.addChild(leftUpperArm);\n torso.addChild(rightUpperArm);\n torso.addChild(leftUpperLeg);\n torso.addChild(rightUpperLeg);\n\n // Define Upper Arm Children\n leftUpperArm.addChild(leftLowerArm);\n rightUpperArm.addChild(rightLowerArm);\n\n // Define hand Relationship\n leftLowerArm.addChild(leftHand);\n rightLowerArm.addChild(rightHand);\n\n // Define Upper Leg Children\n leftUpperLeg.addChild(leftLowerLeg);\n rightUpperLeg.addChild(rightLowerLeg);\n leftLowerLeg.addChild(leftFoot);\n rightLowerLeg.addChild(rightFoot);\n return torso;\n }",
"@Override\n protected Entity findPlayerToAttack() {\n EntityPlayer player = this.worldObj.getClosestVulnerablePlayerToEntity(this, 64.0);\n if (player != null) {\n if (this.shouldAttackPlayer(player)) {\n if (this.lookDelay++ == 5) {\n this.lookDelay = 0;\n return player;\n }\n }\n else {\n this.lookDelay = 0;\n }\n }\n return null;\n }",
"private Alien shoottop(){\n\t\tAlien shooter = alien1[choose()];\n\t\tif (shooter == null) return shoottop();\n\t\telse if (shooter.Destroyed) return shoottop();\n\t\telse return shooter;\n\t}",
"protected void createStartSnake() {\n int screenXCenter = maxX / 2; //Cast just in case we have an odd number\n int screenYCenter = maxY / 2; //Cast just in case we have an odd number\n\n snakeSquares[screenXCenter][screenYCenter] = 1;\n snakeSquares[screenXCenter + 1][screenYCenter] = 2;\n snakeSquares[screenXCenter + 2][screenYCenter] = 3;\n\n snakeHeadX = screenXCenter;\n snakeHeadY = screenYCenter;\n\n snakeSize = 3;\n\n currentHeading = DIRECTION_LEFT;\n lastHeading = DIRECTION_LEFT;\n\n justAteMustGrowThisMuch = 0;\n }",
"private void convertHeadToTailComponent() {\n\t\tHeadComponent curHead = (HeadComponent) snake.getLast();\n\t\tsnake.removeLast();\n\t\tsnake.addLast(new TailComponent(curHead.getX(), curHead.getY()));\n\t}",
"public Player getLeadingPlayer() {\n\t\tif (this.getStones() > this.getOpponentKalaha().getStones()) {\n\t\t\treturn this.Owner;\n\t\t} else if (this.getStones() < this.getOpponentKalaha().getStones()) {\n\t\t\treturn this.Owner.getOpponent();\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public Enemy getEnemy(int whichEnemy);",
"public void drawHead(Graphics g, int a, int b)\n {\n //draws the outline of the head of the snake based on the selected color\n \n if(lastpowerUp.equals(\"BLACK\") && powerupTimer > 0)\n {\n Color transGray = new Color(55,55,55);\n g.setColor(transGray);\n }\n else if(!lastpowerUp.equals(\"RAINBOW\"))\n { \n if(difficult.equals(\"GHOST\"))\n g.setColor(Color.BLACK);\n else if(color.equals(\"WHITE\"))\n g.setColor(Color.WHITE); \n else if(color.equals(\"GREEN\"))\n g.setColor(Color.GREEN); //Green outline\n else if(color.equals(\"BLUE\"))\n g.setColor(Color.BLUE); \n else if(color.equals(\"CYAN\"))\n g.setColor(Color.CYAN); \n else if(color.equals(\"GRAY\"))\n g.setColor(Color.GRAY);\n else if(color.equals(\"YELLOW\"))\n g.setColor(Color.YELLOW); \n else if(color.equals(\"MAGENTA\"))\n g.setColor(Color.MAGENTA); \n else if(color.equals(\"ORANGE\"))\n g.setColor(Color.ORANGE); \n else if(color.equals(\"PINK\"))\n g.setColor(Color.PINK); \n else if(color.equals(\"RED\"))\n g.setColor(Color.RED); \n }\n else if(lastpowerUp.equals(\"RAINBOW\") && powerupTimer > 0)\n {\n int x = (int)(Math.random()*250);\n int y = (int)(Math.random()*250);\n int z = (int)(Math.random()*250);\n \n Color randomColor = new Color(x,y,z);\n g.setColor(randomColor);\n }\n \n \n if((lastpowerUp.equals(\"YELLOW\") && powerupTimer > 0 && !modeT) || (modeT && lastpowerUp.equals(\"TROLL\") && powerupTimer >0))\n {\n if(up || down)\n {\n g.drawLine(a-37,b,a+52,b);\n g.drawLine(a-37,b,a-37,b+15);\n g.drawLine(a+52,b,a+52,b+15);\n g.drawLine(a-37,b+15,a+52,b+15);\n }\n else if(left || right)\n {\n g.drawLine(a,b-37,a+15,b-37);\n g.drawLine(a,b-37,a,b+52);\n g.drawLine(a+15,b-37,a+15,b+52);\n g.drawLine(a,b+52,a+15,b+52);\n }\n }\n else\n {\n g.drawLine(a,b,a,b+15);\n g.drawLine(a,b,a+15,b);\n g.drawLine(a+15,b,a+15,b+15);\n g.drawLine(a,b+15,a+15,b+15);\n } \n \n }",
"void playSoldierCard(int victimIndex, HexLocation location);",
"private EntityLivingBase findPlayerToAttack() {\n EntityPlayer player = entity.worldObj.getClosestVulnerablePlayerToEntity(entity, aggroRange);\n if ( player != null && !player.capabilities.isCreativeMode && entity.canEntityBeSeen(player) )\n \treturn player;\n\n EntityLivingBase target = entity.getLastAttacker();\n if ( isTargetValid(target) && entity.canEntityBeSeen(target) )\n \treturn target;\n\n \treturn null;\n }",
"public void snakeUp(){\r\n\t\tspeedUp();\r\n\t\tpoints += 100;\r\n\t}",
"public Point validSnakeHeadUp() {\t\t\n\t\treturn new Point(top_border + 2, 15);\n\t}",
"private void moveSnake() { \r\n for (int i = length; i > 0; i--) {\r\n snake[i].row = snake[i-1].row;\r\n snake[i].column = snake[i-1].column; \r\n snake[i].direction = snake[i-1].direction; \r\n }\r\n if (snake[HEAD].direction == UP) snake[HEAD].row--;\r\n else if (snake[HEAD].direction == DOWN) snake[HEAD].row++;\r\n else if (snake[HEAD].direction == LEFT) snake[HEAD].column--;\r\n else if (snake[HEAD].direction == RIGHT) snake[HEAD].column++;\r\n }",
"public void check() {\n Ellipse2D.Double head = snakeParts.get(0);\n Food food = gameGround.getFood();\n\n // Ate itself\n for (int i = 1; i < snakeParts.size(); i++) {\n if (head.getMinX() == snakeParts.get(i).getMinX() && head.getMinY() == snakeParts.get(i).getMinY()) {\n over = true;\n return;\n }\n }\n\n // Ate food\n if (head.getMinX() == food.getShape().getMinX() && head.getMinY() == food.getShape().getMinY()) {\n scoreBoard.addPoints(1);\n food.next(this);\n snakeParts.add(ass);\n }\n }",
"private boolean shouldSnakeSeekTruman(Point snake, int trux, int truy){\n\t\treturn (Math.abs(snake.x - trux) < SNAKE_ATTACK_RANGE && Math.abs(snake.y - truy) < SNAKE_ATTACK_RANGE);\n\t}",
"protected String getHurtSound() {\n return \"dig.stone\";\n }",
"private Alien2 shootmiddle() {\n\t\tAlien2 shooter = alien2[choose()];\n\t\tif (shooter == null) return shootmiddle();\n\t\telse if (shooter.Destroyed) return shootmiddle();\n\t\telse return shooter;\n\t}",
"public T hent(int pos);",
"public int getPlayerTuz(Side owner) {\n for(int i = 0 ; i <= 17 ; ++i) {\n if(holes[i].isTuz() && holes[i].getOwner() == owner) {\n return i;\n }\n }\n return -1;\n }",
"public void startSnake() {\n createBoard();\n generateFirstSnake();\n generateEnemy();\n spawnApples();\n printBoard();\n keepMoving();\n }",
"@Override\n public Enemy getEnemyPlayer() {\n return batMan.getEnemyPlayer();\n }",
"public int headFor(Coordinate place) {\n\n\t\tif (place == null) {\n\t\t\tSystem.out.println(\"ERROR: can't move toward nonexistant location\");\n\t\t\treturn -1;\n\t\t}\n\n\t\t// first, record from where the agent is starting\n\t\tstartPoint = this.geometry.getCoordinate();\n\t\tgoalPoint = null;\n\n\t\tif (!(edge.getTo().equals(node) || edge.getFrom().equals(node))) {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_mismatch_between_current_edge_and_node\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t///////////////////// FINDING THE GOAL ////////////////////\n\t\t// set up goal information\n\t\ttargetDestination = world.snapPointToRoadNetwork(place);\n\n\t\tGeoNode destinationNode = world.snapPointToNode(targetDestination);\n\t\tif (destinationNode == null) {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_invalid_destination_node\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t// be sure that if the target location is not a node but rather a point along an\n\t\t// edge, that point is recorded\n\t\tif (destinationNode.geometry.getCoordinate().distance(targetDestination) > world.resolution)\n\t\t\tgoalPoint = targetDestination;\n\t\telse\n\t\t\tgoalPoint = null;\n\n\t\t///////////////// FINDING A PATH /////////////////////\n\n\t\tpath = pathfinder.astarPath(node, destinationNode, world.roads);\n\n\t\t// if it fails, give up\n\t\tif (path == null) {\n\t\t\treturn -1;\n\t\t}\n\n\t\t//////////////////// CHECK FOR BEGINNING OF PATH ///////////////////\n\t\t// we want to be sure that we're situated on the path *right now*, and that if\n\t\t// the path doesn't include the link we're on at this moment that we're both\n\t\t// a) on a link that connects to the startNode\n\t\t// b) pointed toward that startNode\n\t\t// Then, we want to clean up by getting rid of the edge on which we're already\n\t\t// located\n\n\t\t// Make sure we're in the right place, and face the right direction\n\t\tif (edge.getTo().equals(node))\n\t\t\tdirection = 1;\n\t\telse if (edge.getFrom().equals(node))\n\t\t\tdirection = -1;\n\t\telse {\n\t\t\tSystem.out.println((int) world.schedule.getTime() + \"MOVE_ERROR_mismatch_between_current_edge_and_node_2\");\n\t\t\treturn -2;\n\t\t}\n\n\t\t// reset stuff\n\t\tif (path.size() == 0 && targetDestination.distance(geometry.getCoordinate()) > world.resolution) {\n\t\t\tpath.add(edge);\n\t\t\tnode = (GeoNode) edge.getOtherNode(node);\n\t\t}\n\n\t\t//////////////////// CHECK FOR END OF PATH //////////////\n\n\t\tif (goalPoint != null) {\n\n\t\t\tListEdge myLastEdge = world.getClosestEdge(goalPoint, world.resolution, world.networkEdgeLayer, world.fa);\n\n\t\t\tif (myLastEdge == null) {\n\t\t\t\tSystem.out.println((int) world.schedule.getTime() + \"\\tMOVE_ERROR_goal_point_is_too_far_from_any_edge\");\n\t\t\t\treturn -2;\n\t\t\t}\n\n\t\t\t// make sure the point is on the last edge\n\t\t\tEdge lastEdge;\n\t\t\tif (path.size() > 0)\n\t\t\t\tlastEdge = path.get(0);\n\t\t\telse\n\t\t\t\tlastEdge = edge;\n\n\t\t\tPoint goalPointGeometry = world.fa.createPoint(goalPoint);\n\t\t\tif (!lastEdge.equals(myLastEdge)\n\t\t\t\t\t&& ((MasonGeometry) lastEdge.info).geometry.distance(goalPointGeometry) > world.resolution) {\n\t\t\t\tif (lastEdge.getFrom().equals(myLastEdge.getFrom()) || lastEdge.getFrom().equals(myLastEdge.getTo())\n\t\t\t\t\t\t|| lastEdge.getTo().equals(myLastEdge.getFrom()) || lastEdge.getTo().equals(myLastEdge.getTo()))\n\t\t\t\t\tpath.add(0, myLastEdge);\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println((int) world.schedule.getTime()\n\t\t\t\t\t\t\t+ \"\\tMOVE_ERROR_goal_point_edge_is_not_included_in_the_path\");\n\t\t\t\t\treturn -2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// set up the coordinates\n\t\tthis.startIndex = segment.getStartIndex();\n\t\tthis.endIndex = segment.getEndIndex();\n\n\t\treturn 1;\n\t}",
"public WallCollision(NinjaEntity player){\n this.player = player;\n }",
"public Square getHead() {\n return this.head;\n }",
"public static void tossWhoIsFirst() \n\t{\n\t\t\n\t\tRandom randomHeadTail = new Random();\n\t\tint generatedHeadOrTail = randomHeadTail.nextInt(2);\n\t\tSystem.out.println(generatedHeadOrTail);\n\t\tSystem.out.println(\"Tossing a coin To decide who plays first.\\nEnter 1-for-Head or 0-for-Tail:\");\n\t\tscanner = new Scanner(System.in);\n\t\tint playerHeadOrTail = scanner.nextInt();\n\t\tif(playerHeadOrTail >= 0 && playerHeadOrTail <= 1)\n\t\t{\n\t\t\tif(playerHeadOrTail == generatedHeadOrTail)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Player won toss ! Make first move.\");\n\t\t\t\tbeforeMoveBoard();\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Computer won toss ! Make's first move.\");\n\t\t\t\tcomputerMove();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Invalid Coin choice: Make choice again.\");\n\t\t\ttossWhoIsFirst();\n\t\t}\n\t}",
"public int getSnakeStartLength();",
"@Nullable\r\n public AnimalTamer getSecondTrustedPlayer();",
"public boolean wideSnakeOnDot()\n {\n if(up || down)\n {\n //Location p = new Location(head.getA()-30,head.getB());\n //Location m = new Location(head.getA()-15,head.getB());\n //Location n = new Location(head.getA()+15,head.getB());\n //Location o = new Location(head.getA()+30,head.getB()); \n //if(dot.isEqual(m) || dot.isEqual(n) || dot.isEqual(o) || head.isEqual(p))\n // return true;\n \n if(Math.abs(head.getA()-dot.getA())<50 && (head.getB()-dot.getB() == 0))\n {\n return true;\n } \n } \n else if(left || right)\n {\n //Location p = new Location(head.getA(),head.getB()-30);\n //Location m = new Location(head.getA(),head.getB()-15);\n //Location n = new Location(head.getA(),head.getB()+15);\n //Location o = new Location(head.getA(),head.getB()+30); \n //if(dot.isEqual(m) || dot.isEqual(n) || dot.isEqual(o) || head.isEqual(p))\n // return true;\n \n \n if(Math.abs(head.getB()-dot.getB())<50 && (head.getA()-dot.getA() == 0))\n {\n return true;\n }\n }\n return false;\n }",
"private static void checkFirstPlayer()\n {\n int Head = 0;\n double toss = Math.floor(Math.random()*10) % 2;\n if ( toss == Head )\n {\n System.out.println(\"computer starts to play first\");\n }\n else\n {\n System.out.println(\"User starts to play first\");\n }\n }",
"public void startSnake()\n {\n int thisA = (150+1260)/2; //705\n int thisB = (150+630)/2 -195; //195\n \n for(int i=0 ; i<3; i++)\n {\n list.add(new Location(thisA,thisB));\n //drawSegment(g,thisA,thisB);\n thisB += 15;\n \n }\n head.setA(thisA);\n head.setB(thisB-15); //to adjust for the extra +15 at the end of the last for loop run through \n }",
"void robPlayer(HexLocation location, int victimIndex);",
"public void generateFirstSnake() {\n int rowsPlace = randomGenerator(0, rows-1);\n int collsPlace = randomGenerator(0, colls-1);\n \n if(board[rowsPlace][collsPlace] == ' '){\n snakePartList.add(new SnakePart(rowsPlace, collsPlace, SnakePartMaxID));\n board[rowsPlace][collsPlace] = 'S';\n setSnakeHeadColls(collsPlace);\n setSnakeHeadRows(rowsPlace);\n } else {\n generateFirstSnake();\n }\n }",
"private Point findNextPosition(int headX, int headY) {\n int nextHeadPositionX;\n int nextHeadPositionY;\n\n\n switch (direction) {\n case \"left\":\n nextHeadPositionX = headX - 1;\n nextHeadPositionY = headY;\n\n break;\n case \"right\":\n nextHeadPositionX = headX + 1;\n nextHeadPositionY = headY;\n\n break;\n case \"down\":\n nextHeadPositionY = headY + 1;\n nextHeadPositionX = headX;\n\n break;\n case \"up\":\n nextHeadPositionY = headY - 1;\n nextHeadPositionX = headX;\n\n break;\n default:\n return null;\n }\n\n return new Point(nextHeadPositionX, nextHeadPositionY);\n }",
"private void createSnake() {\r\n int halfWidth = gridWidth / 2;\r\n int halfHeight = gridHeight / 2;\r\n \r\n snake = new Snake(new Coordinates(halfWidth, halfHeight), 5, Direction.WEST);\r\n }",
"private Alien3 shootbottom() {\n\t\tAlien3 shooter = alien3[choose()];\n\t\tif (shooter == null) return shootbottom();\n\t\telse if (shooter.Destroyed) return shootbottom();\n\t\telse return shooter;\n\t}",
"public abstract void hitOnHead(Popo popo, boolean head);",
"public double getHeadDistance() {\n\t\treturn m_headDistance;\n\t}",
"public void onScannedRobot(ScannedRobotEvent e)\n {\n BadBoy en = (BadBoy)enemies.get(e.getName());\n \n if(en == null){\n en = new BadBoy();\n enemies.put(e.getName(), en);\n }\n \n \n en.hp = true;\n en.energy = e.getEnergy();\n en.pos = hallarPunto(myPos, e.getDistance(), getHeadingRadians() + e.getBearingRadians());\n \n // normal target selection: the one closer to you is the most dangerous so attack him\n //si no le queda vida al objetivo actual CHANGE TARGET m8\n \n if(!objetivo.hp || e.getDistance() < myPos.distance(objetivo.pos)) {\n objetivo = en;\n }\n \n \n }",
"public void onScannedRobot(ScannedRobotEvent e) {\r\n\t\tif (isFriend(e.getName())) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tEnemy en;\r\n\t\tif (targets.containsKey(e.getName())) {\r\n\t\t\ten = (Enemy) targets.get(e.getName());\r\n\t\t} else {\r\n\t\t\ten = new Enemy();\r\n\t\t\ttargets.put(e.getName(), en);\r\n\t\t}\r\n\t\t// the next line gets the absolute bearing to the point where the bot is\r\n\t\tdouble absbearing_rad = (getHeadingRadians() + e.getBearingRadians())\r\n\t\t\t\t% (2 * PI);\r\n\t\t// this section sets all the information about our target\r\n\t\ten.name = e.getName();\r\n\t\tdouble h = normaliseBearing(e.getHeadingRadians() - en.heading);\r\n\t\th = h / (getTime() - en.ctime);\r\n\t\ten.changehead = h;\r\n\t\ten.x = getX() + Math.sin(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the x\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// target is\r\n\t\ten.y = getY() + Math.cos(absbearing_rad) * e.getDistance(); // works out\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the y\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// coordinate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of where\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// target is\r\n\t\ten.bearing = e.getBearingRadians();\r\n\t\ten.heading = e.getHeadingRadians();\r\n\t\ten.ctime = getTime(); // game time at which this scan was produced\r\n\t\ten.speed = e.getVelocity();\r\n\t\ten.distance = e.getDistance();\r\n\t\ten.live = true;\r\n\t\tif ((en.distance < target.distance) || (target.live == false)) {\r\n\t\t\ttarget = en;\r\n\t\t}\r\n\t}",
"private Ship pickNearestEnemyShip(Toroidal2DPhysics space, Ship ship) {\n\t\tdouble minDistance = Double.POSITIVE_INFINITY;\n\t\tShip nearestShip = null;\n\t\tfor (Ship otherShip : space.getShips()) {\n\t\t\t// don't aim for our own team (or ourself)\n\t\t\tif (otherShip.getTeamName().equals(ship.getTeamName())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tdouble distance = space.findShortestDistance(ship.getPosition(), otherShip.getPosition());\n\t\t\tif (distance < minDistance) {\n\t\t\t\tminDistance = distance;\n\t\t\t\tnearestShip = otherShip;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn nearestShip;\n\t}",
"int getHair();",
"public int magicMissile();",
"public static int isVehicleInSight(Player curr) {\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n if (bodyDir == UP) {\n dirs.add(UP);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(DOWN);\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(LEFT);\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n dirs.add(RIGHT);\n dirs.add(LEFT);\n if (curr.head360())\n dirs.add(UP);\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n dirs.add(UP);\n dirs.add(DOWN);\n if (curr.head360())\n dirs.add(RIGHT);\n }\n\n if (dirs == null || dirs.size() == 0)\n return -1;\n for (int vi = 0; vi < players.length; vi++) {\n if (players[vi] == null || players[vi].getName().equals(\"NONE\") || (players[vi] instanceof Monster)) //we don't want the AI monster to consider itself or other monsters a target\n continue;\n Player veh = players[vi];\n boolean isAir = veh.isFlying();\n int vR = veh.getRow();\n int vC = veh.getCol();\n if (veh.getName().endsWith(\"civilian\"))\n continue;\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 1; r--) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (isAir && r == vR && curr.getCol() == vC)\n return dir + 10;\n if (r == vR && curr.getCol() == vC)\n return dir;\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length - 1; c++) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 1; c--) {\n if (isAir && c == vC && curr.getRow() == vR)\n return dir + 10;\n if (curr.getRow() == vR && c == vC)\n return dir;\n }\n }\n if (skip)\n continue;\n }\n }\n return -1;\n }",
"public Ellipse getHead() {\n return _noteHead;\n }",
"public void findShootedPlayer(UUID id) {\n\t\n\t\tif(healths.contains(id.toString()))\n\t\t\t{\n\t\t\t\thealths.put(id.toString(),healths.get(id.toString())-20);\n\t\t\t\tSystem.out.println(\"ghostEntity \"+id.toString() +\"was shooted\");\n\t\t\t\tif(healths.get(id.toString())<=0)\n\t\t\t\t{\n\t\t\t\t\thealths.put(id.toString(),100);\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t}",
"@Override\r\n public boolean dye() {\r\n if (getX() > 3100 || getX() < 10 || getY() < 10 || getY() > 3100) {\r\n return true;\r\n }\r\n// int pixel = mapRGB.getRGB((int) getX(), (int) getY());\r\n// int red = (pixel >> 16) & 0xff;\r\n// if(red==255){this.handler.getWaves().removeEnemy(); return true;}\r\n int k = collision(velX, velY, this.getX(), this.getY());\r\n if(k!=0) {\r\n this.handler.getWaves().removeEnemy(); \r\n return true;\r\n }\r\n else{\r\n zombie_x = getX(); \r\n zombie_y = getY();\r\n }\r\n //I proiettili hanno una portata limitata o se ha colpito il player o se è uscito dalla mappa o se è andato contro un muro\r\n if ((this.getHealth() == 0) || (handler.getPlayer().getBounds().contains(getX(), getY()))) {\r\n int n = (int) (Math.random() * 10);\r\n if(n>1) n=2;\r\n switch (n) {\r\n case 2:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 3, 200, 25, handler.getPlayer(), this.handler, 30, 60, 60, 5, new Animation(Assets.zombie, 20), new Animation(Assets.zombieAttack, 35), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 0:\r\n this.handler.addSprite(new StandardZombie(zombie_x, zombie_y, 4, 70, 50, handler.getPlayer(), this.handler, 0, 60, 60, 20, new Animation(Assets.zombie2, 15), new Animation(Assets.zombie2Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n case 1:\r\n this.handler.addSprite(new SpittleZombie(zombie_x, zombie_y, 3, 500, 40, handler.getPlayer(), this.handler, 0, 60, 60, 45, new Animation(Assets.zombie3, 15), new Animation(Assets.zombie3Attack, 15), new Sound(Assets.zombieBite), new Sound(Assets.zombieHit)));\r\n break;\r\n }\r\n return true;\r\n }\r\n \r\n return false;\r\n }",
"public Snake(){ super(); }",
"public Recognition findSkytone() {\n List<Recognition> recogs = this.findBricks();\n boolean one_seen = false;\n Recognition skystone = null;\n for (Recognition recog : recogs) {\n if (recog.getLabel() == \"Skystone\") {\n if (one_seen) {\n return null;\n } //if this is the second we're seeing, return null\n else {\n one_seen = true;\n skystone = recog;\n }\n }\n }\n return skystone; //will be null if we never saw a skystone, or defined if not\n }",
"public String playTexasHoldEm() throws IOException {\n\n StringBuffer buffer = new StringBuffer();\n String input = FileReaderUtil.readInputFile();\n\n List<String> players = new ArrayList<>();\n List<Hand> hands = new ArrayList<>();\n Set<Integer> winners = new HashSet<>();\n String[] lines = input.split(\"\\n\");\n\n Hand highestHand = null;\n String[] highestCards = null;\n int highest = -1;\n int index = 0;\n\n for (String line : lines) {\n\n String[] cards = line.toUpperCase().split(\" \");\n players.add(line);\n\n if (cards.length == 7) {\n // Played until the end.\n Hand currHand = determineHand(cards);\n hands.add(currHand);\n\n if (highestHand == null) {\n highestHand = currHand;\n highest = index;\n highestCards = cards;\n\n winners.add(index);\n } else if (currHand.rank > highestHand.rank) {\n winners.clear();\n winners.add(index);\n\n highestHand = currHand;\n highest = index;\n highestCards = cards;\n } else if (currHand.rank == highestHand.rank) {\n\n int compare = breakTie(cards, highestCards);\n if (compare == 0) {\n // tied\n winners.add(highest);\n winners.add(index);\n } else if (compare < 0) {\n // current card wins\n winners.clear();\n winners.add(index);\n highest = index;\n highestCards = cards;\n }\n }\n } else {\n hands.add(null);\n }\n\n index++;\n }\n\n for (int i = 0; i < players.size(); i++) {\n String player = lines[i];\n Hand hand = hands.get(i);\n\n buffer.append(player);\n\n if (hand != null) {\n buffer.append(\" \").append(WordUtils.capitalizeFully(hand.formatted));\n }\n\n if (winners.contains(i)) {\n buffer.append(\" \").append(\"(winner)\");\n }\n\n buffer.append(\"\\n\");\n }\n\n return buffer.toString().trim();\n }",
"public int move(String direction) {\n int[] head = snake.peekFirst();\n int x = head[0];\n int y = head[1];\n switch (direction) {\n case \"L\": y--; break;\n case \"R\": y++; break;\n case \"D\": x++; break;\n case \"U\": x--; break;\n }\n if (x < 0 || x >= height || y < 0 || y >= width) return -1;\n\n int[] newHead = new int[] {x, y};\n if (!foodQueue.isEmpty() && Arrays.equals(newHead, foodQueue.peek())) {\n foodQueue.poll();\n snake.offerFirst(newHead);\n return ++score;\n }\n snake.pollLast();\n for (int[] pos : snake) {\n if (Arrays.equals(newHead, pos)) return -1;\n }\n snake.offerFirst(newHead);\n return score;\n }",
"@Override\n\tpublic void enter(Entity entity) {\n\t\tOfDouble posStreamIter = rand.doubles(2, -WANDER_EXTENT, WANDER_EXTENT).iterator();\n\t\twanderGoal.set(posStreamIter.next().floatValue(),(float) posStreamIter.next().floatValue() );\n\t\tGdx.app.log(\"AI\", entity.toString() + \" heading to position \" + this.wanderGoal.toString());\n\t}",
"public static void main(String args[])\r\n {\n Box box1 = new Box(0, 0);\r\n box1.setboxType(BoxType.SNAKE_HEAD);\r\n // System.out.println(\"box1: x = \" + box1.getColumn() + \" y = \" + box1.getRow() + \" type = \" + box1.getBoxType());\r\n // System.out.println(\"making snake body with a size of 0\\n\");\r\n Snake snake = new Snake(box1);\r\n // System.out.println(\"snake size = \" + snake.getSize() + \" direction = \" +snake.getDirection());\r\n snake.setDirection(Direction.UP);\r\n // System.out.println(\"growing snake\\n\");\r\n snake.grow();\r\n // System.out.println(\"new snake size =\" + snake.getSize() + \" direction = \" + snake.getDirection());\r\n // for(Iterator i = snake.getSnakLinkedList().iterator(); i.hasNext();)\r\n // {\r\n // Box body = (Box)i.next();\r\n // System.out.println(\"Snake node: r = \" + body.getRow() + \" c = \" + body.getColumn());\r\n // }\r\n snake.grow();\r\n snake.move(Direction.DOWN);\r\n // System.out.println(\"new snake size =\" + snake.getSize() + \" direction = \" + snake.getDirection());\r\n for(Iterator i = snake.getSnakLinkedList().iterator(); i.hasNext();)\r\n {\r\n Box body = (Box)i.next();\r\n System.out.println(\"Snake node: Type = \" + body.getBoxType() + \" r = \" + body.getRow() + \" c = \" + body.getColumn());\r\n }\r\n }",
"public void collision(){\r\n\t\tif(currX < 0 || currX > 1000-width || currY < 0 || currY > 700-height){\r\n\t\t\tinGame=false;\r\n\t\t}\r\n\t\t/*\r\n\t\tI start at 1 because tail[0] will constantly be taking the position\r\n\t\tof the snake's head, so if i start at 0, the game would end immediately.\r\n\t\t*/\r\n\t\tfor(int i=1; i < numOranges; i++){\r\n\t\t\tRectangle currOrangeRect = new Rectangle(tail[i].getXcoords(), tail[i].getYcoords(), OrangeModel.getWidth(), OrangeModel.getHeight());\r\n\t\t\tif(new Rectangle(currX, currY, width, height).intersects(currOrangeRect)){\r\n\t\t\t\tinGame=false;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public Collision getCollisionType(ISprite sprite);",
"public void skystonePos1() {\n // This method will drive the robot to Skystone Position 1 (Closest to the bridge)\n // Blinked in: Change color SOLID BLUE to indicate we successfully Drove to the stone\n }",
"public void generateEnemy() {\n int rowsPlace = randomGenerator(0, rows-1);\n int collsPlace = randomGenerator(0, colls-1);\n\n if(board[rowsPlace][collsPlace] == ' '){\n snakeEnemyPartList.add(new SnakeEnemyPart(rowsPlace, collsPlace, enemyId));\n board[rowsPlace][collsPlace] = 'E';\n setSnakeHeadColls(collsPlace);\n setSnakeHeadRows(rowsPlace);\n } else {\n generateEnemy();\n }\n }",
"public Snake() {\n\t\tsnakeId = 0;\n\t\theadId = 0;\n\t\tTailId = 0;\n\t}",
"public void turnSmaround()\n { \n Wall w= (Wall)getOneIntersectingObject(Wall.class);\n wX=w.getX();\n wY=w.getY();\n }",
"public static int[] isMonsterInSight(Player curr) {\n int[] ans = {-1, -1};\n ArrayList<Integer> dirs = new ArrayList();\n int bodyDir = curr.getBodyDirection();\n String name = curr.getName();\n if (bodyDir == UP) {\n dirs.add(UP);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(DOWN);\n }\n } else if (bodyDir == RIGHT) {\n dirs.add(RIGHT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(LEFT);\n }\n } else if (bodyDir == DOWN) {\n dirs.add(DOWN);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(RIGHT);\n dirs.add(LEFT);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(UP);\n }\n } else //if(curr.getBodyDirection()==LEFT)\n {\n dirs.add(LEFT);\n if (!name.endsWith(\"fighter\")) //figher planes can only see what is in front of them\n {\n if (!name.equals(\"AIR bomber\"))//bombers only see what is in front and behind them for their bombing run\n {\n dirs.add(UP);\n dirs.add(DOWN);\n }\n if (name.startsWith(\"TANK\") || name.endsWith(\"jeep\") || name.endsWith(\"destroyer\") || name.endsWith(\"coastguard\") || name.equals(\"AIR bomber\"))\n dirs.add(RIGHT);\n }\n }\n\n if (dirs == null || dirs.size() == 0)\n return ans; //{-1,-1}\n for (int m = 0; m < players.length; m++) { //skip player if Vehicle is not mind controlled and the player is not a monster\n //skip player if Vehicle is mind controlled and the player is a monster\n if (players[m] == null || players[m].getName().equals(\"NONE\") || curr == players[m] ||\n ((curr instanceof Vehicle && !((Vehicle) (curr)).isMindControlled()) && !(players[m] instanceof Monster)) ||\n ((curr instanceof Vehicle && ((Vehicle) (curr)).isMindControlled()) && (players[m] instanceof Monster)))\n continue;\n int mR = players[m].getRow();\n int mC = players[m].getCol();\n\n for (int i = 0; i < dirs.size(); i++) {\n int dir = dirs.get(i);\n boolean skip = false;\n if (dir == UP) {\n for (int r = curr.getRow(); r >= 0; r--) { //coastguard, destroyer, fighter planes and artillery have the monsters position known - the monster is not hidden by structures\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == DOWN) {\n for (int r = curr.getRow(); r < board.length - 1; r++) {\n if (!MapBuilder.noStructure(r, curr.getCol(), panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (r == mR && curr.getCol() == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n\n }\n } else if (dir == RIGHT) {\n for (int c = curr.getCol(); c < board[0].length; c++) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n } else if (dir == LEFT) {\n for (int c = curr.getCol(); c >= 0; c--) {\n if (!MapBuilder.noStructure(curr.getRow(), c, panel) && !name.endsWith(\"coastguard\") && !name.endsWith(\"destroyer\") && !name.endsWith(\"fighter\") && !name.endsWith(\"artillery\") && !name.endsWith(\"missile\") && !name.equals(\"AIR bomber\") && !players[m].isFlying()) {\n skip = true;\n break;\n }\n if (curr.getRow() == mR && c == mC) {\n ans[0] = dir;\n ans[1] = m;\n return ans;\n }\n }\n }\n if (skip)\n continue;\n }\n }\n return ans;\n }",
"void fireShellAtOpponent(int playerNr);",
"public static void applyPhysics(Drone drone, float dt) throws DroneCrashException, MaxAoAException {\r\n\t\t\r\n\t\t// stepsize bepalen\r\n\t\tfloat h;\r\n\t\tif (dt - drone.getPredictionMethod().getStepSize() >= 0) {\r\n\t\t\th = drone.getPredictionMethod().getStepSize();\r\n\t\t} else if (dt > 0) {\r\n\t\t\th = dt;\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// huidige versnellingen bepalen\r\n\t\tVector3f[] currentAccelerationsW = calculateAccelerations(drone, h);\r\n\t\t\r\n\t\t// snelheid voorspellen in functie van de huidige vernsellingen en posities\r\n\t\tVector3f[] newVelocities = drone.getPredictionMethod().predictVelocity(drone.getLinearVelocity(), drone.getAngularVelocity(), \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcurrentAccelerationsW[0], currentAccelerationsW[1], h);\r\n\t\t\r\n\t\t// nieuwe positie berekenen aan de hand van de nieuwe snelheid\r\n\t\tVector3f[] deltaPositions = calculatePositionDifferences(drone, newVelocities, h);\r\n\r\n\t\t// nieuwe snelheid opslaan\r\n\t\tdrone.setLinearVelocity(newVelocities[0]);\r\n\t\tdrone.setAngularVelocity(newVelocities[1]);\r\n\r\n\t\t// translatie en rotatie uitvoeren\r\n\t\tdrone.translate(deltaPositions[0]);\r\n\r\n\t\tif (!deltaPositions[1].equals(new Vector3f(0, 0, 0))) {\r\n\t\t\tVector3f rotationAxis = new Vector3f(0, 0, 0);\r\n\t\t\tdeltaPositions[1].normalise(rotationAxis);\r\n\t\t\tdrone.rotate(deltaPositions[1].length(), rotationAxis);\r\n\t\t}\r\n\r\n\t\t// checken of de drone crasht\r\n\t\tVector3f leftWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getLeftWing().getCenterOfMass()), drone.getPosition(), leftWingCenterOfMass);\r\n\t\tVector3f rightWingCenterOfMass = new Vector3f(0,0,0);\r\n\t\tVector3f.add(drone.transformToWorldFrame(drone.getRightWing().getCenterOfMass()),drone.getPosition(), rightWingCenterOfMass);\r\n\t\t\r\n\t\tif (drone.transformToWorldFrame(drone.getEnginePosition()).y + drone.getPosition().y <=\tgroundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the engine hit the ground!\");\r\n\t\t} if (drone.transformToWorldFrame(drone.getTailMassPosition()).y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the tail hit the ground!\");\r\n\t\t} if (leftWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the left wing hit the\tground!\");\r\n\t\t} if (rightWingCenterOfMass.y + drone.getPosition().y <= groundLevel) {\r\n\t\t\tthrow new DroneCrashException(\"Drone Crashed: the right wing hit the ground!\");\r\n\t\t}\r\n\t\tfor (Tyre tyre : drone.getTyres()) {\r\n\t\t\tif (tyre.getRadius() < tyre.getCompression()) {\r\n\t\t\t\tthrow new DroneCrashException(\"Drone Crashed: tyre compressed too much!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// recursieve oproep\r\n\t\tPhysicsEngine.applyPhysics(drone, (dt - h));\r\n\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent arg0)\n\t{\n\t\trenderPanel.repaint();\n\t\tclock++;\n\n\t\tif (clock % 2 == 0 && head != null && !dead && !paused)\n\t\t{\n\t\t\ttime++;\n\n\t\t\ttronBody.add(new Point(head.x, head.y));\n\t\t\ttronBody2.add(new Point(head2.x, head2.y));\n\t\t\t/*Tron1*/\n\n\t\t\tif (direction == LEFT)\n\t\t\t{\n\t\t\t\tif (last_direction == 'D')\n\t\t\t\t{\n\t\t\t\t\tif (head.x + 1 < 60 && noBodyAt(head.x + 1, head.y) && noBodyAt2(head.x + 1, head.y))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x + 1, head.y);\n\t\t\t\t\tif (keypress == true)\n\t\t\t\t{\tlast_direction = 'R';\n\t\t\t\t\t\tkeypress = false;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (last_direction == 'R')\n\t\t\t\t{\n\t\t\t\t\tif (head.y - 1 >= 0 && noBodyAt(head.x, head.y -1) && noBodyAt2(head.x, head.y - 1))\n\t\t\t\t\t{\n\t\t\t\t\t\thead = new Point(head.x, head.y -1);\n\t\t\t\t\tif (keypress == true)\n\t\t\t\t\t{last_direction = 'U';\n\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction == 'U')\n\t\t\t\t\t{\n\t\t\t\t\tif (head.x - 1 >= 0 && noBodyAt(head.x - 1, head.y) && noBodyAt2(head.x - 1, head.y))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x -1, head.y);\n\t\t\t\t\tif (keypress == true) {\n\t\t\t\t\t\tlast_direction = 'L';\n\t\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse if (last_direction == 'L')\n\t\t\t\t{\n\t\t\t\t\tif (head.y + 1 < 38 && noBodyAt(head.x, head.y + 1) && noBodyAt2(head.x, head.y + 1))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x, head.y +1);\n\t\t\t\t\tif (keypress == true) {\n\t\t\t\t\tlast_direction = 'D';\n\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (direction == RIGHT)\n\t\t\t{\n\t\t\t\tif (last_direction == 'D')\n\t\t\t\t{\n\t\t\t\t\tif (head.x - 1 >= 0 && noBodyAt(head.x - 1, head.y) && noBodyAt2(head.x - 1, head.y))\n\t\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x - 1, head.y);\n\t\t\t\t\tif (keypress == true)\n\t\t\t\t\t{\tlast_direction = 'L';\n\t\t\t\t\t\tkeypress = false;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\telse if (last_direction == 'R')\n\t\t\t\t{\n\t\t\t\t\tif (head.y + 1 < 38 && noBodyAt(head.x, head.y + 1) && noBodyAt2(head.x, head.y + 1))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x, head.y +1);\n\t\t\t\t\tif (keypress == true)\n\t\t\t\t\t{last_direction = 'D';\n\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction == 'U')\n\t\t\t\t\t{\n\t\t\t\t\tif (head.x + 1 < 60 && noBodyAt(head.x + 1, head.y) && noBodyAt2(head.x + 1, head.y))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x +1, head.y);\n\t\t\t\t\tif (keypress == true) {\n\t\t\t\t\t\tlast_direction = 'R';\n\t\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse if (last_direction == 'L')\n\t\t\t\t{\n\t\t\t\t\tif (head.y - 1 >= 0 && noBodyAt(head.x - 1, head.y) && noBodyAt2(head.x - 1, head.y))\n\t\t\t\t\t{\n\t\t\t\t\thead = new Point(head.x, head.y -1);\n\t\t\t\t\tif (keypress == true) {\n\t\t\t\t\tlast_direction = 'U';\n\t\t\t\t\tkeypress = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'R';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t\t/*Tron2*/\n\t\t\tif (direction2 == LEFT)\n\t\t\t{\n\t\t\t\tif (last_direction2 == 'D')\n\t\t\t\t{\n\t\t\t\t\tif (head2.x + 1 < 60 && noBodyAt(head2.x + 1, head2.y) && noBodyAt2(head2.x + 1, head2.y))\n\t\t\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x + 1, head2.y);\n\t\t\t\t\tif (keypress2 == true)\n\t\t\t\t\t{\tlast_direction2 = 'R';\n\t\t\t\t\t\tkeypress2 = false;\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'R')\n\t\t\t\t{\n\t\t\t\t\tif (head2.y - 1 >= 0 && noBodyAt(head2.x - 1, head2.y) && noBodyAt2(head2.x - 1, head2.y))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x, head2.y -1);\n\t\t\t\t\tif (keypress2 == true)\n\t\t\t\t\t{last_direction2 = 'U';\n\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'U')\n\t\t\t\t\t{\n\t\t\t\t\tif (head2.x - 1 >= 0 && noBodyAt(head2.x - 1, head2.y) && noBodyAt2(head2.x - 1, head2.y))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x -1, head2.y);\n\t\t\t\t\tif (keypress2 == true) {\n\t\t\t\t\t\tlast_direction2 = 'L';\n\t\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'L')\n\t\t\t\t{\n\t\t\t\t\tif (head2.y + 1 < 38 && noBodyAt(head2.x, head2.y + 1) && noBodyAt2(head2.x, head2.y + 1))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x, head2.y +1);\n\t\t\t\t\tif (keypress2 == true) {\n\t\t\t\t\tlast_direction2 = 'D';\n\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\n\t\t\tif (direction2 == RIGHT)\n\t\t\t{\n\t\t\t\tif (last_direction2 == 'D')\n\t\t\t\t{\n\t\t\t\t\tif (head2.x - 1 >= 0 && noBodyAt(head2.x - 1, head2.y) && noBodyAt2(head2.x - 1, head2.y))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x - 1, head2.y);\n\t\t\t\t\tif (keypress2 == true)\n\t\t\t\t\t{\tlast_direction2 = 'L';\n\t\t\t\t\t\tkeypress2 = false;\n\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'R')\n\t\t\t\t{\n\t\t\t\t\tif (head2.y + 1 < 38 && noBodyAt(head2.x, head2.y + 1) && noBodyAt2(head2.x, head2.y + 1))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x, head2.y +1);\n\t\t\t\t\tif (keypress2 == true)\n\t\t\t\t\t{last_direction2 = 'D';\n\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'U')\n\t\t\t\t\t{\n\t\t\t\t\tif (head2.x + 1 < 60 && noBodyAt(head2.x + 1, head2.y) && noBodyAt2(head2.x + 1, head2.y))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x +1, head2.y);\n\t\t\t\t\tif (keypress2 == true) {\n\t\t\t\t\t\tlast_direction2 = 'R';\n\t\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\telse if (last_direction2 == 'L')\n\t\t\t\t{\n\t\t\t\t\tif (head2.y - 1 >= 0 && noBodyAt(head2.x - 1, head2.y) && noBodyAt2(head2.x - 1, head2.y))\n\t\t\t\t\t{\n\t\t\t\t\thead2 = new Point(head2.x, head2.y -1);\n\t\t\t\t\tif (keypress2 == true) {\n\t\t\t\t\tlast_direction2 = 'U';\n\t\t\t\t\tkeypress2 = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdead = true;\n\t\t\t\t\t\twinner = 'B';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void takeStone(Stone stone){\r\n\t\tint pos = 0;\r\n\t\tboolean cont = true;\r\n\t\twhile(cont) {\r\n\t\t\tfor(Stone s: hand) {\r\n\t\t\t\tif(cont == true) {\r\n\t\t\t\t\tif(!(s.toString().equals(stone.toString()))) {\r\n\t\t\t\t\t\tpos++;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tcont = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(pos != MAXHANDSIZE) {\r\n\t\t\thand.remove(pos);\r\n\t\t}\r\n\t}",
"public List<Pair> GetSnake() {\n return snake;\n }",
"@Override\n public Player getHumanPlayer() {\n return batMan.getHumanPlayer();\n }",
"private void moveSnake()\r\n\r\n\t{\r\n\r\n\t\t//Get the lower & upper limit for the last row of the board. \r\n\t\t// e.g. for a 20x20 board, these values would be 380 & 400 respectively\r\n\t\tint lowerLimitOfLastRow = numOfBoardRows*numOfBoardCols-numOfBoardCols;\r\n\t\tint upperLimitOfLastRow = numOfBoardRows*numOfBoardCols;\r\n\r\n\t\t//Loop through all snakes to update their location\r\n\t\tfor(Snake s: snakes)\r\n\t\t{\r\n\t\t\t//Do nothing if snake is not alive\r\n\t\t\tif(!s.isSnakeAlive())\r\n\t\t\t\tcontinue;\r\n\t\t\t//Move the snake number of cells depending on its current speed. i.e. \r\n\t\t\t// snake with minimum/default speed will move only one cell while with maximum speed will move 4 cells during the same time. \r\n\t\t\tfor(int i=s.getSnakeSpeed().getValue(); i<= SnakeSpeed.DEFAULT.getValue(); i=i*2)\r\n\t\t\t{\r\n\t\t\t\tint lastCellLocation = -1;\r\n\t\t\t\tSnakeDirection sd = s.getSnakeDirection();\r\n\t\t\t\tArrayList<Integer> scells = s.getSnakeCells();\r\n\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex)\r\n\t\t\t\t{\r\n\t\t\t\t\tlastCellLocation = scells.get(scells.size()-1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Move the cells forward except the first one\r\n\t\t\t\tfor(int j=scells.size()-1;j>0;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tscells.set(j, scells.get(j-1)); \r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Update the first cell based on the current direction of the snake\r\n\t\t\t\tif(sd == SnakeDirection.DOWN)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but first row when the current cell is in the last row \r\n\t\t\t\t\tif(scells.get(0) >= lowerLimitOfLastRow && scells.get(0) < upperLimitOfLastRow)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell under the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.UP)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the cell in the same column but last row when the current cell is in the first row \r\n\t\t\t\t\tif(scells.get(0) >= 0 && scells.get(0) < numOfBoardCols)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + lowerLimitOfLastRow);\r\n\t\t\t\t\t//Else, Set the value of first cell as the cell above the current cell in the next row \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - numOfBoardCols);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.RIGHT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value minus the number of columns when the current cell is in the last column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == numOfBoardCols - 1)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - (numOfBoardCols - 1));\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value incremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + 1);\r\n\t\t\t\t}\r\n\t\t\t\telse if(sd == SnakeDirection.LEFT)\r\n\t\t\t\t{\r\n\t\t\t\t\t//Set the value of first cell as the current cell value plus the number of columns when the current cell is in the first column \r\n\t\t\t\t\tif(scells.get(0)%numOfBoardCols == 0)\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) + numOfBoardCols -1);\r\n\t\t\t\t\t//Else, Set the value of first cell as the current value decremented by one \r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tscells.set(0, scells.get(0) - 1);\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t//Update snake length & food cells if its the current player's snake and there's a food item at the same location as snake's head\r\n\t\t\t\tif(s.getSnakeIndex() == snakeIndex) \r\n\t\t\t\t{\r\n\t\t\t\t\tif(foodCells.contains(scells.get(0)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tscells.add(lastCellLocation);\r\n\t\t\t\t\t\tfoodCells.remove(scells.get(0));\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\ts.setSnakeCells(scells);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t//refresh the board to send/receive latest snakeProtocol object between client/server and also update the board\r\n\t\trefreshBoard();\r\n\t}",
"private Pair decideMovement(Entity e) {\n Pair pos = gameMap.getCoordinatesFor(e.getId());\n Movable movable = mm.get(e);\n Array<Pair> reachableCells = gameMap.pathFinder.getReachableCells(pos.x, pos.y, movable);\n ImmutableBag<Integer> enemies = groupAI.getEnemies(e);\n if (enemies.size() == 0) return reachableCells.get(MathUtils.random(reachableCells.size-1));\n\n // The best enemy you are considering chasing and its score\n int targetEnemy = -1;\n float bestScore = 0f;\n\n // The current enemy you are checking out and its score\n int id;\n float score;\n\n // How far away is the enemy? How many enemies are within a small radius of it?\n int distance, count;\n\n for (int i = 0; i < enemies.size(); i++) {\n count = 1;\n Pair target = gameMap.getCoordinatesFor(enemies.get(i));\n distance = MapTools.distance(pos.x, pos.y, target.x, target.y);\n for (Pair cell : MapTools.getNeighbors(target.x, target.y, 6)) {\n id = gameMap.getEntityAt(cell.x, cell.y);\n if (!enemies.contains(id)) continue;\n count++;\n }\n\n score = groupAI.entityScores.get(enemies.get(i)) * count / (1 + distance / 5);\n if (score > bestScore) {\n bestScore = score;\n targetEnemy = enemies.get(i);\n }\n }\n\n if (targetEnemy > -1) {\n Pair target = gameMap.getCoordinatesFor(targetEnemy);\n Path path = gameMap.pathFinder.findPath(pos.x, pos.y, target.x, target.y, movable, true);\n for (int i = 0; i < path.getLength(); i++) {\n Step step = path.getStep(i);\n Pair p = new Pair(step.getX(),step.getY());\n if (reachableCells.contains(p, false)) return p;\n }\n }\n return reachableCells.get(MathUtils.random(reachableCells.size-1));\n }",
"void fireShellAtPlayer(int playerNr, int x, int y);",
"public boolean didHitMazeWall() {\n if (!SnakeGame.getHasMazeWalls()) { return false; }\n // AMD: has the snake hit the maze wall?\n boolean didHit = false;\n //MazeWall mw = DrawSnakeGamePanel.mw1;\n for (MazeWall mw : DrawSnakeGamePanel.getGameWalls()) {\n // AMD: our decision depends partly on the snake's direction & partly on the line's orientation\n switch (currentHeading) {\n case DIRECTION_UP: {\n if (mw.getV_or_h() == 'h' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_DOWN: {\n if (mw.getV_or_h() == 'h' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY + 1) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_LEFT: {\n if (mw.getV_or_h() == 'v' && mw.getGridX() == this.snakeHeadX && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n case DIRECTION_RIGHT: {\n if (mw.getV_or_h() == 'v' && mw.getGridX() == this.snakeHeadX + 1 && mw.getGridY() == this.snakeHeadY) {\n didHit = true;\n }\n break;\n }\n default: {\n //FINDBUGS: another switch case with no default. This one is fine, four clear situations.\n // Ultimately, shouldn't get here: leave something here that can be turned on for debugging:\n // System.out.println(\"Invalid direction detected in Snake.didhitmazewall()!\");\n break;\n }\n }\n // if the current wall under consideration has been hit, we need to exit the loop.\n if (didHit) { break; }\n }\n return didHit;\n }",
"public Hand getLeftHand()\n\t{\n\t\treturn hands[0];\n\t}",
"public interface AI {\n\n /**\n * Sets the new enemy position.\n * @param pos the new enemy position\n */\n void setEnemyPos(Point2D pos);\n\n /**\n * Returns the new position for the enemy to\n * move to.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @param map\n * @return the position to move to\n */\n Point2D getNextMove(Point2D target, boolean pursuit, Set<Point2D> map);\n\n /**\n * Returns the new enemy rotation based on the\n * state in which the enemy is in.\n * @param target the position that wants to be tracked\n * @param pursuit the state in which the enemy is in\n * @return the angle that the enemy should face\n */\n double getRotation(Point2D target, boolean pursuit);\n\n /**\n * Returns if the enemy is in pursuit of the target\n * by calculating if the noise radius overlap with the\n * two.\n * @param target the position that wants to be tracked\n * @param noise the radius of the noise made by a player action\n * @return the state in which the enemy will be in\n * @see Player\n */\n boolean isInPursuit(Point2D target, double noise);\n\n /**\n * Returns if the enemy has the {@code target} in line of\n * sight and is close enough to get the enemy attention\n * to shoot.\n * @param target the position that wants to be tracked\n * @return the action that should be performed by the enemy\n */\n boolean isShooting(Point2D target);\n\n /**\n * Returns the collection of all position to check\n * if target is obscured by a wall used to JUnit\n * tests purpose.\n * @return the collections of all wall objects position\n */\n Set<Point2D> getWallSet();\n\n}"
]
| [
"0.69583154",
"0.6204184",
"0.60545534",
"0.6016989",
"0.5780173",
"0.5698064",
"0.5684204",
"0.55440444",
"0.55299795",
"0.54592615",
"0.5425525",
"0.5326194",
"0.5312011",
"0.52853817",
"0.5271591",
"0.52582896",
"0.5253566",
"0.52444077",
"0.52163863",
"0.52105767",
"0.52085894",
"0.5197174",
"0.51872456",
"0.51836306",
"0.5181291",
"0.5176279",
"0.5165267",
"0.5159255",
"0.5126037",
"0.5121811",
"0.5119986",
"0.5102668",
"0.50984126",
"0.5023228",
"0.5015707",
"0.5004947",
"0.49903625",
"0.49864203",
"0.49703583",
"0.49692026",
"0.49642733",
"0.49553144",
"0.49438834",
"0.49385753",
"0.4937744",
"0.492178",
"0.4916765",
"0.49140427",
"0.49115393",
"0.49101734",
"0.48976544",
"0.48844945",
"0.4865372",
"0.48456705",
"0.48450544",
"0.4845046",
"0.48439935",
"0.4837379",
"0.48302358",
"0.48266017",
"0.48216534",
"0.4814478",
"0.48048168",
"0.47936818",
"0.47899276",
"0.4781483",
"0.4779807",
"0.47743794",
"0.47717357",
"0.47712883",
"0.4766364",
"0.47637203",
"0.47593567",
"0.47585478",
"0.4756137",
"0.47478813",
"0.4746725",
"0.47387192",
"0.47374532",
"0.4734416",
"0.4728435",
"0.4716144",
"0.47150773",
"0.47141388",
"0.46983367",
"0.46926853",
"0.468506",
"0.46840557",
"0.46810496",
"0.46788198",
"0.46757057",
"0.46703884",
"0.46680123",
"0.46677732",
"0.46656045",
"0.46647754",
"0.4664231",
"0.4660823",
"0.46552798",
"0.46471292"
]
| 0.75879246 | 0 |
Constructs a new CaseInsensitiveElementList. | public CaseInsensitiveElementList() {
this((Locale)null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"private LowercaseWordList() {\n\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"public BasicElementList() {\n\t}",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"ArrayList<String> createList(String finalInput);",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"public OrderedNameMap() {\r\n\t\tthis(CASE_SENSITIVE);\r\n\t}",
"StringList createStringList();",
"public WordList() {\t\t//Default constructor\n\t}",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public SortedList(){\n this(\"list\");\n }",
"public StringList(int capacity) {\n super(capacity);\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public MyList() {\n this(\"List\");\n }",
"private Lists() { }",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public static ElementInsertionList create()\n {\n return new ElementInsertionList();\n }",
"private SortCaseOrder(String strName) { m_strName = strName; }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"ListString createListString();",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public ArrayList() {\n\t\tthis(10, 75);\n\t}",
"public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }",
"public MyArrayList() {\n\t\tthis(EXTRA_SPACE);\n\t}",
"public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}",
"@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}",
"public abstract void init(ArrayList<String> ary);",
"public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }",
"public StringBag(){\n\n list = new ArrayList();\n\n\t}",
"public DefaultJavaElementComparator() {\n // initialize default categories\n this.categories = new int[] { // static type\n 1, // static field\n 2, // static initializer\n 3, // static method\n 7, // type\n 6, // field\n 4, // initializer\n 5, // constructor\n 8, // method\n 9 };\n this.collator = Collator.getInstance();\n }",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public SeerAutoCompleteComboBox(List<String> list) {\n this(list, SeerAutoCompleteComboBoxSearchType.STARTS_WITH);\n }",
"public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}",
"public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}",
"public TbStringExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public MyList(String name) {\n nameList = name;\n }",
"public NamedList() {\n\t\tnvPairs = new ArrayList<Object>();\n\t}",
"public ConcurrentHashMapAllowNull(Boolean caseInsensitive) {\n super();\n this.caseInsensitive = caseInsensitive;\n }",
"public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }",
"public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }",
"public MyHashTableCC(){\n\t\tm_arraylists = new MyArraylist[DIFF_CHARACTERS];\n\n\t\tfor (int i = 0; i < m_arraylists.length; i++){\n\t\t\tm_arraylists[i] = new MyArraylist();\n\t\t}\n\t}",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public List(String name)\n\t{\n\t\tthis(name, null);\n\t}",
"public SimpleFileFilter(final String aPattern,\n final boolean aCaseSensitive) {\n\n setPattern(aPattern, aCaseSensitive);\n }",
"List<City> findByNameIgnoringCase(String cityName);",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n List<CasesItem> filteredList = new ArrayList<>();\n if(constraint == null || constraint.length() == 0) {\n\n filteredList.addAll(mItemCasesAll);\n } else {\n\n String filterPattern = constraint.toString().toLowerCase().trim();\n for(CasesItem items: mItemCasesAll) {\n\n if(items.getmCountryName().toLowerCase().contains(filterPattern)) {\n\n filteredList.add(items);\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n return filterResults;\n }",
"public List(String name, Contract of)\n\t{\n\t\tsuper(name);\n\t\tsetOf(of);\n\t}",
"@Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n FilterResults results = new FilterResults();\n\n if (charSequence != null && charSequence.length() > 0) {\n charSequence = charSequence.toString().toUpperCase();\n ArrayList<Icon> filterIcon = new ArrayList<>();\n\n for (int i = 0; i < mFilterList.size(); i++) {\n if (mFilterList.get(i).getName().toUpperCase().contains(charSequence)) {\n filterIcon.add(mFilterList.get(i));\n }\n }\n\n results.count = filterIcon.size();\n results.values = filterIcon;\n } else {\n results.count = mFilterList.size();\n results.values = mFilterList;\n }\n\n return results;\n }",
"public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}",
"public WordChain(String input_a, boolean caseSensitive) {\n\t\tint i;\n\t\tint start;\n\t\tint finish;\n\t\tString input;\n\n\t\t//Initialise\n\t\twc = new Vector();\n\t\tstart = 0;\n\t\tfinish = 0;\n\t\ti = 0;\n\n\t\t//Get rid of non-word characters\n\t\tinput = removePunctuation(input_a, caseSensitive);\n\n\t\t//Each word chain has a \"_start_node_\" and an \"_end_node_\"\n\t\twc.add(\"_start_node_\");\n\n\t\t//Search for white space and grab characters from in between\n\t\twhile ((start < input.length()) && (finish < input.length())) {\n\t\t\twhile (((input.charAt(start) == ' ') || (input.charAt(start) == '\\t') || (input.charAt(start) == '\\n'))\n\t\t\t\t\t && (start < input.length() - 1)) {\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tfinish = start;\n\t\t\twhile (((input.charAt(finish) != ' ') && (input.charAt(finish) != '\\t') && (input.charAt(finish) != '\\n'))\n\t\t\t\t\t && (finish < input.length() - 1)) {\n\t\t\t\tfinish++;\n\t\t\t}\n\n\t\t\t//Add new word to chain\n\t\t\tif (start < finish) {\n\t\t\t\twc.add(input.substring(start, finish));\n\t\t\t}\n\t\t\tstart = finish + 1;\n\t\t}\n\n\t\t//Add end node\n\t\twc.add(\"_end_node_\");\n\t}",
"public XMLString toLowerCase(Locale locale) {\n/* 687 */ return new XMLStringDefault(this.m_str.toLowerCase(locale));\n/* */ }",
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"public RegexFileFilter(String pattern, IOCase caseSensitivity) {\n/* 73 */ if (pattern == null) {\n/* 74 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* 76 */ int flags = 0;\n/* 77 */ if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {\n/* 78 */ flags = 2;\n/* */ }\n/* 80 */ this.pattern = Pattern.compile(pattern, flags);\n/* */ }",
"CollectionLiteralExp createCollectionLiteralExp();",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"private ARXOrderedString(){\r\n this(\"Default\");\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}",
"public UpperCaseField() {\n this(null, 0, 0);\n }",
"@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"public CSVList(String svl)\n\t{\n\t\tsuper(svl, sepReg, sep);\n\t}",
"public ListSearchResults()\n {\n logEnter(LOG_TAG, \"<init>\");\n\n entryMap = new HashMap<String,SearchResultEntry>(0);\n entries = new LinkedList<SearchResultEntry>();\n instance = null;\n }",
"<C> CollectionLiteralExp<C> createCollectionLiteralExp();",
"public ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public ArrayList<String> sampleArrayList(){\n ArrayList<String> myArrayListString = new ArrayList<String>();\n myArrayListString.add(\"dog\");\n myArrayListString.add(\"cat\");\n myArrayListString.add(null);\n myArrayListString.add(\"anotherDog\");\n myArrayListString.add(null);\n myArrayListString.add(\"catty43\");\n myArrayListString.add(\"test14.22\");\n return myArrayListString;\n }",
"public ContactList()\n {\n myList = new ArrayList<>();\n }",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"public ArrayJList() {\n this(DEFAULT_CAPACITY);\n }",
"StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }",
"public TextInputList() {\n\n\t}",
"public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}",
"public ArrayListBound(String files) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t\t\n\t\t\n\t}"
]
| [
"0.7428875",
"0.7324687",
"0.7201247",
"0.6917796",
"0.6791029",
"0.66955525",
"0.6646956",
"0.6601417",
"0.63502586",
"0.5945697",
"0.5936464",
"0.5808463",
"0.5744695",
"0.5709118",
"0.5481269",
"0.54166496",
"0.53931254",
"0.53763294",
"0.53587186",
"0.53118443",
"0.515632",
"0.51390386",
"0.51154983",
"0.5113507",
"0.5107913",
"0.5094962",
"0.508766",
"0.50607556",
"0.50548637",
"0.5041233",
"0.5012687",
"0.50003976",
"0.49926463",
"0.49911165",
"0.4963408",
"0.49491087",
"0.49459898",
"0.49358255",
"0.49332213",
"0.4920593",
"0.4917943",
"0.48880792",
"0.48705834",
"0.482559",
"0.48190853",
"0.4805252",
"0.4764887",
"0.47593096",
"0.47578478",
"0.47557068",
"0.47556955",
"0.47300038",
"0.4728252",
"0.47272164",
"0.47189778",
"0.47178832",
"0.47133237",
"0.47131813",
"0.4699849",
"0.4671059",
"0.4651609",
"0.46512672",
"0.46377128",
"0.46362898",
"0.46222752",
"0.46153855",
"0.46123648",
"0.46035084",
"0.4600062",
"0.4598202",
"0.45952716",
"0.45889407",
"0.45868567",
"0.45829096",
"0.45804912",
"0.45762837",
"0.45760852",
"0.4571479",
"0.45663828",
"0.45663288",
"0.45655113",
"0.45588842",
"0.45560554",
"0.4555955",
"0.4550447",
"0.45412686",
"0.45376536",
"0.45333475",
"0.45318338",
"0.4531097",
"0.4524427",
"0.45080113",
"0.450266",
"0.450266",
"0.450266",
"0.4491222",
"0.44900364",
"0.44823825",
"0.44795302",
"0.4470684"
]
| 0.82276154 | 0 |
Constructs a new CaseInsensitiveElementList. | public CaseInsensitiveElementList(Locale locale) {
setLocale(locale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"private LowercaseWordList() {\n\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"public BasicElementList() {\n\t}",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"ArrayList<String> createList(String finalInput);",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"public OrderedNameMap() {\r\n\t\tthis(CASE_SENSITIVE);\r\n\t}",
"StringList createStringList();",
"public WordList() {\t\t//Default constructor\n\t}",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public SortedList(){\n this(\"list\");\n }",
"public StringList(int capacity) {\n super(capacity);\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public MyList() {\n this(\"List\");\n }",
"private Lists() { }",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public static ElementInsertionList create()\n {\n return new ElementInsertionList();\n }",
"private SortCaseOrder(String strName) { m_strName = strName; }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"ListString createListString();",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public ArrayList() {\n\t\tthis(10, 75);\n\t}",
"public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }",
"public MyArrayList() {\n\t\tthis(EXTRA_SPACE);\n\t}",
"public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}",
"@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}",
"public MyArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public abstract void init(ArrayList<String> ary);",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }",
"public StringBag(){\n\n list = new ArrayList();\n\n\t}",
"public DefaultJavaElementComparator() {\n // initialize default categories\n this.categories = new int[] { // static type\n 1, // static field\n 2, // static initializer\n 3, // static method\n 7, // type\n 6, // field\n 4, // initializer\n 5, // constructor\n 8, // method\n 9 };\n this.collator = Collator.getInstance();\n }",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public SeerAutoCompleteComboBox(List<String> list) {\n this(list, SeerAutoCompleteComboBoxSearchType.STARTS_WITH);\n }",
"public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}",
"public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}",
"public TbStringExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public MyList(String name) {\n nameList = name;\n }",
"public NamedList() {\n\t\tnvPairs = new ArrayList<Object>();\n\t}",
"public ConcurrentHashMapAllowNull(Boolean caseInsensitive) {\n super();\n this.caseInsensitive = caseInsensitive;\n }",
"public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }",
"public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }",
"public MyHashTableCC(){\n\t\tm_arraylists = new MyArraylist[DIFF_CHARACTERS];\n\n\t\tfor (int i = 0; i < m_arraylists.length; i++){\n\t\t\tm_arraylists[i] = new MyArraylist();\n\t\t}\n\t}",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public List(String name)\n\t{\n\t\tthis(name, null);\n\t}",
"public SimpleFileFilter(final String aPattern,\n final boolean aCaseSensitive) {\n\n setPattern(aPattern, aCaseSensitive);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList () {\n\t\tcapacity = 10;\n\t\tsize = 0;\n\t\tlist = (E[]) new Object[capacity];\n\t}",
"List<City> findByNameIgnoringCase(String cityName);",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n List<CasesItem> filteredList = new ArrayList<>();\n if(constraint == null || constraint.length() == 0) {\n\n filteredList.addAll(mItemCasesAll);\n } else {\n\n String filterPattern = constraint.toString().toLowerCase().trim();\n for(CasesItem items: mItemCasesAll) {\n\n if(items.getmCountryName().toLowerCase().contains(filterPattern)) {\n\n filteredList.add(items);\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n return filterResults;\n }",
"public List(String name, Contract of)\n\t{\n\t\tsuper(name);\n\t\tsetOf(of);\n\t}",
"public static <T> ArrayList<T> createArrayList() {\n \t\treturn new ArrayList<T>();\n \t}",
"@Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n FilterResults results = new FilterResults();\n\n if (charSequence != null && charSequence.length() > 0) {\n charSequence = charSequence.toString().toUpperCase();\n ArrayList<Icon> filterIcon = new ArrayList<>();\n\n for (int i = 0; i < mFilterList.size(); i++) {\n if (mFilterList.get(i).getName().toUpperCase().contains(charSequence)) {\n filterIcon.add(mFilterList.get(i));\n }\n }\n\n results.count = filterIcon.size();\n results.values = filterIcon;\n } else {\n results.count = mFilterList.size();\n results.values = mFilterList;\n }\n\n return results;\n }",
"public WordChain(String input_a, boolean caseSensitive) {\n\t\tint i;\n\t\tint start;\n\t\tint finish;\n\t\tString input;\n\n\t\t//Initialise\n\t\twc = new Vector();\n\t\tstart = 0;\n\t\tfinish = 0;\n\t\ti = 0;\n\n\t\t//Get rid of non-word characters\n\t\tinput = removePunctuation(input_a, caseSensitive);\n\n\t\t//Each word chain has a \"_start_node_\" and an \"_end_node_\"\n\t\twc.add(\"_start_node_\");\n\n\t\t//Search for white space and grab characters from in between\n\t\twhile ((start < input.length()) && (finish < input.length())) {\n\t\t\twhile (((input.charAt(start) == ' ') || (input.charAt(start) == '\\t') || (input.charAt(start) == '\\n'))\n\t\t\t\t\t && (start < input.length() - 1)) {\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tfinish = start;\n\t\t\twhile (((input.charAt(finish) != ' ') && (input.charAt(finish) != '\\t') && (input.charAt(finish) != '\\n'))\n\t\t\t\t\t && (finish < input.length() - 1)) {\n\t\t\t\tfinish++;\n\t\t\t}\n\n\t\t\t//Add new word to chain\n\t\t\tif (start < finish) {\n\t\t\t\twc.add(input.substring(start, finish));\n\t\t\t}\n\t\t\tstart = finish + 1;\n\t\t}\n\n\t\t//Add end node\n\t\twc.add(\"_end_node_\");\n\t}",
"public List()\n\t{\n\t\tthis(null, null);\n\t}",
"public XMLString toLowerCase(Locale locale) {\n/* 687 */ return new XMLStringDefault(this.m_str.toLowerCase(locale));\n/* */ }",
"public RegexFileFilter(String pattern, IOCase caseSensitivity) {\n/* 73 */ if (pattern == null) {\n/* 74 */ throw new IllegalArgumentException(\"Pattern is missing\");\n/* */ }\n/* 76 */ int flags = 0;\n/* 77 */ if (caseSensitivity != null && !caseSensitivity.isCaseSensitive()) {\n/* 78 */ flags = 2;\n/* */ }\n/* 80 */ this.pattern = Pattern.compile(pattern, flags);\n/* */ }",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"CollectionLiteralExp createCollectionLiteralExp();",
"private ARXOrderedString(){\r\n this(\"Default\");\r\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList() {\n\t\tObject[] oList = new Object[INIT_SIZE];\n\t\tlist = (E[]) oList;\n\t\tsize = INIT_SIZE;\n\t}",
"@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"public UpperCaseField() {\n this(null, 0, 0);\n }",
"public CSVList(String svl)\n\t{\n\t\tsuper(svl, sepReg, sep);\n\t}",
"public ListSearchResults()\n {\n logEnter(LOG_TAG, \"<init>\");\n\n entryMap = new HashMap<String,SearchResultEntry>(0);\n entries = new LinkedList<SearchResultEntry>();\n instance = null;\n }",
"<C> CollectionLiteralExp<C> createCollectionLiteralExp();",
"public ArrayList<String> sampleArrayList(){\n ArrayList<String> myArrayListString = new ArrayList<String>();\n myArrayListString.add(\"dog\");\n myArrayListString.add(\"cat\");\n myArrayListString.add(null);\n myArrayListString.add(\"anotherDog\");\n myArrayListString.add(null);\n myArrayListString.add(\"catty43\");\n myArrayListString.add(\"test14.22\");\n return myArrayListString;\n }",
"public ComandosJuego() //constructor\n\t{\n\t\tlista = new ArrayList<String>();\n\t}",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public ContactList()\n {\n myList = new ArrayList<>();\n }",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }",
"public ArrayJList() {\n this(DEFAULT_CAPACITY);\n }",
"StringPatternCounter(ArrayList<StringPattern> stringPatternList, String fileInput)\n {\n super(fileInput);\n this.stringPatternList = stringPatternList;\n }",
"public TextInputList() {\n\n\t}",
"public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}",
"public ArrayListBound(String files) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t\t\n\t\t\n\t}"
]
| [
"0.8226578",
"0.74280584",
"0.7324199",
"0.69177467",
"0.6788912",
"0.66934",
"0.66464233",
"0.66016847",
"0.6348187",
"0.5947875",
"0.59351075",
"0.580599",
"0.5741958",
"0.57086295",
"0.5474885",
"0.54170036",
"0.53927946",
"0.537897",
"0.5357404",
"0.53118616",
"0.5154269",
"0.5142575",
"0.51181036",
"0.51161885",
"0.51024204",
"0.5096492",
"0.50870866",
"0.5060561",
"0.5057331",
"0.50422907",
"0.5011366",
"0.50018376",
"0.4994938",
"0.49935237",
"0.49660027",
"0.49462658",
"0.49451756",
"0.49382144",
"0.4929892",
"0.49231458",
"0.49212536",
"0.48886535",
"0.48737127",
"0.48274434",
"0.48210382",
"0.48059845",
"0.47648805",
"0.47616842",
"0.4760421",
"0.47577196",
"0.47554153",
"0.47328618",
"0.47260895",
"0.47252184",
"0.47211587",
"0.4716806",
"0.47113565",
"0.47109953",
"0.46958634",
"0.46727434",
"0.46532682",
"0.46472302",
"0.46388298",
"0.46337584",
"0.46214104",
"0.46187422",
"0.4614196",
"0.4601063",
"0.46009976",
"0.45971188",
"0.45931995",
"0.45917732",
"0.45864743",
"0.45847434",
"0.45790896",
"0.45780492",
"0.45736474",
"0.45688385",
"0.45687973",
"0.4564928",
"0.4563015",
"0.45617002",
"0.45604876",
"0.45531994",
"0.45510238",
"0.45413566",
"0.4536442",
"0.45333588",
"0.45323166",
"0.45315406",
"0.45269227",
"0.45101702",
"0.4498185",
"0.4498185",
"0.4498185",
"0.4493992",
"0.4489",
"0.44829175",
"0.447706",
"0.44704458"
]
| 0.72010374 | 3 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given IData document. | public CaseInsensitiveElementList(IData document) {
this(document, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"private LowercaseWordList() {\n\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"public ComicSearch_Adapter(Context aContext, ArrayList<Comic> listData) {\n this.listData = listData;\n layoutInflater = LayoutInflater.from(aContext);\n copie = new ArrayList<Comic>();\n copie.addAll(listData);\n this.context=aContext;\n }",
"public WordList() {\t\t//Default constructor\n\t}",
"public BasicElementList() {\n\t}",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"@Override\n public YFCDocument invoke(YFCDocument inXml) {\n \n YFCElement inEle = inXml.getDocumentElement();\n YFCIterable<YFCElement> yfsItrator = inEle.getChildren(XMLLiterals.ITEM);\n for(YFCElement itemEle : yfsItrator) {\n YFCDocument itemListDoc = YFCDocument.createDocument(XMLLiterals.ITEM_LIST);\n YFCElement itemListEle = itemListDoc.getDocumentElement();\n itemEle.setAttribute(XMLLiterals.ORGANIZATION_CODE, INDIGO_CA);\n itemEle.setAttribute(XMLLiterals.UNIT_OF_MEASURE, EACH);\n itemListEle.importNode(itemEle);\n invokeYantraService(ITEM_LOAD_Q, itemListDoc);\n }\n return inXml;\n }",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"ArrayList<String> createList(String finalInput);",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public S<T> list(List<String> data){\n\t\tlist(data.toArray(new String[data.size()]));\n\t\treturn this;\n\t}",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"protected Trie(char[] paramArrayOfchar, int paramInt, DataManipulate paramDataManipulate) {\n/* 147 */ this.m_options_ = paramInt;\n/* 148 */ if (paramDataManipulate != null) {\n/* 149 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 151 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 153 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 155 */ this.m_index_ = paramArrayOfchar;\n/* 156 */ this.m_dataOffset_ = this.m_index_.length;\n/* */ }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"public IssuesList visitDocument() {\n list = new IssuesList();\n org.w3c.dom.Element element = document.getDocumentElement();\n if ((element != null) && element.getTagName().equals(\"issues\")) {\n visitElement_issues(element);\n }\n if ((element != null) && element.getTagName().equals(\"components\")) {\n visitElement_components(element);\n }\n if ((element != null) && element.getTagName().equals(\"component\")) {\n visitElement_component(element);\n }\n if ((element != null) && element.getTagName().equals(\"subcomponent\")) {\n visitElement_subcomponent(element);\n }\n if ((element != null) && element.getTagName().equals(\"statuses\")) {\n visitElement_statuses(element);\n }\n if ((element != null) && element.getTagName().equals(\"status\")) {\n visitElement_status(element);\n }\n if ((element != null) && element.getTagName().equals(\"platforms\")) {\n visitElement_platforms(element);\n }\n if ((element != null) && element.getTagName().equals(\"platform\")) {\n visitElement_platform(element);\n }\n if ((element != null) && element.getTagName().equals(\"operating-systems\")) {\n visitElement_operating_systems(element);\n }\n if ((element != null) && element.getTagName().equals(\"os\")) {\n visitElement_os(element);\n }\n if ((element != null) && element.getTagName().equals(\"versions\")) {\n visitElement_versions(element);\n }\n if ((element != null) && element.getTagName().equals(\"version\")) {\n visitElement_version(element);\n }\n if ((element != null) && element.getTagName().equals(\"priorities\")) {\n visitElement_priorities(element);\n }\n if ((element != null) && element.getTagName().equals(\"priority\")) {\n visitElement_priority(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue-types\")) {\n visitElement_issue_types(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue-type\")) {\n visitElement_issue_type(element);\n }\n if ((element != null) && element.getTagName().equals(\"persons\")) {\n visitElement_persons(element);\n }\n if ((element != null) && element.getTagName().equals(\"person\")) {\n visitElement_person(element);\n }\n if ((element != null) && element.getTagName().equals(\"resolutions\")) {\n visitElement_resolutions(element);\n }\n if ((element != null) && element.getTagName().equals(\"resolution\")) {\n visitElement_resolution(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue\")) {\n visitElement_issue(element);\n }\n if ((element != null) && element.getTagName().equals(\"depends-on\")) {\n visitElement_depends_on(element);\n }\n if ((element != null) && element.getTagName().equals(\"comment\")) {\n visitElement_comment(element);\n }\n return list;\n }",
"public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n List<CasesItem> filteredList = new ArrayList<>();\n if(constraint == null || constraint.length() == 0) {\n\n filteredList.addAll(mItemCasesAll);\n } else {\n\n String filterPattern = constraint.toString().toLowerCase().trim();\n for(CasesItem items: mItemCasesAll) {\n\n if(items.getmCountryName().toLowerCase().contains(filterPattern)) {\n\n filteredList.add(items);\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n return filterResults;\n }",
"public StringDataList() {\n }",
"public MultiStringColl(int i) {\n c = null;\n how_many = 0;\n }",
"public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}",
"public JaccardSearcher(String docFilename) {\n super(docFilename);\n // TODO: YOUR CODE HERE\n\n // Instantiate the indexer\n // VSM MyCoolSearcher.Indexer is being used because we don't want to create static nested Builder class for the MyCoolSearcher.Indexer class\n indexer = new VectorSpaceModelIndexer.Builder(documents, stopWords).build();\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public OrderedArrayList()\n {\n\t_data = new ArrayList<Comparable>();\n }",
"private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}",
"public OrderedArrayList()\n {\n _data = new ArrayList<Comparable>();\n }",
"public abstract void init(ArrayList<String> ary);",
"DataList createDataList();",
"public static ElementoDettaglioVariazioneCodificaCapitolo getInstance(DettaglioVariazioneCodificaCapitolo dati) {\n\t\tElementoDettaglioVariazioneCodificaCapitolo result = new ElementoDettaglioVariazioneCodificaCapitolo();\n\t\t//campi opzionali\n\t\tCapitolo<?,?> capitoloPrecedente = dati.getCapitoloPrecedente();\n\t\tCapitolo<?,?> capitoloVariazione = dati.getCapitolo();\n\t\t\n\t\tresult.setDescrizioneCapitoloPreVariazione(ottieniStringaDescrizione(capitoloPrecedente.getDescrizione(), capitoloVariazione.getDescrizione()));\n\t\tresult.setDescrizioneArticoloPreVariazione(ottieniStringaDescrizione(capitoloPrecedente.getDescrizioneArticolo(), capitoloVariazione.getDescrizioneArticolo()));\n\t\t\n\t\tList<ClassificatoreGerarchico> classificatoriModificatiDallaVariazione = dati.getClassificatoriGerarchici();\n\t\tList<ClassificatoreGerarchico> classificatoriPrecedenti = dati.getClassificatoriGerarchiciPrecedenti();\n\t\tresult.setStrutturaAmministrativaContabileCapitoloPreVariazione(ottieniStringaSACFromListaClassificatori(classificatoriPrecedenti, classificatoriModificatiDallaVariazione));\n\t\n\t\tVariazioneCodificaCapitolo variazione = dati.getVariazioneCodificaCapitolo();\n\t\tresult.setNumeroVariazione(variazione.getNumero());\n\t\t\n\t\tif(variazione.getAttoAmministrativo()==null){\n\t\t\tresult.setProvvedimentoVariazione(\"\");\n\t\t}else{\n\t\t\tresult.setProvvedimentoVariazione(\"\" + variazione.getAttoAmministrativo().getAnno() + \" / \" +variazione.getAttoAmministrativo().getNumero());\n\t\t}\n\t\tresult.setDataVariazione(FormatUtils.formatDate(variazione.getData()));\n\t\n\t\treturn result;\n\t\n\t}",
"public List(String vTittle, int vText, int imageResourceId) {\n mTittleItem = vTittle;\n mTextItem = vText;\n mImageResourceId = imageResourceId;\n }",
"OrderedListContent createOrderedListContent();",
"public static ElementInsertionList create()\n {\n return new ElementInsertionList();\n }",
"public List(String name, Contract of)\n\t{\n\t\tsuper(name);\n\t\tsetOf(of);\n\t}",
"public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }",
"ListString createListString();",
"protected ArrayList<Object[]> genObjectArrayListFromIDElementList(ArrayList<? extends IDElement> pIDElementList) throws Exception{\r\n\t\tObject[] vElement;\r\n\t\tArrayList<Object[]> vRet;\r\n \t\t\r\n \t\tif (pIDElementList != null) {\r\n \t\t\tvRet = new ArrayList<Object[]>();\r\n \t\t\t\r\n \t\t\tfor (IDElement vCur : pIDElementList) {\r\n \t\t\t\tvElement = new Object[2];\r\n \t \t\t\t\r\n \t \t\t\tvElement[0] = vCur.getId();\r\n \t \t\t\tvElement[1] = vCur.getName();\r\n \t \t\t\t\r\n \t \t\t\tvRet.add(vElement);\r\n \t\t\t}\r\n \t\t} else throw new Exception(\"04; gOALfIDEL,Edi\");\r\n \t\t\r\n \t\treturn vRet;\r\n\t}",
"public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = CaSiAdapter.this.listSort;\n results.count = CaSiAdapter.this.listSort.size();\n } else {\n ArrayList<CaSi> lsSach = new ArrayList<>();\n Iterator it = CaSiAdapter.this.list.iterator();\n while (it.hasNext()) {\n CaSi p = (CaSi) it.next();\n if (String.valueOf(p.getMaCS()).toUpperCase().contains(constraint.toString().toUpperCase()) || p.getHoTenCS().toUpperCase().contains(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }",
"LI createLI();",
"public InternmentList() {\n\t\tsuper(\"Internments\", List.IMPLICIT);\n\n\t\tstartData();\n\t\tstartComponents();\n\t}",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n constraint = constraint.toString().toLowerCase();\n FilterResults result = new FilterResults();\n if (constraint != null && constraint.toString().length() > 0) {\n List<Message> filt = new ArrayList<Message>(); //filtered list\n for (int i = 0; i < originalData.size(); i++) {\n Message m = originalData.get(i);\n if (m.getSender().getEmailAddress().getName().toLowerCase().contains(constraint)) {\n filt.add(m); //add only items which matches\n }\n }\n result.count = filt.size();\n result.values = filt;\n } else { // return original list\n synchronized (this) {\n result.values = originalData;\n result.count = originalData.size();\n }\n }\n return result;\n }",
"StringList createStringList();",
"public /* synthetic */ ResidentialComplexSelect(String str, String str2, boolean z, Boolean bool, String str3, List list, String str4, String str5, boolean z2, AttributedText attributedText, int i, j jVar) {\n this(str, str2, z, bool, (i & 16) != 0 ? null : str3, (i & 32) != 0 ? CollectionsKt__CollectionsKt.emptyList() : list, (i & 64) != 0 ? null : str4, str5, (i & 256) != 0 ? false : z2, (i & 512) != 0 ? null : attributedText);\n }",
"public static ArrayList posisjoner(String ord, int index, Node currentNode){\n \treturn new ArrayList();\r\n }",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"public IteratorForXML(String i, String tag)\r\n/* 25: */ {\r\n/* 26:30 */ this(i, tag, tag);\r\n/* 27: */ }",
"public DocumentVector(double[] data) {\n\t\tthis(DSUtil.toDoubleList(data));\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public CaseClassRelation (scala.collection.Seq<A> data, scala.reflect.api.TypeTags.TypeTag<A> evidence$3) { throw new RuntimeException(); }",
"private DocumentOrderIterator() {}",
"public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}",
"protected Trie(InputStream paramInputStream, DataManipulate paramDataManipulate) throws IOException {\n/* 117 */ DataInputStream dataInputStream = new DataInputStream(paramInputStream);\n/* */ \n/* 119 */ int i = dataInputStream.readInt();\n/* 120 */ this.m_options_ = dataInputStream.readInt();\n/* */ \n/* 122 */ if (!checkHeader(i)) {\n/* 123 */ throw new IllegalArgumentException(\"ICU data file error: Trie header authentication failed, please check if you have the most updated ICU data file\");\n/* */ }\n/* */ \n/* 126 */ if (paramDataManipulate != null) {\n/* 127 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 129 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 131 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 133 */ this.m_dataOffset_ = dataInputStream.readInt();\n/* 134 */ this.m_dataLength_ = dataInputStream.readInt();\n/* 135 */ unserialize(paramInputStream);\n/* */ }",
"public DocumentVector(Collection<Double> data) {\n\t\tinit(data);\n\t}",
"public CapsuleAdapter(List<T> data) {\n if (data != null) mList = data;\n }",
"public static List<Content> evaluateListQuery(String query, Element dataElem)\n throws SaxonApiException {\n\n // put the element in a jdom document\n Document dataDoc = new Document(dataElem.clone());\n String result = evaluateQuery(query, dataDoc);\n\n // use the string result to create a doc to get it expressed as an element list\n Document resultDoc = JDOMUtil.stringToDocument(StringUtil.wrap(result, \"root\"));\n return resultDoc.getRootElement().cloneContent();\n }",
"private ArrayList<SearchModel> initData() {\n // items in the arraylist\n ArrayList<SearchModel> foodList = new ArrayList<>();\n List<FoodModel> foods = foodModelList;\n for(int i=0; i< foods.size(); i++)\n {\n foodList.add(new SearchModel(foods.get(i).getName()));\n }\n return foodList;\n }",
"private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }",
"DictionarySimpleElement(DataItem cborName) {\n\t\tif(cborName == null) {\n\t\t\tthrow new IllegalArgumentException(\"CBOR name must not be null\");\n\t\t}\n\n\t\tthis.cborName = cborName;\n\t\tthis.xmlName = null;\n\t\tthis.attributes = null;\n\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.trace(\"DictionarySimpleElement for reverse lookup constructed:\");\n\t\t\tlog.trace(this.toString());\n\t\t}\n\t}",
"public static Document getSortElementsTransformationStylesheetDocument\r\n (String strParentElementXPath,\r\n String strSortKeyXPath,\r\n SortDataType dataType,\r\n SortOrder order,\r\n SortCaseOrder caseOrder)\r\n throws SAXException,\r\n IOException\r\n {\r\n return XMLUtil.loadDocumentFromString\r\n (getSortElementsTransformationStylesheetString\r\n (strParentElementXPath, \r\n strSortKeyXPath, \r\n dataType, \r\n order, \r\n caseOrder));\r\n }",
"@Override\n\tpublic ArrayList<Lista> listaListeElettoraliDiElezione(String nomeElezione) {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\n\t\t\tfor (int key : keys) {\n\t\t\t\tif (map.get(key).getElezione().equals(nomeElezione))\n\t\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\t\treturn liste;\n\t\t}",
"public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private Element createXmlElementForCase(Case case_, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_CASE);\n\t\telement.setAttribute(XML_INFO1, case_.getConstraint().toString());\n\n\t\tElement child = createXmlElementForValue(case_.getValue(), xmlDocument, constraint);\n\t\tif (child != null)\n\t\t\telement.appendChild(child);\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}",
"private Lists() { }",
"public SortedList(){\n this(\"list\");\n }",
"private void initialize() {\n this.docTypeList = new ArrayList<>();\n this.problemTypeList = new ArrayList<>();\n\n // The add() function should be called in the order specified since together\n // they form a mapping mechanism,\n // for example 'ENCAPSULATED' before 'POSTSCRIPT' and 'RICH' before 'TEXT'.\n\n this.docTypeList.add(\"ENCAPSULATED\");\n this.problemTypeList.add(ProblemType.NON_ENCAPSULATED_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"EXCEL\");\n this.problemTypeList.add(ProblemType.NON_MSEXCEL_FILE);\n\n this.docTypeList.add(\"GIF\");\n this.problemTypeList.add(ProblemType.NON_GIF_FILE);\n\n this.docTypeList.add(\"HTML\");\n this.problemTypeList.add(ProblemType.NON_HTML_FILE);\n\n this.docTypeList.add(\"LATEX\");\n this.problemTypeList.add(ProblemType.NON_LATEX_FILE);\n\n this.docTypeList.add(\"MPEG\");\n this.problemTypeList.add(ProblemType.NON_MP4_FILE);\n\n this.docTypeList.add(\"POSTSCRIPT\");\n this.problemTypeList.add(ProblemType.NON_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"TIFF\");\n this.problemTypeList.add(ProblemType.NON_TIFF_FILE);\n\n this.docTypeList.add(\"WORD\");\n this.problemTypeList.add(ProblemType.NON_MSWORD_FILE);\n\n this.classInitialized = true;\n\n LOG.debug(\"initialize:this.docTypeList.size {}\", this.docTypeList.size());\n LOG.debug(\"initialize:this.problemTypeList.size {}\", this.problemTypeList.size());\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public T caseCollectionLiteralExpCS(CollectionLiteralExpCS object) {\r\n return null;\r\n }",
"public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }",
"public Recycler_View_Adapter_Users(Context context, List<String> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n this.context = context;\n thisAdapter = this;\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"public TbStringExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public IconBuilder textCase(TextCase textCase) {\n\t\tthis.textCase = textCase;\n\t\treturn this;\n\t}",
"public static Node sortElements\r\n (Node xml, \r\n String strParentElementXPath,\r\n String strSortKeyXPath,\r\n SortDataType dataType,\r\n SortOrder order,\r\n SortCaseOrder caseOrder)\r\n throws SAXException,\r\n IOException,\r\n TransformerConfigurationException,\r\n TransformerException\r\n \r\n {\r\n return XMLUtil.getOwnerDocument(sortElements\r\n (xml, \r\n strParentElementXPath, \r\n strSortKeyXPath, \r\n dataType,\r\n order,\r\n caseOrder,\r\n (Node)null));\r\n }",
"public OpenHashSet(java.lang.String[] data) {\n this();\n\n for (int i = 0; i < data.length; i++){\n if (data[i]!=null)\n add(data[i]);\n }\n }",
"public DefaultJavaElementComparator() {\n // initialize default categories\n this.categories = new int[] { // static type\n 1, // static field\n 2, // static initializer\n 3, // static method\n 7, // type\n 6, // field\n 4, // initializer\n 5, // constructor\n 8, // method\n 9 };\n this.collator = Collator.getInstance();\n }",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public WordAdapter(Activity context, ArrayList<Word> numbers, int resourceId)\n {\n //calls constructor of superclass with a 0 because the views\n // will be manually inflated\n super(context, 0, numbers);\n mResourceID = resourceId;\n }",
"@Override\r\n\tpublic List<NoticeVO> listSearch(SearchCriteria cri) {\n\t\treturn sqlSession.selectList(namespace + \".listSearch\", cri);\r\n\t}",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }"
]
| [
"0.7555705",
"0.7055482",
"0.7049486",
"0.69365394",
"0.69044274",
"0.67491466",
"0.6429329",
"0.6357144",
"0.6060375",
"0.5939912",
"0.5883071",
"0.5716959",
"0.5496495",
"0.53512424",
"0.50657964",
"0.49914673",
"0.49575338",
"0.49350837",
"0.49307507",
"0.47261313",
"0.46953622",
"0.46396104",
"0.45932555",
"0.45842406",
"0.454249",
"0.4541142",
"0.45358825",
"0.44984937",
"0.44956928",
"0.4482079",
"0.4482079",
"0.4478222",
"0.4440946",
"0.44313633",
"0.44134307",
"0.43895018",
"0.4386096",
"0.43738675",
"0.43717575",
"0.4361446",
"0.43610638",
"0.43601447",
"0.43386197",
"0.4324922",
"0.43215632",
"0.43072367",
"0.4298198",
"0.42920563",
"0.42832118",
"0.42686036",
"0.426349",
"0.425995",
"0.42565802",
"0.42487612",
"0.42472875",
"0.42439395",
"0.42419356",
"0.42379248",
"0.42359844",
"0.42302284",
"0.4230076",
"0.42297885",
"0.4226186",
"0.42221764",
"0.42194682",
"0.4218978",
"0.42131805",
"0.42121056",
"0.42102647",
"0.4202658",
"0.42018846",
"0.41923937",
"0.4182697",
"0.41818246",
"0.41797963",
"0.41796347",
"0.41722673",
"0.41716516",
"0.4166114",
"0.41551885",
"0.41536152",
"0.41530016",
"0.4149708",
"0.41449594",
"0.4141603",
"0.41325572",
"0.4126179",
"0.41214982",
"0.41202214",
"0.41184708",
"0.41169754",
"0.41153342",
"0.4111518",
"0.41010764",
"0.40989634",
"0.4092825",
"0.40926713",
"0.40853047",
"0.40788698",
"0.40784642"
]
| 0.8431594 | 0 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given IData document. | public CaseInsensitiveElementList(IData document, Locale locale) {
this(locale);
addAll(document);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"private LowercaseWordList() {\n\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"public ComicSearch_Adapter(Context aContext, ArrayList<Comic> listData) {\n this.listData = listData;\n layoutInflater = LayoutInflater.from(aContext);\n copie = new ArrayList<Comic>();\n copie.addAll(listData);\n this.context=aContext;\n }",
"public WordList() {\t\t//Default constructor\n\t}",
"public BasicElementList() {\n\t}",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"@Override\n public YFCDocument invoke(YFCDocument inXml) {\n \n YFCElement inEle = inXml.getDocumentElement();\n YFCIterable<YFCElement> yfsItrator = inEle.getChildren(XMLLiterals.ITEM);\n for(YFCElement itemEle : yfsItrator) {\n YFCDocument itemListDoc = YFCDocument.createDocument(XMLLiterals.ITEM_LIST);\n YFCElement itemListEle = itemListDoc.getDocumentElement();\n itemEle.setAttribute(XMLLiterals.ORGANIZATION_CODE, INDIGO_CA);\n itemEle.setAttribute(XMLLiterals.UNIT_OF_MEASURE, EACH);\n itemListEle.importNode(itemEle);\n invokeYantraService(ITEM_LOAD_Q, itemListDoc);\n }\n return inXml;\n }",
"public ListElement()\n\t{\n\t\tthis(null, null, null); //invokes constructor with 3 arguments\n\t}",
"ArrayList<String> createList(String finalInput);",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public S<T> list(List<String> data){\n\t\tlist(data.toArray(new String[data.size()]));\n\t\treturn this;\n\t}",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"protected Trie(char[] paramArrayOfchar, int paramInt, DataManipulate paramDataManipulate) {\n/* 147 */ this.m_options_ = paramInt;\n/* 148 */ if (paramDataManipulate != null) {\n/* 149 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 151 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 153 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 155 */ this.m_index_ = paramArrayOfchar;\n/* 156 */ this.m_dataOffset_ = this.m_index_.length;\n/* */ }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"public IssuesList visitDocument() {\n list = new IssuesList();\n org.w3c.dom.Element element = document.getDocumentElement();\n if ((element != null) && element.getTagName().equals(\"issues\")) {\n visitElement_issues(element);\n }\n if ((element != null) && element.getTagName().equals(\"components\")) {\n visitElement_components(element);\n }\n if ((element != null) && element.getTagName().equals(\"component\")) {\n visitElement_component(element);\n }\n if ((element != null) && element.getTagName().equals(\"subcomponent\")) {\n visitElement_subcomponent(element);\n }\n if ((element != null) && element.getTagName().equals(\"statuses\")) {\n visitElement_statuses(element);\n }\n if ((element != null) && element.getTagName().equals(\"status\")) {\n visitElement_status(element);\n }\n if ((element != null) && element.getTagName().equals(\"platforms\")) {\n visitElement_platforms(element);\n }\n if ((element != null) && element.getTagName().equals(\"platform\")) {\n visitElement_platform(element);\n }\n if ((element != null) && element.getTagName().equals(\"operating-systems\")) {\n visitElement_operating_systems(element);\n }\n if ((element != null) && element.getTagName().equals(\"os\")) {\n visitElement_os(element);\n }\n if ((element != null) && element.getTagName().equals(\"versions\")) {\n visitElement_versions(element);\n }\n if ((element != null) && element.getTagName().equals(\"version\")) {\n visitElement_version(element);\n }\n if ((element != null) && element.getTagName().equals(\"priorities\")) {\n visitElement_priorities(element);\n }\n if ((element != null) && element.getTagName().equals(\"priority\")) {\n visitElement_priority(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue-types\")) {\n visitElement_issue_types(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue-type\")) {\n visitElement_issue_type(element);\n }\n if ((element != null) && element.getTagName().equals(\"persons\")) {\n visitElement_persons(element);\n }\n if ((element != null) && element.getTagName().equals(\"person\")) {\n visitElement_person(element);\n }\n if ((element != null) && element.getTagName().equals(\"resolutions\")) {\n visitElement_resolutions(element);\n }\n if ((element != null) && element.getTagName().equals(\"resolution\")) {\n visitElement_resolution(element);\n }\n if ((element != null) && element.getTagName().equals(\"issue\")) {\n visitElement_issue(element);\n }\n if ((element != null) && element.getTagName().equals(\"depends-on\")) {\n visitElement_depends_on(element);\n }\n if ((element != null) && element.getTagName().equals(\"comment\")) {\n visitElement_comment(element);\n }\n return list;\n }",
"public WordList() {\n\t\twordList = new ArrayList<>();\n\t\t// TODO Add your code here\n\t}",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n List<CasesItem> filteredList = new ArrayList<>();\n if(constraint == null || constraint.length() == 0) {\n\n filteredList.addAll(mItemCasesAll);\n } else {\n\n String filterPattern = constraint.toString().toLowerCase().trim();\n for(CasesItem items: mItemCasesAll) {\n\n if(items.getmCountryName().toLowerCase().contains(filterPattern)) {\n\n filteredList.add(items);\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n return filterResults;\n }",
"public StringDataList() {\n }",
"public S<T> list(String[] data){\n\t\tif(t instanceof ListView){\n\t\t\t\n\t\t\t((ListView) t).setAdapter(new ArrayAdapter<String>(activity,\n\t\t android.R.layout.simple_list_item_1, android.R.id.text1, data));\n\t\t}\n\t\treturn this;\n\t}",
"public MultiStringColl(int i) {\n c = null;\n how_many = 0;\n }",
"public JaccardSearcher(String docFilename) {\n super(docFilename);\n // TODO: YOUR CODE HERE\n\n // Instantiate the indexer\n // VSM MyCoolSearcher.Indexer is being used because we don't want to create static nested Builder class for the MyCoolSearcher.Indexer class\n indexer = new VectorSpaceModelIndexer.Builder(documents, stopWords).build();\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public OrderedArrayList()\n {\n\t_data = new ArrayList<Comparable>();\n }",
"private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}",
"public OrderedArrayList()\n {\n _data = new ArrayList<Comparable>();\n }",
"public abstract void init(ArrayList<String> ary);",
"DataList createDataList();",
"public static ElementoDettaglioVariazioneCodificaCapitolo getInstance(DettaglioVariazioneCodificaCapitolo dati) {\n\t\tElementoDettaglioVariazioneCodificaCapitolo result = new ElementoDettaglioVariazioneCodificaCapitolo();\n\t\t//campi opzionali\n\t\tCapitolo<?,?> capitoloPrecedente = dati.getCapitoloPrecedente();\n\t\tCapitolo<?,?> capitoloVariazione = dati.getCapitolo();\n\t\t\n\t\tresult.setDescrizioneCapitoloPreVariazione(ottieniStringaDescrizione(capitoloPrecedente.getDescrizione(), capitoloVariazione.getDescrizione()));\n\t\tresult.setDescrizioneArticoloPreVariazione(ottieniStringaDescrizione(capitoloPrecedente.getDescrizioneArticolo(), capitoloVariazione.getDescrizioneArticolo()));\n\t\t\n\t\tList<ClassificatoreGerarchico> classificatoriModificatiDallaVariazione = dati.getClassificatoriGerarchici();\n\t\tList<ClassificatoreGerarchico> classificatoriPrecedenti = dati.getClassificatoriGerarchiciPrecedenti();\n\t\tresult.setStrutturaAmministrativaContabileCapitoloPreVariazione(ottieniStringaSACFromListaClassificatori(classificatoriPrecedenti, classificatoriModificatiDallaVariazione));\n\t\n\t\tVariazioneCodificaCapitolo variazione = dati.getVariazioneCodificaCapitolo();\n\t\tresult.setNumeroVariazione(variazione.getNumero());\n\t\t\n\t\tif(variazione.getAttoAmministrativo()==null){\n\t\t\tresult.setProvvedimentoVariazione(\"\");\n\t\t}else{\n\t\t\tresult.setProvvedimentoVariazione(\"\" + variazione.getAttoAmministrativo().getAnno() + \" / \" +variazione.getAttoAmministrativo().getNumero());\n\t\t}\n\t\tresult.setDataVariazione(FormatUtils.formatDate(variazione.getData()));\n\t\n\t\treturn result;\n\t\n\t}",
"public List(String vTittle, int vText, int imageResourceId) {\n mTittleItem = vTittle;\n mTextItem = vText;\n mImageResourceId = imageResourceId;\n }",
"OrderedListContent createOrderedListContent();",
"public List(String name, Contract of)\n\t{\n\t\tsuper(name);\n\t\tsetOf(of);\n\t}",
"public static ElementInsertionList create()\n {\n return new ElementInsertionList();\n }",
"public RowListaCustomAdapter ( Context c, ArrayList<Row>data){\n Log.v(TAG, \"Construir Adaptador\");\n this.data = data;\n inflater = LayoutInflater.from(c);\n\n }",
"ListString createListString();",
"protected ArrayList<Object[]> genObjectArrayListFromIDElementList(ArrayList<? extends IDElement> pIDElementList) throws Exception{\r\n\t\tObject[] vElement;\r\n\t\tArrayList<Object[]> vRet;\r\n \t\t\r\n \t\tif (pIDElementList != null) {\r\n \t\t\tvRet = new ArrayList<Object[]>();\r\n \t\t\t\r\n \t\t\tfor (IDElement vCur : pIDElementList) {\r\n \t\t\t\tvElement = new Object[2];\r\n \t \t\t\t\r\n \t \t\t\tvElement[0] = vCur.getId();\r\n \t \t\t\tvElement[1] = vCur.getName();\r\n \t \t\t\t\r\n \t \t\t\tvRet.add(vElement);\r\n \t\t\t}\r\n \t\t} else throw new Exception(\"04; gOALfIDEL,Edi\");\r\n \t\t\r\n \t\treturn vRet;\r\n\t}",
"public FilterResults performFiltering(CharSequence constraint) {\n FilterResults results = new FilterResults();\n if (constraint == null || constraint.length() == 0) {\n results.values = CaSiAdapter.this.listSort;\n results.count = CaSiAdapter.this.listSort.size();\n } else {\n ArrayList<CaSi> lsSach = new ArrayList<>();\n Iterator it = CaSiAdapter.this.list.iterator();\n while (it.hasNext()) {\n CaSi p = (CaSi) it.next();\n if (String.valueOf(p.getMaCS()).toUpperCase().contains(constraint.toString().toUpperCase()) || p.getHoTenCS().toUpperCase().contains(constraint.toString().toUpperCase())) {\n lsSach.add(p);\n }\n }\n results.values = lsSach;\n results.count = lsSach.size();\n }\n return results;\n }",
"@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n constraint = constraint.toString().toLowerCase();\n FilterResults result = new FilterResults();\n if (constraint != null && constraint.toString().length() > 0) {\n List<Message> filt = new ArrayList<Message>(); //filtered list\n for (int i = 0; i < originalData.size(); i++) {\n Message m = originalData.get(i);\n if (m.getSender().getEmailAddress().getName().toLowerCase().contains(constraint)) {\n filt.add(m); //add only items which matches\n }\n }\n result.count = filt.size();\n result.values = filt;\n } else { // return original list\n synchronized (this) {\n result.values = originalData;\n result.count = originalData.size();\n }\n }\n return result;\n }",
"public InternmentList() {\n\t\tsuper(\"Internments\", List.IMPLICIT);\n\n\t\tstartData();\n\t\tstartComponents();\n\t}",
"LI createLI();",
"StringList createStringList();",
"public /* synthetic */ ResidentialComplexSelect(String str, String str2, boolean z, Boolean bool, String str3, List list, String str4, String str5, boolean z2, AttributedText attributedText, int i, j jVar) {\n this(str, str2, z, bool, (i & 16) != 0 ? null : str3, (i & 32) != 0 ? CollectionsKt__CollectionsKt.emptyList() : list, (i & 64) != 0 ? null : str4, str5, (i & 256) != 0 ? false : z2, (i & 512) != 0 ? null : attributedText);\n }",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"public static ArrayList posisjoner(String ord, int index, Node currentNode){\n \treturn new ArrayList();\r\n }",
"public DocumentVector(double[] data) {\n\t\tthis(DSUtil.toDoubleList(data));\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public IteratorForXML(String i, String tag)\r\n/* 25: */ {\r\n/* 26:30 */ this(i, tag, tag);\r\n/* 27: */ }",
"public CaseClassRelation (scala.collection.Seq<A> data, scala.reflect.api.TypeTags.TypeTag<A> evidence$3) { throw new RuntimeException(); }",
"private DocumentOrderIterator() {}",
"public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}",
"protected Trie(InputStream paramInputStream, DataManipulate paramDataManipulate) throws IOException {\n/* 117 */ DataInputStream dataInputStream = new DataInputStream(paramInputStream);\n/* */ \n/* 119 */ int i = dataInputStream.readInt();\n/* 120 */ this.m_options_ = dataInputStream.readInt();\n/* */ \n/* 122 */ if (!checkHeader(i)) {\n/* 123 */ throw new IllegalArgumentException(\"ICU data file error: Trie header authentication failed, please check if you have the most updated ICU data file\");\n/* */ }\n/* */ \n/* 126 */ if (paramDataManipulate != null) {\n/* 127 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 129 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 131 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 133 */ this.m_dataOffset_ = dataInputStream.readInt();\n/* 134 */ this.m_dataLength_ = dataInputStream.readInt();\n/* 135 */ unserialize(paramInputStream);\n/* */ }",
"public CapsuleAdapter(List<T> data) {\n if (data != null) mList = data;\n }",
"public DocumentVector(Collection<Double> data) {\n\t\tinit(data);\n\t}",
"public static List<Content> evaluateListQuery(String query, Element dataElem)\n throws SaxonApiException {\n\n // put the element in a jdom document\n Document dataDoc = new Document(dataElem.clone());\n String result = evaluateQuery(query, dataDoc);\n\n // use the string result to create a doc to get it expressed as an element list\n Document resultDoc = JDOMUtil.stringToDocument(StringUtil.wrap(result, \"root\"));\n return resultDoc.getRootElement().cloneContent();\n }",
"private ArrayList<SearchModel> initData() {\n // items in the arraylist\n ArrayList<SearchModel> foodList = new ArrayList<>();\n List<FoodModel> foods = foodModelList;\n for(int i=0; i< foods.size(); i++)\n {\n foodList.add(new SearchModel(foods.get(i).getName()));\n }\n return foodList;\n }",
"DictionarySimpleElement(DataItem cborName) {\n\t\tif(cborName == null) {\n\t\t\tthrow new IllegalArgumentException(\"CBOR name must not be null\");\n\t\t}\n\n\t\tthis.cborName = cborName;\n\t\tthis.xmlName = null;\n\t\tthis.attributes = null;\n\n\t\tif(log.isTraceEnabled()) {\n\t\t\tlog.trace(\"DictionarySimpleElement for reverse lookup constructed:\");\n\t\t\tlog.trace(this.toString());\n\t\t}\n\t}",
"private void initData() {\r\n allElements = new Vector<PageElement>();\r\n\r\n String className = Utility.getDisplayName(queryResult.getOutputEntity());\r\n List<AttributeInterface> attributes = Utility.getAttributeList(queryResult);\r\n int attributeSize = attributes.size();\r\n //int attributeLimitInDescStr = (attributeSize < 10) ? attributeSize : 10;\r\n\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n serviceURLComboContents.add(\" All service URLs \");\r\n for (String url : allRecords.keySet()) {\r\n\r\n List<IRecord> recordList = allRecords.get(url);\r\n \r\n StringBuilder urlNameSize = new StringBuilder( url );\r\n urlNameSize = new StringBuilder( urlNameSize.substring(urlNameSize.indexOf(\"//\")+2));\r\n urlNameSize = new StringBuilder(urlNameSize.substring(0,urlNameSize.indexOf(\"/\")));\r\n urlNameSize.append(\" ( \" + recordList.size() + \" )\");\r\n serviceURLComboContents.add(urlNameSize.toString());\r\n Vector<PageElement> elements = new Vector<PageElement>();\r\n for (IRecord record : recordList) {\r\n StringBuffer descBuffer = new StringBuffer();\r\n for (int i = 0; i < attributeSize; i++) {\r\n Object value = record.getValueForAttribute(attributes.get(i));\r\n if (value != null) {\r\n if (i != 0) {\r\n descBuffer.append(',');\r\n }\r\n descBuffer.append(value);\r\n }\r\n }\r\n String description = descBuffer.toString();\r\n // if (description.length() > 150) {\r\n // //150 is allowable chars at 1024 resolution\r\n // description = description.substring(0, 150);\r\n // //To avoid clipping of attribute value in-between\r\n // int index = description.lastIndexOf(\",\");\r\n // description = description.substring(0, index);\r\n // }\r\n PageElement element = new PageElementImpl();\r\n element.setDisplayName(className + \"_\" + record.getRecordId().getId());\r\n element.setDescription(description);\r\n\r\n DataRow dataRow = new DataRow(record, queryResult.getOutputEntity());\r\n dataRow.setParent(parentDataRow);\r\n dataRow.setAssociation(queryAssociation);\r\n\r\n Vector recordListUserObject = new Vector();\r\n recordListUserObject.add(dataRow);\r\n recordListUserObject.add(record);\r\n\r\n element.setUserObject(recordListUserObject);\r\n\r\n allElements.add(element);\r\n elements.add(element);\r\n }\r\n URLSToResultRowMap.put(urlNameSize.toString(), elements);\r\n }\r\n }",
"public static Document getSortElementsTransformationStylesheetDocument\r\n (String strParentElementXPath,\r\n String strSortKeyXPath,\r\n SortDataType dataType,\r\n SortOrder order,\r\n SortCaseOrder caseOrder)\r\n throws SAXException,\r\n IOException\r\n {\r\n return XMLUtil.loadDocumentFromString\r\n (getSortElementsTransformationStylesheetString\r\n (strParentElementXPath, \r\n strSortKeyXPath, \r\n dataType, \r\n order, \r\n caseOrder));\r\n }",
"@Override\n\tpublic ArrayList<Lista> listaListeElettoraliDiElezione(String nomeElezione) {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\n\t\t\tfor (int key : keys) {\n\t\t\t\tif (map.get(key).getElezione().equals(nomeElezione))\n\t\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\t\treturn liste;\n\t\t}",
"private Element createXmlElementForCase(Case case_, Document xmlDocument, Constraint constraint) {\n\t\tElement element = xmlDocument.createElement(XML_CASE);\n\t\telement.setAttribute(XML_INFO1, case_.getConstraint().toString());\n\n\t\tElement child = createXmlElementForValue(case_.getValue(), xmlDocument, constraint);\n\t\tif (child != null)\n\t\t\telement.appendChild(child);\n\t\t\n\t\treturn (element.hasChildNodes() ? element : null);\n\t}",
"public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private Lists() { }",
"public SortedList(){\n this(\"list\");\n }",
"private void initialize() {\n this.docTypeList = new ArrayList<>();\n this.problemTypeList = new ArrayList<>();\n\n // The add() function should be called in the order specified since together\n // they form a mapping mechanism,\n // for example 'ENCAPSULATED' before 'POSTSCRIPT' and 'RICH' before 'TEXT'.\n\n this.docTypeList.add(\"ENCAPSULATED\");\n this.problemTypeList.add(ProblemType.NON_ENCAPSULATED_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"EXCEL\");\n this.problemTypeList.add(ProblemType.NON_MSEXCEL_FILE);\n\n this.docTypeList.add(\"GIF\");\n this.problemTypeList.add(ProblemType.NON_GIF_FILE);\n\n this.docTypeList.add(\"HTML\");\n this.problemTypeList.add(ProblemType.NON_HTML_FILE);\n\n this.docTypeList.add(\"LATEX\");\n this.problemTypeList.add(ProblemType.NON_LATEX_FILE);\n\n this.docTypeList.add(\"MPEG\");\n this.problemTypeList.add(ProblemType.NON_MP4_FILE);\n\n this.docTypeList.add(\"POSTSCRIPT\");\n this.problemTypeList.add(ProblemType.NON_POSTSCRIPT_FILE);\n\n this.docTypeList.add(\"TIFF\");\n this.problemTypeList.add(ProblemType.NON_TIFF_FILE);\n\n this.docTypeList.add(\"WORD\");\n this.problemTypeList.add(ProblemType.NON_MSWORD_FILE);\n\n this.classInitialized = true;\n\n LOG.debug(\"initialize:this.docTypeList.size {}\", this.docTypeList.size());\n LOG.debug(\"initialize:this.problemTypeList.size {}\", this.problemTypeList.size());\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public T caseCollectionLiteralExpCS(CollectionLiteralExpCS object) {\r\n return null;\r\n }",
"public OccList()\n {\n int capacity = 8;\n data = new Occ[capacity];\n // initialize data with empty occ\n for (int i=0; i<capacity; i++) data[i] = new Occ(); \n }",
"public Recycler_View_Adapter_Users(Context context, List<String> data) {\n this.mInflater = LayoutInflater.from(context);\n this.mData = data;\n this.context = context;\n thisAdapter = this;\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"public TbStringExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public IconBuilder textCase(TextCase textCase) {\n\t\tthis.textCase = textCase;\n\t\treturn this;\n\t}",
"public static Node sortElements\r\n (Node xml, \r\n String strParentElementXPath,\r\n String strSortKeyXPath,\r\n SortDataType dataType,\r\n SortOrder order,\r\n SortCaseOrder caseOrder)\r\n throws SAXException,\r\n IOException,\r\n TransformerConfigurationException,\r\n TransformerException\r\n \r\n {\r\n return XMLUtil.getOwnerDocument(sortElements\r\n (xml, \r\n strParentElementXPath, \r\n strSortKeyXPath, \r\n dataType,\r\n order,\r\n caseOrder,\r\n (Node)null));\r\n }",
"public OpenHashSet(java.lang.String[] data) {\n this();\n\n for (int i = 0; i < data.length; i++){\n if (data[i]!=null)\n add(data[i]);\n }\n }",
"public DefaultJavaElementComparator() {\n // initialize default categories\n this.categories = new int[] { // static type\n 1, // static field\n 2, // static initializer\n 3, // static method\n 7, // type\n 6, // field\n 4, // initializer\n 5, // constructor\n 8, // method\n 9 };\n this.collator = Collator.getInstance();\n }",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public WordAdapter(Activity context, ArrayList<Word> numbers, int resourceId)\n {\n //calls constructor of superclass with a 0 because the views\n // will be manually inflated\n super(context, 0, numbers);\n mResourceID = resourceId;\n }",
"@Override\r\n\tpublic List<NoticeVO> listSearch(SearchCriteria cri) {\n\t\treturn sqlSession.selectList(namespace + \".listSearch\", cri);\r\n\t}",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"public static ListInitExpression listInit(NewExpression newExpression, Iterable<ElementInit> elementInits) { throw Extensions.todo(); }"
]
| [
"0.84319144",
"0.7054987",
"0.7049121",
"0.69355726",
"0.6904063",
"0.6748179",
"0.64295256",
"0.6356644",
"0.6060381",
"0.59396976",
"0.58825254",
"0.5716812",
"0.54970586",
"0.5351331",
"0.5065302",
"0.49913773",
"0.4957574",
"0.49348572",
"0.4932062",
"0.47254232",
"0.46940482",
"0.4640255",
"0.45911267",
"0.45839226",
"0.454214",
"0.45407724",
"0.4535181",
"0.44995555",
"0.44936508",
"0.44813523",
"0.44813523",
"0.4479241",
"0.4440047",
"0.4431194",
"0.4413197",
"0.438732",
"0.43856755",
"0.43740356",
"0.43714353",
"0.43619138",
"0.43606764",
"0.43595856",
"0.43376684",
"0.4325349",
"0.432077",
"0.43073052",
"0.42970744",
"0.42925116",
"0.4282263",
"0.4267542",
"0.426288",
"0.42599186",
"0.42550832",
"0.42476112",
"0.42471164",
"0.4244211",
"0.42414457",
"0.4237131",
"0.42369097",
"0.4230439",
"0.4229656",
"0.42293203",
"0.42252904",
"0.42228407",
"0.4219343",
"0.4218245",
"0.42126942",
"0.42121714",
"0.4210323",
"0.4201429",
"0.42007753",
"0.41921744",
"0.41832218",
"0.41831765",
"0.41801265",
"0.41786668",
"0.4172145",
"0.41700307",
"0.416533",
"0.41550153",
"0.4152233",
"0.41518843",
"0.4148876",
"0.41445833",
"0.41387644",
"0.41329598",
"0.41273114",
"0.41210547",
"0.4120333",
"0.41175473",
"0.4116741",
"0.41161668",
"0.41105533",
"0.41014227",
"0.4098002",
"0.40929407",
"0.40914765",
"0.40850604",
"0.40784314",
"0.40773833"
]
| 0.75552756 | 1 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given Map. | public CaseInsensitiveElementList(Map<String, ? extends V> map) {
this(map, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"private LowercaseWordList() {\n\n }",
"public OrderedNameMap() {\r\n\t\tthis(CASE_SENSITIVE);\r\n\t}",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"private static List<ajr> m19375a(Map<String, String> map) {\n if (map == null) {\n return null;\n }\n if (map.isEmpty()) {\n return Collections.emptyList();\n }\n List<ajr> arrayList = new ArrayList(map.size());\n for (Entry entry : map.entrySet()) {\n arrayList.add(new ajr((String) entry.getKey(), (String) entry.getValue()));\n }\n return arrayList;\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public ConcurrentHashMapAllowNull(Boolean caseInsensitive) {\n super();\n this.caseInsensitive = caseInsensitive;\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public ValueComparator(Map map){\n\t\t\tthis.map = map;\n\t\t}",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static <K, V extends Comparable<? super V>> List<Entry<K, V>> getMapSortedByValue(Map<K, V> map) {\r\n\t\tfinal int size = map.size();\r\n\t\tfinal List<Map.Entry<K, V>> list = new ArrayList<Map.Entry<K, V>>(size);\r\n\t\tlist.addAll(map.entrySet());\r\n\t\tfinal ValueComparator<V> cmp = new ValueComparator<V>();\r\n\t\tCollections.sort(list, cmp);\r\n\t\treturn list;\r\n\t\t/*\r\n\t\tfinal List<K> keys = new ArrayList<K>(size);\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tkeys.set(i, list.get(i).getKey());\r\n\t\t}\r\n\t\treturn keys;\r\n\t\t*/\r\n\t}",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public zzq(zzm zzm, Map<K, Collection<V>> map) {\n super(map);\n this.zza = zzm;\n }",
"public TrieNode buildTrie(List<String> dict){\n TrieNode root = new TrieNode();\n for(String s : dict){\n TrieNode t = root;\n for(char c : s.toCharArray()){\n if(t.children[c - 'a'] == null)\n t.children[c - 'a'] = new TrieNode();\n t = t.children[c-'a'];\n }\n t.isword = true;\n t.word = s;\n }\n return root;\n }",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public static CharSequence translateUsingMap(StringValue in, IntToIntMap map) {\n UnicodeString us = in.getUnicodeString();\n int len = us.uLength();\n FastStringBuffer sb = new FastStringBuffer(len);\n for (int i = 0; i < len; i++) {\n int c = us.uCharAt(i);\n int newchar = map.get(c);\n if (newchar == Integer.MAX_VALUE) {\n // character not in map, so is not to be translated\n newchar = c;\n }\n if (newchar != -1) {\n sb.appendWideChar(newchar);\n }\n // else no action, delete the character\n }\n return sb;\n }",
"public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public HashedVector(Map<Integer, Double> map) {\n\t\tthis.elements = new HashMap<Integer, Double>(map);\n\t}",
"public List<ApMessage> searchbyname(Map map) {\n\t\treturn apMessageDao.searchbyname(map);\r\n\t}",
"WordList(){\r\n\t\tm_words = new HashMap();\r\n\t}",
"public StrStrMap() {\n }",
"void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);",
"public HashMapValueComparator(Map<Object, Object> m){\n\t\tsuper();\n\t\tthis.map = m;\n\t}",
"public List init(Map map) {\n\t\treturn apMessageDao.init(map);\r\n\t}",
"public DictionaryAdapter(Map<String,String> dict) {\n mData = new ArrayList();\n mData.addAll(dict.entrySet());\n }",
"InternationalString createInternationalString(Map<Locale,String> strings);",
"private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"public List<ApMessage> searchbyCode(Map<String, Object> map) {\n\t\treturn apMessageDao.searchbyCode(map);\r\n\t}",
"private MapTransformer(Map map) {\n super();\n iMap = map;\n }",
"public abstract ArrayList<Key> toArrayList();",
"public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}",
"public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public HashMap<String, ArrayList<Counter<String>> > makeVectors(HashMap<String, ArrayList< List<String> > > hm) { \n HashMap<String, ArrayList<Counter<String>> > retHM = new HashMap<String, ArrayList<Counter<String>> >();\n for(String ID : hm.keySet() ){\n ArrayList<Counter<String>> tempVectList=new ArrayList<Counter<String>>();\n for(List<String> sentence : hm.get(ID) ){//loop through the list of sentences for that specific ID \n Counter<String> tempVect = new Counter<String>(); \n for(String word : sentence){//loop through the sentence\n tempVect.incrementCount(word,1.0);\n }\n tempVectList.add(tempVect);\n } \n retHM.put(ID,tempVectList);\n }\n return retHM;\n }",
"public MessageValidator(Map<Integer, List<Message>> messagesMap,\n Map<Integer, BankClient> bankDatabase) {\n this.messagesMap = messagesMap;\n this.bankDatabase = bankDatabase;\n }",
"public List<String> mapToList (String startWord, String endWord, Map<String, String> map){\n \tLinkedList<String> ladder = new LinkedList<String>();\n \tif(startWord.equals(endWord)){\n \t\tladder.add(startWord);\n \t\tladder.add(endWord);\n \t\treturn ladder;\n \t}\n \tladder.add(endWord);\n \tString word = endWord;\n \twhile(!word.equals(startWord)){\n \t\tString parent = map.get(word);\n \t\tladder.addFirst(parent);\n \t\tword = parent;\n \t}\n \treturn ladder;\n \t\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public Map() {\n\n\t\t}",
"public COSArrayList(COSDictionary dictionary, COSName dictionaryKey)\n {\n array = new COSArray();\n actual = new ArrayList<>();\n parentDict = dictionary;\n dictKey = dictionaryKey;\n }",
"protected MapImpl() {\n }",
"public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}",
"public static HashMap<String, ArrayList<String>> copy(HashMap<String, ArrayList<String>> original) {\n\t\tHashMap<String, ArrayList<String>> copy = new HashMap<String, ArrayList<String>>();\r\n\t\tfor (Entry<String, ArrayList<String>> entry : original.entrySet()) {\r\n\t\t\tcopy.put(entry.getKey(), new ArrayList<String>(entry.getValue()));\r\n\t\t}\r\n\t\treturn copy;\r\n\t}",
"public static List<C3717i.C3719b> m18358a(Map<String, String> map) {\n if (map == null || map.isEmpty()) {\n return null;\n }\n try {\n Set<Map.Entry<String, String>> entrySet = map.entrySet();\n ArrayList arrayList = new ArrayList();\n for (Map.Entry<String, String> entry : entrySet) {\n arrayList.add(new C3717i.C3719b(entry.getKey(), entry.getValue()));\n }\n return arrayList;\n } catch (Throwable th) {\n th.printStackTrace();\n return null;\n }\n }",
"public MappedArgument(String label, int flags, V[] array,\n Map<String, V> valueMap, boolean caseInsensitive, String description) {\n super(label, flags, array, description);\n this.valueMap = valueMap;\n this.caseInsensitive = caseInsensitive;\n }",
"@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",
"public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}",
"public static HtmlSelectOneMenu getLookupList(String className) {\r\n\r\n\t\t// set up jsf components\r\n\t\tHtmlSelectOneMenu dropDown = new HtmlSelectOneMenu();\r\n\t\tUISelectItems items = new UISelectItems();\r\n\r\n\t\tList<SelectItem> lookupList = retrieveLookupList(className, true);\r\n\r\n\t\t// apply collection to JSF menu component\r\n\t\titems.setValue(lookupList);\r\n\t\tdropDown.getChildren().add(items);\r\n\r\n\t\treturn dropDown;\r\n\t}",
"private static void addEntriesToMap(\n\t\tMap<Character,Integer> map,String toSort, String poolOfOccurances\n\t\t){\n\n\t\t//Loop the toStort\n\t\tfor(int i=0;i<toSort.length();i++){\n\t\t\tmap.put(toSort.charAt(i),new Integer(getCharacterFrequence(toSort.charAt(i),poolOfOccurances)));\n\t\t}\n\n\t}",
"private void putElementsToComboBox(HashMap<String, Map<String, String>> projectsInfo) {\n\t\tfor ( String key : projectsInfo.keySet() ) {\n\t\t\tthis.comboBox.addItem(key);\n\t\t}\n\t}",
"private SearchRegistryCriteria createCriteria(Map criteriaMap)\n {\n SearchRegistryCriteria criteria = new SearchRegistryCriteria();\n\n Object[] keys = criteriaMap.keySet().toArray();\n for (int i=0; i<keys.length; i++)\n {\n Logger.debug(\n \"[SubmitRegistrySearchAction.createCriteria] Setting field \"+keys[i] +\n \" to \"+criteriaMap.get(keys[i]));\n criteria.setFieldValue((Number)keys[i], criteriaMap.get(keys[i]));\n }\n\n return criteria;\n }",
"public List findCtiyByCode(Map map) {\n\t\treturn apMessageDao.findCtiyByCode(map);\r\n\t}",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"public MyHashMap() {\n hashMap = new ArrayList<>();\n }",
"public TOrderedHashMap(final Map<? extends K, ? extends V> map) {\n\t\tthis(map.size());\n\t\tputAll(map);\n\t}",
"@Override\n\tpublic Multimap<String, List<String>> fileRecordsIntoMap(List<String> list) {\n\t\tMultimap<String, List<String>> multimap = ArrayListMultimap.create();\n\t\tCollections.sort(list);\n\t\tfor(String key :list)\n\t\t{\n\t\t\tkey=key.trim().toLowerCase();\n\t\t\tif(!key.isEmpty())\n\t\t\t{\n\t\t\t\tspaceRemover(key);\n\t\t\t\tString withoutSort=key;\n\t\t\t\tkey=sortString(key);\n\t\t\t\tmultimap = putIntoMAP(key , withoutSort, multimap);\n\t\t\t}\n\t\t}\n\t\treturn multimap;\n\t}",
"public MultiKeyMap() {\n this.map = new java.util.HashMap<String,V>();\n return;\n }",
"private ArrayList<String> simpleFormList(ArrayList<String> list){\n\t\tArrayList<String> simpleFormList = new ArrayList<String>();\n\t\tfor(String s : list){\n\t\t\tString pos = posMap.get(s);\n\t\t\tsimpleFormList.add(simpleForm(s,pos));\n\t\t}\n\t\treturn simpleFormList;\n\t}",
"public MapElement(int key) {\n this.key = key;\n }",
"public MyHashMap() {\n map = new ArrayList<>();\n for (int i = 0;i<255;i++)\n map.add(new Entry());\n }",
"@Override\n\tpublic List selectList3(Object map) {\n\t\treturn null;\n\t}",
"public ArrayMap() {\n this(DEFAULT_INITIAL_CAPACITY);\n }",
"public static Subject createWithMap(HashMap<String, String> map) {\n if (map.containsKey(MAP_ITEM_ID)) {\n Subject subject = SubjectManipulator.createItem(map);\n SubjectManipulator.add(subject);\n return subject;\n } else if (map.containsKey(MAP_CUSTOMER_ID)) {\n Subject subject = SubjectManipulator.createCustomer(map);\n SubjectManipulator.add(subject);\n return subject;\n } else if (map.containsKey(MAP_CATEGORY_ID)) {\n Subject subject = SubjectManipulator.createCategory(map);\n SubjectManipulator.add(subject);\n return subject;\n } else {\n LOGGER.warning(\"The map you gave was not valid, please make sure you haven't edited the map_id fields.\");\n return null;\n }\n }",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"public CharCharMap(final char[] k, final char[] v) {\n this(k, v, DEFAULT_LOAD_FACTOR);\n }",
"@RequestMapping(\"/Subject/ListBySearch\")\n\t@ResponseBody\n\tpublic List<SubjectVo> getSubjectBySearch(@RequestParam HashMap<String, Object> map){\n\t\t\n\t\tSystem.out.println(map);\n\t\t\n\t\tList<SubjectVo> subjectList = subjectService.getSubjectBySearch(map); \n\t\t\n\t\tSystem.out.println(subjectList);\n\t\t\n\t\treturn subjectList;\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}",
"public EncodingMap() {}",
"MapListView(android.app.ListActivity activity) {\n m_activity = activity;\n initMapEngine();\n }",
"@Override\n\tpublic List selectList2(Object map) {\n\t\treturn null;\n\t}",
"private static <K extends Comparable<K>, V>\n ImmutableSortedMap<K, SortedSet<V>>\n copyMap(Map<K, ? extends SortedSet<V>> map) {\n final ImmutableSortedMap.Builder<K, SortedSet<V>> b =\n ImmutableSortedMap.naturalOrder();\n for (Map.Entry<K, ? extends SortedSet<V>> e : map.entrySet()) {\n b.put(e.getKey(), ImmutableSortedSet.copyOf(e.getValue()));\n }\n return b.build();\n }",
"public List<HashMap<String, Object>> codelist(HashMap<String, String> hashmapParam) {\n\t\treturn mapper.codelist(hashmapParam);\r\n\t}",
"public BasicElementList() {\n\t}",
"@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }",
"public StrStrMap(Map<String, String> map) {\n this.map.putAll(map);\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"public List initProvince(Map map) {\n\t\treturn apMessageDao.initProvince(map);\r\n\t}",
"public List<Map<String, Object>> getKeYuanList(Map<String, Object> map);",
"public Kabasuji(ArrayList<Level> level){\n\t\tthis.levels = level;\n\t\t@SuppressWarnings(\"unused\")\n\t\tLevelSelection levelSec = new LevelSelection(level);\n\t}",
"public ArrayList<WordCode<K, V>> entrySet() {\n\t\tArrayList<WordCode<K, V>> entrySet = new ArrayList<>();\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tfor (WordCode<K, V> wc : ll) {\n\t\t\t\tentrySet.add(wc);\n\t\t\t}\n\t\t}\n\t\treturn entrySet;\n\t}",
"public static ArrayList wordLocate(TreeMap map, String word) {\r\n Set ref = map.keySet();\r\n Iterator it = ref.iterator();\r\n ArrayList list = new ArrayList();\r\n\r\n while (it.hasNext()) {\r\n Object o = it.next();\r\n if (map.get(o).equals(word)) {\r\n list.add(o);\r\n }\r\n }\r\n return list;\r\n }",
"private Set<String> getNames(Map<String, String> map) {\r\n\t\tSet<String> set = new HashSet<>();\r\n\t\t\r\n\t\tmap.forEach((k,v) -> set.add(k));\r\n\t\t\r\n\t\treturn Collections.unmodifiableSet(set);\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tMap<String, String> map = new HashMap<>();\n\t\t\n\t\tArrayList<String> lista = new ArrayList<>();\n\t\t\n\t\tString a = \"Juan\";\n\t\tString b = \"ObiJuan\";\n\t\tString c = \"Paco\";\n\t\t\n\t\tlista.add(a);\n\t\tlista.add(b);\n\t\tlista.add(c);\n\t\t\n\t\tmap.put(\"primero\", a);\n\t\tmap.put(\"segundo\", b);\n\t\tmap.put(\"tercero\", c);\n\t\t\n\t\tSystem.out.println(lista.get(1));\n\t\tSystem.out.println(lista.get(lista.indexOf(\"ObiJuan\")));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tSystem.out.println(map.get(\"primero\"));\n\t\t\n\t\tlista.remove(lista.indexOf(\"Paco\"));\n\t\t\n\t\t\n\t\tfor (String palabra : lista) {\n\t\t\tSystem.out.println(palabra);\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tfor (String key : map.keySet()) {\n\t\t\tSystem.out.println(\"Clave: \" + key);\n\t\t\tSystem.out.println(\"Valor: \" + map.get(key));\n\t\t\tSystem.out.println(\"----------------\");\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tlista.forEach(elemento -> System.out.println(elemento));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n//\t\tmap.forEach(clave, valor -> (\n//\t\t\tSystem.out.println(\"Clave con lambda: \" + clave);\n//\t\t\tSystem.out.println(\"Valor con lambda: \" + valor);\n//\t\t);\n//\t\t\n\t}",
"ArgMapListRule createArgMapListRule();",
"public HashMapValueComparator() {\n\t\tsuper();\n\t}",
"public abstract void init(ArrayList<String> ary);",
"private void initialiseAcronymList(ArrayList<String> pAcronymList) {\n\t\tthis.acronymList = new HashSet<String>(pAcronymList);\t\t\n\t}",
"private void fillEntryLangMap(String p_termbaseId) throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_ENTRY_LANG_QUERY);\n ps.setLong(1, Long.valueOf(p_termbaseId).longValue());\n rs = ps.executeQuery();\n m_map = new TreeMap();\n while (rs.next())\n {\n Long cid = new Long(rs.getLong(1));\n String name = rs.getString(2);\n HashSet set = (HashSet) m_map.get(cid);\n if (set == null)\n {\n set = new HashSet();\n m_map.put(cid, set);\n }\n set.add(name);\n }\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }"
]
| [
"0.77542573",
"0.67203885",
"0.62882245",
"0.61923563",
"0.61694247",
"0.61037314",
"0.59147966",
"0.56251234",
"0.5621375",
"0.5480092",
"0.5285151",
"0.5269911",
"0.5170866",
"0.5145869",
"0.4945162",
"0.48576748",
"0.47924602",
"0.47725487",
"0.4770352",
"0.47427016",
"0.47220814",
"0.4711871",
"0.46990332",
"0.46822563",
"0.46731827",
"0.46367714",
"0.4621317",
"0.4560361",
"0.45579714",
"0.4553743",
"0.45325673",
"0.45274523",
"0.4507283",
"0.44936508",
"0.44895837",
"0.44824257",
"0.44728354",
"0.44539666",
"0.44532228",
"0.44448137",
"0.44377205",
"0.4422136",
"0.44149816",
"0.4412492",
"0.441021",
"0.44098708",
"0.44009104",
"0.4384514",
"0.43553114",
"0.43531",
"0.43482348",
"0.43408203",
"0.43311286",
"0.43288535",
"0.4326863",
"0.4317505",
"0.42816368",
"0.4270802",
"0.42540464",
"0.4240405",
"0.42401695",
"0.42388093",
"0.42355794",
"0.42338815",
"0.42297888",
"0.4229021",
"0.42262045",
"0.42256728",
"0.4223886",
"0.42200413",
"0.4219678",
"0.42062888",
"0.4187471",
"0.418321",
"0.41765696",
"0.4176427",
"0.41743314",
"0.41681898",
"0.4167318",
"0.41646692",
"0.41622347",
"0.4161981",
"0.4154761",
"0.41516542",
"0.41504544",
"0.414599",
"0.41447002",
"0.41441947",
"0.4134959",
"0.413103",
"0.41284898",
"0.41277233",
"0.41272798",
"0.41244623",
"0.412194",
"0.41153502",
"0.41123074",
"0.41114226",
"0.4110264",
"0.4101969"
]
| 0.83454347 | 0 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given Map. | public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {
this(locale);
addAll(map);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"private LowercaseWordList() {\n\n }",
"public OrderedNameMap() {\r\n\t\tthis(CASE_SENSITIVE);\r\n\t}",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }",
"private static List<ajr> m19375a(Map<String, String> map) {\n if (map == null) {\n return null;\n }\n if (map.isEmpty()) {\n return Collections.emptyList();\n }\n List<ajr> arrayList = new ArrayList(map.size());\n for (Entry entry : map.entrySet()) {\n arrayList.add(new ajr((String) entry.getKey(), (String) entry.getValue()));\n }\n return arrayList;\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public ConcurrentHashMapAllowNull(Boolean caseInsensitive) {\n super();\n this.caseInsensitive = caseInsensitive;\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public ValueComparator(Map map){\n\t\t\tthis.map = map;\n\t\t}",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static <K, V extends Comparable<? super V>> List<Entry<K, V>> getMapSortedByValue(Map<K, V> map) {\r\n\t\tfinal int size = map.size();\r\n\t\tfinal List<Map.Entry<K, V>> list = new ArrayList<Map.Entry<K, V>>(size);\r\n\t\tlist.addAll(map.entrySet());\r\n\t\tfinal ValueComparator<V> cmp = new ValueComparator<V>();\r\n\t\tCollections.sort(list, cmp);\r\n\t\treturn list;\r\n\t\t/*\r\n\t\tfinal List<K> keys = new ArrayList<K>(size);\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tkeys.set(i, list.get(i).getKey());\r\n\t\t}\r\n\t\treturn keys;\r\n\t\t*/\r\n\t}",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public zzq(zzm zzm, Map<K, Collection<V>> map) {\n super(map);\n this.zza = zzm;\n }",
"public TrieNode buildTrie(List<String> dict){\n TrieNode root = new TrieNode();\n for(String s : dict){\n TrieNode t = root;\n for(char c : s.toCharArray()){\n if(t.children[c - 'a'] == null)\n t.children[c - 'a'] = new TrieNode();\n t = t.children[c-'a'];\n }\n t.isword = true;\n t.word = s;\n }\n return root;\n }",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public static CharSequence translateUsingMap(StringValue in, IntToIntMap map) {\n UnicodeString us = in.getUnicodeString();\n int len = us.uLength();\n FastStringBuffer sb = new FastStringBuffer(len);\n for (int i = 0; i < len; i++) {\n int c = us.uCharAt(i);\n int newchar = map.get(c);\n if (newchar == Integer.MAX_VALUE) {\n // character not in map, so is not to be translated\n newchar = c;\n }\n if (newchar != -1) {\n sb.appendWideChar(newchar);\n }\n // else no action, delete the character\n }\n return sb;\n }",
"public Dictionary()\n\t{\n\t\tfor(Character i = 97; i<=122;i++)\n\t\t\tthis.put(i,new ArrayList<DictionaryElement>());\n\t\t\t\n\t}",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public HashedVector(Map<Integer, Double> map) {\n\t\tthis.elements = new HashMap<Integer, Double>(map);\n\t}",
"public List<ApMessage> searchbyname(Map map) {\n\t\treturn apMessageDao.searchbyname(map);\r\n\t}",
"WordList(){\r\n\t\tm_words = new HashMap();\r\n\t}",
"public StrStrMap() {\n }",
"void mo53966a(HashMap<String, ArrayList<C8514d>> hashMap);",
"public HashMapValueComparator(Map<Object, Object> m){\n\t\tsuper();\n\t\tthis.map = m;\n\t}",
"public List init(Map map) {\n\t\treturn apMessageDao.init(map);\r\n\t}",
"public DictionaryAdapter(Map<String,String> dict) {\n mData = new ArrayList();\n mData.addAll(dict.entrySet());\n }",
"InternationalString createInternationalString(Map<Locale,String> strings);",
"private static Map<String, String> createMapFromList(final List<String> all) {\n\t\tfinal Map<String, String> map = new ConcurrentHashMap<>();\n\n\t\tfor (final String documentElement : all) {\n\t\t\tif (documentElement != null) {\n\t\t\t\tmap.put(documentElement, documentElement);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"public List<ApMessage> searchbyCode(Map<String, Object> map) {\n\t\treturn apMessageDao.searchbyCode(map);\r\n\t}",
"private MapTransformer(Map map) {\n super();\n iMap = map;\n }",
"public abstract ArrayList<Key> toArrayList();",
"public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }",
"public void filterBy(Map<String, List<String>> queryMap) {\n }",
"public static <K, T> List<T> convertMapToList(Map<K, T> map) {\r\n\t\t\r\n\t\t// Si la collection est nulle\r\n\t\tif(map == null) return null;\r\n\t\t\r\n\t\t// On retourne l'ensemble\r\n\t\treturn new ArrayList<T>(map.values());\r\n\t}",
"public EfficientWordMarkov()\n\t{\n\t\tsuper();\n\t\tmyMap = new HashMap<WordGram , ArrayList<String>>();\n\t}",
"public HashMap<String, ArrayList<Counter<String>> > makeVectors(HashMap<String, ArrayList< List<String> > > hm) { \n HashMap<String, ArrayList<Counter<String>> > retHM = new HashMap<String, ArrayList<Counter<String>> >();\n for(String ID : hm.keySet() ){\n ArrayList<Counter<String>> tempVectList=new ArrayList<Counter<String>>();\n for(List<String> sentence : hm.get(ID) ){//loop through the list of sentences for that specific ID \n Counter<String> tempVect = new Counter<String>(); \n for(String word : sentence){//loop through the sentence\n tempVect.incrementCount(word,1.0);\n }\n tempVectList.add(tempVect);\n } \n retHM.put(ID,tempVectList);\n }\n return retHM;\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public MessageValidator(Map<Integer, List<Message>> messagesMap,\n Map<Integer, BankClient> bankDatabase) {\n this.messagesMap = messagesMap;\n this.bankDatabase = bankDatabase;\n }",
"public List<String> mapToList (String startWord, String endWord, Map<String, String> map){\n \tLinkedList<String> ladder = new LinkedList<String>();\n \tif(startWord.equals(endWord)){\n \t\tladder.add(startWord);\n \t\tladder.add(endWord);\n \t\treturn ladder;\n \t}\n \tladder.add(endWord);\n \tString word = endWord;\n \twhile(!word.equals(startWord)){\n \t\tString parent = map.get(word);\n \t\tladder.addFirst(parent);\n \t\tword = parent;\n \t}\n \treturn ladder;\n \t\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public Map() {\n\n\t\t}",
"public COSArrayList(COSDictionary dictionary, COSName dictionaryKey)\n {\n array = new COSArray();\n actual = new ArrayList<>();\n parentDict = dictionary;\n dictKey = dictionaryKey;\n }",
"protected MapImpl() {\n }",
"public List<String> lowercase(List<String> terms) {\r\n\t\tfor(String i : terms)\r\n\t\t\ti.toLowerCase();\r\n\t\treturn terms;\r\n\t}",
"public static HashMap<String, ArrayList<String>> copy(HashMap<String, ArrayList<String>> original) {\n\t\tHashMap<String, ArrayList<String>> copy = new HashMap<String, ArrayList<String>>();\r\n\t\tfor (Entry<String, ArrayList<String>> entry : original.entrySet()) {\r\n\t\t\tcopy.put(entry.getKey(), new ArrayList<String>(entry.getValue()));\r\n\t\t}\r\n\t\treturn copy;\r\n\t}",
"public static List<C3717i.C3719b> m18358a(Map<String, String> map) {\n if (map == null || map.isEmpty()) {\n return null;\n }\n try {\n Set<Map.Entry<String, String>> entrySet = map.entrySet();\n ArrayList arrayList = new ArrayList();\n for (Map.Entry<String, String> entry : entrySet) {\n arrayList.add(new C3717i.C3719b(entry.getKey(), entry.getValue()));\n }\n return arrayList;\n } catch (Throwable th) {\n th.printStackTrace();\n return null;\n }\n }",
"public MappedArgument(String label, int flags, V[] array,\n Map<String, V> valueMap, boolean caseInsensitive, String description) {\n super(label, flags, array, description);\n this.valueMap = valueMap;\n this.caseInsensitive = caseInsensitive;\n }",
"@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }",
"public Dictionary ( ArrayList < String > listOfWords ) {\n\t\tsuper(listOfWords.get((listOfWords.size()-1)/2));\n\t\t\n\t\t//store words list as binary tree\n\t\t//starts with left side then with right\n\t\tint start = 0;\n\t\tint end = listOfWords.size()-1;\n\t\tint mid = (start+end)/2;\n\t\tmakeTree(listOfWords, start, mid-1);\n\t\tmakeTree(listOfWords, mid+1, end);\n\t\t\n\t\t\n\t\t/**old code written by Professor below\n\t\t * \n\t\t */\n\t\t//words = listOfWords;\n\t\t//if (null == words) {\n\t\t//\twords = new ArrayList <String> ();\n\t\t//}\n\t\t\n\n\t\t\n\t}",
"public static HtmlSelectOneMenu getLookupList(String className) {\r\n\r\n\t\t// set up jsf components\r\n\t\tHtmlSelectOneMenu dropDown = new HtmlSelectOneMenu();\r\n\t\tUISelectItems items = new UISelectItems();\r\n\r\n\t\tList<SelectItem> lookupList = retrieveLookupList(className, true);\r\n\r\n\t\t// apply collection to JSF menu component\r\n\t\titems.setValue(lookupList);\r\n\t\tdropDown.getChildren().add(items);\r\n\r\n\t\treturn dropDown;\r\n\t}",
"private static void addEntriesToMap(\n\t\tMap<Character,Integer> map,String toSort, String poolOfOccurances\n\t\t){\n\n\t\t//Loop the toStort\n\t\tfor(int i=0;i<toSort.length();i++){\n\t\t\tmap.put(toSort.charAt(i),new Integer(getCharacterFrequence(toSort.charAt(i),poolOfOccurances)));\n\t\t}\n\n\t}",
"private SearchRegistryCriteria createCriteria(Map criteriaMap)\n {\n SearchRegistryCriteria criteria = new SearchRegistryCriteria();\n\n Object[] keys = criteriaMap.keySet().toArray();\n for (int i=0; i<keys.length; i++)\n {\n Logger.debug(\n \"[SubmitRegistrySearchAction.createCriteria] Setting field \"+keys[i] +\n \" to \"+criteriaMap.get(keys[i]));\n criteria.setFieldValue((Number)keys[i], criteriaMap.get(keys[i]));\n }\n\n return criteria;\n }",
"private void putElementsToComboBox(HashMap<String, Map<String, String>> projectsInfo) {\n\t\tfor ( String key : projectsInfo.keySet() ) {\n\t\t\tthis.comboBox.addItem(key);\n\t\t}\n\t}",
"public List findCtiyByCode(Map map) {\n\t\treturn apMessageDao.findCtiyByCode(map);\r\n\t}",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"public MyHashMap() {\n hashMap = new ArrayList<>();\n }",
"public TOrderedHashMap(final Map<? extends K, ? extends V> map) {\n\t\tthis(map.size());\n\t\tputAll(map);\n\t}",
"@Override\n\tpublic Multimap<String, List<String>> fileRecordsIntoMap(List<String> list) {\n\t\tMultimap<String, List<String>> multimap = ArrayListMultimap.create();\n\t\tCollections.sort(list);\n\t\tfor(String key :list)\n\t\t{\n\t\t\tkey=key.trim().toLowerCase();\n\t\t\tif(!key.isEmpty())\n\t\t\t{\n\t\t\t\tspaceRemover(key);\n\t\t\t\tString withoutSort=key;\n\t\t\t\tkey=sortString(key);\n\t\t\t\tmultimap = putIntoMAP(key , withoutSort, multimap);\n\t\t\t}\n\t\t}\n\t\treturn multimap;\n\t}",
"public MultiKeyMap() {\n this.map = new java.util.HashMap<String,V>();\n return;\n }",
"private ArrayList<String> simpleFormList(ArrayList<String> list){\n\t\tArrayList<String> simpleFormList = new ArrayList<String>();\n\t\tfor(String s : list){\n\t\t\tString pos = posMap.get(s);\n\t\t\tsimpleFormList.add(simpleForm(s,pos));\n\t\t}\n\t\treturn simpleFormList;\n\t}",
"public MyHashMap() {\n map = new ArrayList<>();\n for (int i = 0;i<255;i++)\n map.add(new Entry());\n }",
"public MapElement(int key) {\n this.key = key;\n }",
"@Override\n\tpublic List selectList3(Object map) {\n\t\treturn null;\n\t}",
"public ArrayMap() {\n this(DEFAULT_INITIAL_CAPACITY);\n }",
"public static Subject createWithMap(HashMap<String, String> map) {\n if (map.containsKey(MAP_ITEM_ID)) {\n Subject subject = SubjectManipulator.createItem(map);\n SubjectManipulator.add(subject);\n return subject;\n } else if (map.containsKey(MAP_CUSTOMER_ID)) {\n Subject subject = SubjectManipulator.createCustomer(map);\n SubjectManipulator.add(subject);\n return subject;\n } else if (map.containsKey(MAP_CATEGORY_ID)) {\n Subject subject = SubjectManipulator.createCategory(map);\n SubjectManipulator.add(subject);\n return subject;\n } else {\n LOGGER.warning(\"The map you gave was not valid, please make sure you haven't edited the map_id fields.\");\n return null;\n }\n }",
"private Criteria buildCriteria(Map<String, ?> fieldValues) {\r\n Criteria criteria = new Criteria();\r\n for (Iterator i = fieldValues.entrySet().iterator(); i.hasNext();) {\r\n Map.Entry<String, Object> e = (Map.Entry<String, Object>) i.next();\r\n\r\n String key = e.getKey();\r\n Object value = e.getValue();\r\n if (value instanceof Collection) {\r\n criteria.addIn(key, (Collection) value);\r\n } else {\r\n criteria.addEqualTo(key, value);\r\n }\r\n }\r\n\r\n return criteria;\r\n }",
"public CharCharMap(final char[] k, final char[] v) {\n this(k, v, DEFAULT_LOAD_FACTOR);\n }",
"@RequestMapping(\"/Subject/ListBySearch\")\n\t@ResponseBody\n\tpublic List<SubjectVo> getSubjectBySearch(@RequestParam HashMap<String, Object> map){\n\t\t\n\t\tSystem.out.println(map);\n\t\t\n\t\tList<SubjectVo> subjectList = subjectService.getSubjectBySearch(map); \n\t\t\n\t\tSystem.out.println(subjectList);\n\t\t\n\t\treturn subjectList;\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}",
"public EncodingMap() {}",
"MapListView(android.app.ListActivity activity) {\n m_activity = activity;\n initMapEngine();\n }",
"@Override\n\tpublic List selectList2(Object map) {\n\t\treturn null;\n\t}",
"private static <K extends Comparable<K>, V>\n ImmutableSortedMap<K, SortedSet<V>>\n copyMap(Map<K, ? extends SortedSet<V>> map) {\n final ImmutableSortedMap.Builder<K, SortedSet<V>> b =\n ImmutableSortedMap.naturalOrder();\n for (Map.Entry<K, ? extends SortedSet<V>> e : map.entrySet()) {\n b.put(e.getKey(), ImmutableSortedSet.copyOf(e.getValue()));\n }\n return b.build();\n }",
"public List<HashMap<String, Object>> codelist(HashMap<String, String> hashmapParam) {\n\t\treturn mapper.codelist(hashmapParam);\r\n\t}",
"public BasicElementList() {\n\t}",
"@Override\r\n public Iterable<V> vertices() {\r\n LinkedList<V> list = new LinkedList<>();\r\n for(V v : map.keySet())\r\n list.add(v);\r\n return list;\r\n }",
"public StrStrMap(Map<String, String> map) {\n this.map.putAll(map);\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"public List initProvince(Map map) {\n\t\treturn apMessageDao.initProvince(map);\r\n\t}",
"public List<Map<String, Object>> getKeYuanList(Map<String, Object> map);",
"public ArrayList<WordCode<K, V>> entrySet() {\n\t\tArrayList<WordCode<K, V>> entrySet = new ArrayList<>();\n\t\t\n\t\tfor (LinkedList<WordCode<K, V>> ll : myBuckets) {\n\t\t\tfor (WordCode<K, V> wc : ll) {\n\t\t\t\tentrySet.add(wc);\n\t\t\t}\n\t\t}\n\t\treturn entrySet;\n\t}",
"public static ArrayList wordLocate(TreeMap map, String word) {\r\n Set ref = map.keySet();\r\n Iterator it = ref.iterator();\r\n ArrayList list = new ArrayList();\r\n\r\n while (it.hasNext()) {\r\n Object o = it.next();\r\n if (map.get(o).equals(word)) {\r\n list.add(o);\r\n }\r\n }\r\n return list;\r\n }",
"public Kabasuji(ArrayList<Level> level){\n\t\tthis.levels = level;\n\t\t@SuppressWarnings(\"unused\")\n\t\tLevelSelection levelSec = new LevelSelection(level);\n\t}",
"private Set<String> getNames(Map<String, String> map) {\r\n\t\tSet<String> set = new HashSet<>();\r\n\t\t\r\n\t\tmap.forEach((k,v) -> set.add(k));\r\n\t\t\r\n\t\treturn Collections.unmodifiableSet(set);\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tMap<String, String> map = new HashMap<>();\n\t\t\n\t\tArrayList<String> lista = new ArrayList<>();\n\t\t\n\t\tString a = \"Juan\";\n\t\tString b = \"ObiJuan\";\n\t\tString c = \"Paco\";\n\t\t\n\t\tlista.add(a);\n\t\tlista.add(b);\n\t\tlista.add(c);\n\t\t\n\t\tmap.put(\"primero\", a);\n\t\tmap.put(\"segundo\", b);\n\t\tmap.put(\"tercero\", c);\n\t\t\n\t\tSystem.out.println(lista.get(1));\n\t\tSystem.out.println(lista.get(lista.indexOf(\"ObiJuan\")));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tSystem.out.println(map.get(\"primero\"));\n\t\t\n\t\tlista.remove(lista.indexOf(\"Paco\"));\n\t\t\n\t\t\n\t\tfor (String palabra : lista) {\n\t\t\tSystem.out.println(palabra);\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tfor (String key : map.keySet()) {\n\t\t\tSystem.out.println(\"Clave: \" + key);\n\t\t\tSystem.out.println(\"Valor: \" + map.get(key));\n\t\t\tSystem.out.println(\"----------------\");\n\t\t}\n\t\tSystem.out.println(\"----------------\");\n\t\tSystem.out.println(\"----------------\");\n\t\t\n\t\tlista.forEach(elemento -> System.out.println(elemento));\n\t\t\n\t\tSystem.out.println(\"----------------\");\n\t\t\n//\t\tmap.forEach(clave, valor -> (\n//\t\t\tSystem.out.println(\"Clave con lambda: \" + clave);\n//\t\t\tSystem.out.println(\"Valor con lambda: \" + valor);\n//\t\t);\n//\t\t\n\t}",
"ArgMapListRule createArgMapListRule();",
"public HashMapValueComparator() {\n\t\tsuper();\n\t}",
"public abstract void init(ArrayList<String> ary);",
"private void initialiseAcronymList(ArrayList<String> pAcronymList) {\n\t\tthis.acronymList = new HashSet<String>(pAcronymList);\t\t\n\t}",
"private void fillEntryLangMap(String p_termbaseId) throws Exception\n {\n Connection c = null;\n PreparedStatement ps = null;\n ResultSet rs = null;\n\n try\n {\n c = ConnectionPool.getConnection();\n ps = c.prepareStatement(TERM_ENTRY_LANG_QUERY);\n ps.setLong(1, Long.valueOf(p_termbaseId).longValue());\n rs = ps.executeQuery();\n m_map = new TreeMap();\n while (rs.next())\n {\n Long cid = new Long(rs.getLong(1));\n String name = rs.getString(2);\n HashSet set = (HashSet) m_map.get(cid);\n if (set == null)\n {\n set = new HashSet();\n m_map.put(cid, set);\n }\n set.add(name);\n }\n }\n finally\n {\n ConnectionPool.silentClose(rs);\n ConnectionPool.silentClose(ps);\n ConnectionPool.silentReturnConnection(c);\n }\n }"
]
| [
"0.8345722",
"0.6720241",
"0.6288552",
"0.61917335",
"0.6168879",
"0.61032194",
"0.5913862",
"0.5627215",
"0.5622196",
"0.54816484",
"0.5286173",
"0.5268971",
"0.5171335",
"0.5146623",
"0.49456856",
"0.48580518",
"0.47935748",
"0.4774257",
"0.47715345",
"0.47424",
"0.47223175",
"0.47127834",
"0.46991745",
"0.46833757",
"0.46734747",
"0.46380782",
"0.4620973",
"0.45603356",
"0.45581904",
"0.45554772",
"0.45342502",
"0.45275673",
"0.4509024",
"0.44944546",
"0.44906762",
"0.44824952",
"0.44721222",
"0.4454337",
"0.44531995",
"0.4444976",
"0.44388568",
"0.4423419",
"0.44152805",
"0.44139224",
"0.44107592",
"0.44102383",
"0.44017202",
"0.43869197",
"0.43551353",
"0.43545067",
"0.43493393",
"0.43420234",
"0.43312126",
"0.43295428",
"0.43274373",
"0.43181843",
"0.42824328",
"0.42723024",
"0.42558232",
"0.4240218",
"0.42400843",
"0.42396945",
"0.4235411",
"0.42351347",
"0.42312366",
"0.42304257",
"0.42276862",
"0.4226965",
"0.4224657",
"0.4220505",
"0.42198288",
"0.42072067",
"0.41875675",
"0.41832972",
"0.4177441",
"0.41768435",
"0.41750535",
"0.41691166",
"0.4167361",
"0.4165278",
"0.41631633",
"0.41627246",
"0.41557986",
"0.41518813",
"0.41516805",
"0.41475803",
"0.41458425",
"0.41455343",
"0.41361907",
"0.41311896",
"0.4128894",
"0.41283652",
"0.4127899",
"0.41249552",
"0.4122361",
"0.41167852",
"0.4114017",
"0.41115075",
"0.4110798",
"0.4102365"
]
| 0.77537906 | 1 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given Collection. | public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {
this(collection, null);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public T caseCollectionLiteralExpCS(CollectionLiteralExpCS object) {\r\n return null;\r\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"private LowercaseWordList() {\n\n }",
"<C> CollectionLiteralExp<C> createCollectionLiteralExp();",
"public CollectionFacadeSet(java.util.Collection<java.lang.String> collection) {\n this.collection = collection;\n for (String str : collection) {\n if (contains(str) || str == null) {\n continue;\n }\n add(str);\n }\n }",
"CollectionLiteralExp createCollectionLiteralExp();",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static <T> ConstList<T> make(Iterable<T> collection) {\n if (collection == null)\n return make();\n if (collection instanceof ConstList)\n return (ConstList<T>) collection;\n if (collection instanceof Collection) {\n Collection<T> col = (Collection<T>) collection;\n if (col.isEmpty())\n return make();\n else\n return new ConstList<T>(new ArrayList<T>(col));\n }\n ArrayList<T> ans = null;\n for (T x : collection) {\n if (ans == null)\n ans = new ArrayList<T>();\n ans.add(x);\n }\n if (ans == null)\n return make();\n else\n return new ConstList<T>(ans);\n }",
"public CirArrayList(Collection<? extends E> col) {\n // todo: collection constructor\n this();\n for( E thing : col)\n add(size(), thing);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public Collection() {\n this.collection = new ArrayList<>();\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"protected abstract Collection createCollection();",
"public T caseCollectionTypeLiteralExpCS(CollectionTypeLiteralExpCS object) {\r\n return null;\r\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Collection<T> compatibleWith(Collection<T> collection) {\n \ttry {\n \t\treturn (Collection<T>)collection.getClass().newInstance();\n \t} \n \tcatch (InstantiationException exception) {}\n \tcatch (IllegalAccessException exception) {}\n \treturn new ArrayList<T>();\n }",
"public T caseInCollectionElementsDeclaration(InCollectionElementsDeclaration object)\n {\n return null;\n }",
"public void AddLowercase(Locale culture)\n\t{\n\t\tint i;\n\t\tint origSize;\n\t\tSingleRange range;\n\n\t\t_canonical = false;\n\n\t\tfor (i = 0, origSize = _rangelist.size(); i < origSize; i++)\n\t\t{\n\t\t\trange = _rangelist.get(i);\n\t\t\tif (range._first == range._last)\n\t\t\t{\n\t\t\t\trange._first = range._last = Character.toLowerCase(range._first);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAddLowercaseRange(range._first, range._last, culture);\n\t\t\t}\n\t\t}\n\t}",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public static void init(){\n java.util.Collection<String> collection = new ArrayList<>();\n\n // List Implementation\n // use for ordered collection with duplicates\n // Items can be retrieved and inserted at specific positions (like array)\n //\n // ArrayList:\n // Grows automatically, lookup constant time, add/remove slower\n //\n // LinkedList:\n // Implements List and Queue, add/remove/access at start/end constant time\n // arbitrary index linear time, good if used like queue\n //\n // Vector:\n // Old class before ArrayList, same as ArrayList just slower but thread-safe, not really used\n //\n // Stack:\n // Add/remove from top of stack, extends Vector, not really used, instead ArrayDeque is used\n \n // Common List Methods\n // boolean add(E) | void add(int, E) | E get(int) | void remove(int) | E set(int, E)\n // int indexOf(Object) | int lastIndexOf(Object) - both return -1 if not found\n List<String> list = (List<String>) collection;\n\n // Loop through Collections\n // Old way without generic -> needs casting\n Iterator<String> iter = collection.iterator();\n while(iter.hasNext()){\n System.out.println(iter.next());\n }\n\n // Set Implementation\n // Stores in hash table using hashCode(), add/check constant time\n //\n // HashSet:\n // Groups elements inside buckets if same hashCode\n //\n // TreeSet:\n // In sorted tree structure, always in sorted order, add/check O(log n), implements NavigableSet\n // Looping through will print out in natural order\n\n // No new set methods but collection methods is different for sets (add() can return false)\n //\n // NavigableSet Interface:\n // E lower(E) - return greatest element < e, or null if no such element\n // E floor(E) - return greatest element <= e, ...\n // E ceiling(E) - return smallest element >= e, ...\n // E higher(E) - return smallest element > e, ...\n\n // Queue Implementation\n // Elements added/removed in specific order\n //\n // LinkedList:\n // Double-ended queue, implements List and Queue, not as efficient, has indexes\n //\n // ArrayDeque:\n // ‘pure’ double-ended queue, resizable array, more efficient\n\n // Common Queue Methods\n // Examine and Remove always head of queue\n // Insert always at end of queue\n //\n // Throws exception on failure\n // boolean add(E) | E element() | E remove()\n //\n // Returns special value (null) on failure\n // boolean offer(E) | E peek() | E poll();\n\n // Common ArrayDeque Methods\n // void push(E) | E pop() - throws exception when Empty\n\t\t//\t\tpop() and poll() return same values\n\t\t//\t\tpush() + pop/poll() = stack\n\t\t//\t\toffer() + pop/poll() = queue\n //\n // LinkedList like ArrayDeque\n\n // Map Implementation: (not implementing Collection)\n // Identify values by key\n //\n // HashMap:\n // Keys in hash table using hashCode(), add/retrieve constant time\n //\n // LinkedHashMap:\n // same as HashMap only with an order\n //\n // TreeMap:\n // Keys in sorted tree structure, always sorted, add/check O(log n)\n //\n // Hashtable:\n // Like Vector, old and thread-safe, newer version: HashMap\n\n // Common Map Methods, does not have Collection methods\n // void clear() | boolean isEmpty() | int size()\n //\n // V get(Object) return value mapped by key or null if none\n // V put(K, V) add or replace key/value pair, return previous value or null if none\n // V remove(Object) removes and return value mapped by key, null if none\n //\n // boolean containsKey(Object) | boolean containsValue(Object)\n // Set<K> keySet() | Collection<V> values()\n //\n // V merge(K, V, BiFunction<? super V, ? super V, ? extends V>) - BiFunction decides which value saved to key\n // If key does not exists or value == null -> new value will always be used, BiFunction not called\n // If BiFunction return null -> key will be removed from map\n\n // Sorted Type cannot contain null.\n // TreeMap no null keys, TreeSet no null values\n //\n // ArrayDeque no null values. Null values has special meaning\n // Hashtable no null values and keys. Just because. Too old.\n //\n // Else throws NullPointerException\n\n /* Searching and Sorting */\n List<Comparing> cList = new ArrayList<>();\n\n // If no Comparator specified, List type has to implement Comparable\n // else compiler error\n Collections.sort(cList);\n Collections.sort(cList, new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Same as sorting\n // Warning: unsorted list results in undefined values\n Collections.binarySearch(cList, new Comparing());\n Collections.binarySearch(cList, new Comparing(), new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Same applies to sorted collections like: TreeSet, TreeMap\n // Comparator can be passed to constructor\n Set<Comparing> tSet = new TreeSet<>(new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Throw ClassCastException when adding class that is not implementing Comparable\n tSet.add(new Comparing());\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public NodeListImpl(final Collection<Node> collection) {\n super();\n nodeList = new ArrayList<>(collection);\n }",
"public Collection() {\n }",
"public T caseCollectionLiteralPartsCS(CollectionLiteralPartsCS object) {\r\n return null;\r\n }",
"public static <T> List<T> createList(Collection<T> collection) {\n\t\treturn Collections.list(Collections.enumeration(collection));\n\t}",
"EnsembleLettre(Collection<? extends Character> c) {\n\t\tsuper(c);\n\t}",
"CollectionReferenceElement createCollectionReferenceElement();",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }",
"public final EObject entryRuleCollectionLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:6093:63: (iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF )\n // InternalMyDsl.g:6094:2: iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionLiteralExpCS=ruleCollectionLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public OCRSet(Collection<? extends E> c) {\r\n this.map =\r\n new HashMap<Integer, E>(Math.max((int) (c.size() / .75f) + 1,\r\n 16));\r\n this.addAll(c);\r\n }",
"public BasicElementList() {\n\t}",
"public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public WECollection()\n {\n }",
"public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }",
"protected List buildSearchResultList(Collection searchResultsCollection, Long actualSize) {\n CollectionIncomplete results = new CollectionIncomplete(searchResultsCollection, actualSize);\n\n // Sort list if default sort column given\n List searchResults = results;\n List defaultSortColumns = getDefaultSortColumns();\n if (defaultSortColumns.size() > 0) {\n Collections.sort(results, new BeanPropertyComparator(defaultSortColumns, true));\n }\n return searchResults;\n }",
"public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}",
"public TempList(Collection< ? extends T> all) {\n list = new ArrayList<T>(all);\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"ArrayList<String> createList(String finalInput);",
"public SmartList(Collection<? extends E> collection) {\n size = collection.size();\n\n if (collection.size() == 0) {\n storage = null;\n } else if (collection.size() == 1) {\n storage = collection.toArray()[0];\n } else if (collection.size() <= 5) {\n storage = collection.toArray();\n } else {\n storage = new ArrayList<>(collection);\n }\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}",
"public MultiStringColl() {\n c = null;\n how_many = 0;\n }",
"public T caseCollectionLiteralPartsOclExpCS(CollectionLiteralPartsOclExpCS object) {\r\n return null;\r\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"public LinkedListDemo(Collection<? extends E> c) {\r\n this();\r\n addAll(c);\r\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"@Test\n public void initializeFromAnotherCollectionWhenCreating() {\n List<Integer> lst1 = new ArrayList<>(List.of(3, 1, 2));\n assertThat(lst1).hasSize(3);\n\n // create and initialize an ArrayList from Arrays.asList\n List<Integer> lst2 = new ArrayList<>(Arrays.asList(3, 1, 2));\n assertThat(lst2).hasSize(3);\n\n // create and initialize an ArrayList from Java 9+ Set.of\n List<Integer> lst3 = new ArrayList<>(Set.of(5, 4, 6));\n assertThat(lst3).hasSize(3);\n\n // create and initialize from an existing collection\n List<Integer> lst4 = new ArrayList<>(lst3);\n assertThat(lst4).hasSize(3);\n }",
"private void addEmailsToAutoComplete(List<String> emailAddressCollection) {\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\n\t\t\t\tCertainActivity.this, android.R.layout.simple_dropdown_item_1line,\n\t\t\t\temailAddressCollection);\n\n\t}",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"private Collection<?> buildForEachCollection(final ExecutionContext executionContext)\n {\n String text = foreach.getTextTrim();\n if (text != null && text.startsWith(\"#{\"))\n {\n return evaluateForEachExpression(executionContext, text);\n }\n return (Collection<?>) FieldInstantiator.getValue(List.class, foreach);\n }",
"CollectionParameter createCollectionParameter();",
"public ArraySet(Collection<? extends E> c)\n {\n super(c);\n addsEnabled = false;\n }",
"public ArrayList(int initialCapacity) {\n\t\tthis(initialCapacity, 75);\n\t}",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"<C> CollectionItem<C> createCollectionItem();",
"public StringList(int capacity) {\n super(capacity);\n }",
"public Collection(char colour) { /* ... code ... */ }",
"private void addEmailsToAutoComplete(List<String> emailAddressCollection) {\n ArrayAdapter<String> adapter =\n new ArrayAdapter<>(Screen_open.this,\n android.R.layout.simple_dropdown_item_1line, emailAddressCollection);\n }",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public static <E, C extends Collection<E>> SynchronizedMutableCollection<E> of(C collection)\n {\n return new SynchronizedMutableCollection<E>(CollectionAdapter.adapt(collection));\n }",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public List<AEIdecl> getAEIsFromNames(Collection<String> collection, \r\n\t\t\tArchiElemInstances archiElemInstances)\r\n\t\t\tthrows RestrizioniSpecException \r\n\t\t{\r\n\t\tList<AEIdecl> list2 = new ArrayList<AEIdecl>();\r\n\t\tAEIdecl[] idecls = archiElemInstances.getAEIdeclSeq();\r\n\t\tfor (String string : collection)\r\n\t\t\t{\r\n\t\t\tboolean b = false;\r\n\t\t\tfor (int i = 0; i <idecls.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = idecls[i].getName();\r\n\t\t\t\tif (string.equals(string2))\r\n\t\t\t\t\t{\r\n\t\t\t\t\tb = true;\r\n\t\t\t\t\tlist2.add(idecls[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (!b) throw new RestrizioniSpecException(string+\" is not found\");\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}",
"public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"public final EObject entryRuleCollectionPatternCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionPatternCS = null;\n\n\n try {\n // InternalMyDsl.g:6270:60: (iv_ruleCollectionPatternCS= ruleCollectionPatternCS EOF )\n // InternalMyDsl.g:6271:2: iv_ruleCollectionPatternCS= ruleCollectionPatternCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionPatternCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionPatternCS=ruleCollectionPatternCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionPatternCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public MultiStringColl(int i) {\n c = null;\n how_many = 0;\n }",
"public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }",
"static List<SubstantiveParametersParameterItem> createSubstantiveParametersParameterItem(List<String> collectionOfItems) {\n List<SubstantiveParametersParameterItem> substantiveParametersParameterItemList = new ArrayList<>();\n for (String item: collectionOfItems) {\n substantiveParametersParameterItemList.add(new SubstantiveParametersParameterItem(item));\n }\n return substantiveParametersParameterItemList;\n }",
"Collection<?> create(int initialCapacity);",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public OntologyListView(Collection<Ontology> collection, JComponent parentComponent) {\n super(collection,parentComponent);\n }",
"public /* synthetic */ Checks(Collection collection, Check[] checkArr, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this((Collection<Name>) collection, checkArr, (Function1<? super FunctionDescriptor, String>) (i & 4) != 0 ? C33784.INSTANCE : function1);\n }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public ArrayList() {\n\t\tthis(10, 75);\n\t}",
"public void buildFromCollection(List<? extends T> source) {\r\n\t\tsource.stream()\r\n\t\t\t\t.forEach(item -> addElement(item));\r\n\t}",
"public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }",
"public CollectionComparator(Method attributeCaller, boolean descending)\n\t{\n\t\tthis.attributeCaller = attributeCaller;\n\t\tthis.descending = descending;\n\t}",
"public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }",
"public abstract void init(ArrayList<String> ary);",
"public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"public static <T> List<T> adaptCollection(Collection<?> collection, Class<T> klass)\n {\n List<T> r = new ArrayList<T>();\n \n for(Object o : collection)\n {\n T t = adapt(o, klass);\n if(t != null)\n {\n r.add(t);\n }\n }\n \n return r;\n }"
]
| [
"0.7844025",
"0.7030773",
"0.64288473",
"0.638246",
"0.63713044",
"0.62004685",
"0.5912249",
"0.57512826",
"0.57318676",
"0.5638921",
"0.5559636",
"0.5534602",
"0.54699206",
"0.54523027",
"0.54483294",
"0.53427994",
"0.53152066",
"0.5307068",
"0.5300681",
"0.5276841",
"0.5183194",
"0.51769",
"0.51551414",
"0.5113185",
"0.5009392",
"0.500545",
"0.49803734",
"0.49565408",
"0.4941031",
"0.49371973",
"0.4915441",
"0.48989064",
"0.4889837",
"0.48541865",
"0.485224",
"0.48401242",
"0.48268393",
"0.4823175",
"0.47929594",
"0.4786729",
"0.47743177",
"0.47591445",
"0.47468114",
"0.47373497",
"0.47223806",
"0.47221753",
"0.4719605",
"0.47087955",
"0.46858606",
"0.46442693",
"0.46368283",
"0.46247748",
"0.46237743",
"0.46227902",
"0.4617771",
"0.46133125",
"0.4611607",
"0.46101967",
"0.46080846",
"0.4601703",
"0.4566722",
"0.45468718",
"0.45461023",
"0.45430356",
"0.4538772",
"0.45320576",
"0.45287326",
"0.45281774",
"0.4512265",
"0.45084816",
"0.4489639",
"0.44849533",
"0.448291",
"0.44819158",
"0.44775328",
"0.44769672",
"0.4476512",
"0.44723573",
"0.4449507",
"0.44390926",
"0.44326144",
"0.4414488",
"0.4410529",
"0.43985245",
"0.43947327",
"0.43897665",
"0.43853578",
"0.4381656",
"0.43786097",
"0.4372493",
"0.4371226",
"0.43680614",
"0.43651676",
"0.43647572",
"0.4362382",
"0.43518138",
"0.4349118",
"0.43485278",
"0.43440023",
"0.43437126"
]
| 0.8447048 | 0 |
Constructs a new CaseInsensitiveElementList seeded with the elements in the given Collection. | public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {
this(locale);
addAll(collection);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public T caseCollectionLiteralExpCS(CollectionLiteralExpCS object) {\r\n return null;\r\n }",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"private LowercaseWordList() {\n\n }",
"<C> CollectionLiteralExp<C> createCollectionLiteralExp();",
"public CollectionFacadeSet(java.util.Collection<java.lang.String> collection) {\n this.collection = collection;\n for (String str : collection) {\n if (contains(str) || str == null) {\n continue;\n }\n add(str);\n }\n }",
"CollectionLiteralExp createCollectionLiteralExp();",
"public static List<String> getMatches(String value, Collection<String> list, boolean caseInsensitive) {\n List<String> result = new LinkedList<>();\n\n for (String str : list) {\n if (str.startsWith(value.toLowerCase())\n || (caseInsensitive && str.toLowerCase().startsWith(value.toLowerCase()))) {\n result.add(str);\n }\n }\n\n return result;\n }",
"public static <T> ConstList<T> make(Iterable<T> collection) {\n if (collection == null)\n return make();\n if (collection instanceof ConstList)\n return (ConstList<T>) collection;\n if (collection instanceof Collection) {\n Collection<T> col = (Collection<T>) collection;\n if (col.isEmpty())\n return make();\n else\n return new ConstList<T>(new ArrayList<T>(col));\n }\n ArrayList<T> ans = null;\n for (T x : collection) {\n if (ans == null)\n ans = new ArrayList<T>();\n ans.add(x);\n }\n if (ans == null)\n return make();\n else\n return new ConstList<T>(ans);\n }",
"public CirArrayList(Collection<? extends E> col) {\n // todo: collection constructor\n this();\n for( E thing : col)\n add(size(), thing);\n }",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public Collection() {\n this.collection = new ArrayList<>();\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"protected abstract Collection createCollection();",
"public T caseCollectionTypeLiteralExpCS(CollectionTypeLiteralExpCS object) {\r\n return null;\r\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Collection<T> compatibleWith(Collection<T> collection) {\n \ttry {\n \t\treturn (Collection<T>)collection.getClass().newInstance();\n \t} \n \tcatch (InstantiationException exception) {}\n \tcatch (IllegalAccessException exception) {}\n \treturn new ArrayList<T>();\n }",
"public T caseInCollectionElementsDeclaration(InCollectionElementsDeclaration object)\n {\n return null;\n }",
"public void AddLowercase(Locale culture)\n\t{\n\t\tint i;\n\t\tint origSize;\n\t\tSingleRange range;\n\n\t\t_canonical = false;\n\n\t\tfor (i = 0, origSize = _rangelist.size(); i < origSize; i++)\n\t\t{\n\t\t\trange = _rangelist.get(i);\n\t\t\tif (range._first == range._last)\n\t\t\t{\n\t\t\t\trange._first = range._last = Character.toLowerCase(range._first);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAddLowercaseRange(range._first, range._last, culture);\n\t\t\t}\n\t\t}\n\t}",
"public WCollection(String elementObjectClassName)\n\t{\n\t\tm_elementObjectClassName = elementObjectClassName;\n\t}",
"public static void init(){\n java.util.Collection<String> collection = new ArrayList<>();\n\n // List Implementation\n // use for ordered collection with duplicates\n // Items can be retrieved and inserted at specific positions (like array)\n //\n // ArrayList:\n // Grows automatically, lookup constant time, add/remove slower\n //\n // LinkedList:\n // Implements List and Queue, add/remove/access at start/end constant time\n // arbitrary index linear time, good if used like queue\n //\n // Vector:\n // Old class before ArrayList, same as ArrayList just slower but thread-safe, not really used\n //\n // Stack:\n // Add/remove from top of stack, extends Vector, not really used, instead ArrayDeque is used\n \n // Common List Methods\n // boolean add(E) | void add(int, E) | E get(int) | void remove(int) | E set(int, E)\n // int indexOf(Object) | int lastIndexOf(Object) - both return -1 if not found\n List<String> list = (List<String>) collection;\n\n // Loop through Collections\n // Old way without generic -> needs casting\n Iterator<String> iter = collection.iterator();\n while(iter.hasNext()){\n System.out.println(iter.next());\n }\n\n // Set Implementation\n // Stores in hash table using hashCode(), add/check constant time\n //\n // HashSet:\n // Groups elements inside buckets if same hashCode\n //\n // TreeSet:\n // In sorted tree structure, always in sorted order, add/check O(log n), implements NavigableSet\n // Looping through will print out in natural order\n\n // No new set methods but collection methods is different for sets (add() can return false)\n //\n // NavigableSet Interface:\n // E lower(E) - return greatest element < e, or null if no such element\n // E floor(E) - return greatest element <= e, ...\n // E ceiling(E) - return smallest element >= e, ...\n // E higher(E) - return smallest element > e, ...\n\n // Queue Implementation\n // Elements added/removed in specific order\n //\n // LinkedList:\n // Double-ended queue, implements List and Queue, not as efficient, has indexes\n //\n // ArrayDeque:\n // ‘pure’ double-ended queue, resizable array, more efficient\n\n // Common Queue Methods\n // Examine and Remove always head of queue\n // Insert always at end of queue\n //\n // Throws exception on failure\n // boolean add(E) | E element() | E remove()\n //\n // Returns special value (null) on failure\n // boolean offer(E) | E peek() | E poll();\n\n // Common ArrayDeque Methods\n // void push(E) | E pop() - throws exception when Empty\n\t\t//\t\tpop() and poll() return same values\n\t\t//\t\tpush() + pop/poll() = stack\n\t\t//\t\toffer() + pop/poll() = queue\n //\n // LinkedList like ArrayDeque\n\n // Map Implementation: (not implementing Collection)\n // Identify values by key\n //\n // HashMap:\n // Keys in hash table using hashCode(), add/retrieve constant time\n //\n // LinkedHashMap:\n // same as HashMap only with an order\n //\n // TreeMap:\n // Keys in sorted tree structure, always sorted, add/check O(log n)\n //\n // Hashtable:\n // Like Vector, old and thread-safe, newer version: HashMap\n\n // Common Map Methods, does not have Collection methods\n // void clear() | boolean isEmpty() | int size()\n //\n // V get(Object) return value mapped by key or null if none\n // V put(K, V) add or replace key/value pair, return previous value or null if none\n // V remove(Object) removes and return value mapped by key, null if none\n //\n // boolean containsKey(Object) | boolean containsValue(Object)\n // Set<K> keySet() | Collection<V> values()\n //\n // V merge(K, V, BiFunction<? super V, ? super V, ? extends V>) - BiFunction decides which value saved to key\n // If key does not exists or value == null -> new value will always be used, BiFunction not called\n // If BiFunction return null -> key will be removed from map\n\n // Sorted Type cannot contain null.\n // TreeMap no null keys, TreeSet no null values\n //\n // ArrayDeque no null values. Null values has special meaning\n // Hashtable no null values and keys. Just because. Too old.\n //\n // Else throws NullPointerException\n\n /* Searching and Sorting */\n List<Comparing> cList = new ArrayList<>();\n\n // If no Comparator specified, List type has to implement Comparable\n // else compiler error\n Collections.sort(cList);\n Collections.sort(cList, new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Same as sorting\n // Warning: unsorted list results in undefined values\n Collections.binarySearch(cList, new Comparing());\n Collections.binarySearch(cList, new Comparing(), new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Same applies to sorted collections like: TreeSet, TreeMap\n // Comparator can be passed to constructor\n Set<Comparing> tSet = new TreeSet<>(new Comparator<Comparing>() {\n public int compare(Comparing t1, Comparing t2){ return 0; }\n });\n\n // Throw ClassCastException when adding class that is not implementing Comparable\n tSet.add(new Comparing());\n }",
"public ArrayList<Character> charToLower(ArrayList<Character> list){\n ArrayList<Character> lower = new ArrayList<>();\n for(Character x: list){\n x = Character.toLowerCase(x);\n lower.add(x);\n }\n return lower;\n }",
"public NodeListImpl(final Collection<Node> collection) {\n super();\n nodeList = new ArrayList<>(collection);\n }",
"public Collection() {\n }",
"public T caseCollectionLiteralPartsCS(CollectionLiteralPartsCS object) {\r\n return null;\r\n }",
"public static <T> List<T> createList(Collection<T> collection) {\n\t\treturn Collections.list(Collections.enumeration(collection));\n\t}",
"EnsembleLettre(Collection<? extends Character> c) {\n\t\tsuper(c);\n\t}",
"CollectionReferenceElement createCollectionReferenceElement();",
"public MyArrayList() {\n this(DEFAULT_CAP);\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList(int initialCap) {\n list = (E[])new Object[0];\n capacity = initialCap;\n size = 0;\n }",
"public final EObject entryRuleCollectionLiteralExpCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionLiteralExpCS = null;\n\n\n try {\n // InternalMyDsl.g:6093:63: (iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF )\n // InternalMyDsl.g:6094:2: iv_ruleCollectionLiteralExpCS= ruleCollectionLiteralExpCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionLiteralExpCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionLiteralExpCS=ruleCollectionLiteralExpCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionLiteralExpCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"ArrayListOfStrings () {\n list = new ArrayList<String>();\n }",
"public OCRSet(Collection<? extends E> c) {\r\n this.map =\r\n new HashMap<Integer, E>(Math.max((int) (c.size() / .75f) + 1,\r\n 16));\r\n this.addAll(c);\r\n }",
"public BasicElementList() {\n\t}",
"public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}",
"public WECollection()\n {\n }",
"public CaseInsensitiveDictionary() {\n words = new HashSet<>();\n }",
"public <E> Collection<E> mo8156u(Collection<E> collection) {\n return Collections.unmodifiableList((List) collection);\n }",
"protected List buildSearchResultList(Collection searchResultsCollection, Long actualSize) {\n CollectionIncomplete results = new CollectionIncomplete(searchResultsCollection, actualSize);\n\n // Sort list if default sort column given\n List searchResults = results;\n List defaultSortColumns = getDefaultSortColumns();\n if (defaultSortColumns.size() > 0) {\n Collections.sort(results, new BeanPropertyComparator(defaultSortColumns, true));\n }\n return searchResults;\n }",
"public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}",
"public TempList(Collection< ? extends T> all) {\n list = new ArrayList<T>(all);\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public SmartList(Collection<? extends E> collection) {\n size = collection.size();\n\n if (collection.size() == 0) {\n storage = null;\n } else if (collection.size() == 1) {\n storage = collection.toArray()[0];\n } else if (collection.size() <= 5) {\n storage = collection.toArray();\n } else {\n storage = new ArrayList<>(collection);\n }\n }",
"ArrayList<String> createList(String finalInput);",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList1() {\n\t\telements = (E[]) new Object[CAPACITY];\n\t\tsize = 0;\n\t}",
"public MultiStringColl() {\n c = null;\n how_many = 0;\n }",
"public T caseCollectionLiteralPartsOclExpCS(CollectionLiteralPartsOclExpCS object) {\r\n return null;\r\n }",
"public LinkedListDemo(Collection<? extends E> c) {\r\n this();\r\n addAll(c);\r\n }",
"public static Comparator<CharSequence> charSequenceComparator(boolean caseInsensitive) {\n return caseInsensitive ? CharSequenceComparator.INSENSITIVE : CharSequenceComparator.SENSITIVE;\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"@Test\n public void initializeFromAnotherCollectionWhenCreating() {\n List<Integer> lst1 = new ArrayList<>(List.of(3, 1, 2));\n assertThat(lst1).hasSize(3);\n\n // create and initialize an ArrayList from Arrays.asList\n List<Integer> lst2 = new ArrayList<>(Arrays.asList(3, 1, 2));\n assertThat(lst2).hasSize(3);\n\n // create and initialize an ArrayList from Java 9+ Set.of\n List<Integer> lst3 = new ArrayList<>(Set.of(5, 4, 6));\n assertThat(lst3).hasSize(3);\n\n // create and initialize from an existing collection\n List<Integer> lst4 = new ArrayList<>(lst3);\n assertThat(lst4).hasSize(3);\n }",
"private void addEmailsToAutoComplete(List<String> emailAddressCollection) {\n\t\tArrayAdapter<String> adapter = new ArrayAdapter<String>(\n\t\t\t\tCertainActivity.this, android.R.layout.simple_dropdown_item_1line,\n\t\t\t\temailAddressCollection);\n\n\t}",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"private Collection<?> buildForEachCollection(final ExecutionContext executionContext)\n {\n String text = foreach.getTextTrim();\n if (text != null && text.startsWith(\"#{\"))\n {\n return evaluateForEachExpression(executionContext, text);\n }\n return (Collection<?>) FieldInstantiator.getValue(List.class, foreach);\n }",
"CollectionParameter createCollectionParameter();",
"public ArraySet(Collection<? extends E> c)\n {\n super(c);\n addsEnabled = false;\n }",
"public ArrayList(int initialCapacity) {\n\t\tthis(initialCapacity, 75);\n\t}",
"public ArrayList() {\n elements = new Object[DEFAULT_CAPACITY];\n }",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"ListItem(Element[] elements) {\n\t\tsuper(elements);\n\t}",
"<C> CollectionItem<C> createCollectionItem();",
"public StringList(int capacity) {\n super(capacity);\n }",
"public Collection(char colour) { /* ... code ... */ }",
"private void addEmailsToAutoComplete(List<String> emailAddressCollection) {\n ArrayAdapter<String> adapter =\n new ArrayAdapter<>(Screen_open.this,\n android.R.layout.simple_dropdown_item_1line, emailAddressCollection);\n }",
"public static <E, C extends Collection<E>> SynchronizedMutableCollection<E> of(C collection)\n {\n return new SynchronizedMutableCollection<E>(CollectionAdapter.adapt(collection));\n }",
"public ArrayList(int initCapacity) {\n elements = new Object[initCapacity];\n }",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public List<AEIdecl> getAEIsFromNames(Collection<String> collection, \r\n\t\t\tArchiElemInstances archiElemInstances)\r\n\t\t\tthrows RestrizioniSpecException \r\n\t\t{\r\n\t\tList<AEIdecl> list2 = new ArrayList<AEIdecl>();\r\n\t\tAEIdecl[] idecls = archiElemInstances.getAEIdeclSeq();\r\n\t\tfor (String string : collection)\r\n\t\t\t{\r\n\t\t\tboolean b = false;\r\n\t\t\tfor (int i = 0; i <idecls.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = idecls[i].getName();\r\n\t\t\t\tif (string.equals(string2))\r\n\t\t\t\t\t{\r\n\t\t\t\t\tb = true;\r\n\t\t\t\t\tlist2.add(idecls[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\tif (!b) throw new RestrizioniSpecException(string+\" is not found\");\r\n\t\t\t}\r\n\t\treturn list2;\r\n\t\t}",
"public AbstractHashSet(Collection c) {\n\t\tmap = new DelegateAbstractHashMap(Math.max((int) (c.size() / .75f) + 1,\n\t\t\t\t16), this);\n\t\taddAll(c);\n\t}",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"public final EObject entryRuleCollectionPatternCS() throws RecognitionException {\n EObject current = null;\n\n EObject iv_ruleCollectionPatternCS = null;\n\n\n try {\n // InternalMyDsl.g:6270:60: (iv_ruleCollectionPatternCS= ruleCollectionPatternCS EOF )\n // InternalMyDsl.g:6271:2: iv_ruleCollectionPatternCS= ruleCollectionPatternCS EOF\n {\n if ( state.backtracking==0 ) {\n newCompositeNode(grammarAccess.getCollectionPatternCSRule()); \n }\n pushFollow(FOLLOW_1);\n iv_ruleCollectionPatternCS=ruleCollectionPatternCS();\n\n state._fsp--;\n if (state.failed) return current;\n if ( state.backtracking==0 ) {\n current =iv_ruleCollectionPatternCS; \n }\n match(input,EOF,FOLLOW_2); if (state.failed) return current;\n\n }\n\n }\n\n catch (RecognitionException re) {\n recover(input,re);\n appendSkippedTokens();\n }\n finally {\n }\n return current;\n }",
"public MultiStringColl(int i) {\n c = null;\n how_many = 0;\n }",
"public Collection()\n {\n // initialisation des variables d'instance\n documents = new ArrayList<>();\n }",
"@SuppressWarnings(\"unchecked\")\n public ArrayList() {\n list = (E[])new Object[DEFAULT_CAP];\n capacity = 10;\n size = 0;\n }",
"static List<SubstantiveParametersParameterItem> createSubstantiveParametersParameterItem(List<String> collectionOfItems) {\n List<SubstantiveParametersParameterItem> substantiveParametersParameterItemList = new ArrayList<>();\n for (String item: collectionOfItems) {\n substantiveParametersParameterItemList.add(new SubstantiveParametersParameterItem(item));\n }\n return substantiveParametersParameterItemList;\n }",
"Collection<?> create(int initialCapacity);",
"public ElementIterator(List l) {\n\t myList = l;\n\t }",
"public OntologyListView(Collection<Ontology> collection, JComponent parentComponent) {\n super(collection,parentComponent);\n }",
"public /* synthetic */ Checks(Collection collection, Check[] checkArr, Function1 function1, int i, DefaultConstructorMarker defaultConstructorMarker) {\n this((Collection<Name>) collection, checkArr, (Function1<? super FunctionDescriptor, String>) (i & 4) != 0 ? C33784.INSTANCE : function1);\n }",
"public ArrayList() {\n\t\tthis(10, 75);\n\t}",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public void buildFromCollection(List<? extends T> source) {\r\n\t\tsource.stream()\r\n\t\t\t\t.forEach(item -> addElement(item));\r\n\t}",
"public ArrayList() { // constructs list with default capacity\n this(CAPACITY);\n }",
"public CollectionComparator(Method attributeCaller, boolean descending)\n\t{\n\t\tthis.attributeCaller = attributeCaller;\n\t\tthis.descending = descending;\n\t}",
"public void setCaseList() {\n ResultSet rs = Business.getInstance().getData().getAllCases();\n try {\n while (rs.next()) {\n allCases.add(new Case(rs.getInt(\"caseid\"),\n rs.getString(\"case_directory\"),\n rs.getString(\"creation_date\"),\n rs.getString(\"cpr\"),\n rs.getBoolean(\"is_active\")));\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"protected Collection createCollectionMatchingType(MappingContext mappingContext) {\n Class<?> collectionType = mappingContext.getTypeInformation().getSafeToWriteClass();\n if (collectionType.isAssignableFrom(ArrayList.class)) {\n return new ArrayList();\n } else if (collectionType.isAssignableFrom(LinkedHashSet.class)) {\n return new LinkedHashSet();\n } else {\n throw new ConfigMeMapperException(mappingContext, \"Unsupported collection type '\" + collectionType + \"'\");\n }\n }",
"public static void main(String[] args) {\n //Generic Version of Collection\n ArrayList<String> arrayList = new ArrayList<>();\n arrayList.add(\"Deepak\");\n arrayList.add(\"Kumar\");\n arrayList.add(\"Hello\");\n arrayList.add(\"Sandeep\");\n System.out.println(\"Collection Before Array Conversion=\" + arrayList);\n String[] names = new String[arrayList.size()];\n arrayList.toArray(names);\n System.out.println(\"Array After Conversion From Collection\");\n for (int i = 0; i < names.length; i++) {\n System.out.println(names[i]);\n }\n //Collection Normal Version\n ArrayList arrayList1 = new ArrayList<>();\n arrayList1.add(\"Deepak\");\n arrayList1.add('a');\n arrayList1.add(1);\n arrayList1.add(10.9f);\n arrayList1.add(10.90);\n arrayList1.add(true);\n\n\n System.out.println(\"Normal Colection without Conversion\"+arrayList1);\n Object[] object = arrayList1.toArray();\n\n System.out.println(\"Array After Conversion From Normal Collection\");\n for (int i = 0; i < object.length; i++) {\n System.out.println(object[i]);\n }\n\n ///Array to Collection Conversion\n String[] names1 = new String[]{\"Deepak\",\"Kuldeep\",\"Sandeep\",\"Pardeep\"};\n ArrayList<String> namesCollection = new ArrayList(Arrays.asList(names1));\n System.out.println(namesCollection);\n\n\n }",
"public abstract void init(ArrayList<String> ary);",
"public List(){\n\t\tthis(\"list\", new DefaultComparator());\n\t}",
"private CollectionUtils() {\n\n\t}"
]
| [
"0.84462655",
"0.70306075",
"0.64293265",
"0.6383856",
"0.6371718",
"0.62011397",
"0.59124494",
"0.57511127",
"0.5731856",
"0.5639992",
"0.55594414",
"0.5537056",
"0.54700744",
"0.545233",
"0.5448276",
"0.5342515",
"0.5313591",
"0.5307793",
"0.5302373",
"0.5276656",
"0.51827776",
"0.5178713",
"0.515486",
"0.5115054",
"0.5009251",
"0.5007045",
"0.4979464",
"0.4956268",
"0.49435782",
"0.49378765",
"0.49131855",
"0.48999184",
"0.4891626",
"0.48545596",
"0.485301",
"0.48404342",
"0.48279884",
"0.48240653",
"0.47938094",
"0.4787225",
"0.4774066",
"0.4761255",
"0.47474653",
"0.47377396",
"0.47237307",
"0.47233602",
"0.47197437",
"0.47097197",
"0.4687245",
"0.46454096",
"0.4633646",
"0.46259177",
"0.4624417",
"0.4623724",
"0.46194476",
"0.46138635",
"0.46117634",
"0.46114647",
"0.4609192",
"0.46029392",
"0.45676756",
"0.4545013",
"0.4544984",
"0.45431966",
"0.453938",
"0.4533544",
"0.45310116",
"0.45289677",
"0.45121124",
"0.45095596",
"0.44921672",
"0.44865775",
"0.44849563",
"0.44827428",
"0.44783258",
"0.44779128",
"0.44767776",
"0.44705454",
"0.44514456",
"0.44401425",
"0.44332135",
"0.441649",
"0.44127813",
"0.43993002",
"0.43956718",
"0.43922204",
"0.4385433",
"0.43835357",
"0.4379284",
"0.4373637",
"0.4373513",
"0.43699697",
"0.43669996",
"0.43669128",
"0.43625006",
"0.43535638",
"0.4348088",
"0.4348031",
"0.43449432",
"0.43444148"
]
| 0.78434205 | 1 |
Sets the locale to use for case comparison. | protected void setLocale(Locale locale) {
this.locale = LocaleHelper.normalize(locale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLocale (\r\n String strLocale) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void setPreferredLocale(Locale locale);",
"public void setLocale(Locale locale) {\n fLocale = locale;\n }",
"public void setRequestedLocale(final Locale val) {\n requestedLocale = val;\n }",
"@Override\n\tpublic void setLocale(Locale loc) {\n\t}",
"public void setLocale(Locale locale)\n {\n this.locale = locale;\n }",
"public void setLocale(String locale) {\n locale = fixLocale(locale);\n this.locale = locale;\n this.uLocale = new ULocale(locale);\n String lang = uLocale.getLanguage();\n if (locale.equals(\"fr_CA\") || lang.equals(\"en\")) {\n throw new RuntimeException(\"Skipping \" + locale);\n }\n cldrFile = cldrFactory.make(locale, false);\n UnicodeSet exemplars = cldrFile.getExemplarSet(\"\",WinningChoice.WINNING);\n usesLatin = exemplars != null && exemplars.containsSome(LATIN_SCRIPT);\n for (DataHandler dataHandler : dataHandlers) {\n dataHandler.reset(cldrFile);\n }\n }",
"@Override\n public void setLocale(Locale arg0) {\n\n }",
"public void setLocale(Locale locale) {\n\n\t}",
"public final void setLocale( Locale locale )\n {\n }",
"public void setLocale(Locale l) {\n if (!initialized)\n super.setLocale(l);\n else {\n locale = l;\n initNames();\n }\n }",
"protected void setLocale(Locale locale) {\n this.locale = locale;\n }",
"public void setLocale(Locale locale) {\r\n this.locale = locale;\r\n }",
"@Override\n public void setLocale(Locale arg0) {\n //\n if (log4j.isDebugEnabled()) {log4j.debug(BaseMessages.getString(PKG, \"MVSFileParser.DEBUG.Ignore.Locale\"));} //$NON-NLS-1$\n }",
"public XMLString toLowerCase(Locale locale) {\n/* 687 */ return new XMLStringDefault(this.m_str.toLowerCase(locale));\n/* */ }",
"public void setLocale(Locale locale) {\n this.locale = locale;\n }",
"public void setLocale(Locale locale) {\n this.locale = locale;\n }",
"@BeforeEach\n public void setUp() throws Exception\n {\n \tLocale.setDefault( Locale.ENGLISH );\n }",
"protected void setLocale(Locale locale) {\n this.locale = locale;\n }",
"public static void setLocale(Locale newLocale) {\n if (newLocale == null) {\n newLocale = Locale.getDefault();\n }\n localeInfo.set(newLocale);\n }",
"void setCaseSensitive(int value);",
"public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }",
"public void setLocale(String value) {\n setAttributeInternal(LOCALE, value);\n }",
"private void setLocale() {\n\t\tLocale locale = new Locale(this.getString(R.string.default_map_locale));\n Locale.setDefault(locale);\n Configuration config = new Configuration();\n config.locale = locale;\n getBaseContext().getResources().updateConfiguration(config,\n getBaseContext().getResources().getDisplayMetrics());\n\t}",
"public void setLocale(String locale)\n\t\t{\n\t\t this.setLocaleLocked(locale);\n\t\t}",
"public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}",
"public static void initialSystemLocale(Context context)\n {\n LogpieSystemSetting setting = LogpieSystemSetting.getInstance(context);\n if (setting.getSystemSetting(KEY_LANGUAGE) == null)\n {\n String mLanguage = Locale.getDefault().getLanguage();\n if (mLanguage.equals(Locale.CHINA) || mLanguage.equals(Locale.CHINESE))\n {\n setting.setSystemSetting(KEY_LANGUAGE, CHINESE);\n }\n else\n {\n setting.setSystemSetting(KEY_LANGUAGE, ENGLISH);\n }\n }\n }",
"protected void localeChanged() {\n\t}",
"public void setLocale(Locale locale) {\n/* 462 */ ParamChecks.nullNotPermitted(locale, \"locale\");\n/* 463 */ this.locale = locale;\n/* 464 */ setStandardTickUnits(createStandardDateTickUnits(this.timeZone, this.locale));\n/* */ \n/* 466 */ fireChangeEvent();\n/* */ }",
"protected String setlocale(String locale, String category) {\n\t\treturn \"C\";\n\t}",
"public void setIgnoreCase(boolean ignoreCase)\r\n\t{\r\n\t\tsm.setIgnoreCase(ignoreCase);\r\n\t}",
"java.lang.String getLocale();",
"public void setCaseSensitive(final boolean theCase) {\n this.caseSensitive = theCase;\n }",
"public void setLocale(Locale loc) {\n this.response.setLocale(loc);\n }",
"public void setLocale(Locale locale)\n throws SAXException\n {\n if (\"en\".equals(locale.getLanguage()))\n {\n return;\n }\n throw new SAXException (\"AElfred2 only supports English locales.\");\n }",
"Language(Locale locale) {\n this.locale = locale;\n }",
"@Test\n\t@PerfTest(invocations = 10)\n\tpublic void defLang() {\n\t\tl.setLocale(l.getLocale().getDefault());\n\t\tassertEquals(\"Register\", Internationalization.resourceBundle.getString(\"btnRegister\"));\n\t}",
"public void setLocale (final Locale locale) {\n\t\tthis.locale = locale;\n\t}",
"public void setLocale (Locale locale) {\n _locale = locale;\n _cache.clear();\n _global = getBundle(_globalName);\n }",
"public void setFallbackLocale(Locale locale) { this.fallbackLocale = locale; }",
"public static void setLocale(Locale locale) {\n// Recarga las entradas de la tabla con la nueva localizacion \n RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME, locale);\n}",
"public void testCompareIgnoreCase() {\n\t\tString one = \"hello\";\n\t\tString two = \"In the house\";\n\t\t//h vor i\n\t\tassertTrue(comp.compareStrings(one, two) > 0);\n\t\tassertEquals(0, comp.compareStrings(one, one));\n\t\tassertTrue(comp.compareStrings(two, one) < 0);\n\t}",
"@Override\n\tpublic final void setLocale(final Locale locale)\n\t{\n\t\tif (httpServletResponse != null)\n\t\t{\n\t\t\thttpServletResponse.setLocale(locale);\n\t\t}\n\t}",
"public void testLocale1()\n throws ValidatorException {\n // Create bean to run test on.\n final NameBean name = new NameBean();\n name.setFirstName(\"\");\n name.setLastName(\"\");\n\n valueTest(name, new Locale(\"en\", \"US\", \"TEST1\"), false, false, false);\n }",
"public boolean enableLocaleOverride( ) {\n\t\ttry {\n\t\t\tURIBuilder builder = new URIBuilder( I18N_URL );\n\t\t\tbuilder.addParameter( \"locale\", \"en_US\" );\n\t\t\tHttpGet get = new HttpGet( builder.build( ).toURL( ).toString( ) );\n\t\t\tString result = EntityUtils.toString( this.httpClient( ).execute( get ).getEntity( ) ).trim( );\n\t\t\treturn result.contains(\"Succeeded\" );\n\t\t} catch( Exception e ) {\n\t\t\tthrow new FitbitExecutionException( e );\n\t\t}\n\t}",
"public void setDefaultLocale(Locale defaultLocale) {\n this.defaultLocale = defaultLocale;\n }",
"public ICase retourneLaCase() ;",
"private void setLocale(String lang) {\n Locale myLocale = new Locale(lang);\n Resources res = getResources();\n DisplayMetrics dm = res.getDisplayMetrics();\n Configuration conf = res.getConfiguration();\n conf.setLocale(myLocale);\n res.updateConfiguration(conf, dm);\n Intent refresh = new Intent(this, MainActivity.class);\n startActivity(refresh);\n finish();\n }",
"private void setLocale( String localeName )\r\n\t{\r\n\t\tConfiguration conf = getResources().getConfiguration();\r\n\t\tconf.locale = new Locale( localeName );\r\n\t\t\r\n\t\tsetCurrentLanguage( conf.locale.getLanguage() );\r\n\r\n\t\tDisplayMetrics metrics = new DisplayMetrics();\r\n\t\tgetWindowManager().getDefaultDisplay().getMetrics( metrics );\r\n\t\t\r\n\t\t// the next line just changes the application's locale. It changes this\r\n\t\t// globally and not just in the newly created resource\r\n\t\tResources res = new Resources( getAssets(), metrics, conf );\r\n\t\t// since we don't need the resource, just allow it to be garbage collected.\r\n\t\tres = null;\r\n\r\n\t\tLog.d( TAG, \"setLocale: locale set to \" + localeName );\r\n\t}",
"public void temp() {\n\t\t\n\t\tString language = locale.getLanguage();\n\t\tSystem.out.println(language);\n\t\t\n\t\tif(language.equals(\"ru\")) {\n\t\t\tsetLocale(new Locale(\"en\", \"US\"));\n\t\t} else {\n\t\t\tsetLocale(new Locale(\"ru\", \"UA\"));\n\t\t}\n\t}",
"Locale getDefaultLocale();",
"Locale getDefaultLocale();",
"public LocaleTest(final String name) {\n super(name);\n }",
"public String getLocale() {\n return this.locale;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetLocale(\"vi\");\n\t\t\t}",
"public void setCaseSensitive( boolean isCaseSensitive )\n {\n this.isCaseSensitive = isCaseSensitive;\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"protected final void handleLocale(HttpServletRequest req) {\n setLocaleFromHeader(req.getParameterValues(\"LocaleFromHeader\"));\n \n if (localeFromHeader) {\n for ( Enumeration en=req.getLocales(); en.hasMoreElements(); ) {\n Locale locale = (Locale)en.nextElement();\n try {\n setLocale(locale);\n return;\n } catch ( Exception ex ) {\n logger.warning(\"locale not supported \" + locale);\n } // end of try-catch\n } // end of for ()\n }\n }",
"public Locale getLocale() { return this.locale; }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetLocale(\"en\");\n\t\t\t}",
"public void testLocale2()\n throws ValidatorException {\n // Create bean to run test on.\n final NameBean name = new NameBean();\n name.setFirstName(\"\");\n name.setLastName(\"\");\n\n valueTest(name, new Locale(\"en\", \"US\", \"TEST2\"), true, false, true);\n }",
"public void setIgnoreCase(boolean ignore) {\n if (!super.isEmpty()) {\n throw new RuntimeException(Messages.getString(\"ResourceProperties.0\")); //$NON-NLS-1$\n }\n this.ignoreCase = ignore;\n }",
"private void setLanguage() {\n ResourceBundle labels = ResourceBundle.getBundle\n (\"contactmanager.Contactmanager\", Locale.getDefault()); \n this.setTitle(labels.getString(\"title\"));\n }",
"public XMLString toUpperCase(Locale locale) {\n/* 715 */ return new XMLStringDefault(this.m_str.toUpperCase(locale));\n/* */ }",
"public void setLocaleL(Locale localeL) {\n\t\tpanelVirtualKeyboard.setLocaleL(localeL);\n\t}",
"String getCaseSensitive();",
"public String locale() {\n return this.locale;\n }",
"public void setLocale(final Locale locale) {\r\n messages = ResourceBundle.getBundle(PATH_TO_BUNDLE_FILE, locale);\r\n }",
"public String changeLeguage(){\r\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tLocale miLocale = new Locale(\"en\",\"US\");\r\n\t\tcontext.getViewRoot().setLocale(miLocale);\r\n\t\treturn \"login\";\r\n\t}",
"public void AddLowercase(Locale culture)\n\t{\n\t\tint i;\n\t\tint origSize;\n\t\tSingleRange range;\n\n\t\t_canonical = false;\n\n\t\tfor (i = 0, origSize = _rangelist.size(); i < origSize; i++)\n\t\t{\n\t\t\trange = _rangelist.get(i);\n\t\t\tif (range._first == range._last)\n\t\t\t{\n\t\t\t\trange._first = range._last = Character.toLowerCase(range._first);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAddLowercaseRange(range._first, range._last, culture);\n\t\t\t}\n\t\t}\n\t}",
"public void switchLanguage(){\n Locale myLocale = new Locale(\"de\");\r\n // get current Locale\r\n String currentLocale = scanActivity.getResources().getConfiguration().locale\r\n .toString();\r\n // set Locale to english if current Locale is german\r\n if (currentLocale.equals(\"de\")) {\r\n myLocale = new Locale(\"en\");\r\n }\r\n // sets the Locale in the configuration and updates the\r\n // configuration\r\n DisplayMetrics metrics = scanActivity.getResources().getDisplayMetrics();\r\n Configuration config = scanActivity.getResources().getConfiguration();\r\n config.locale = myLocale;\r\n scanActivity.getResources().updateConfiguration(config, metrics);\r\n // recreates the app in order to show the selected language\r\n scanActivity.recreate();\r\n }",
"public void setLocale(Locale locale) {\n\t\t\n\t\tif(locale == null) throw new IllegalArgumentException(\"locale must be not null!\");\n\t\t\n\t\tLocale oldLocale = this.locale; \n\t\t\n\t\tif(oldLocale != locale) {\n\t\t\t\n\t\t\tresourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE_BASE_NAME, locale, control);\n\t\t\t\n\t\t\tthis.locale = locale;\n\t\t\t\n\t\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\t\t\n\t\t\tString language = locale.getLanguage();\n\t\t\tString country = locale.getCountry();\n\t\t\tString variant = locale.getVariant();\n\t\t\t\n\t\t\tpropertiesManager.setProperty(\"locale.language\", language);\n\t\t\tpropertiesManager.setProperty(\"locale.country\", country);\n\t\t\tpropertiesManager.setProperty(\"locale.variant\", variant);\n\n\t\t\tfireLocaleChanged(oldLocale, locale);\n\t\t}\n\t}",
"public void localize(){\n String file=System.getProperty(\"user.home\")+ File.separator + \"rex.properties\";\n Properties rexProp = new Properties();\n try{\n\n rexProp.load(new FileInputStream(new File(file)));\n \n }catch(Exception e){\n S.out(\"Error reading rex.properties file\"); \n }\n strLanguage= rexProp.getProperty(\"Language\");\n \n if (strLanguage!=\"\"){\n Locale oLang= new Locale(strLanguage);\n I18n.setCurrentLocale(oLang);\n }\n else{\n I18n.setCurrentLocale(Locale.getDefault()); //set default locale\n }\n\n }",
"public boolean areStringComparisonsCaseInsensitive() {\n \t\treturn false;\n \t}",
"public void setDefaultLocale(String defaultLocale) {\n setDefaultLocale(LocaleUtils.parseLocale(defaultLocale));\n }",
"public Future<String> locale() throws DynamicCallException, ExecutionException {\n return call(\"locale\");\n }",
"public static void forceLocale(Context context) {\r\n\t\tfinal String language = getSavedLanguage(context);\r\n\t\t\r\n\t\tif (language == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tDebug.logE(\"force locale\", \"language \" + language);\r\n\t\t\r\n\t\tResources res = context.getResources();\r\n\r\n\t\tConfiguration config = res.getConfiguration();\r\n\t\ttry {\r\n\t\t\tconfig.locale = new Locale(language);\r\n\t\t} catch(Throwable e) {\r\n\t\t\t;\r\n\t\t}\r\n\t res.updateConfiguration(config, context.getResources().getDisplayMetrics());\r\n\t}",
"@Test\n\tpublic void testLocale() throws Exception {\n\t\tLocale.setDefault(Locale.JAPANESE);\n\t\tProperties serviceProps = SgsTestNode.getDefaultProperties(APP_NAME,\n\t\t\t\tserverNode, null);\n\t\tserviceProps.setProperty(\"com.sun.sgs.impl.kernel.profile.level\",\n\t\t\t\t\"medium\");\n\t\taddNodes(serviceProps, 1);\n\t\tProfileCollector collector = getCollector(additionalNodes[0]);\n\t\tassertNotNull(collector);\n\t\tassertSame(ProfileLevel.MEDIUM, collector.getDefaultProfileLevel());\n\t}",
"@ApiModelProperty(value = \"The locale of the contained data\")\n public String getLocale() {\n return locale;\n }",
"public Locale getLocale() {\n\t\treturn Locale.US;\r\n\t}",
"public abstract Builder setDisplayNamesLocale(String value);",
"@ZAttr(id=345)\n public void setLocale(String zimbraLocale) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraLocale, zimbraLocale);\n getProvisioning().modifyAttrs(this, attrs);\n }",
"public static final void setLocaleFromPreferences(Context ctx) {\n String firstLocale = ctx.getResources().getConfiguration().locale.toString().substring(0, 2);\n String currentLocale = PreferenceManager.getDefaultSharedPreferences(ctx).getString(\"locale\", firstLocale);\n /**\n * Locale locale = new Locale((String) currentLocale); config.locale =\n * locale; Locale.setDefault(locale);\n */\n setLocale(ctx, currentLocale);\n }",
"public void componentsLocaleChanged() {\n\t\ttextRes = PeralexLibsBundle.getResource();\n\n\t\tlocaleChanged();\n\t}",
"public XMLString toLowerCase() {\n/* 702 */ return new XMLStringDefault(this.m_str.toLowerCase());\n/* */ }",
"public ULocale getLocale() {\r\n return this.locale;\r\n }",
"private void init() {\n\t\t\n\t\tPropertiesManager propertiesManager = PropertiesManager.getInstance();\n\t\tFile localeDirectory = new File(propertiesManager.getProperty(\"locale.directory\", LOCALE_DIRECTORY));\n\n\t\tlocales = new ArrayList<Locale>();\n\n\t\ttry {\n\t\t\t\n\t\t\tClassUtils.addClassPathFile(localeDirectory);\n\t\t\t\n\t\t\t// Находим все доступные локали\n\t\t\tlocales = findAvailableLocales(localeDirectory);\n\n\t\t} catch(Exception ignore) {}\n\n\t\tfallbackLocale = Locale.ENGLISH;\n\t\tcontrol = new Control();\n\n\t\tif(!locales.contains(Locale.ENGLISH)) {\n\t\t\tlocales.add(0, fallbackLocale);\n\t\t}\n\n\t\tdefaultLocale = locales.get(locales.indexOf(Locale.ENGLISH));\n\t\t\n\t\tString language = propertiesManager.getProperty(\"locale.language\", \"\");\n\t\tString country = propertiesManager.getProperty(\"locale.country\", \"\");\n\t\tString variant = propertiesManager.getProperty(\"locale.variant\", \"\");\n\t\t\n\t\tLocale locale = new Locale(language, country, variant);\n\t\t\n\t\tif(locales.contains(locale)) {\n\t\t\tlocale = locales.get(locales.indexOf(locale));\n\t\t} else {\n\t\t\tlocale = defaultLocale;\n\t\t}\n\n\t\tsetLocale(locale);\n\t\t\n\t\tif(FontEditor.DEBUG) {\n\t\t\t\n\t\t\tfor(Locale l : locales) {\n\t\t\t\tSystem.out.println(\"locale found -> \" + l.getDisplayLanguage(Locale.ENGLISH));\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Total locale(s) found: \" + locales.size());\n\t\t\tSystem.out.println();\n\t\t}\n//System.out.println(\">>> \" + getValue(\"shitd\"));\n\t}",
"@BeforeClass\n public static void initGlobal()\n {\n Locale.setDefault(Locale.ENGLISH);\n\n ValidatorFactory factory = Validation.buildDefaultValidatorFactory();\n validator = factory.getValidator();\n }",
"@Override\n protected void attachBaseContext(Context base) {\n super.attachBaseContext(Application.Companion.getLocaleManager().setLocale(base));\n }",
"public static void localize(String text) {\n }",
"public Locale getLocale () {\n return _locale;\n }",
"@RequestMapping(value = \"/localechange/{locale}\", method = RequestMethod.GET)\r\n public String changeLocale(@PathVariable(\"locale\") String locale, HttpServletRequest request, HttpServletResponse response) {\r\n if (locale != null) {\r\n if (locale.equals(\"de\")) {\r\n RequestContextUtils.getLocaleResolver(request).setLocale(request, response, Locale.GERMAN);\r\n } else {\r\n RequestContextUtils.getLocaleResolver(request).setLocale(request, response, Locale.ENGLISH);\r\n }\r\n }\r\n return \"redirect:/home\";\r\n }",
"@Override\n public Locale getLocale() {\n return null;\n }",
"@Override\n public int compare(Student o1, Student o2) {\n Collator col = Collator.getInstance(new Locale(\"cs\",\"CZ\"));\n return col.compare(o1.getLastName(), o2.getLastName());\n }",
"private void translate()\r\n\t{\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\t\r\n\t\tString language = locale.getLanguage();\r\n\t\t\r\n\t\ttranslate(language);\r\n\t}",
"public void setLocales(List<Locale> locales);",
"public void setServerLocale(String serverLocale){\n this.serverLocale = serverLocale;\n }",
"private void loadLocale() {\n\t\tSharedPreferences sharedpreferences = this.getSharedPreferences(\"CommonPrefs\", Context.MODE_PRIVATE);\n\t\tString lang = sharedpreferences.getString(\"Language\", \"en\");\n\t\tSystem.out.println(\"Default lang: \"+lang);\n\t\tif(lang.equalsIgnoreCase(\"ar\"))\n\t\t{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"ar\";\n\t\t}\n\t\telse{\n\t\t\tmyLocale = new Locale(lang);\n\t\t\tsaveLocale(lang);\n\t\t\tLocale.setDefault(myLocale);\n\t\t\tandroid.content.res.Configuration config = new android.content.res.Configuration();\n\t\t\tconfig.locale = myLocale;\n\t\t\tthis.getBaseContext().getResources().updateConfiguration(config, this.getBaseContext().getResources().getDisplayMetrics());\n\t\t\tCommonFunctions.lang = \"en\";\n\t\t}\n\t}",
"public String getLocale()\n {\n return (m_taskVector == null || m_taskVector.size() == 0) ?\n DEFAULT_LOCALE :\n taskAt(0).getSourceLanguage();\n }",
"public boolean getCaseSesitive() {\n\t\treturn this.caseSensitive;\n\t}"
]
| [
"0.6556668",
"0.64890504",
"0.64327896",
"0.6405116",
"0.63092095",
"0.62603325",
"0.62581754",
"0.6250553",
"0.6221736",
"0.62108886",
"0.62030727",
"0.6190135",
"0.6113028",
"0.61090404",
"0.6088137",
"0.60438216",
"0.60438216",
"0.59973025",
"0.58916914",
"0.5835874",
"0.57741493",
"0.57558554",
"0.57558554",
"0.5749749",
"0.5704541",
"0.57016164",
"0.56769204",
"0.5571592",
"0.55346274",
"0.55110353",
"0.55093265",
"0.5503916",
"0.5499889",
"0.54327416",
"0.53877103",
"0.5373306",
"0.5362698",
"0.535162",
"0.5338047",
"0.5337347",
"0.5335924",
"0.5301249",
"0.5298564",
"0.5285099",
"0.5282157",
"0.5266306",
"0.52462703",
"0.5244724",
"0.5225986",
"0.5183018",
"0.5177562",
"0.5177562",
"0.51684123",
"0.5165391",
"0.5162815",
"0.5154696",
"0.5129592",
"0.5120526",
"0.51061064",
"0.5101937",
"0.50998944",
"0.50965184",
"0.5079659",
"0.5076396",
"0.5074053",
"0.5070062",
"0.5049063",
"0.50370866",
"0.5030794",
"0.5024497",
"0.5022359",
"0.50122446",
"0.50040615",
"0.4992714",
"0.49802598",
"0.49717814",
"0.49587482",
"0.49501622",
"0.49334174",
"0.49098012",
"0.48936608",
"0.4893578",
"0.4887528",
"0.48843795",
"0.48788747",
"0.48651868",
"0.48575625",
"0.48527053",
"0.48347557",
"0.48346707",
"0.48295188",
"0.48277572",
"0.48212194",
"0.48202425",
"0.48193288",
"0.48189127",
"0.48187158",
"0.48129827",
"0.48102954",
"0.4809512"
]
| 0.58636045 | 19 |
Normalizes the given Element; this default implementation returns the given element unmodified. Subclasses can override this method to return a more appropriate Element subclass if required. | @Override
protected Element<String, V> normalize(Element<String, V> element) {
return new CaseInsensitiveElement<V>(element, locale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void normalise() {\n\t\tElement base = this;\n\t\t\n\t\tbase.setNamespace(\"1\");\n\t\t\n\t\tint i = 1;\n\t\tfor (Element child : base.getAllChildren() )\n\t\t\tbase.normaliseChild(child, i++);\n\t\t\n\t\t\n\t}",
"@Nonnull\n S normalize();",
"@Override\n\tpublic Element toElement() {\n\t\treturn null;\n\t}",
"public AbstractDNode getOriginalElement() {\n return element;\n }",
"@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"Element asElement();",
"public void normalize() {}",
"public Vector normalize() {\n this.head = this.normalized().getHead();\n return this;\n }",
"public Vector normalize() {\n double num=1/length();\n head = scale(num).head;\n return this;\n }",
"@Override\n\tpublic Element getElement() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Element newInstance() {\n\t\treturn null;\n\t}",
"@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }",
"public Element(Element element) {\n\t\tElement src = element.clone();\n\n\t\tthis.attributes = src.attributes;\n\t\tthis.name = src.name;\n\t\tthis.defxmlns = src.defxmlns;\n\t\tthis.xmlns = src.xmlns;\n\t\tthis.children = src.children;\n\t}",
"public Vector normalized() {\n Vector t=new Vector(normalize());\n return t;\n }",
"public Element toXMLElement() {\n return null;\n }",
"public SVGElementModel convert(SVGElement element) {\n \t\tSVGElementModel model = elementToModel.get(element);\n //\t\tassert(model != null);\n \t\treturn model;\n \t}",
"public Element getElement() {\n return super.getElement();\n }",
"Form removeDefaultRendererForElementClass(Class<? extends Element> clazz);",
"public T caseTypedElement(TypedElement object) {\r\n\t\treturn null;\r\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public T caseElement(Element object) {\n\t\treturn null;\n\t}",
"public Object caseElement(Element object) {\r\n\t\treturn null;\r\n\t}",
"public Expr standardize() {\r\n\t\treturn this;\r\n\t}",
"public Vector normalize ( );",
"@Override\r\n\tpublic E element() {\n\t\treturn null;\r\n\t}",
"public CMLVector3 normalize() throws RuntimeException {\r\n if (this.isZero()) {\r\n throw new RuntimeException(\"Cannot normalize zero vector\");\r\n }\r\n Vector3 veucl3 = this.getEuclidVector3();\r\n if (veucl3 != null) {\r\n veucl3.normalize();\r\n setXMLContent(veucl3.getArray());\r\n }\r\n return this;\r\n }",
"public Node getNormalizedNode() {\n\t\treturn transformedNode;\n\t}",
"protected abstract Element toXmlEx(Document doc);",
"public static native Element overwrite(Element oldElem, Element newElem)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newElem);\r\n\t}-*/;",
"Element getElement() {\n\t\tElement result = element.clone();\n\t\tresult.setName(table.getName());\n\t\treturn result;\n\t}",
"public T caseElement(Element object)\n {\n return null;\n }",
"protected void normalizeElemTypeForEquiv()\r\n\t\t\tthrows RestrizioniSpecException {\r\n\t\ttry {\r\n\t\t\tScope scope = new Scope(this.archiType);\r\n\t\t\tNormalizeParts normalizeParts = new NormalizeParts(scope);\r\n\t\t\tElemType elemType = normalizeParts.normalizeElemTypeFromAEI(this.idecl);\r\n\t\t\tthis.equivalenza.setEt(elemType);\r\n\t\t\t}\r\n\t\tcatch (NormalizeException e)\r\n\t\t\t{\r\n\t\t\tthrow new RestrizioniSpecException(e);\r\n\t\t\t}\r\n\t}",
"public void setElement(Element Element) {\n\t\telement = Element;\n\t}",
"private Object parseElement(XmlElement element) throws XmlParseException\n {\n try\n {\n return parseElementRaw(element);\n }\n catch (Exception e)\n {\n throw new XmlParseException(\"Failed to parse: \" + element.toXml(), e);\n }\n }",
"private Object parseElementRaw(XmlElement element) throws Exception\n {\n ElementType type = ElementType.valueOf(element.getName().toUpperCase());\n switch (type)\n {\n case INTEGER:\n return parseInt(element.getValue());\n case REAL:\n return Double.valueOf(element.getValue());\n case STRING:\n return element.getValue();\n case DATE:\n return m_dateFormat.parse(element.getValue());\n case DATA:\n return base64decode(element.getValue());\n case ARRAY:\n return parseArray(element);\n case TRUE:\n return Boolean.TRUE;\n case FALSE:\n return Boolean.FALSE;\n case DICT:\n return parseDict(element);\n default:\n throw new RuntimeException(\"Unexpected type: \" + element.getName());\n }\n }",
"public SimpleElement toSimpleElement(Element root) throws ConversionException\n\t{\n\t\tSimpleElement rootElement = new SimpleElement();\n\t\t\n\t\tString name = StringUtils.trim(root.getNodeName());\n\t\tif (null != name)\n\t\t\trootElement.setName(name);\n\t\t\n\t\tpopSimpleAttributes(root, rootElement);\n\t\tpopSimpleChildren(root, rootElement);\n\t\t\n\t\treturn rootElement;\n\t}",
"@Override\n\tpublic Element getElement() {\n\t\treturn elem;\n\t}",
"@Override\n\tpublic void setElement(Element element) {\n\t\t\n\t}",
"public Vector normalized() {\n double size = this.length();\n return new Vector(this.getHead().getX() / size, this.getHead().getY() / size, this.getHead().getZ() / size);\n }",
"Element getGenericElement();",
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public void normalize()\n\t{\n\t\tif (this.getDenom() < 0)\n\t\t{\n\t\t\tthis.setDenom(this.getDenom() * (-1));\n\t\t\tthis.setNumer(this.getNumer() * (-1));\n\t\t}\n\t}",
"Object element();",
"Object element();",
"public static native Element overwrite(Element oldElem, String newRawHtml)/*-{\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, newRawHtml);\r\n\t}-*/;",
"public Vector330Class normalize(){\n if(this.magnitude() <= EPS){\n return new Vector330Class(0, 0);\n }\n else{\n return new Vector330Class(this.x * (1/this.magnitude()), this.y * (1/this.magnitude()));\n }\n }",
"public Vector normalized(){\r\n\t\tfloat len = this.length();\r\n\t\tif( len != 0.0f && len != 1.0f ){\r\n\t\t\treturn new Vector( this.x / len, this.y / len, this.z / len );\r\n\t\t}\r\n\t\treturn this;\r\n\t}",
"public Object buildElementFromElement(Object element, MergeManager mergeManager) {\n ObjectBuilder objectBuilder = this.getObjectBuilder(element, mergeManager.getSession());\n Object result = objectBuilder.buildNewInstance();\n objectBuilder.mergeIntoObject(result, true, element, mergeManager);\n\n return result;\n }",
"public Element transform(Node source) throws TransformerException {\n DOMResult outputDR = new DOMResult();\n myTransformer.transform(new DOMSource(source), outputDR);\n return ((Document) outputDR.getNode()).getDocumentElement();\n }",
"public static InputElement getImplAsInputElement(ContentElement element) {\n return InputElement.as(element.getImplNodelet());\n }",
"@TimeComplexity(\"O(1)\")\n\tpublic E setElement(E eT)\n\t{\n\t\t//TCJ: the cost does not vary with input size so it is constant\n\t\tE temp = element;\n\t\telement = eT;\n\t\treturn temp;\n\t}",
"public final void normalize() {\n\tsvd(this);\n }",
"@Override\n protected Document parseAsDom(final Document input) {\n return input;\n }",
"Renderer getDefaultRendererForElementClass(Class<? extends Element> clazz);",
"public static <T extends XmlEntityObject> T wrap(Element element)\n\t\t\tthrows CannotCreateEntityException {\n\t\tif (element == null) {\n\t\t\tthrow new ArgumentNullPointerException(\"element\");\n\t\t}\n\t\tT entityObject = XmlEntityUtils.<T> createBlank(element);\n\t\tbind(element, entityObject);\n\t\treturn entityObject;\n\t}",
"protected XMLElement createAnotherElement() {\n return new XMLElement(this.conversionTable,\n this.skipLeadingWhitespace,\n false,\n this.ignoreCase);\n }",
"@Override\n public Object getModifiedElement()\n {\n return null;\n }",
"Element toXML();",
"public static Element mutateVersion(Element element) {\n element.textContent = Core.getGustVersion();\n return element;\n }",
"E createDefaultElement();",
"public Vector normalize(){\n\t\tdouble mag = magnitude();\n\t\treturn new Vector(x/mag, y/mag, z/mag);\n\t}",
"public Element toElement(SimpleElement elem, Document doc)\n\t{\n\t\tElement root = doc.createElement(elem.getName());\n\t\t\n\t\tpopulateAttributes(root, elem);\n\t\tpopulateChildren(root, elem);\n\t\t\n\t\treturn root;\n\t}",
"@Override\r\n public Element findElement()\r\n {\n return null;\r\n }",
"public Vector2D normalize() \n {\n \tfloat length = getLength();\n if (length != 0.0f) \n {\n this.setX(this.getX() / length);\n this.setY(this.getY() / length);\n } \n else \n {\n this.setX(0.0f);\n this.setY(0.0f);\n }\n return this;\n }",
"@Override\n public T getCombinedElement()\n {\n return element;\n }",
"public void addNormal(E element) {\n\t\tsuper.add(element);\r\n\t}",
"@Override\n\t\tprotected Element getElement(ElementType button) {\n\t\t\treturn null;\n\t\t}",
"public static Element undressAbsOld(F a, Ring ring){\n if (a.name==F.ABS){ \n if (a.X[0] instanceof F) {Element ee=undressAbs(((F)(a.X[0])), ring); if(ee!=null) return ee;}\n return a.X[0]; } \n Element[] nX=null; boolean flagAbs=false;\n if (a.name==F.MULTIPLY) { nX=new Element[a.X.length];\n for (int i = 0; i < a.X.length; i++) {\n if ((a.X[i] instanceof F)&&(((F)a.X[i]).name==F.ABS)) {\n Element ee=((F)a.X[i]).X[0];\n flagAbs=true;\n if (ee instanceof F){\n ee = undressAbs(((F)ee), ring);\n nX[i]= (ee==null)? ((F)a.X[i]).X[0]: ee;\n } else {\n nX[i] = ee;\n }\n }\n else if ((a.X[i].isItNumber(ring))&&(!a.X[i].isNegative())) nX[i]= a.X[i];\n else return null;\n } return (flagAbs)? new F (F.MULTIPLY, nX) : null;\n }\n if (a.name==F.DIVIDE) { nX=new Element[2];\n for (int i = 0; i < 2; i++) {\n if ((a.X[i] instanceof F)&&(((F)a.X[i]).name==F.ABS)){ Element ee=((F)a.X[i]).X[0]; flagAbs=true;\n if ( (ee instanceof F)){ ee= undressAbs(((F)ee), ring); nX[i]= (ee==null)? ((F)a.X[i]).X[0]:ee;}}\n else if ((a.X[i].isItNumber(ring))&&(!a.X[i].isNegative())) nX[i]= a.X[i];\n else return null;\n }\n return (flagAbs)? new F (F.DIVIDE, nX) : null;\n } return null;\n }",
"public Element getElement()\n {\n return m_Element;\n }",
"public String prefixeElement(final Element refElement) {\n return(null);\n }",
"public void normalize() {\n // determine the maximum value\n \n Double max = getMaxValue();\n \n if(max!=null) {\n normalize(max);\n }\n }",
"Element getElement();",
"public LibraryElement cloneElement();",
"@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic E element()\n\t{\n\t\treturn element;\n\t}",
"public static PomTaggedExpression normalize(PomTaggedExpression pte) {\n return normalize(pte, NORMALIZE_PARENTHESES, NORMALIZE_SUB_SUPERSCRIPTS);\n }",
"public org.ccsds.moims.mo.mal.structures.Element createElement()\n {\n return new BasicUpdate();\n }",
"public Vector4d normalize() {\n\t\tdouble len = length();\n\t\tif (len != 0) {\n\t\t\tx /= len;\n\t\t\ty /= len;\n\t\t\tz /= len;\n\t\t\tw /= len;\n\t\t}\n\t\treturn this;\n\t}",
"@Override\n public List<Element> normalize(Program solution)\n {\n List<Element> original = (List<Element>) solution.parse();\n List<Element> normalized = new ArrayList<Element>();\n List<Integer> normalizedValues = new ArrayList<Integer>();\n Map<Integer, Integer> occurrences = new HashMap<Integer,Integer>();\n \n // Count elements balance\n for(Element e : original)\n {\n int label = e.getLabel();\n if(e.getLabel() > 0)\n occurrences.put(label, occurrences.containsKey(label) ? occurrences.get(label) + 1 : 1);\n else\n occurrences.put(-label, occurrences.containsKey(-label) ? occurrences.get(-label) -1 : -1);\n } \n \n for(Element e : original)\n {\n int label = e.getLabel();\n if (label > 0 && !normalizedValues.contains(label) && occurrences.get(label) >= 0)\n {\n normalized.add(e);\n normalizedValues.add(label);\n }\n } \n return normalized;\n }",
"public KnownMediaType normalize() {\n KnownMediaType kmt = this;\n while (kmt.getAliasOf() != null) {\n kmt = kmt.getAliasOf();\n }\n return kmt;\n }",
"public static Element undressAbs(Element a, Ring ring){\n if(a instanceof F) {\n if(((F)a).name == F.ABS) {\n return ((F)a).X[0];\n }\n if( (((F)a).name == F.MULTIPLY) || (((F)a).name == F.DIVIDE) ) {\n Element[] nX = new Element[((F)a).X.length];\n for(int i = 0; i < nX.length; i++) {\n Element arg = ((F)a).X[i];\n Element ee = null;\n if(arg instanceof F) {\n ee = undressAbs(arg, ring);\n } else if((arg.isItNumber(ring))&&(arg.isNegative() == false)) {\n ee = arg;\n }\n if(ee == null) {\n return null;\n }\n nX[i] = ee;\n }\n return new F(((F)a).name, nX);\n }\n if(((F)a).name == F.intPOW) {\n Element arg = ((F)a).X[0];\n Element ee = null;\n if(arg instanceof F) {\n ee = undressAbs(arg, ring);\n } else if((arg.isItNumber(ring))&&(arg.isNegative() == false)) {\n ee = arg;\n }\n if(ee == null) {\n return null;\n }\n return new F(F.intPOW, ee, ((F)a).X[1]);\n }\n }\n return null;\n }",
"public void setElementClass (String elementClass) throws ModelException;",
"IVec3 normalized();",
"public Vec2double normalise() {\n\t\tdouble len = (double) (1 / Math.sqrt(x*x + y*y));\n//\t\tx *= len;\n//\t\ty *= len;\n\t\treturn new Vec2double(x*len, y*len);\n\t}",
"public DoubleVector Normalize(Instance inst) {\n\t\t\tDoubleVector normalizedInstance = new DoubleVector();\n\t\t\tint index = 0;\n\t\t\tfor (int j = 0; j < inst.numAttributes(); j++) {\n\t\t\t\tif (inst.classIndex() == j)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tdouble value = 0;\n\n\t\t\t\tif (normalizeationOption.getChosenIndex() == 0) {\n\t\t\t\t\tif (this.statsAttributes.get(index).getStandardDeviation() < Constants.SMALL_EPSILON)\n\t\t\t\t\t\tvalue = (inst.value(j) - this.statsAttributes.get(index).getCurrentMean());\n\t\t\t\t\telse\n\t\t\t\t\t\tvalue = (inst.value(j) - this.statsAttributes.get(index).getCurrentMean())\n\t\t\t\t\t\t\t\t/ this.statsAttributes.get(index).getStandardDeviation();\n\t\t\t\t}else if(normalizeationOption.getChosenIndex() <= 2){\n\t\t\t\t\tif (this.statsAttributes.get(index).getRange() < Constants.SMALL_EPSILON)\n\t\t\t\t\t\tvalue = (inst.value(j) - this.statsAttributes.get(index).getMin());\n\t\t\t\t\telse\n\t\t\t\t\t\tvalue = (inst.value(j) - this.statsAttributes.get(index).getMin())\n\t\t\t\t\t\t\t\t/ this.statsAttributes.get(index).getRange();\n\t\t\t\t}else {\n\t\t\t\t\tvalue = inst.value(j) ;\n\t\t\t\t}\n\n\t\t\t\tnormalizedInstance.setValue(index, value);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\treturn normalizedInstance;\n\t\t}",
"protected abstract Object handleElement(Element aElement) throws AeXMLDBException;",
"Element() {\n\t}",
"public E getElement() { return element; }",
"public Object transform(Object input) {\n return input;\n }",
"public void normalize() {\n\t\tdouble norm = norm();\n\t\tif (DoubleComparison.eq(norm, 0)) {\n\t\t\tthrow new RuntimeException(\"Failed to normalize: length is zero\");\n\t\t}\n\t\tthis.x = this.x / norm;\n\t\tthis.y = this.y / norm;\n\t\tthis.z = this.z / norm;\n\t}",
"public Double getNormalizedAmount()\n {\n if (_units == null)\n return getAmount();\n\n if (_units.isCompatible(_normalizingUnits))\n return _units.convertAmount(getAmount(), _normalizingUnits);\n else\n return getAmount();\n }",
"final public Element getElement() {\n return element;\n }",
"public void setElement(MatrixElement pNewElement) {\r\n\t\tmElement = pNewElement;\r\n\t}",
"private <T extends Element> T getNearestElement(Element element, Class<T> klass) {\n List elements = element.nearestDescendants(klass);\n if (elements == null || elements.isEmpty()) {\n return null;\n }\n\n return (T) elements.get(0);\n }",
"@objid (\"3497729a-1481-4a27-95dc-ad28d935364c\")\n protected abstract MObject transmuteElement(MObject elementToBeTransmuted, IMModelServices modelServices);",
"public static native Element overwrite(Element oldElem, DomConfig config)/*-{\r\n\t\tvar configJS = [email protected]::getJsObject()();\r\n\t\treturn $wnd.Ext.DomHelper.overwrite(oldElem, configJS);\r\n\t}-*/;",
"public Object fromXml(XmlElement xml)\n {\n // TODO: copy the relevant namespaces declared by the parent\n // should that be done by clone?\n return xml == null ? null : xml.clone();\n }",
"default IEmfAttribute<?, V> getOriginalAttribute() {\n\n\t\treturn this;\n\t}",
"public Vector3D normalize()\r\n {\r\n float oneOverMagnitude = 0;\r\n float mag = magnitude();\r\n \r\n if (mag!=0) {\r\n oneOverMagnitude = 1 / mag;\r\n }\r\n\r\n return this.product(oneOverMagnitude);\r\n }",
"public Node<T> detach(T element) {\n // Sanity check.\n if (this.element == element) {\n this.element = null;\n } else {\n throw new IllegalArgumentException(\"Removal of wrong element.\");\n }\n // Useful for chaining.\n return this;\n }"
]
| [
"0.64026314",
"0.6129516",
"0.60103124",
"0.5889421",
"0.5873819",
"0.5799886",
"0.5699565",
"0.5344725",
"0.5215568",
"0.52002877",
"0.5187377",
"0.51650685",
"0.5143655",
"0.51191956",
"0.5112354",
"0.50937396",
"0.5087304",
"0.50813854",
"0.5038673",
"0.5033163",
"0.5033163",
"0.5033163",
"0.50253487",
"0.50219125",
"0.5006343",
"0.50048494",
"0.50025725",
"0.49956614",
"0.4991119",
"0.49892578",
"0.49829474",
"0.49617717",
"0.4951767",
"0.4948773",
"0.4947842",
"0.49345493",
"0.4907089",
"0.489095",
"0.48837513",
"0.488286",
"0.48713174",
"0.4869692",
"0.48375672",
"0.48294723",
"0.48294723",
"0.4824914",
"0.4778346",
"0.47713086",
"0.47690436",
"0.47610787",
"0.47592244",
"0.47537658",
"0.4748999",
"0.47476187",
"0.4735181",
"0.47132444",
"0.46905217",
"0.46770224",
"0.46673566",
"0.46576223",
"0.46529132",
"0.46365085",
"0.4632665",
"0.46317726",
"0.463149",
"0.4626166",
"0.46112204",
"0.46065187",
"0.46063605",
"0.4594881",
"0.45945868",
"0.4592472",
"0.45821145",
"0.45753077",
"0.45664546",
"0.45606261",
"0.45508105",
"0.45486727",
"0.45419163",
"0.45413837",
"0.45404103",
"0.45333627",
"0.45305392",
"0.45252365",
"0.4517877",
"0.45171863",
"0.45171347",
"0.45160243",
"0.4506146",
"0.45048195",
"0.44994715",
"0.44959208",
"0.44847515",
"0.4484052",
"0.44829947",
"0.44816235",
"0.44785017",
"0.44752744",
"0.4472953",
"0.44672236"
]
| 0.6490881 | 0 |
Normalizes the given IData; this implementation converts the IData to an ElementList. Subclasses should override this method and return an instance of their self. | @Override
protected IData normalize(IData document) {
return new CaseInsensitiveElementList<Object>(document);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"private <T extends IDElement> ArrayList<Object[]> transformElementListToList(ArrayList<T> pElementList, int pElementType) throws Exception{\r\n\t\tArrayList<Object[]> vRet = new ArrayList<Object[]>();\r\n\t\t\r\n\t\tif (pElementList!= null) {\r\n\t\t\tfor (T vCur : pElementList) {\r\n\t\t\t\tswitch(pElementType) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tvRet.add(transformProbElementToList((ProbElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvRet.add(transformPrioElementToList((PrioElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception(\"02; tELtL,Edi\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else throw new Exception(\"04; tELtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}",
"protected ArrayList<Object[]> transformPrioElementListToList(ArrayList<PrioElement> pPrioElementList) throws Exception{\r\n\t\treturn transformElementListToList(pPrioElementList, 1);\r\n\t}",
"@SuppressWarnings(\"WeakerAccess\")\n @NonNull\n protected List<T> convert(@NonNull final Object data) {\n final List<Object> objects = CoreReflection.getObjects(data, false);\n if (objects == null) return Collections.singletonList(convertSingle(data));\n\n final ArrayList<T> list = new ArrayList<>();\n for (final Object object: objects)\n if (!CoreReflection.isNotSingle(object))\n list.add(convertSingle(object));\n\n return list;\n }",
"protected ArrayList<Object[]> transformProbElementListToList(ArrayList<ProbElement> pProbElementList) throws Exception{\r\n\t\treturn transformElementListToList(pProbElementList, 0);\r\n\t}",
"protected abstract ArrayList<Element> _toXml_();",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }",
"public ArrayList<Double> normalize( ArrayList<Double> data, double scale )\n {\n double min = Double.MAX_VALUE;\n double max = Double.MIN_VALUE;\n ArrayList<Double> result = new ArrayList<Double>();\n\n // First, need to find the min value in the array\n for( double value : data )\n {\n if( value < min )\n {\n min = value;\n }\n }\n\n // Next, translate by the min amount\n for( double value : data )\n {\n double temp = (value - min);\n result.add( temp );\n if( temp > max )\n {\n max = temp;\n }\n }\n\n // Finally, scale by max\n for( int i=0; i<result.size(); i++ )\n {\n result.set( i, (scale * ( result.get( i ) / max )) );\n }\n\n return result;\n }",
"public void normalise() {\n\t\tElement base = this;\n\t\t\n\t\tbase.setNamespace(\"1\");\n\t\t\n\t\tint i = 1;\n\t\tfor (Element child : base.getAllChildren() )\n\t\t\tbase.normaliseChild(child, i++);\n\t\t\n\t\t\n\t}",
"public List<Tag> getAsList() {\n return Collections.unmodifiableList(data);\n }",
"@Override\r\n\tpublic Object[] getElements(Object inputElement) {\n\t\treturn ((List) inputElement).toArray();\r\n\t}",
"@Override\r\n\t\tpublic Object[] getElements(Object inputElement) {\n\t\t\ttry{\r\n\t\t\t\treturn ((List)inputElement).toArray();\r\n\t\t\t}catch(Exception e){\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}",
"@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}",
"public List<E> toList() {\r\n ArrayList<E> result = new ArrayList<E>(this.size());\r\n for (E e : this) {\r\n result.add(e);\r\n }\r\n return result;\r\n }",
"@Override\n public List<Element> normalize(Program solution)\n {\n List<Element> original = (List<Element>) solution.parse();\n List<Element> normalized = new ArrayList<Element>();\n List<Integer> normalizedValues = new ArrayList<Integer>();\n Map<Integer, Integer> occurrences = new HashMap<Integer,Integer>();\n \n // Count elements balance\n for(Element e : original)\n {\n int label = e.getLabel();\n if(e.getLabel() > 0)\n occurrences.put(label, occurrences.containsKey(label) ? occurrences.get(label) + 1 : 1);\n else\n occurrences.put(-label, occurrences.containsKey(-label) ? occurrences.get(-label) -1 : -1);\n } \n \n for(Element e : original)\n {\n int label = e.getLabel();\n if (label > 0 && !normalizedValues.contains(label) && occurrences.get(label) >= 0)\n {\n normalized.add(e);\n normalizedValues.add(label);\n }\n } \n return normalized;\n }",
"public List toList() throws TemplateModelException {\n if (unwrappedList == null) {\n Class listClass = list.getClass();\n List result = null;\n try {\n result = (List) listClass.newInstance();\n } catch (Exception e) {\n throw new TemplateModelException(\"Error instantiating an object of type \" + listClass.getName() + \"\\n\" + e.getMessage());\n }\n BeansWrapper bw = BeansWrapper.getDefaultInstance();\n for (int i=0; i<list.size(); i++) {\n Object elem = list.get(i);\n if (elem instanceof TemplateModel) {\n elem = bw.unwrap((TemplateModel) elem);\n }\n result.add(elem);\n }\n unwrappedList = result;\n }\n return unwrappedList;\n }",
"protected List<String> convertToList(final String data) {\n\t\tif (data == null || data.length() == 0) {\n\t\t\treturn new ArrayList<String>();\n\t\t}\n\t\tString[] result = data.split(\",\");\n\t\tList<String> list = new ArrayList<String>();\n\t\tfor (String val : result) {\n\t\t\tlist.add(val.trim());\n\t\t}\n\t\treturn list;\n\t}",
"protected ArrayList<Object[]> genObjectArrayListFromIDElementList(ArrayList<? extends IDElement> pIDElementList) throws Exception{\r\n\t\tObject[] vElement;\r\n\t\tArrayList<Object[]> vRet;\r\n \t\t\r\n \t\tif (pIDElementList != null) {\r\n \t\t\tvRet = new ArrayList<Object[]>();\r\n \t\t\t\r\n \t\t\tfor (IDElement vCur : pIDElementList) {\r\n \t\t\t\tvElement = new Object[2];\r\n \t \t\t\t\r\n \t \t\t\tvElement[0] = vCur.getId();\r\n \t \t\t\tvElement[1] = vCur.getName();\r\n \t \t\t\t\r\n \t \t\t\tvRet.add(vElement);\r\n \t\t\t}\r\n \t\t} else throw new Exception(\"04; gOALfIDEL,Edi\");\r\n \t\t\r\n \t\treturn vRet;\r\n\t}",
"private Object[] transformPrioElementToList(PrioElement pPrioElement) throws Exception{\r\n\t\tObject[] vRet = new Object[3];\r\n\t\t\r\n\t\tif (pPrioElement != null) {\r\n\t\t\tvRet[0] = pPrioElement.getId();\r\n\t\t\tvRet[1] = pPrioElement.getName();\r\n\t\t\tvRet[2] = pPrioElement.getPriority();\r\n\t\t} else throw new Exception(\"04; tPriEtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}",
"@Override\n public List<E> asList() {\n ArrayList<E> result = null;\n\n while (top.next != null) {\n top = top.next;\n result.add(top.data);\n }\n return result;\n }",
"public ArrayList convertDataStructure(Iterator iterator) {\r\n ArrayList list = new ArrayList();\r\n int i = 0;\r\n while (iterator.hasNext()) {\r\n AgrupamentoBean bean = (AgrupamentoBean) iterator.next();\r\n bean.setRegistro(new Long(i));\r\n list.add(bean);\r\n i++;\r\n }\r\n return list;\r\n }",
"public void setValue(List<T> convertData) {\n this.data = convertData;\n }",
"public CapsuleAdapter(List<T> data) {\n if (data != null) mList = data;\n }",
"public static List<OperationData> getElements() {\n return new ArrayList<>(content);\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public static void buildElements(Object p,Object v,List<DataElement> dataVect) {\n if(!(p instanceof Iterable<?>)) p=null;\r\n if(!(v instanceof Iterable<?>)) v=null;\r\n if(p==null && v==null) return;\r\n Iterator<?> pi=(p==null)?null:((Iterable<?>)p).iterator();\r\n Iterator<?> vi=(v==null)?null:((Iterable<?>)v).iterator();\r\n while((pi!=null && pi.hasNext()) || (vi!=null && vi.hasNext())) {\r\n Object po=(pi==null)?null:pi.next();\r\n Object vo=(vi==null)?null:vi.next();\r\n int[] params=null;\r\n float[] vals=null;\r\n // if(po instanceof NativeArray) po=new IterableNativeArray((NativeArray)po);\r\n if(po instanceof int[]) params=(int[])po;\r\n else if(po instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)po;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n params=new int[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n params[cnt]=ScriptUtil.objectToInt(o);\r\n cnt++;\r\n }\r\n } else if(po!=null) {\r\n params=new int[1];\r\n params[0]=ScriptUtil.objectToInt(po);\r\n }\r\n // if(vo instanceof NativeArray) vo=new IterableNativeArray((NativeArray)vo);\r\n if(vo instanceof float[]) vals=(float[])vo;\r\n else if(vo instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)vo;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n vals=new float[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n vals[cnt]=ScriptUtil.objectToFloat(o);\r\n cnt++;\r\n }\r\n } else if(vo!=null) {\r\n vals=new float[1];\r\n vals[0]=ScriptUtil.objectToFloat(vo);\r\n }\r\n if(params==null) params=new int[0];\r\n if(vals==null) vals=new float[0];\r\n dataVect.add(new DataElement(params,vals));\r\n }\r\n }",
"public XSListSimpleType asList() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: idiv \n // 1: laload \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- ------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/ListSimpleTypeImpl;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"@Override\n\tCollection<T> internalElements() {\n\t\tCollection<T> values = new LinkedList<T>();\n\t\t\n\t\tfor(LinkedList<T> list : internalStorage.get(0).values()) {\n\t\t values.addAll(list);\t\n\t\t}\n\t\treturn values;\n\t}",
"public abstract ArrayList<STTPoint> getWrappedData();",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public List<T> preorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n list.add(root.getData());\n preorderHelper(list, root);\n }\n return list;\n }",
"public ArrayList<TheDataModel> getUnclassifiedData(ArrayList<TheDataModel> tabulatedData){\n\t\t\n\t\tArrayList<TheDataModel> unclassifiedData=new ArrayList<TheDataModel>();\n\t\tfor(int i=0;i<tabulatedData.size();i++){\n\t\t\tif(tabulatedData.get(i).getY().equals(\".\")){\n\t\t\t\tunclassifiedData.add(tabulatedData.get(i));\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn unclassifiedData;\n\t\t\n\t}",
"public double[] preprocessDataNormalizationOnly(double[] data) {\n return dataNormalization.normalizeNewData(data);\n }",
"protected Element[] findDataElements(Element element) {\n List elements = new ArrayList();\n Iterator dataElements = element.getChildren(\"dataElement\",\n DataThingXMLFactory.namespace).iterator();\n while (dataElements.hasNext()) {\n elements.add((Element) dataElements.next());\n }\n Iterator collectionElements = element.getChildren(\"partialOrder\",\n DataThingXMLFactory.namespace).iterator();\n while (collectionElements.hasNext()) {\n Element collectionElement = (Element) collectionElements.next();\n Element itemListElement = collectionElement.getChild(\"itemList\",\n DataThingXMLFactory.namespace);\n elements.addAll(Arrays.asList(findDataElements(itemListElement)));\n }\n return (Element[]) elements.toArray(new Element[elements.size()]);\n }",
"@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}",
"public static List<Content> evaluateListQuery(String query, Element dataElem)\n throws SaxonApiException {\n\n // put the element in a jdom document\n Document dataDoc = new Document(dataElem.clone());\n String result = evaluateQuery(query, dataDoc);\n\n // use the string result to create a doc to get it expressed as an element list\n Document resultDoc = JDOMUtil.stringToDocument(StringUtil.wrap(result, \"root\"));\n return resultDoc.getRootElement().cloneContent();\n }",
"List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);",
"public ArrayList<DataPoint> normalizeFeatures(ArrayList<DataPoint> datapoints) {\n\t\t\n\t\tdouble[] vector = new double[featureCount];\n\t\t// now normalize ALL the points!\n\t\tfor (DataPoint aPoint : datapoints) {\n\t\t\tvector = aPoint.vector;\n\t\t\tfor (int i = 0; i < featureCount; ++i) {\n\t\t\t\tvector[i] = (vector[i] - meansOfFeatures.get(i))\n\t\t\t\t\t\t/ stdevOfFeatures.get(i);\n\t\t\t}\n\t\t\taPoint.setVector(vector);\n\t\t}\n\t\treturn datapoints;\n\t}",
"private Object[] transformProbElementToList(ProbElement pProbElement) throws Exception{\r\n\t\tObject[] vRet = new Object[3];\r\n\t\t\r\n\t\tif (pProbElement != null) {\r\n\t\t\tvRet[0] = pProbElement.getId();\r\n\t\t\tvRet[1] = pProbElement.getName();\r\n\t\t\tvRet[2] = pProbElement.getProbability();\r\n\t\t} else throw new Exception(\"04; tPEtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}",
"public abstract List<CellValue< ? extends Comparable< ? >>> convertColumnData(C column,\n List<V> columnData);",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic <T> void setModelData(List<T> data) {\n\t\t\tmProperties = (List<PropertyItem>) data;\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}",
"public List<T> toList() {\n return Query.toList(iterable);\n }",
"public double[][] normalize( double[][] data )\n {\n double[][] result = new double[ data.length ][];\n\n for( int i=0; i<data.length; i++ )\n {\n result[ i ] = normalize( data[ i ], 1 );\n }\n\n return result;\n }",
"public ListConverting getListConverting() {\n return listConverting;\n }",
"protected int[] transformGenElementToList(GenElement pGenElement) throws Exception {\r\n\t\tint[] vRet = new int[3];\r\n\t\t\r\n\t\tif (pGenElement != null) {\r\n\t\t\tvRet[0] = pGenElement.getNumber();\r\n\t\t\tvRet[1] = pGenElement.getSide();\r\n\t\t\tvRet[2] = pGenElement.getOffset();\r\n\t\t}else throw new Exception(\"04; tGEtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}",
"private void transList(MutterData data, MutterLogic logic) {\r\n List<String> mutterListAll = logic.getMutterListAll();\r\n List<String> dateTimeListAll = logic.getDateTimeListAll();\r\n\r\n mutterListAll.clear();\r\n dateTimeListAll.clear();\r\n\r\n //---- ディープコピー(要素ごとコピー) ----\r\n mutterListAll.addAll(data.getMutterList());\r\n dateTimeListAll.addAll(data.getDateTimeList());\r\n\r\n logic.setMutterListAll(mutterListAll);\r\n logic.setDateTimeListAll(dateTimeListAll);\r\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public void populate(List data) {\n visit(m_root, data);\n }",
"Listof<X> toList();",
"List<Object> toList() {\n List<Object> results = new ArrayList<>(this.myArrayList.size());\n for (Object element : this.myArrayList) {\n if (element == null || PropertyObject.NULL.equals(element)) {\n results.add(null);\n } else if (element instanceof PropertyArray) {\n results.add(((PropertyArray) element).toList());\n } else if (element instanceof PropertyObject) {\n results.add(((PropertyObject) element).toMap());\n } else {\n results.add(element);\n }\n }\n return results;\n }",
"IStreamList<T> transform(IStreamList<T> dataset);",
"public ArrayList<E> getData() {\n\t\treturn data;\n\t}",
"public List<T> getItems() {\n return SerDes.unmirrorList(getElement().getItems(), getItemClass());\n }",
"@Override\r\n public ListADT<T> toMutable() {\r\n return new ListADTImpl<T>(this.head);\r\n }",
"@Override\r\n\tpublic List<T> getCollectionData() {\n\t\treturn data == null ? null : data.list;\r\n\t}",
"protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }",
"public abstract List<T> convertToEntities(List<D> dtos);",
"public List<VueMetadataElement> getXMLdata() {\n // TODO: FIX\n // if (isEmpty())\n // return null;\n // else\n return dataList;\n }",
"@Override\n public void sort(List<Double> data, List<List<Double>> sortedData) {\n for (int i = 0; i < data.size() - 1; i++) {\n for (int j = 0; j < data.size() - i - 1; j++) {\n if (data.get(j) > data.get(j + 1)) {\n Double temp = data.get(j);\n data.set(j, data.get(j + 1));\n data.set(j + 1, temp);\n sortedData.add(new ArrayList<>(data));\n }\n }\n }\n }",
"@Override\n\t\tprotected void revalidate() {\n\t\t\tif (valid) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvalid = true;\n\t\t\tmissing = false;\n\t\t\tmalformed = false;\n\n\t\t\tString s = getValueAsString();\n\t\t\tif (s == null) {\n\t\t\t\tmissing = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tListBuilder builder = new ListBuilder(this);\n\n\t\t\t\tdoParse(s, builder);\n\n\t\t\t\tif (builder.getList() != null) {\n\t\t\t\t\tclear(itemList);\n\t\t\t\t}\n\t\t\t\titemList = builder.getList();\n\t\t\t} catch (ParseException e) {\n\t\t\t\titemList = new ArrayList<>(1);\n\t\t\t\tmalformed = true;\n\t\t\t}\n\t\t}",
"public void setData(java.util.List data) {\r\n this.data = data;\r\n }",
"@Override\n public ArrayList<Object> getFieldsAsList() {\n if (!getParsed()) {\n parse();\n }\n if (cachedList == null) {\n cachedList = new ArrayList<Object>();\n } else {\n cachedList.clear();\n }\n for (int i = 0; i < getFields().length; i++) {\n cachedList.add(uncheckedGetField(i));\n }\n return cachedList;\n }",
"@Override\n protected List<FieldInfo> getListData()\n {\n // if is an array (we potentially will compress the array if it is\n // large)\n if (obj.isArray()) {\n return compressArrayList(obj);\n }\n else {\n List<DebuggerField> fields = obj.getFields();\n List<FieldInfo> fieldInfos = new ArrayList<FieldInfo>(fields.size());\n for (DebuggerField field : fields) {\n if (! Modifier.isStatic(field.getModifiers())) {\n String desc = Inspector.fieldToString(field);\n String value = field.getValueString();\n fieldInfos.add(new FieldInfo(desc, value));\n }\n }\n return fieldInfos;\n }\n }",
"public static <T> List<T> toList(Iterable<T> elements) {\n return toList(elements.iterator());\n }",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"@Override\n @SuppressWarnings(\"rawtypes\")\n public Object[] getElements(Object inputElement) {\n if (inputElement instanceof Object[]) {\n return (Object[])inputElement;\n }\n if (inputElement instanceof Collection) {\n return ((Collection)inputElement).toArray();\n }\n return new Object[0];\n }",
"void onParsableDataResult(List<T> parsableData);",
"public List<Object> toList() {\n int i = this.capacityHint;\n int i2 = this.size;\n ArrayList arrayList = new ArrayList(i2 + 1);\n Object[] head2 = head();\n int i3 = 0;\n while (true) {\n int i4 = 0;\n while (i3 < i2) {\n arrayList.add(head2[i4]);\n i3++;\n i4++;\n if (i4 == i) {\n head2 = head2[i];\n }\n }\n return arrayList;\n }\n }",
"public static List toList(Iterator iter)\r\n {\r\n if (iter == null)\r\n {\r\n return null;\r\n }\r\n List list = new ArrayList();\r\n while (iter.hasNext())\r\n {\r\n list.add(iter.next());\r\n }\r\n return list;\r\n }",
"@Override\n public void getHomepageElementList() {\n String elementTypes = firebaseRemoteConfig.getString(Constants.FIREBASE_ELEMENT_LIST);\n List<String> elementTypeArray = Arrays.asList(elementTypes.split(\",\"));\n\n List<ElementView> elementViewList = new ArrayList<>();\n for (String elementType : elementTypeArray) {\n ElementView elementView = elementViewFactory.convert(elementType);\n if (elementView != null) {\n elementViewList.add(elementView);\n }\n }\n\n homepageView.setupElementViewAdapter(elementViewList);\n }",
"@Override\r\n\t\tpublic void normalize()\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"public List<Element> listElements() {\r\n List<Element> result = new ArrayList<>(numElements);\r\n for (Entry<Fitness, List<Element>> entry\r\n : elementsByFitness.descendingMap().entrySet()) {\r\n List<Element> list = entry.getValue();\r\n assert !list.isEmpty();\r\n result.addAll(list);\r\n }\r\n\r\n return result;\r\n }",
"private Instances[] splitData(Instances data, Attribute att) {\r\n\r\n\t Instances[] splitData = new Instances[att.numValues()];\r\n\t for (int j = 0; j < att.numValues(); j++) {\r\n\t splitData[j] = new Instances(data, data.numInstances());\r\n\t }\r\n\t Enumeration instEnum = data.enumerateInstances();\r\n\t while (instEnum.hasMoreElements()) {\r\n\t Instance inst = (Instance) instEnum.nextElement();\r\n\t splitData[(int) inst.value(att)].add(inst);\r\n\t }\r\n\t for (int i = 0; i < splitData.length; i++) {\r\n\t splitData[i].compactify();\r\n\t }\r\n\t //System.out.println(\"split data is \"+splitData[0].get(0));\r\n\t // System.out.println(\" @seperate by attribute:\"+att);\r\n\t //for(Instances ii:splitData){\r\n\t\t\t//System.out.println(\" \");\r\n\t //\tprintinsts(ii);\r\n\t //}\r\n\t \r\n\t return splitData;\r\n\t }",
"public ArrayList<Element> listeTousElements() {\n return(new ArrayList<Element>(cacheNomsElements.keySet()));\n }",
"protected java.util.List getInsertElementStructure(Element element, Element parentEle){\n return ElementToObjectMapper.getMapper().getInsertElementStructure(element.getTagName());\n }",
"@Override\n public Iterator<E> iterator() {\n return new SimpleArrayListIterator<E>();\n }",
"@Override\n\t\tpublic abstract List<T> parse(Object valueToParse, Type elementType);",
"@SuppressWarnings(\"unchecked\")\n\tpublic ArrayList<E> getEntities() {\n\t\treturn (ArrayList<E>) entities.clone();\n\t}",
"public static <T extends Row> DataSet<T> toDS(List<T> data) {\n return new DataSet<>(data);\n }",
"private void expand() {\n\n intElements = copyIntArray(intElements, intElements.length * 2);\n doubleElements = copyDoubleArray(doubleElements, doubleElements.length * 2);\n stringElements = copyStringArray(stringElements, stringElements.length * 2);\n typeOfElements = copyIntArray(typeOfElements, typeOfElements.length * 2);\n }",
"public Object[] getElements() {\r\n\t\treturn data.toArray();\r\n\t}",
"@Override\n\tpublic List<Exam> toEntity(List<ExamDTO> dtoList) {\n\t\treturn null;\n\t}",
"public S<T> list(List<String> data){\n\t\tlist(data.toArray(new String[data.size()]));\n\t\treturn this;\n\t}",
"public interface DataConverter<JAVATYPE,METATYPE extends FieldDefinition> {\n /** Method invoked for a single JAVATYPE */\n JAVATYPE convert(JAVATYPE oldValue, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE List. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n List <JAVATYPE> convertList(List<JAVATYPE> oldList, final METATYPE meta);\n\n /** Method invoked for a JAVATYPE Set. This can be used to alter the set size / add / remove elements after processing.\n * Please note that the converter is only invoked on the list itself, not on the individual elements. */\n Set <JAVATYPE> convertSet(Set<JAVATYPE> oldSet, final METATYPE meta);\n\n /** Method invoked for an array of JAVATYPEs. This can be used to alter the list length / add / remove elements after processing.\n * Please note that the converter is only invoked on the array itself, not on the individual elements. */\n JAVATYPE [] convertArray(JAVATYPE [] oldArray, final METATYPE meta);\n\n /** Map-type methods. The tree walker converses the value parts of the map only. */\n public <K> Map<K, JAVATYPE> convertMap(Map<K, JAVATYPE> oldMap, final METATYPE meta);\n}",
"public ArrayList buildGroup(AbstractEntityInterface anEntity) {\n/* 25 */ ArrayList resultList = new ArrayList();\n/* 26 */ if (!(anEntity instanceof lrg.memoria.core.Class)) {\n/* 27 */ return resultList;\n/* */ }\n/* 29 */ ModelElementList modelElementList = ((DataAbstraction)anEntity).getAncestorsList();\n/* 30 */ modelElementList.remove(anEntity);\n/* 31 */ return modelElementList;\n/* */ }",
"@Override\r\n public ListADT<T> toImmutable() {\r\n return new ImmutableListADTImpl<T>(new ListADTImpl<T>(this.head));\r\n }",
"public List<Expr> getExprListNoTransform() {\n return (List<Expr>) getChildNoTransform(1);\n }",
"public List allElements() {\r\n\t\tArrayList elems = new ArrayList();\r\n\t\tfor (int i = 0; i < elements.size(); ++i) {\r\n\t\t\tObject ob = elements.get(i);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t} else if (ob instanceof FunctionDef) {\r\n\t\t\t\tExpression[] params = ((FunctionDef) ob).getParameters();\r\n\t\t\t\tfor (int n = 0; n < params.length; ++n) {\r\n\t\t\t\t\telems.addAll(params[n].allElements());\r\n\t\t\t\t}\r\n\t\t\t} else if (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TArrayType) {\r\n\t\t\t\t\tExpression[] exp_list = (Expression[]) tob.getObject();\r\n\t\t\t\t\tfor (int n = 0; n < exp_list.length; ++n) {\r\n\t\t\t\t\t\telems.addAll(exp_list[n].allElements());\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\telems.add(ob);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\telems.add(ob);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn elems;\r\n\t}",
"@Override\n default List<FieldElement> deserializeList(byte[] bytes) {\n List<CompT> wrongType = getSerializer().deserializeList(bytes);\n return wrongType.stream().map(x -> (FieldElement) x).collect(Collectors.toList());\n }",
"public void swap(ArrayList<TodoList> newData){\n data = new ArrayList<>(newData);\n notifyDataSetChanged();\n }",
"@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"private ArrayList<ArrayList<String>> zeroingData(ArrayList<ArrayList<String>> data) {\n\n\t\tdouble firstStrainVal = Double.parseDouble(data.get(1).get(0));\n\t\tdouble firstStressVal = Double.parseDouble(data.get(1).get(1));\n\n\t\t// subtract the first strain value for the entire strain column\n\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\tString newStrain = Double.toString(Double.parseDouble(data.get(i).get(0)) - firstStrainVal);\n\t\t\tBigDecimal bd = new BigDecimal(newStrain).setScale(6, RoundingMode.CEILING);\n\t\t\tdata.get(i).set(0, bd.toString());\n\t\t}\n\n\t\t// subtract the first stress value for the entire stress column\n\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\tString newStress = Double.toString(Double.parseDouble(data.get(i).get(1)) - firstStressVal);\n\t\t\tBigDecimal bd = new BigDecimal(newStress).setScale(6, RoundingMode.CEILING);\n\t\t\tdata.get(i).set(1, bd.toString());\n\t\t}\n\n\t\t// Gage correction\n\t\tif (gageCorrect) {\n\n\t\t\t// divide the entire strain column by (1 + offeststrain)\n\t\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\t\tString newStrain = Double.toString(Double.parseDouble(data.get(i).get(0)) / (1 + firstStrainVal));\n\t\t\t\tBigDecimal bd = new BigDecimal(newStrain).setScale(6, RoundingMode.CEILING);\n\t\t\t\tdata.get(i).set(0, bd.toString());\n\t\t\t}\n\n\t\t\t// multiply the stress column by (1 + offeststrain)\n\t\t\tfor (int i = 1; i < data.size(); i++) {\n\t\t\t\tString newStress = Double.toString(Double.parseDouble(data.get(i).get(1)) * (1 + firstStrainVal));\n\t\t\t\tBigDecimal bd = new BigDecimal(newStress).setScale(6, RoundingMode.CEILING);\n\t\t\t\tdata.get(i).set(1, bd.toString());\n\t\t\t}\n\n\t\t}\n\n\t\treturn data;\n\t}",
"protected <ELEMENT> List<ELEMENT> newReferrerList() { // overriding to import\r\n return new ArrayList<ELEMENT>();\r\n }",
"private static <T> List<T> list(T... elements) {\n return ImmutableList.copyOf(elements);\n }",
"public Layer_ElementsCollection()\n\t{\n\t\tthis.elements = new ArrayList<GIS_element>();\n\t}",
"public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }",
"protected void init(Collection<Double> data) {\n\t\tList<Attribute> attList = Util.newList();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tAttribute att = new Attribute(\"w\" + i, Type.real);\n\t\t\tattList.add(att);\n\t\t}\n\t\tsetAttRef(AttributeList.create(attList));\n\t\t\n\t\tint i = 0;\n\t\tfor (double value : data) {\n\t\t\tsetValue(i, value);\n\t\t\ti++;\n\t\t}\n\t}"
]
| [
"0.5995944",
"0.5995944",
"0.5767445",
"0.55771524",
"0.5511548",
"0.5446172",
"0.52799153",
"0.5251928",
"0.5245896",
"0.5152162",
"0.5111908",
"0.51095194",
"0.50999486",
"0.5073334",
"0.5049907",
"0.49378848",
"0.49186036",
"0.49059525",
"0.49015254",
"0.48860765",
"0.48697692",
"0.48670664",
"0.4857246",
"0.48322365",
"0.47928277",
"0.47869927",
"0.47764465",
"0.47723296",
"0.4763435",
"0.47524405",
"0.47239855",
"0.47074294",
"0.47060892",
"0.47031683",
"0.4699723",
"0.4694212",
"0.46805656",
"0.46400496",
"0.4639206",
"0.46032846",
"0.45976582",
"0.4571404",
"0.45680714",
"0.45563558",
"0.45535117",
"0.45525426",
"0.45435554",
"0.45370725",
"0.4534044",
"0.4515366",
"0.45090705",
"0.44953084",
"0.44904345",
"0.448916",
"0.44855848",
"0.44718084",
"0.44674128",
"0.44590288",
"0.44518724",
"0.44508895",
"0.44398674",
"0.4435066",
"0.44327548",
"0.44233048",
"0.44216168",
"0.44214037",
"0.44176513",
"0.44039938",
"0.4387929",
"0.43845168",
"0.43830037",
"0.4379309",
"0.4357894",
"0.43517518",
"0.43502814",
"0.4332707",
"0.43315732",
"0.43314505",
"0.43265513",
"0.43155",
"0.42966777",
"0.42933455",
"0.4291913",
"0.4284741",
"0.42833474",
"0.42832905",
"0.42814937",
"0.4280561",
"0.42757058",
"0.42661962",
"0.42660984",
"0.42644197",
"0.4263243",
"0.4260595",
"0.42595595",
"0.42583984",
"0.42571658",
"0.42568573",
"0.4248525",
"0.42469478"
]
| 0.67259395 | 0 |
Returns a newly created IData object. | public static IData create() {
return new CaseInsensitiveElementList<Object>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract D createData();",
"DataElement createDataElement();",
"public InternalData createInternalData2() {\r\n return new InternalData(); // returns data which is not exported from Module modb\r\n }",
"CreationData creationData();",
"DataType createDataType();",
"public Data() {}",
"public abstract DataType<T> newInstance();",
"public IData getData() {\n return data;\n }",
"DataTypeInstance getDataInstance();",
"DataList createDataList();",
"DataFactory getDataFactory();",
"public Object create( DataWrapper data) {\n return LoadManager.getItem(data.getString(\"type\"),data.getName());\n }",
"ExpData createData(Container container, @NotNull DataType type);",
"DataPackage createDataPackage();",
"FData createFData();",
"public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public DataBuffer createDataBuffer() {\n DataBuffer dataBuffer = null;\n\n int size = getBufferSize();\n switch (dataType) {\n case DataBuffer.TYPE_BYTE:\n dataBuffer = new DataBufferByte(size, numBanks);\n break;\n case DataBuffer.TYPE_USHORT:\n dataBuffer = new DataBufferUShort(size, numBanks);\n break;\n case DataBuffer.TYPE_SHORT:\n dataBuffer = new DataBufferShort(size, numBanks);\n break;\n case DataBuffer.TYPE_INT:\n dataBuffer = new DataBufferInt(size, numBanks);\n break;\n case DataBuffer.TYPE_FLOAT:\n dataBuffer = new DataBufferFloat(size, numBanks);\n break;\n case DataBuffer.TYPE_DOUBLE:\n dataBuffer = new DataBufferDouble(size, numBanks);\n break;\n }\n\n return dataBuffer;\n }",
"T getData() {\n\t\treturn data;\n\t}",
"Object getData() { /* package access */\n\t\treturn data;\n\t}",
"public Data createData(Address addr, DataType dataType) throws CodeUnitInsertionException;",
"public static FileData createEntity() {\n FileData fileData = Reflections.createObj(FileData.class, Lists.newArrayList(\n\t\t FileData.F_NAME\n\t\t,FileData.F_PATH\n\t\t,FileData.F_SIZE\n\t\t,FileData.F_TYPE\n\t\t,FileData.F_DESCRIPTION\n ),\n\n\t\t DEFAULT_NAME\n\n\t\t,DEFAULT_PATH\n\n\t\t,DEFAULT_SIZE\n\n\t\t,DEFAULT_TYPE\n\n\n\n\n\n\n\t\t,DEFAULT_DESCRIPTION\n\n\t);\n return fileData;\n }",
"DataModel createDataModel();",
"AtomicData createAtomicData();",
"public Object getDataObject() {\n return dataObject;\n }",
"public T getData() {\n return mData;\n }",
"public Data() {\n }",
"public Data() {\n }",
"public T getData() {\r\n return data;\r\n }",
"public IseData getIseData() {\n String uuidString = getString(getColumnIndex(IseDataTable.Cols.UUID));\n String iseNumber = getString(getColumnIndex(IseDataTable.Cols.ISE_NUMBER));\n String location = getString(getColumnIndex(IseDataTable.Cols.LOCATION));\n String gridId = getString(getColumnIndex(IseDataTable.Cols.GRID_ID));\n long date = getLong(getColumnIndex(IseDataTable.Cols.DATE));\n String description = getString(getColumnIndex(IseDataTable.Cols.DESCRIPTION));\n String inspectorFullName = getString(getColumnIndex(IseDataTable.Cols.INSPECTOR_NAME));\n String inspectorUserName = getString(getColumnIndex(IseDataTable.Cols.INSPECTOR_USERNAME));\n double methaneReading = getDouble(getColumnIndex(IseDataTable.Cols.MAX_METHANE_READING));\n\n IseData iseData = new IseData(UUID.fromString(uuidString));\n iseData.setIseNumber(iseNumber);\n iseData.setLocation(location);\n iseData.setGridId(gridId);\n iseData.setDate(new Date(date));\n iseData.setDescription(description);\n iseData.setInspectorFullName(inspectorFullName);\n iseData.setInspectorUserName(inspectorUserName);\n iseData.setMethaneReading(methaneReading);\n\n return iseData;\n }",
"public IData getStoreddata();",
"public Data createData(Address addr, DataType dataType, int length)\n\t\t\tthrows CodeUnitInsertionException;",
"public D getData(){\n\t\treturn data;\n\t}",
"public D getData() {\n return data;\n }",
"public D getData() {\n return data;\n }",
"public static EpitrelloDataServerice creator() {\n\t\tif(dataServerice == null) {\n\t\t\tdataServerice = new DataService();\n\t\t}\n\t\treturn dataServerice;\n\t}",
"public interface IDataFactory<D extends IData>{\n\n D create();\n\n void save(D data, String key, CompoundNBT tag);\n\n void read(D data, String key, CompoundNBT tag);\n\n void saveUpdate(D data, PacketBuffer buf);\n\n void readUpdate(D data, PacketBuffer buf);\n\n default boolean canConvert(Class returnType){\n return false;\n }\n\n default void convert(D data, Object obj){}\n\n /**\n * Used for debugging only\n */\n default D createTest(){\n return create();\n }\n\n}",
"public Data() {\n \n }",
"public abstract Object getData();",
"final public Object getDataObject() {\n return this.dataObject;\n }",
"Object getData();",
"Object getData();",
"public Object getData() \n {\n return data;\n }",
"public Data getData() {\n return data;\n }",
"public Data getData() {\n return data;\n }",
"@Override\n public FlotillaData getData() {\n FlotillaData data = new FlotillaData();\n data.setName(name);\n data.setLocation(reference);\n data.setBoats(getBoatNames(boats));\n\n return data;\n }",
"T getObject() {\n\t\t\treturn data;\n\t\t}",
"public static Dataclient GetData(){\n return RetrofitClient.getClient(Base_Url).create(Dataclient.class);\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }",
"@Override\n\tpublic Data getDataModelVariables() {\n\t\treturn new Data();\n\t}",
"protected abstract T create(ICalDataType dataType, SemiStructuredValueIterator it);",
"public static DataModelBuilder create() {\n return new DataModelBuilder();\n }",
"public com.clarifai.grpc.api.Data.Builder getDataBuilder() {\n \n onChanged();\n return getDataFieldBuilder().getBuilder();\n }",
"@Override()\n protected RelationshipData createNewData(final String _name)\n {\n return new RelationshipData(this, _name);\n }",
"T getData();",
"private PieDataset createDataset() {\n\t\tDefaultPieDataset result = new DefaultPieDataset();\n\t\tresult.setValue(\"Linux\", 29);\n\t\tresult.setValue(\"Mac\", 20);\n\t\tresult.setValue(\"Windows\", 51);\n\t\treturn result;\n\n\t}",
"private CinaImageDataSetInformation createDataSetInformation()\n {\n CinaImageDataSetInformation metadataDataSetInfo = new CinaImageDataSetInformation();\n metadataDataSetInfo.setSampleCode(replicaSampleId.getSampleCode());\n metadataDataSetInfo.setSpaceCode(replicaSampleId.getSpaceLevel().getSpaceCode());\n metadataDataSetInfo.setDataSetType(globalState.getImageDataSetType().getDataSetType());\n metadataDataSetInfo.setDataSetKind(DataSetKind.PHYSICAL);\n List<String> parentDataSetCodes =\n Collections.singletonList(bundleMetadataDataSetInformation.getDataSetCode());\n metadataDataSetInfo.setParentDataSetCodes(parentDataSetCodes);\n metadataDataSetInfo.setShareId(bundleMetadataDataSetInformation.getShareId());\n return metadataDataSetInfo;\n }",
"public DataFactoryImpl() {\n\t\tsuper();\n\t}",
"public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}",
"public synchronized Object getData() {\n return data;\n }",
"public Object getData();",
"protected O bytesToObject(byte[] data) throws OBException,\r\n InstantiationException, IllegalAccessException, IllegalIdException {\r\n O res = type.newInstance();\r\n try {\r\n res.load(data);\r\n } catch (IOException e) {\r\n throw new OBException(e);\r\n }\r\n return res;\r\n }",
"public DataItem getData() {\n return data;\n }",
"DataHRecordData() {}",
"public hu.blackbelt.epsilon.runtime.model.test1.data.DataModel build() {\n final hu.blackbelt.epsilon.runtime.model.test1.data.DataModel _newInstance = hu.blackbelt.epsilon.runtime.model.test1.data.DataFactory.eINSTANCE.createDataModel();\n if (m_featureNameSet) {\n _newInstance.setName(m_name);\n }\n if (m_featureEntitySet) {\n _newInstance.getEntity().addAll(m_entity);\n } else {\n if (!m_featureEntityBuilder.isEmpty()) {\n for (hu.blackbelt.epsilon.runtime.model.test1.data.util.builder.IDataBuilder<? extends hu.blackbelt.epsilon.runtime.model.test1.data.Entity> builder : m_featureEntityBuilder) {\n _newInstance.getEntity().add(builder.build());\n }\n }\n }\n return _newInstance;\n }",
"public T getData(){\n return this.data;\n }",
"T getData() {\n return this.data;\n }",
"private PieDataset createDataset() {\n JOptionPane.showMessageDialog(null, \"teste\"+dados.getEntrada());\r\n \r\n DefaultPieDataset result = new DefaultPieDataset();\r\n result.setValue(\"Entrada\", dados.getEntrada());\r\n result.setValue(\"Saida\", dados.getSaida());\r\n result.setValue(\"Saldo do Periodo\", dados.getSaldo());\r\n return result;\r\n\r\n }",
"public interface DataObject {\n\n /**\n * Returns the length of the contained resource.\n *\n * @return resource length of the resource.\n * @throws IOException when an error occurs while reading the length.\n */\n long getContentLength() throws IOException;\n\n /**\n * Returns an {@link InputStream} representing the contents of the resource.\n *\n * @return contents of the resource as stream.\n * @throws IOException when an error occurs while reading the resource.\n */\n InputStream getInputStream() throws IOException;\n\n /**\n * Returns {@link DataObject} containing the resource. The contents are ranged\n * from the start to the end indexes.\n *\n * @param start index at which data will be read from.\n * @param end index at which dat will be read to.\n * @return ranged resource object.\n * @throws IOException when an error occurs while reading the resource.\n */\n DataObject withRange(int start, int end) throws IOException;\n}",
"public abstract DataType<T> newInstance(String format);",
"E create(Resource data);",
"public T getData()\n\t{ \treturn this.data; }",
"public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}",
"public Object getData() {\n\t\treturn data;\n\t}",
"public A getData()\n\t{\n\t\treturn data;\n\t}",
"private Dataset prepareDataset() {\n // create TAPIR dataset with single endpoint\n Dataset dataset = new Dataset();\n dataset.setKey(UUID.randomUUID());\n dataset.setTitle(\"Beavers\");\n dataset.addEndpoint(endpoint);\n\n // add single Contact\n Contact contact = new Contact();\n contact.setKey(1);\n contact.addEmail(\"[email protected]\");\n dataset.setContacts(Lists.newArrayList(contact));\n\n // add single Identifier\n Identifier identifier = new Identifier();\n identifier.setKey(1);\n identifier.setType(IdentifierType.GBIF_PORTAL);\n identifier.setIdentifier(\"450\");\n dataset.setIdentifiers(Lists.newArrayList(identifier));\n\n // add 2 MachineTags 1 with metasync.gbif.org namespace, and another not having it\n List<MachineTag> machineTags = Lists.newArrayList();\n\n MachineTag machineTag = new MachineTag();\n machineTag.setKey(1);\n machineTag.setNamespace(Constants.METADATA_NAMESPACE);\n machineTag.setName(Constants.DECLARED_COUNT);\n machineTag.setValue(\"1000\");\n machineTags.add(machineTag);\n\n MachineTag machineTag2 = new MachineTag();\n machineTag2.setKey(2);\n machineTag2.setNamespace(\"public\");\n machineTag2.setName(\"IsoCountryCode\");\n machineTag2.setValue(\"DK\");\n machineTags.add(machineTag2);\n\n dataset.setMachineTags(machineTags);\n\n // add 1 Tag\n Tag tag = new Tag();\n tag.setKey(1);\n tag.setValue(\"Invasive\");\n dataset.setTags(Lists.newArrayList(tag));\n\n return dataset;\n }",
"public DataRecord() {\n super(DataTable.DATA);\n }",
"public static Instances getData()\n {\n return data;\n }",
"private com.google.protobuf.SingleFieldBuilderV3<\n com.clarifai.grpc.api.Data, com.clarifai.grpc.api.Data.Builder, com.clarifai.grpc.api.DataOrBuilder> \n getDataFieldBuilder() {\n if (dataBuilder_ == null) {\n dataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<\n com.clarifai.grpc.api.Data, com.clarifai.grpc.api.Data.Builder, com.clarifai.grpc.api.DataOrBuilder>(\n getData(),\n getParentForChildren(),\n isClean());\n data_ = null;\n }\n return dataBuilder_;\n }",
"public T getData() {\n return this.data;\n }",
"public FurniData toFurniData ()\n {\n FurniData furni = new FurniData();\n furni.id = furniId;\n furni.itemType = itemType;\n furni.itemId = itemId;\n furni.media = SceneUtil.createMediaDesc(mediaHash, mediaType);\n furni.loc = new MsoyLocation(x, y, z, 0);\n furni.layoutInfo = layoutInfo;\n furni.scaleX = scaleX;\n furni.scaleY = scaleY;\n furni.rotation = rotation;\n furni.hotSpotX = hotSpotX;\n furni.hotSpotY = hotSpotY;\n furni.actionType = actionType;\n furni.actionData = actionData;\n return furni;\n }",
"public T getData() {\n return null;\n }",
"@Override\n public ShipVictoryData getData() {\n ShipVictoryData data = new ShipVictoryData();\n data.setTitle(title);\n data.setDescription(description);\n data.setEvents(PersistentUtility.getData(matchers));\n data.setRequirementMet(requirementMet);\n data.setTotalPoints(totalPoints);\n data.setRequiredPoints(requiredPoints);\n return data;\n }",
"IData reify();",
"Object getRawData();",
"protected abstract void createPacketData();",
"public Object clone(){\r\n\t\tSampleData obj = new SampleData(letter,getWidth(),getHeight());\r\n\t\tfor ( int y=0;y<getHeight();y++ )\r\n\t\t\tfor ( int x=0;x<getWidth();x++ )\r\n\t\t\t\tobj.setData(x,y,getData(x,y));\r\n\t\treturn obj;\r\n\t}",
"public abstract DynamicDataRow makeUIRowData();",
"public mainData() {\n }",
"public DataType(String dataName) {\n /*try {\n basicType = this.getClass().getName();\n idForDataType = this.getClass().getName();\n } catch (Exception ex) {\n Logger.getLogger(DataType.class).fatal(\"Failed to generate a unique id: \" +\n ex.getMessage(),ex);\n }*/\n this.dataName = dataName;\n }",
"public InitialData(){}",
"public T getData()\n\t{\n\t\treturn this.data;\n\t}",
"@Override\n protected Object[] getData() {\n return new Object[] { creator };\n }",
"public Object getDataObject()\r\n {\r\n return stockData;\r\n }",
"DataStreams createDataStreams();",
"protected @Override\r\n abstract void initData();",
"@java.lang.Override\n public com.clarifai.grpc.api.DataOrBuilder getDataOrBuilder() {\n return getData();\n }",
"AtomicDataAttributes createAtomicDataAttributes();",
"private IMapData<Integer, String> getHashMapData1() {\n List<IKeyValueNode<Integer, String>> creationData = new ArrayList<>();\n List<IKeyValueNode<Integer, String>> data = new ArrayList<>();\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }",
"Data() {\n\t\t// dia = 01;\n\t\t// mes = 01;\n\t\t// ano = 1970;\n\t\tthis(1, 1, 1970); // usar um construtor dentro de outro\n\t}",
"public interface DataAPI {\n\t// Query\n\tDataTree getDataHierarchy(); // Tree List of Data and Datatypes\n\t\n\tDataTree getDatatypeHierarchy(); // Tree List of Datatypes\n\n\tDataTree getMetricsHierarchy(); // Tree List of Metrics and Metric\n\t\t\t\t\t\t\t\t\t\t\t// types\n\n\tArrayList<String> getAllDatatypeIds();\n\n\tMetadataProperty getMetadataProperty(String propid);\n\n\tArrayList<MetadataProperty> getMetadataProperties(String dtypeid, boolean direct);\n\n\tArrayList<MetadataProperty> getAllMetadataProperties();\n\n\tDataItem getDatatypeForData(String dataid);\n\n\tArrayList<DataItem> getDataForDatatype(String dtypeid, boolean direct);\n\n\tString getTypeNameFormat(String dtypeid);\n\n\tString getDataLocation(String dataid);\n\n\tArrayList<MetadataValue> getMetadataValues(String dataid, ArrayList<String> propids);\n\n\t// Write\n\tboolean addDatatype(String dtypeid, String parentid);\n\n\tboolean removeDatatype(String dtypeid);\n\n\tboolean renameDatatype(String newtypeid, String oldtypeid);\n\n\tboolean moveDatatypeParent(String dtypeid, String fromtypeid, String totypeid);\n\n\tboolean addData(String dataid, String dtypeid);\n\n\tboolean renameData(String newdataid, String olddataid);\n\n\tboolean removeData(String dataid);\n\n\tboolean setDataLocation(String dataid, String locuri);\n\n\tboolean setTypeNameFormat(String dtypeid, String format);\n\n\tboolean addObjectPropertyValue(String dataid, String propid, String valid);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, Object val);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, String val, String xsdtype);\n\n\tboolean removePropertyValue(String dataid, String propid, Object val);\n\n\tboolean removeAllPropertyValues(String dataid, ArrayList<String> propids);\n\n\tboolean addMetadataProperty(String propid, String domain, String range);\n\t\n\tboolean addMetadataPropertyDomain(String propid, String domain);\n\n\tboolean removeMetadataProperty(String propid);\n\t\n\tboolean removeMetadataPropertyDomain(String propid, String domain);\n\n\tboolean renameMetadataProperty(String oldid, String newid);\n\n\t// Sync/Save\n\tboolean save();\n\t\n\tvoid end();\n\t\n\tvoid delete();\n}"
]
| [
"0.75918597",
"0.72101074",
"0.67730755",
"0.6633091",
"0.6601053",
"0.65868574",
"0.65551496",
"0.65216017",
"0.65131474",
"0.6485246",
"0.64848924",
"0.64836425",
"0.6443946",
"0.64343315",
"0.6398267",
"0.6368184",
"0.63204795",
"0.62921023",
"0.6254554",
"0.62308747",
"0.62083703",
"0.61831695",
"0.61721563",
"0.61474377",
"0.6109384",
"0.6079381",
"0.6079381",
"0.6049725",
"0.6020545",
"0.59959024",
"0.59812367",
"0.5964236",
"0.59623224",
"0.59623224",
"0.5946851",
"0.59429395",
"0.59356105",
"0.59326905",
"0.5931116",
"0.59258854",
"0.59258854",
"0.5924661",
"0.5923951",
"0.5923951",
"0.58957016",
"0.58784175",
"0.58688605",
"0.5854014",
"0.5849703",
"0.58432496",
"0.5839653",
"0.5827484",
"0.581706",
"0.58150595",
"0.5812883",
"0.58085424",
"0.5798498",
"0.5792131",
"0.5786253",
"0.5781608",
"0.5781189",
"0.57754946",
"0.57709825",
"0.57701623",
"0.5766374",
"0.576562",
"0.57644385",
"0.57519984",
"0.5702726",
"0.56910586",
"0.56796277",
"0.56781256",
"0.5667106",
"0.5660757",
"0.56542015",
"0.56539506",
"0.5650411",
"0.5637375",
"0.5630249",
"0.5613461",
"0.560603",
"0.56040937",
"0.5599634",
"0.5598929",
"0.55986947",
"0.5598291",
"0.5596844",
"0.55939114",
"0.5580919",
"0.5565734",
"0.55651015",
"0.55586606",
"0.5556263",
"0.55440944",
"0.5542052",
"0.55406064",
"0.55403715",
"0.55343693",
"0.5525493",
"0.5522026"
]
| 0.6267753 | 18 |
Returns an IDataCursor for this IData object. An IDataCursor contains the basic methods you use to traverse an IData object and get or set elements within it. | @Override
public IDataCursor getCursor() {
return new CaseInsensitiveElementListIDataCursor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static interface Cursor {\n\t\tpublic void open() throws RelationException;\n\n\t\t//the hasNext() method actually loads the object, so don't skip it\n\t\tpublic boolean hasNext() throws RelationException;\n\n\t\t//this retrieves the next object. use in confunction with hasNext();\n\t\tpublic Tuple next() throws RelationException;\n\n\t\tpublic void close() throws RelationException;\n\t}",
"public CursorWrapper getCursor() {\n\t\t\treturn cursor;\n\t\t}",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"private Cursor getCursorData() {\n\t\tDBAdventureHelper enclosingInstance = new DBAdventureHelper();\r\n\t\tDBAdventureHelper.AdventureDBHelper mDbHelper = enclosingInstance.new AdventureDBHelper(this);\r\n\t\t// Get the data repository in read mode\r\n\t\tSQLiteDatabase db = mDbHelper.getReadableDatabase();\r\n\r\n\t\t// Projection defines which DB cols you will be pulled from the query\r\n\t\t// Cursor queries the database with the provided parameters; pulling record where ID col == Adventure ID\r\n\t\tCursor c = db.query(\r\n\t\t\t\tAdventureContract.AdventuresTable.ADVENTURES_TABLE_NAME, \t\t\t\t\t\t\t\t\t// The table to query\r\n\t\t\t projection, \t\t\t\t\t\t\t\t\t\t\t\t\t// The columns to return\r\n\t\t\t null,\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// The columns for the WHERE clause\r\n\t\t\t null, \t \t\t\t\t\t\t\t\t \t\t\t\t\t\t\t// The values for the WHERE clause\r\n\t\t\t null, \t\t\t\t\t\t\t\t\t\t\t\t\t// don't group the rows\r\n\t\t\t null, \t\t\t\t\t\t\t\t\t\t\t\t\t// don't filter by row groups\r\n\t\t\t \"DESC\" \t\t \t\t\t\t\t\t\t\t\t\t\t\t\t// The sort order\r\n\t\t);\r\n\t\tc.moveToFirst();\r\n\t return c;\r\n\t }",
"public Cursor I() {\n return this.m.a(D(), (Map<String, String>) this.f5843b);\n }",
"public com.google.protobuf.ByteString\n getCursorBytes() {\n return instance.getCursorBytes();\n }",
"public Cursor getData()\n {\n /* We are using the rawQuery method to execute the SQLite Query we have made and return\n * the Data in the form of a Cursor. As for the Query itself SELECT specifies what Columns\n * we want to select in this case its everything (*)\n */\n return this.getWritableDatabase().rawQuery(\"SELECT * FROM \" + TABLE_NAME, null);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public com.google.protobuf.ByteString\n getCursorBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(cursor_);\n }",
"public Cursor getCursor(){\n return mCursor;\n }",
"public abstract Cursor buildCursor();",
"public java.lang.String getCursor() {\n return instance.getCursor();\n }",
"public WeightedPoint getCursor()\n {\n return cursor;\n }",
"Object get()\n\t{\n\t\tif (length == 0 ) \n\t\t{\t\n\t\t\tthrow new RuntimeException(\"List Error: cannot call get() on empty List\");\n\t\t}\n\t\tif (cursor == null\t) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call get() on cursor that is off the list\");\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn cursor.data;\n\t\t}\n\t}",
"public abstract long getCursor();",
"public java.lang.String getCursor() {\n return cursor_;\n }",
"public Cursor getCursor() {\n\t\treturn null;\n\t}",
"public DataItem getData() {\n return data;\n }",
"public int getCursor() { return curs; }",
"private Cursor getCursorObject() {\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n HabbitContract.HabbitEntry._ID,\n HabbitContract.HabbitEntry.COLUMN_HAD_BREAKFAST,\n HabbitContract.HabbitEntry.COLUMN_BREAKFAST_MEAL,\n HabbitContract.HabbitEntry.COLUMN_HAD_LUNCH,\n HabbitContract.HabbitEntry.COLUMN_LUNCH_MEAL,\n HabbitContract.HabbitEntry.COLUMN_HAD_SUPPER,\n HabbitContract.HabbitEntry.COLUMN_SUPPER_MEAL,\n HabbitContract.HabbitEntry.COLUMN_ADDITIONAL_DATA,\n HabbitContract.HabbitEntry.COLUMN_DATETIME_STAMP};\n\n // Perform a query on the nutrition table\n Cursor cursor = db.query(\n HabbitContract.HabbitEntry.TABLE_NAME, // The table to query\n projection, // The columns to return\n null, // The columns for the WHERE clause\n null, // The values for the WHERE clause\n null, // Don't group the rows\n null, // Don't filter by row groups\n null); // The sort order\n\n return cursor;\n }",
"public interface Cursor\n{\n\n Cursor next_sibling ();\n\n Cursor first_child ();\n\n // Element element ();\n\n}",
"DataFrameCursor<R,C> cursor();",
"@Override\n\tprotected Serializable parseDataCursor(Cursor cursor) {\n\t\treturn null;\n\t}",
"public Cursor getGraphCursor() {\r\n \t\treturn graph.getCursor();\r\n \t}",
"public CrimeCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public Object getDataItem() {\n return this.dataItem;\n }",
"public Item getData()\r\n\t{\r\n\t\treturn theItem;\r\n\t}",
"public MyCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public Iterator<DystoreTuple> iterator()\t{ return tuple_data.iterator(); }",
"@Override\n public Iterator<T> iterator() {\n return new CLITableIterator<T>(createNew(tables, cursor, rowIndex));\n }",
"final public Object getDataObject() {\n return this.dataObject;\n }",
"public Object getDataObject() {\n return dataObject;\n }",
"public Iterable<E> getData(){\n return new Iterable<E>(){\n @Override\n public Iterator<E> iterator() {\n return structure.iterator();\n }\n };\n }",
"public IData getData() {\n return data;\n }",
"public Cursor getCursor() throws RelationException;",
"public DataIterator getCompositeData(Address start, boolean forward);",
"public Node<E> getCursor() {\n if (isCurrent()) { return cursor; }\n else { throw new IllegalStateException(\"There is no current element.\"); }\n }",
"public GenericItemType getData() {\n return this.data;\n }",
"public Cursor GetData() {\r\n\t\tCursor c = dbAdapter.getAllCharging();\r\n\t\treturn c;\r\n\t}",
"public Cursor getCursor()\n {\n// Object localObject1;\n// if (!this.mCursorValid)\n// {\n// this.mCursor = new EsMatrixCursor(PROJECTION);\n// this.mCursorValid = true;\n// if ((this.mLocalProfilesLoaded) && (this.mGaiaIdsAndCirclesLoaded))\n// {\n// localObject1 = new HashSet();\n// HashSet localHashSet = new HashSet();\n// Object localObject3 = this.mLocalProfiles.iterator();\n// while (true)\n// {\n// long l1;\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject5 = this.mContacts.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject5).hasNext())\n// {\n// localObject2 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject2).hasNext())\n// {\n// localObject3 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject1 = this.mCursor;\n// break;\n// }\n// localObject4 = (PublicProfile)((Iterator)localObject3).next();\n// localObject2 = ((PublicProfile)localObject4).gaiaId;\n// if (((HashSet)localObject1).contains(localObject2))\n// continue;\n// localObject5 = this.mCursor;\n// arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject4).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject2;\n// arrayOfObject[4] = ((PublicProfile)localObject4).name;\n// arrayOfObject[5] = null;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = ((PublicProfile)localObject4).snippet;\n// ((EsMatrixCursor)localObject5).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (PublicProfile)((Iterator)localObject2).next();\n// localObject5 = ((PublicProfile)localObject3).gaiaId;\n// localObject4 = (String)this.mGaiaIdsAndCircles.get(localObject5);\n// if ((((HashSet)localObject1).contains(localObject5)) || (TextUtils.isEmpty((CharSequence)localObject4)))\n// continue;\n// ((HashSet)localObject1).add(localObject5);\n// localObject6 = this.mCursor;\n// Object[] arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject3).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject5;\n// arrayOfObject[4] = ((PublicProfile)localObject3).name;\n// arrayOfObject[5] = localObject4;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = null;\n// ((EsMatrixCursor)localObject6).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (Contact)((Iterator)localObject5).next();\n// if (l1.contains(((Contact)localObject3).name))\n// continue;\n// localObject2 = this.mCursor;\n// localObject4 = new Object[11];\n// l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject4[0] = Long.valueOf(l2);\n// localObject4[1] = ((Contact)localObject3).personId;\n// localObject4[2] = ((Contact)localObject3).lookupKey;\n// localObject4[3] = null;\n// localObject4[4] = ((Contact)localObject3).name;\n// localObject4[5] = null;\n// localObject4[6] = null;\n// localObject4[7] = ((Contact)localObject3).email;\n// localObject4[8] = ((Contact)localObject3).phoneNumber;\n// localObject4[9] = ((Contact)localObject3).phoneType;\n// localObject4[10] = null;\n// ((EsMatrixCursor)localObject2).addRow(localObject4);\n// }\n// }\n// Object localObject6 = (LocalProfile)((Iterator)localObject3).next();\n// Object localObject2 = ((LocalProfile)localObject6).gaiaId;\n// ((HashSet)localObject1).add(localObject2);\n// l1.add(((LocalProfile)localObject6).name);\n// Object localObject4 = this.mCursor;\n// Object localObject5 = new Object[11];\n// long l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject5[0] = Long.valueOf(l2);\n// localObject5[1] = ((LocalProfile)localObject6).personId;\n// localObject5[2] = null;\n// localObject5[3] = localObject2;\n// localObject5[4] = ((LocalProfile)localObject6).name;\n// localObject5[5] = ((LocalProfile)localObject6).packedCircleIds;\n// localObject5[6] = ((LocalProfile)localObject6).email;\n// localObject5[7] = null;\n// localObject5[8] = ((LocalProfile)localObject6).phoneNumber;\n// localObject5[9] = ((LocalProfile)localObject6).phoneType;\n// localObject5[10] = null;\n// ((EsMatrixCursor)localObject4).addRow(localObject5);\n// }\n// }\n// localObject1 = this.mCursor;\n// }\n// else\n// {\n// localObject1 = this.mCursor;\n// }\n// return (Cursor)(Cursor)(Cursor)(Cursor)(Cursor)(Cursor)localObject1;\n return null;\n }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public Descriptor getData() {\n return this;\n }",
"Collection getData();",
"public RowDataCursor(MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata) {\n/* 112 */ this.currentPositionInEntireResult = -1;\n/* 113 */ this.metadata = metadata;\n/* 114 */ this.mysql = ioChannel;\n/* 115 */ this.statementIdOnServer = creatingStatement.getServerStatementId();\n/* 116 */ this.prepStmt = creatingStatement;\n/* 117 */ this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);\n/* */ }",
"public Cursor getData() {\n Cursor res = db.rawQuery( \"select * from TRACKDATA order by TRACKID DESC\", null );\n return res;\n }",
"public Cursor readAllData() {\n\n Cursor objCursor = readSQLite.query(TABLE_OFFICER, new String[]{COLUMN_ID_OFFICER, COLUMN_OFFICER, COLUMN_POSITION, COLUMN_IMAGE, COLUMN_VIDEO, COLUMN_SOUND}, null, null, null, null, null);\n\n if (objCursor != null) {\n objCursor.moveToFirst();\n }\n\n return objCursor;\n }",
"public DataSlotElements getDataSlotAccess() {\r\n\t\treturn pDataSlot;\r\n\t}",
"public D getData(){\n\t\treturn data;\n\t}",
"@Override\n\tpublic StendhalCursor getCursor() {\n\t\treturn StendhalCursor.LOOK;\n\t}",
"public Cursor getAllRowData() {\n String where = null;\n Cursor c = \tdb.query(true, DATA_TABLE, null,\n where, null, null, null, null, null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }",
"public D getData() {\n return data;\n }",
"public D getData() {\n return data;\n }",
"@SuppressWarnings({\"unused\", \"RedundantSuppression\"})\n @NonNull\n public BaseCursorAdapter getCursorAdapter() {\n return mBaseCacheAdapter.getCursorAdapter();\n }",
"public Cursor getBAckData(int currentPosition) {\n\n\t\ttry {\n\t\t\tString sql = \"SELECT Id, Name, BackgroundImage, Logo FROm Company\";\n\n\t\t\tCursor mCur = mDb.rawQuery(sql, null);\n\t\t\t// if (mCur.moveToFirst()) {\n\t\t\t// // do {\n\t\t\t// //\n\t\t\t// int size = mCur.getCount();\n\t\t\t// // for (int i = 0; i <= size; i++) {\n\t\t\t// if (currentPosition < size)\n\t\t\t// mCur.moveToPosition(currentPosition);\n\t\t\t// // }\n\t\t\t//\n\t\t\t// // } while (mCur.moveToNext());\n\t\t\t// }\n\t\t\treturn mCur;\n\n\t\t\t// return mCur;\n\n\t\t} catch (SQLException mSQLException) {\n\t\t\tLog.e(TAG, \"getTestData >>\" + mSQLException.toString());\n\t\t\tthrow mSQLException;\n\t\t}\n\t}",
"public Cursor getCursor() throws SQLException\n {\n Cursor c = db.query( true, C_TABLA, columnas, null, null, null, null, null, null);\n\n return c;\n }",
"public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }",
"public Data getData() {\n return data;\n }",
"public Data getData() {\n return data;\n }",
"public X cursor(Cursor cursor) {\n component.setCursor(cursor);\n return (X) this;\n }",
"public DBCursor find() {\n return find(new BasicDBObject());\n }",
"public A getData()\n\t{\n\t\treturn data;\n\t}",
"public DBCursor exportData() {\n\t\tCalendar startDate = new GregorianCalendar(2012, 9-1, 01, 0, 0, 0);\n\t\tCalendar endDate = new GregorianCalendar(2012, 9-1, 30, 23, 59, 59);\n\n\t\t/*\t*/\n\t\tBasicDBObject query = new BasicDBObject(\"date\", new BasicDBObject(\n\t\t\t\t\"$gte\", startDate.getTime()).append(\"$lte\", endDate.getTime()));\n\t\t//query.append(\"componentName\", \"CONTROL/DV10/FrontEnd/Cryostat\");\n\t\t//query.append(\"monitorPointName\", \"GATE_VALVE_STATE\");\n\t\t//query.append(\"componentName\", \"CONTROL/DV16/LLC\");\n\t\t//query.append(\"monitorPointName\", \"POL_MON4\");\n\n\t\t// Used only when the query take more than 10 minutes.\n\t\t_collection.addOption(Bytes.QUERYOPTION_NOTIMEOUT);\n\n\t\t/*\t*/\n\n\t\t// Registros utilizados para probar la diferencia de la zona horaria \n\t\t// local con la del servidor de mongo\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50528be325d8b6dfbafd7ac2\"));\n\t\t//BasicDBObject query = new BasicDBObject(\"_id\", new ObjectId(\"50529496a310ecc5da59531c\"));\n\n\t\tcursor = _collection.find(query);\n\n\t\t//System.out.println(\"Collections: \"+_database.getCollectionNames());\n\t\t\n\t\t//System.out.println(\"Error: \"+_database.getLastError());\n\t\treturn cursor;\n\t}",
"public Iterator<Coord> iterator() {\n\t\treturn new CoordListIterator(array, index);\n\t}",
"public T getData() {\n return mData;\n }",
"public interface DataObject {\n\n /**\n * Returns the length of the contained resource.\n *\n * @return resource length of the resource.\n * @throws IOException when an error occurs while reading the length.\n */\n long getContentLength() throws IOException;\n\n /**\n * Returns an {@link InputStream} representing the contents of the resource.\n *\n * @return contents of the resource as stream.\n * @throws IOException when an error occurs while reading the resource.\n */\n InputStream getInputStream() throws IOException;\n\n /**\n * Returns {@link DataObject} containing the resource. The contents are ranged\n * from the start to the end indexes.\n *\n * @param start index at which data will be read from.\n * @param end index at which dat will be read to.\n * @return ranged resource object.\n * @throws IOException when an error occurs while reading the resource.\n */\n DataObject withRange(int start, int end) throws IOException;\n}",
"@Override\n\tprotected Cursor loadCursor() {\n\t\treturn DataManager.get().queryLocations();\n\t}",
"public DbIterator iterator() {\n // some code goes here\n ArrayList<Tuple> tuples = new ArrayList<Tuple>();\n for (Field key : m_aggregateData.keySet()) {\n \tTuple nextTuple = new Tuple(m_td);\n \tint recvValue;\n \t\n \tswitch (m_op) {\n \tcase MIN: case MAX: case SUM:\n \t\trecvValue = m_aggregateData.get(key);\n \t\tbreak;\n \tcase COUNT:\n \t\trecvValue = m_count.get(key);\n \t\tbreak;\n \tcase AVG:\n \t\trecvValue = m_aggregateData.get(key) / m_count.get(key);\n \t\tbreak;\n \tdefault:\n \t\trecvValue = setInitData(); // shouldn't reach here\n \t}\n \t\n \tField recvField = new IntField(recvValue);\n \tif (m_gbfield == NO_GROUPING) {\n \t\tnextTuple.setField(0, recvField);\n \t}\n \telse {\n \t\tnextTuple.setField(0, key);\n \t\tnextTuple.setField(1, recvField);\n \t}\n \ttuples.add(nextTuple);\n }\n return new TupleIterator(m_td, tuples);\n }",
"@Override\n public Iterator<Long> iterator() {\n Collection<Long> c = new ArrayList<>();\n synchronized (data) {\n for (int i=0; i<data.length; i++)\n c.add(get(i));\n }\n return c.iterator();\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.DataOrBuilder getDataOrBuilder() {\n return getData();\n }",
"@java.lang.Override\n public com.clarifai.grpc.api.Data getData() {\n return data_ == null ? com.clarifai.grpc.api.Data.getDefaultInstance() : data_;\n }",
"public Iterator<T> iterator() {\r\n return new DLListIterator<T>();\r\n }",
"public DataIterator getCompositeData(boolean forward);",
"public PersistentDataContainer getPersistentDataContainer ( ) {\n\t\treturn extract ( handle -> handle.getPersistentDataContainer ( ) );\n\t}",
"public Iterator<IDatasetItem> iterateOverDatasetItems();",
"public java.util.List getData() {\r\n return data;\r\n }",
"public DataTypeElements getDataTypeAccess() {\n\t\treturn (pDataType != null) ? pDataType : (pDataType = new DataTypeElements());\n\t}",
"public List<Data> getData() {\n return data;\n }",
"public Cursor takeData(){\n return databaseR.query(taula_productes, new String[]{\n _id, CodiArticle, Desc, PVP, stock\n },\n null, null,\n null, null,_id);\n }",
"@SuppressWarnings(\"WeakerAccess\")\n @NonNull\n public BaseCursorAdapter getCursorAdapter() {\n return mCursorAdapter;\n }",
"public Iterator<T> iterator() { return new DLLIterator(); }",
"public Object getData(){\n\t\treturn this.data;\n\t}",
"public Cursor getDataid() {\n SQLiteDatabase db = this.getWritableDatabase();\n String query = \"SELECT id FROM credit_table\";\n Cursor data = db.rawQuery(query, null);\n return data;\n }",
"public Iterator <item_t> iterator () {\n return new itor ();\n }",
"public Object data() {\n return this.data;\n }",
"Object getData() { /* package access */\n\t\treturn data;\n\t}",
"public Object getData() {\r\n\t\t\treturn data;\r\n\t\t}",
"public void setCursor(Cursor c) {\n\n\t}",
"public Object getData()\r\n\t\t{\r\n\t\t\treturn data;\r\n\t\t}",
"public T getData()\n\t{ \treturn this.data; }",
"public T getData() {\r\n return data;\r\n }",
"public T getData() {\n return this.data;\n }",
"public DataDirective getDataDirective()\r\n {\r\n return m_data;\r\n }",
"public Comparable getData() {\n return data;\n }",
"public Object getData() {\n\t\treturn data;\n\t}",
"public BaseData[] getData()\n {\n return Cdata;\n }",
"Bindable getBindable( Meta.CursorFactory cursorFactory );",
"public Cursor getData(){\n SQLiteDatabase db = this.getWritableDatabase();\n String query= \"SELECT * FROM credit_table\";\n Cursor data = db.rawQuery(query,null);\n return data;\n }",
"public ArrayList<E> getData() {\n\t\treturn data;\n\t}",
"public Cursor getAllData() {\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"Select * from \" + TABLE_NAME, null);\n return res;\n }",
"T getObject() {\n\t\t\treturn data;\n\t\t}"
]
| [
"0.6533227",
"0.6496294",
"0.6480046",
"0.6305573",
"0.63054436",
"0.612477",
"0.6117801",
"0.60568035",
"0.60124594",
"0.60104007",
"0.5970316",
"0.59648323",
"0.593156",
"0.5806357",
"0.57421505",
"0.57212144",
"0.564374",
"0.5575074",
"0.5567253",
"0.5565825",
"0.5522783",
"0.55183595",
"0.5517493",
"0.5512609",
"0.54883116",
"0.5478455",
"0.54640865",
"0.5457695",
"0.5452695",
"0.5442799",
"0.5416323",
"0.5415674",
"0.54123664",
"0.54056644",
"0.5402381",
"0.5399476",
"0.5391384",
"0.53614604",
"0.535793",
"0.53471094",
"0.53463554",
"0.5341193",
"0.53307194",
"0.5327753",
"0.5310287",
"0.5294855",
"0.5285089",
"0.5249263",
"0.5237787",
"0.52357787",
"0.5234856",
"0.5234856",
"0.5225014",
"0.5221148",
"0.52206993",
"0.52166843",
"0.5216236",
"0.5216236",
"0.5211095",
"0.5201754",
"0.51684666",
"0.5142826",
"0.514223",
"0.5137906",
"0.51326364",
"0.51220936",
"0.51141614",
"0.50994027",
"0.50972307",
"0.50839144",
"0.50693655",
"0.5061886",
"0.5060872",
"0.5060781",
"0.50605714",
"0.50601286",
"0.5055044",
"0.5050381",
"0.5048656",
"0.504495",
"0.5044108",
"0.5027916",
"0.50260174",
"0.50118095",
"0.5009367",
"0.50090545",
"0.5005894",
"0.50048846",
"0.50026685",
"0.5001947",
"0.49977505",
"0.4992477",
"0.4988719",
"0.4983809",
"0.4978506",
"0.4978372",
"0.49770507",
"0.49695724",
"0.49677068",
"0.49650586"
]
| 0.6740706 | 0 |
Recursively builds a clone of the given IData document as a new CaseInsensitiveElementList. | public static IData of(IData document, Locale locale) {
return new CaseInsensitiveElementList<Object>(document, locale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"private void copyFksToParents( EntityInstanceImpl ei, DataRecord dataRecord )\n {\n RelRecord relRecord = dataRecord.getRelRecord();\n for ( RelField relField : relRecord.getRelFields() )\n {\n final RelFieldParser p = new RelFieldParser();\n p.parse( relField, ei );\n p.copySrcToRel();\n }\n }",
"private LowercaseWordList() {\n\n }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public Iterator_BuildTextExpansion_ clone(CallContext context);",
"@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }",
"@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}",
"public WordChain(String input_a, boolean caseSensitive) {\n\t\tint i;\n\t\tint start;\n\t\tint finish;\n\t\tString input;\n\n\t\t//Initialise\n\t\twc = new Vector();\n\t\tstart = 0;\n\t\tfinish = 0;\n\t\ti = 0;\n\n\t\t//Get rid of non-word characters\n\t\tinput = removePunctuation(input_a, caseSensitive);\n\n\t\t//Each word chain has a \"_start_node_\" and an \"_end_node_\"\n\t\twc.add(\"_start_node_\");\n\n\t\t//Search for white space and grab characters from in between\n\t\twhile ((start < input.length()) && (finish < input.length())) {\n\t\t\twhile (((input.charAt(start) == ' ') || (input.charAt(start) == '\\t') || (input.charAt(start) == '\\n'))\n\t\t\t\t\t && (start < input.length() - 1)) {\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tfinish = start;\n\t\t\twhile (((input.charAt(finish) != ' ') && (input.charAt(finish) != '\\t') && (input.charAt(finish) != '\\n'))\n\t\t\t\t\t && (finish < input.length() - 1)) {\n\t\t\t\tfinish++;\n\t\t\t}\n\n\t\t\t//Add new word to chain\n\t\t\tif (start < finish) {\n\t\t\t\twc.add(input.substring(start, finish));\n\t\t\t}\n\t\t\tstart = finish + 1;\n\t\t}\n\n\t\t//Add end node\n\t\twc.add(\"_end_node_\");\n\t}",
"public InorderIterator() {\r\n\t\t\tinorder(); // Traverse binary tree and store elements in list\r\n\t\t}",
"public InorderIterator() {\n inorder(); // Traverse binary tree and store elements in list\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(this.root, 0, childStart - 1);\n\n DocumentSectionType childType = this.getType(childStart);\n\n do {\n Integer end = this.findNextSameLevelElement(childStart + 1, childType);\n //now we have boundaries of our new element, so let's grab it's index\n //we need appropriate matcher\n\n Matcher childMatcher = childType.getPattern().matcher(this.document[childStart]);\n childMatcher.find();\n DocumentTree child = new DocumentTree(childType, childMatcher.group(1), null);\n\n //now clear first line\n try{\n String group2 = childMatcher.group(2);\n this.document[childStart] = group2 != null ? group2 + \" \" : \"\";\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] = \"\";\n }\n try {\n this.document[childStart] += childMatcher.group(3);\n }catch(IndexOutOfBoundsException e){\n this.document[childStart] += \"\";\n }\n //and copy it's text\n this.copyTextToDocumentTree(child, childStart, end - 1);\n root.addChild(child);\n //finally, parse it\n DocumentParser childParser = new DocumentParser(child, joinChapterWithChapterNames);\n childParser.parse();\n\n childStart = end;\n }while(childStart != this.document.length);\n\n if(this.root.getType() == DocumentSectionType.CHAPTER && this.joinChapterWithChapterNames){\n DocumentTree nameNode = (DocumentTree)this.root.getChildren().get(0);\n this.root.removeData();\n this.root.appendData(nameNode.getIndex());\n this.root.replaceChild(nameNode, nameNode.getChildren());\n }\n\n }",
"private void toArrayListRecursive (ArrayList<T> arr, BinaryTreeNode n) {\t\t\n\t\tif (n.left != null) toArrayListRecursive(arr,n.left);\n\t\tarr.add(n.data);\n\t\tif (n.right != null)toArrayListRecursive(arr,n.right);\t\t\t\t\n\t}",
"private ArrayList<T> constructTree(Node<T> z) {\n\t\telements = new ArrayList<T>();\n\t\tQueue<Node<T>> q = new LinkedList<Node<T>>();\n\n\t\tif (z != nil)\n\t\t\tq.add(z);\n\t\twhile (!q.isEmpty()) {\n\t\t\tNode<T> u = q.remove();\n\t\t\telements.add(u.x);\n\t\t\tif (u.left != nil)\n\t\t\t\tq.add(u.left);\n\t\t\tif (u.right != nil)\n\t\t\t\tq.add(u.right);\n\t\t}\n\t\treturn elements;\n\t}",
"private void buildObject(Element current) {\n\t\tList<Element> children = current.getChildren();\n\t\tIterator<Element> iterator = children.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElement child = iterator.next();\n\t\t\tString category = child.getAttributeValue(\"description\");\n\t\t\tString reference = child.getAttributeValue(\"reference\");\n\n\t\t\tEplusObject ob = new EplusObject(category, reference);\n\t\t\tprocessFields(child, ob);\n\t\t\tobjects.add(ob);\n\t\t}\n\t}",
"ArrayList<String> createList(String finalInput);",
"@Override\n\tpublic INode build(List<INode> input) {\n\t\treturn null;\n\t}",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"private CoeusVector getChildNodes(CoeusVector cvData, String levelData, String fieldName) {\r\n CoeusVector cvTemp = new CoeusVector();\r\n Equals levelFilter = new Equals(fieldName,levelData);\r\n CoeusVector cvFilteredData = cvData.filter(levelFilter);\r\n \r\n for (int index = 0; index < cvFilteredData.size(); index++) {\r\n SponsorHierarchyBean sponsorHierarchyBean = (SponsorHierarchyBean)cvFilteredData.get(index);\r\n cvTemp.add((String)sponsorHierarchyBean.getSponsorCode()+ \":\" + sponsorHierarchyBean.getSponsorName());\r\n }\r\n return cvTemp;\r\n }",
"public TrieNode buildTrie(List<String> dict){\n TrieNode root = new TrieNode();\n for(String s : dict){\n TrieNode t = root;\n for(char c : s.toCharArray()){\n if(t.children[c - 'a'] == null)\n t.children[c - 'a'] = new TrieNode();\n t = t.children[c-'a'];\n }\n t.isword = true;\n t.word = s;\n }\n return root;\n }",
"static void searchWord(WordNode root, char boggle[][], int i,\n int j, boolean visited[][], String str, ArrayList<String> elements)\n {\n\n // if we found word in trie / dictionary\n if (root.isWord == true){\n// System.out.println(str.toString());\n elements.add(str.toString());\n }\n\n\n // If both I and j in range and we visited\n // that element of matrix first time\n if (isSafe(i, j, visited,boggle))\n {\n // make it visited\n visited[i][j] = true;\n\n // traverse all child of current root\n for (int K =0; K < 26; K++)\n {\n if (root.child[K] != null)\n {\n // current character\n char ch = (char) (K + 'a') ;\n\n // Recursively search reaming character of word\n // in trie for all 8 adjacent cells of\n // boggle[i][j]\n if (isSafe(i+1,j+1,visited,boggle) && Character.toLowerCase(boggle[i+1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i+1,j+1,\n visited,str+ch, elements);\n if (isSafe(i, j+1,visited,boggle) && Character.toLowerCase(boggle[i][j+1])\n == ch)\n searchWord(root.child[K],boggle,i, j+1,\n visited,str+ch, elements);\n if (isSafe(i-1,j+1,visited,boggle) && Character.toLowerCase(boggle[i-1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j+1,\n visited,str+ch, elements);\n if (isSafe(i+1,j, visited,boggle) && Character.toLowerCase(boggle[i+1][j])\n == ch)\n searchWord(root.child[K],boggle,i+1, j,\n visited,str+ch, elements);\n if (isSafe(i+1,j-1,visited,boggle) && Character.toLowerCase(boggle[i+1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i+1, j-1,\n visited,str+ch, elements);\n if (isSafe(i, j-1,visited,boggle)&& Character.toLowerCase(boggle[i][j-1])\n == ch)\n searchWord(root.child[K],boggle,i,j-1,\n visited,str+ch, elements);\n if (isSafe(i-1,j-1,visited,boggle) && Character.toLowerCase(boggle[i-1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j-1,\n visited,str+ch, elements);\n if (isSafe(i-1, j,visited,boggle) && Character.toLowerCase(boggle[i-1][j])\n == ch)\n searchWord(root.child[K],boggle,i-1, j,\n visited,str+ch, elements);\n }\n }\n\n // make current element unvisited\n visited[i][j] = false;\n }\n }",
"public InitListExpr(DataStore data, Collection<? extends ClavaNode> children) {\n super(data, children);\n\n // isOldFormat = false;\n // this.data = null;\n }",
"protected Trie(char[] paramArrayOfchar, int paramInt, DataManipulate paramDataManipulate) {\n/* 147 */ this.m_options_ = paramInt;\n/* 148 */ if (paramDataManipulate != null) {\n/* 149 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 151 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 153 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 155 */ this.m_index_ = paramArrayOfchar;\n/* 156 */ this.m_dataOffset_ = this.m_index_.length;\n/* */ }",
"public IData insertDataBefore(String key) {\n IData data = new CaseInsensitiveElementList<V>();\n insertBefore(key, data);\n return data;\n }",
"private ArrayList<Concert> cloneConcertList(){\n ArrayList<Concert> tempConcertList = new ArrayList<Concert>();\n tempConcertList.addAll(concertList);\n return tempConcertList;\n }",
"public DomainTreeIterator(EditingDomain domain, Object object, boolean includeRoot)\n {\n super(object, includeRoot);\n this.domain = domain;\n }",
"public BDicTreeCodeExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public List<T> preorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n list.add(root.getData());\n preorderHelper(list, root);\n }\n return list;\n }",
"private static Document createCopiedDocument(Document originalDocument) {\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db;\n Document copiedDocument = null;\n try {\n db = dbf.newDocumentBuilder();\n Node originalRoot = originalDocument.getDocumentElement();\n copiedDocument = db.newDocument();\n Node copiedRoot = copiedDocument.importNode(originalRoot, true);\n copiedDocument.appendChild(copiedRoot);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n return copiedDocument;\n }",
"public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}",
"public Builder<I> toLowerCase() {\n upperCase = false;\n return this;\n }",
"public void populate(List data) {\n visit(m_root, data);\n }",
"public IntTree copy () {\n\t\tIntTree that = new IntTree ();\n\t\tfor (int key : levelOrder())\n\t\t\tthat.put (key);\n\t\treturn that;\n\t}",
"private void collectNodes(List<E> list, Node<E> parentNode) {\n list.add(parentNode.getValue());\n List<Node<E>> childrenList = getChildrenForNode(parentNode);\n for (Node<E> childNode : childrenList) {\n collectNodes(list, childNode);\n }\n }",
"public static Node sortElements\r\n (Node xml, \r\n String strParentElementXPath,\r\n String strSortKeyXPath,\r\n SortDataType dataType,\r\n SortOrder order,\r\n SortCaseOrder caseOrder)\r\n throws SAXException,\r\n IOException,\r\n TransformerConfigurationException,\r\n TransformerException\r\n \r\n {\r\n return XMLUtil.getOwnerDocument(sortElements\r\n (xml, \r\n strParentElementXPath, \r\n strSortKeyXPath, \r\n dataType,\r\n order,\r\n caseOrder,\r\n (Node)null));\r\n }",
"abstract CharArraySet build();",
"public Set<DirectoryEntry> buildDirectory() {\r\n\t\tfinal Set<DirectoryEntry> result = new TreeSet<DirectoryEntry>();\r\n\t\tadvanceObjectsCollection();\r\n\r\n\t\twhile (this.in.readToTag()) {\r\n\t\t\tif (this.in.is(PersistReader.TAG_OBJECTS, false)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tfinal String type = this.in.getTag().getName();\r\n\t\t\tfinal String name = this.in.getTag().getAttributeValue(\"name\");\r\n\t\t\tfinal String description = this.in.getTag().getAttributeValue(\r\n\t\t\t\t\t\"description\");\r\n\r\n\t\t\tfinal DirectoryEntry entry = new DirectoryEntry(type, name,\r\n\t\t\t\t\tdescription);\r\n\t\t\tresult.add(entry);\r\n\r\n\t\t\tskipObject();\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}",
"public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }",
"@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}",
"public final Keyword deepClone()\r\n {\r\n Keyword clone;\r\n try\r\n {\r\n clone = (Keyword) super.clone();\r\n if (translations != null) {\r\n clone.setTranslations(new TreeSet<Translation>());\r\n for (Translation translation: translations)\r\n {\r\n clone.addTranslation(translation.deepClone());\r\n }\r\n }\r\n }\r\n catch (CloneNotSupportedException cnse)\r\n {\r\n clone = null;\r\n }\r\n return clone;\r\n }",
"public static void resolveInPlace(Document in, Builder builder) \n throws BadParseAttributeException, InclusionLoopException, \n IOException, NoIncludeLocationException, ParsingException, \n UnsupportedEncodingException, XIncludeException {\n \n ArrayList stack = new ArrayList();\n resolveInPlace(in, builder, stack);\n \n }",
"public static ArrayList posisjoner(String ord, int index, Node currentNode){\n \treturn new ArrayList();\r\n }",
"private void generalizeCSACriteria(){\n\t\tArrayList<ServiceTemplate> comps = new ArrayList<ServiceTemplate>() ;\n\t\tArrayList<Criterion> crit = new ArrayList<Criterion>() ;\n\t\t\n\t\tcomps = this.data.getServiceTemplates();\n\t\tcrit = this.data.getCriteria();\n\t\t\n\t\tfor(ServiceTemplate c : comps){\n\t\t\tfor(Criterion cr : crit){\n\t\t\t\ttry {\n\t\t\t\t\tCriterion temp = (Criterion) BeanUtils.cloneBean(cr);\n\t\t\t\t\tc.addCrit(temp);\n\t\t\t\t} catch (IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static String createOriginalDocumentBody(DocumentNode document) {\n\t\tStringBuilder text = new StringBuilder();\n\t\tNode childNode;\n\t\tint size;\n\t\t\n\t\ttry {\n\t\t\tsize = document.numberOfChildren();\n\t\t} catch (NullPointerException e) {\n\t\t\tsize = 0;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tchildNode = document.getChild(i);\n\n\t\t\tif ((childNode instanceof ForLoopNode)) {\n\t\t\t\ttext.append(getText(childNode));\n\t\t\t} else {\n\t\t\t\ttext.append(childNode.getText());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn text.toString();\n\t}",
"public abstract Type treeCopy();",
"@Override\r\n\tpublic Map<SearchRank, List<Contact>> searchContact(String initial) {\r\n\t\tTrieNode t = this.root;\r\n\t\tint start = 0;\r\n\t\tMap<SearchRank, List<Contact>> res = new HashMap<SearchRank, List<Contact>>();\r\n\t\twhile(start < initial.length() && t != null && t.getChilds().containsKey(initial.charAt(start))){\r\n\t\t\tt = t.getChilds().get(initial.charAt(start));\r\n\t\t\tstart ++;\r\n\t\t}\r\n\t\tif(start == initial.length() && t != null){\r\n\t\t\tif(t.getContacts() != null)\r\n\t\t\t\tres.put(SearchRank.PERFECT, t.getContacts());\r\n\t\t\t//now add all the nodes contact child of t\r\n\t\t\tList<Contact> list = res.get(SearchRank.PARTIAL);\r\n\t\t\tif(list == null) list = new ArrayList<Contact>();\r\n\t\t\tcollectChildsContact(t, list);\r\n\t\t\tres.put(SearchRank.PARTIAL, list);\r\n\t\t}\r\n\t\treturn res;\r\n\t}",
"public abstract List<T> readDoc(final Document document);",
"private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }",
"private void rebuildSignalDomainContextList(){\n\t\t// Create a new list model:\n\t\tfinal List<OWLNamedIndividual> contexts = ko.getSignalDomainContexts();\n\t\t\n\t\t// For each signal, update the signal domain box list with the IRI:\n\t\tlist.setModel(new AbstractListModel() {\n\t\t\tjava.util.List<OWLNamedIndividual> values = contexts;\n\t\t\tpublic int getSize() {\n\t\t\t\treturn values.size();\n\t\t\t}\n\t\t\tpublic Object getElementAt(int index) {\n\t\t\t\treturn values.get(index);\n\t\t\t}\n\t\t});\n\t}",
"protected Object buildClonePart(Object original, Object attributeValue, UnitOfWorkImpl unitOfWork) {\n ContainerPolicy cp = this.getContainerPolicy();\n if (attributeValue == null) {\n return cp.containerInstance();\n }\n\n Object clonedAttributeValue = cp.containerInstance(cp.sizeFor(attributeValue));\n for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) {\n Object cloneElement = super.buildClonePart(original, cp.next(iter, unitOfWork), unitOfWork);\n cp.addInto(cloneElement, clonedAttributeValue, unitOfWork);\n }\n return clonedAttributeValue;\n }",
"private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }",
"private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter, String... patterns) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, patterns));\n\t\t}\n\t}",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"public static Criteria newAndCreateCriteria() {\n BDicTreeCodeExample example = new BDicTreeCodeExample();\n return example.createCriteria();\n }",
"public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }",
"public QueryNode cloneTree() throws CloneNotSupportedException;",
"protected java.util.List getInsertElementStructure(Element element, Element parentEle){\n return ElementToObjectMapper.getMapper().getInsertElementStructure(element.getTagName());\n }",
"@SuppressWarnings(\"unchecked\")\r\n public synchronized List<TreeNode> getChildrenCopy ()\r\n {\r\n if (logger.isFineEnabled()) {\r\n logger.fine(\"getChildrenCopy of \" + this);\r\n }\r\n\r\n return new ArrayList(children);\r\n }",
"TrieSet(String[] items, int start, int stop, int c) {\n \t // keep this -- it initializes the children array\n \t // (note all positions are initially null)\n this();\n \n //begin solution, replace with: //add code here\n if (items[start].length() == c) {\n terminal = true;\n start++;\n }\n for (char letter = 'A'; letter <= 'Z'; letter++) {\n int end = start;\n while (end < stop && items[end].charAt(c) == letter) end++;\n if (start != end)\n children[c2i(letter)] = new TrieSet(items, start, end, c+1);\n start = end;\n }\n //end solution\n }",
"public Object clone()\n {\n ElementInsertionList clone = new ElementInsertionList();\n\n for (int i = 0; i < list.size(); i++)\n {\n clone.addElementInsertionMap((ElementInsertionMap)list.elementAt(i));\n }\n\n return clone;\n }",
"public S<T> list(List<String> data){\n\t\tlist(data.toArray(new String[data.size()]));\n\t\treturn this;\n\t}",
"protected Collection<V> newCollection() {\r\n \treturn new ArrayList<V>();\r\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"private ArrayList<Region> processRegions(ArrayList<Region> list, int oldStart, int newStart, RegionSequenceData parent, String trackName) {\n // first make a deep clone of the list\n ArrayList<Region> newList=new ArrayList<Region>(list.size());\n for (Region reg:list) {\n Region newreg=reg.clone();\n newreg.setParent(null);\n newList.add(newreg);\n }\n if (oldStart==newStart) return newList; // no need to update reference frame\n // now update all coordinates since the frame of reference has been altered\n for (Region reg:newList) {\n reg.updatePositionReferenceFrame(oldStart, newStart); // this is \"recursive\" for nested regions\n }\n return newList;\n }",
"public CaseClassRelation (scala.collection.Seq<A> data, scala.reflect.api.TypeTags.TypeTag<A> evidence$3) { throw new RuntimeException(); }",
"public void buildDict(String[] dict) {\n\t\tfor (String word : dict) {\n\t\t\tTrieNode node = root;\n\t\t\tfor (Character c : word.toCharArray()) {\n\t\t\t\tif (node.list[c - 'a'] == null) {\n\t\t\t\t\tnode.list[c - 'a'] = new TrieNode();\n\t\t\t\t}\n\t\t\t\tnode = node.list[c - 'a'];\n\t\t\t}\n\t\t\tnode.isLeaf = true;\n\t\t}\n\t}",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n List<Document> otherDocumentsList= new ArrayList<>();\n\n WorkSite currentWorkSite=WorkSitesManager.getWorkSiteById(workSiteID);\n if(currentWorkSite!=null)\n otherDocumentsList=currentWorkSite.getOtherDocuments();\n\n otherDocumentsList.clear();\n\n Iterable<DataSnapshot> dataList = dataSnapshot.getChildren();\n Iterator<DataSnapshot> it = dataList.iterator();\n Log.i(TAG,\" iterator \"+it.hasNext());\n while (it.hasNext()) {\n DataSnapshot snap = it.next();\n String keyStr = snap.getKey();\n String str = snap.getValue(String.class);\n Log.i(TAG, \"key value \"+keyStr + \" \" + str);\n\n FileStatus status;\n\n if (str.equals(\" \") || str.equals(\"\")) {\n status = FileStatus.NOT_UPLOADED;\n } else {\n status = FileStatus.UPLOADED;\n }\n\n Document doc = new Document(keyStr, str, status, \"-\");\n Log.i(TAG,\"before doc addition\");\n //result.add(doc);\n otherDocumentsList.add(doc);\n Log.i(TAG,\"after doc addition\");\n }\n\n\n //activityCalling.setOtherDocumentsList(result);\n activityCalling.refreshOtherDocumentFragment();\n /*otherDocsBrowsed=true;\n\n if(otherDocsBrowsed && securityDocsBrowsed && planDocsBrowsed && ppspsDocsBrowsed){\n activityCalling.refreshFragments();\n otherDocsBrowsed=false;\n securityDocsBrowsed=false;\n ppspsDocsBrowsed=false;\n planDocsBrowsed=false;\n }*/\n }",
"private void scanGlyphsRecursively(final int indexInOriginal)\n throws IOException {\n if (!this.subset.containsKey(indexInOriginal)) {\n this.composedGlyphs.add(indexInOriginal);\n }\n\n if (isComposite(indexInOriginal)) {\n this.compositeGlyphs.add(indexInOriginal);\n final Set<Integer> composedGlyphs = retrieveComposedGlyphs(indexInOriginal);\n for (final Integer composedGlyph : composedGlyphs) {\n scanGlyphsRecursively(composedGlyph);\n }\n }\n }",
"public abstract Type treeCopyNoTransform();",
"public List<AnnotatedPluginDocument> performCloning(Enzyme enzyme, List<AnnotatedPluginDocument> documents) throws DocumentOperationException {\n List<AnnotatedPluginDocument> results = new LinkedList<AnnotatedPluginDocument>() {};\n List<AnnotatedPluginDocument> workingDocuments = new LinkedList<AnnotatedPluginDocument>();\n\n //Cut all the inserts.\n for (AnnotatedPluginDocument doc : documents) {\n workingDocuments.addAll(selectNeededSequence(enzyme, cutSequence(enzyme, doc)));\n }\n\n //We pick the first resulting fragment as the one to start the reaction from.\n //This we will wish to change for error handling later on: ie. Which part works and which does not.\n AnnotatedPluginDocument destinationFragment = workingDocuments.remove(0);\n\n //TODO: How do we avoid an endless ligation?\n //Now I implemented the removal of each used fragment. Probably not good in all cases.\n AnnotatedPluginDocument match = findMatchingDocument(destinationFragment, workingDocuments);\n while (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular() && match != null) { //The second part will be null if there is no match, or the insert list is already empty.\n destinationFragment = ligateSequences(destinationFragment, match);\n workingDocuments.remove(match);\n match = findMatchingDocument(destinationFragment, workingDocuments);\n }\n if (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular()) {\n Dialogs.showMessageDialog(\"Could not circularise the plasmid. The resulting linear fragment is presented.\");\n //TODO: Pop up an option to choose what to do.\n }\n results.add(cleanupAnnotations(destinationFragment));\n return results;\n }",
"public Object clone() throws CloneNotSupportedException {\r\n\t\t// Shallow clone\r\n\t\tExpression v = (Expression) super.clone();\r\n\t\tv.eval_stack = null;\r\n\t\t// v.text = new StringBuffer(new String(text));\r\n\t\tint size = elements.size();\r\n\t\tArrayList cloned_elements = new ArrayList(size);\r\n\t\tv.elements = cloned_elements;\r\n\r\n\t\treturn v;\r\n\t}",
"public abstract Builder zza(List<String> list);",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"@Override\n public YFCDocument invoke(YFCDocument inXml) {\n \n YFCElement inEle = inXml.getDocumentElement();\n YFCIterable<YFCElement> yfsItrator = inEle.getChildren(XMLLiterals.ITEM);\n for(YFCElement itemEle : yfsItrator) {\n YFCDocument itemListDoc = YFCDocument.createDocument(XMLLiterals.ITEM_LIST);\n YFCElement itemListEle = itemListDoc.getDocumentElement();\n itemEle.setAttribute(XMLLiterals.ORGANIZATION_CODE, INDIGO_CA);\n itemEle.setAttribute(XMLLiterals.UNIT_OF_MEASURE, EACH);\n itemListEle.importNode(itemEle);\n invokeYantraService(ITEM_LOAD_Q, itemListDoc);\n }\n return inXml;\n }",
"public WalkerDocument newDocument(DocumentTag adapter) { return newDocument(adapter, null); }",
"@Test\n public void testConstructor_Custom_Store_String() {\n\n File file = new File(System.getProperty(\"java.io.tmpdir\") + File.separator\n + \"oasis-collection-testConstructor_Custom_Store_String\");\n file.mkdirs();\n file.deleteOnExit();\n\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(file.getAbsolutePath());\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n\n File[] subDirs = file.listFiles();\n\n assertNotNull(subDirs);\n\n }",
"private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tSet<Object> exploredEntities = new HashSet<Object>();\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, exploredEntities));\n\t\t}\n\t}",
"public abstract TreeNode copy();",
"protected <V> List<V> newObject(Collection<V> initialValues) {\n return new ArrayList<>(initialValues);\n }",
"@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"static IdNameSelect<INameIdParent> getCitySelect(){\r\n\t\treturn new IdNameSelect<INameIdParent>() {\r\n\t\t\t\r\n\t\t\tList<INameIdParent> result = new ArrayList<INameIdParent>();\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tprotected String getSqlString() {\r\n\t\t\t\treturn citySelect;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tList<INameIdParent> getReuslt() {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t@Override\r\n\t\t\tprotected void retrieveResult(ResultSet rs) throws SQLException {\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tNameIdParent p = new NameIdParent();\r\n\t\t\t\t\tp.id = rs.getLong(\"id\");\r\n\t\t\t\t\tp.name = rs.getString(\"n\");\r\n\t\t\t\t\tp.parentId = rs.getLong(\"municipality_id\");\r\n\t\t\t\t\tresult.add(p);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t};\r\n\t}",
"public ArrayList<T> getList() {\n synchronized(this) {\n return new ArrayList<T>(_treeSet);\n }\n }",
"private ArrayList<String> simpleFormList(ArrayList<String> list){\n\t\tArrayList<String> simpleFormList = new ArrayList<String>();\n\t\tfor(String s : list){\n\t\t\tString pos = posMap.get(s);\n\t\t\tsimpleFormList.add(simpleForm(s,pos));\n\t\t}\n\t\treturn simpleFormList;\n\t}",
"public Object visit(ASTOr node, Object data) {\n for (int i = 0; i < node.jjtGetNumChildren(); i++) {\n List args = (List) node.jjtGetChild(i).jjtAccept(this, data);\n //((List) data).addAll(args);\n }\n return data;\n }",
"@Test\n public void testSetCitiesSearchTree01() {\n System.out.println(\"setCitiesSearchTree\");\n sn10.setCitiesSearchTree();\n\n // Create order list with expected result\n List<CityAndUsers> expResult = new LinkedList<>();\n expResult.add(new CityAndUsers(new City(new Pair(41.243345, -8.674084), \"city0\", 28), 0));\n expResult.add(new CityAndUsers(new City(new Pair(41.237364, -8.846746), \"city1\", 72), 0));\n expResult.add(new CityAndUsers(new City(new Pair(40.822244, -8.794953), \"city7\", 11), 0));\n expResult.add(new CityAndUsers(new City(new Pair(40.519841, -8.085113), \"city2\", 81), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.118700, -8.589700), \"city3\", 42), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.467407, -8.964340), \"city4\", 64), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.337408, -8.291943), \"city5\", 74), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.314965, -8.423371), \"city6\", 80), 1));\n expResult.add(new CityAndUsers(new City(new Pair(40.851360, -8.136585), \"city9\", 65), 2));\n expResult.add(new CityAndUsers(new City(new Pair(40.781886, -8.697502), \"city8\", 7), 3));\n\n List<CityAndUsers> result = (List<CityAndUsers>) sn10.getCitiesAVL().inOrder();\n\n // Test if cities are ordered by ascendent order of users checked in & if AVL Tree is ordered & has the same size\n assertArrayEquals(expResult.toArray(), result.toArray());\n }"
]
| [
"0.7156497",
"0.69368696",
"0.6152592",
"0.5786891",
"0.5518731",
"0.5495489",
"0.53091234",
"0.53091234",
"0.5307627",
"0.51869047",
"0.5098538",
"0.50603193",
"0.49058077",
"0.4816845",
"0.4734621",
"0.47305486",
"0.46901512",
"0.4683951",
"0.46518397",
"0.46303427",
"0.462089",
"0.45292866",
"0.45267063",
"0.4507112",
"0.44784278",
"0.447803",
"0.44670168",
"0.44647807",
"0.44010684",
"0.43380868",
"0.43238688",
"0.43088934",
"0.42815632",
"0.4280252",
"0.42795107",
"0.42445835",
"0.42396688",
"0.42364073",
"0.42278704",
"0.42089093",
"0.41889855",
"0.4187821",
"0.4186163",
"0.4175212",
"0.4173026",
"0.41621315",
"0.4161198",
"0.41534913",
"0.41510126",
"0.4138788",
"0.41363427",
"0.4133625",
"0.413316",
"0.4122123",
"0.41209638",
"0.4110156",
"0.41099754",
"0.41089034",
"0.41032192",
"0.40990508",
"0.4086054",
"0.408437",
"0.4084134",
"0.4078149",
"0.407681",
"0.40656975",
"0.40585262",
"0.4033619",
"0.40215334",
"0.40199503",
"0.40179652",
"0.4016351",
"0.40146577",
"0.40101108",
"0.40081194",
"0.4007674",
"0.39945263",
"0.39800438",
"0.39794213",
"0.3975379",
"0.39715675",
"0.39706337",
"0.39533156",
"0.39502546",
"0.39449027",
"0.3942358",
"0.3940862",
"0.3940278",
"0.3937432",
"0.39356643",
"0.39326483",
"0.39248428",
"0.3917428",
"0.39162615",
"0.39162534",
"0.39144102",
"0.39136836",
"0.3911689",
"0.3909308",
"0.39025852"
]
| 0.56564546 | 4 |
Recursively builds a clone of the given IData[] document list as a new CaseInsensitiveElementList[]. | public static IData[] of(IData[] documents, Locale locale) {
IData[] output = new IData[documents == null ? 0 : documents.length];
if (documents != null) {
for (int i = 0; i < documents.length; i++) {
output[i] = of(documents[i], locale);
}
}
return output;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected IData normalize(IData document) {\n return new CaseInsensitiveElementList<Object>(document);\n }",
"public CaseInsensitiveElementList(IData document) {\n this(document, null);\n }",
"public CaseInsensitiveElementList(IData document, Locale locale) {\n this(locale);\n addAll(document);\n }",
"public static IData create() {\n return new CaseInsensitiveElementList<Object>();\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"Collection<Element> getElementTreeFromPlainList() {\n Map<String, Element> values = new HashMap<String, Element>();\n for (String[] s : data) {\n values.put(s[0], new Element(s[2], s[1]));\n }\n\n // creates a result list\n Collection<Element> result = new ArrayList<Element>();\n\n // for each element in the result list that has a parent, put it into it\n // otherwise it is added to the result list\n for (Element e : values.values()) {\n if (e.parent != null) {\n values.get(e.parent).getChildren().add(e);\n } else {\n result.add(e);\n }\n }\n\n return result;\n }",
"public CaseInsensitiveElementList() {\n this((Locale)null);\n }",
"public static IData of(IData document, Locale locale) {\n return new CaseInsensitiveElementList<Object>(document, locale);\n }",
"public CaseInsensitiveElementListIDataCursor() {\n initialize();\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection) {\n this(collection, null);\n }",
"public ArrayList<T> constructTree() {\n\t\treturn constructTree(r);\n\t}",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"private ArrayList<Document> convertToDocumentsList(ArrayList<WordDocument> list){\n ArrayList<Document> convertedList = new ArrayList<Document>();\n\n for(WordDocument x : list)\n convertedList.add(x.getDocument());\n\n return convertedList;\n }",
"public CaseInsensitiveElementList(Locale locale) {\n setLocale(locale);\n }",
"public CaseInsensitiveElementList(Collection<Element<String, V>> collection, Locale locale) {\n this(locale);\n addAll(collection);\n }",
"private void toArrayListRecursive (ArrayList<T> arr, BinaryTreeNode n) {\t\t\n\t\tif (n.left != null) toArrayListRecursive(arr,n.left);\n\t\tarr.add(n.data);\n\t\tif (n.right != null)toArrayListRecursive(arr,n.right);\t\t\t\t\n\t}",
"private LowercaseWordList() {\n\n }",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"public static List<String> changeCase(List<String> list) {\n if (list != null) {\n List<String> result = new ArrayList<String>();\n for (String element : list) {\n result.add(changeCase(element));\n }\n return result;\n }\n return null;\n }",
"public ArrayBackedList(IList list) {\n while (list.size() > stringArray.length) {\n reallocArray();\n }\n for (int i = 0; i < list.size(); i++) {\n stringArray[i] = list.get(i);\n }\n }",
"public static String[] recorrerElementos(String[] arr){\n\n int maxLenght = maxLength(arr);\n for (int i = maxLenght-1; i >= 0 ; i--){\n HashMap listas = getListas(10);\n for(String arrayElement: arr){\n String key = \"L\" + arrayElement.charAt(i);\n\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n itemsList.add(arrayElement);\n }\n arr = getNewArray(listas);\n }\n return arr;\n }",
"@Override\n\tpublic void docToLists() {\n\t\tnodesToList(document, null, nodes);\n\t}",
"private ArrayList<String> initList(String[] vastitems){\n return new ArrayList<>(Arrays.asList(vastitems));\n }",
"private ArrayList<T> constructTree(Node<T> z) {\n\t\telements = new ArrayList<T>();\n\t\tQueue<Node<T>> q = new LinkedList<Node<T>>();\n\n\t\tif (z != nil)\n\t\t\tq.add(z);\n\t\twhile (!q.isEmpty()) {\n\t\t\tNode<T> u = q.remove();\n\t\t\telements.add(u.x);\n\t\t\tif (u.left != nil)\n\t\t\t\tq.add(u.left);\n\t\t\tif (u.right != nil)\n\t\t\t\tq.add(u.right);\n\t\t}\n\t\treturn elements;\n\t}",
"abstract CharArraySet build();",
"@Override\n protected Element<String, V> normalize(Element<String, V> element) {\n return new CaseInsensitiveElement<V>(element, locale);\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map) {\n this(map, null);\n }",
"ArrayList<String> createList(String finalInput);",
"void mo9148a(int i, ArrayList<C0889x> arrayList);",
"static void searchWord(WordNode root, char boggle[][], int i,\n int j, boolean visited[][], String str, ArrayList<String> elements)\n {\n\n // if we found word in trie / dictionary\n if (root.isWord == true){\n// System.out.println(str.toString());\n elements.add(str.toString());\n }\n\n\n // If both I and j in range and we visited\n // that element of matrix first time\n if (isSafe(i, j, visited,boggle))\n {\n // make it visited\n visited[i][j] = true;\n\n // traverse all child of current root\n for (int K =0; K < 26; K++)\n {\n if (root.child[K] != null)\n {\n // current character\n char ch = (char) (K + 'a') ;\n\n // Recursively search reaming character of word\n // in trie for all 8 adjacent cells of\n // boggle[i][j]\n if (isSafe(i+1,j+1,visited,boggle) && Character.toLowerCase(boggle[i+1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i+1,j+1,\n visited,str+ch, elements);\n if (isSafe(i, j+1,visited,boggle) && Character.toLowerCase(boggle[i][j+1])\n == ch)\n searchWord(root.child[K],boggle,i, j+1,\n visited,str+ch, elements);\n if (isSafe(i-1,j+1,visited,boggle) && Character.toLowerCase(boggle[i-1][j+1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j+1,\n visited,str+ch, elements);\n if (isSafe(i+1,j, visited,boggle) && Character.toLowerCase(boggle[i+1][j])\n == ch)\n searchWord(root.child[K],boggle,i+1, j,\n visited,str+ch, elements);\n if (isSafe(i+1,j-1,visited,boggle) && Character.toLowerCase(boggle[i+1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i+1, j-1,\n visited,str+ch, elements);\n if (isSafe(i, j-1,visited,boggle)&& Character.toLowerCase(boggle[i][j-1])\n == ch)\n searchWord(root.child[K],boggle,i,j-1,\n visited,str+ch, elements);\n if (isSafe(i-1,j-1,visited,boggle) && Character.toLowerCase(boggle[i-1][j-1])\n == ch)\n searchWord(root.child[K],boggle,i-1, j-1,\n visited,str+ch, elements);\n if (isSafe(i-1, j,visited,boggle) && Character.toLowerCase(boggle[i-1][j])\n == ch)\n searchWord(root.child[K],boggle,i-1, j,\n visited,str+ch, elements);\n }\n }\n\n // make current element unvisited\n visited[i][j] = false;\n }\n }",
"@Override\r\n public NumericObjectArrayList makeDeepCopy() {\r\n NumericObjectArrayList list = new NumericObjectArrayList();\r\n for (int i = 0; i < this.getCount(); i++) {\r\n try {\r\n list.insert(i, this.getValueAt(i));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n return list;\r\n }",
"private ArrayList<String> simpleFormList(ArrayList<String> list){\n\t\tArrayList<String> simpleFormList = new ArrayList<String>();\n\t\tfor(String s : list){\n\t\t\tString pos = posMap.get(s);\n\t\t\tsimpleFormList.add(simpleForm(s,pos));\n\t\t}\n\t\treturn simpleFormList;\n\t}",
"protected ArrayList<ArrayList<String>> method1() {\n\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n // Create equal amount of containers as requested.\n for (int i=0;i<num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items\n // into the containers you just created.\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n if (count < this.num) {\n arr.get(count).add((String)itor.next());\n count++;\n } else {\n count = 0;\n }\n }\n\n System.out.println(\"Paying no attention to order, the Array - \");\n printArrayList(new ArrayList<>(Arrays.asList(input)));\n System.out.println(\"divided into \" + this.num + \" sections is: \\n\");\n printMatrix(arr);\n\n return arr;\n }",
"private ArrayList<Concert> cloneConcertList(){\n ArrayList<Concert> tempConcertList = new ArrayList<Concert>();\n tempConcertList.addAll(concertList);\n return tempConcertList;\n }",
"protected ArrayList<ArrayList<String>> method2() {\n ArrayList<ArrayList<String>> arr = new ArrayList<ArrayList<String>>();\n ArrayList<String> n_clone = new ArrayList<>(Arrays.asList(input));\n\n int whole = Math.floorDiv(input.length,this.num);\n int rem = input.length - whole*this.num; // 'rem' can be interpreted as number of exceptions\n // where each exception gets an extra item\n\n // Create equal number of containers as requested\n for (int i=0;i<this.num;i++) {\n arr.add(new ArrayList<String>());\n }\n\n // Iterate through given Array while putting items into containers\n Iterator itor = n_clone.iterator();\n int count = 0;\n while (itor.hasNext()) {\n for (int i = 0; i < whole; i++) {\n if (itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n } else {\n break;\n }\n }\n if (rem != 0 && itor.hasNext()) {\n arr.get(count).add((String)itor.next());\n rem--;\n }\n count++;\n }\n\n printMatrix(arr);\n\n return arr;\n }",
"public abstract void init(ArrayList<String> ary);",
"private void generalizeCSACriteria(){\n\t\tArrayList<ServiceTemplate> comps = new ArrayList<ServiceTemplate>() ;\n\t\tArrayList<Criterion> crit = new ArrayList<Criterion>() ;\n\t\t\n\t\tcomps = this.data.getServiceTemplates();\n\t\tcrit = this.data.getCriteria();\n\t\t\n\t\tfor(ServiceTemplate c : comps){\n\t\t\tfor(Criterion cr : crit){\n\t\t\t\ttry {\n\t\t\t\t\tCriterion temp = (Criterion) BeanUtils.cloneBean(cr);\n\t\t\t\t\tc.addCrit(temp);\n\t\t\t\t} catch (IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public Iterator_BuildTextExpansion_ clone(CallContext context);",
"public abstract Builder zza(List<String> list);",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"private ArrayList<Region> processRegions(ArrayList<Region> list, int oldStart, int newStart, RegionSequenceData parent, String trackName) {\n // first make a deep clone of the list\n ArrayList<Region> newList=new ArrayList<Region>(list.size());\n for (Region reg:list) {\n Region newreg=reg.clone();\n newreg.setParent(null);\n newList.add(newreg);\n }\n if (oldStart==newStart) return newList; // no need to update reference frame\n // now update all coordinates since the frame of reference has been altered\n for (Region reg:newList) {\n reg.updatePositionReferenceFrame(oldStart, newStart); // this is \"recursive\" for nested regions\n }\n return newList;\n }",
"public TrieNode buildTrie(List<String> dict){\n TrieNode root = new TrieNode();\n for(String s : dict){\n TrieNode t = root;\n for(char c : s.toCharArray()){\n if(t.children[c - 'a'] == null)\n t.children[c - 'a'] = new TrieNode();\n t = t.children[c-'a'];\n }\n t.isword = true;\n t.word = s;\n }\n return root;\n }",
"public CaseInsensitiveElementList(Map<String, ? extends V> map, Locale locale) {\n this(locale);\n addAll(map);\n }",
"public T caseElementList(ElementList object)\n {\n return null;\n }",
"public ClsNodeDocument[] GetDocuments (ClsNodeDocument[] searchDocs);",
"private void copyFksToParents( EntityInstanceImpl ei, DataRecord dataRecord )\n {\n RelRecord relRecord = dataRecord.getRelRecord();\n for ( RelField relField : relRecord.getRelFields() )\n {\n final RelFieldParser p = new RelFieldParser();\n p.parse( relField, ei );\n p.copySrcToRel();\n }\n }",
"public ListMemberConstraint( Collection existing, boolean caseSensitive )\n {\n if ( null == existing)\n {\n existing = new ArrayList();\n }\n m_caseSensitive = caseSensitive;\n m_existingElems = existing;\n }",
"public List<List<String>> accountsMerge(List<List<String>> accounts) {\n\n List<Account> accts = new ArrayList<>();\n Map<String, Account> mapMailToAccount = new HashMap<>();\n for (List<String> account : accounts) {\n String name = account.get(0);\n Account acct = new Account(name);\n accts.add(acct);\n for(int i=1;i<account.size();i++){\n String mail = account.get(i);\n Account mappedAcct = mapMailToAccount.get(mail);\n if (mappedAcct == null) {\n mapMailToAccount.put(mail, acct);\n acct.mails.add(mail);\n } else {\n union(acct, mappedAcct);\n }\n }\n }\n for (Account acct : accts) {\n if (acct.parent != acct) {\n acct.parent = find(acct);\n acct.parent.mails.addAll(acct.mails);\n }\n }\n List<List<String>> mergedAccounts = new ArrayList<>();\n for (Account acct : accts) {\n if (acct.parent == acct) {\n mergedAccounts.add(acct.convertToList());\n }\n }\n return mergedAccounts;\n}",
"protected ArrayList<Object[]> transformPrioElementListToList(ArrayList<PrioElement> pPrioElementList) throws Exception{\r\n\t\treturn transformElementListToList(pPrioElementList, 1);\r\n\t}",
"private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter, String... patterns) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, patterns));\n\t\t}\n\t}",
"protected Trie(char[] paramArrayOfchar, int paramInt, DataManipulate paramDataManipulate) {\n/* 147 */ this.m_options_ = paramInt;\n/* 148 */ if (paramDataManipulate != null) {\n/* 149 */ this.m_dataManipulate_ = paramDataManipulate;\n/* */ } else {\n/* 151 */ this.m_dataManipulate_ = new DefaultGetFoldingOffset();\n/* */ } \n/* 153 */ this.m_isLatin1Linear_ = ((this.m_options_ & 0x200) != 0);\n/* */ \n/* 155 */ this.m_index_ = paramArrayOfchar;\n/* 156 */ this.m_dataOffset_ = this.m_index_.length;\n/* */ }",
"private void collectNodes(List<E> list, Node<E> parentNode) {\n list.add(parentNode.getValue());\n List<Node<E>> childrenList = getChildrenForNode(parentNode);\n for (Node<E> childNode : childrenList) {\n collectNodes(list, childNode);\n }\n }",
"private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}",
"private void convertCldrItems(String outDirname, String pathPrefix)\n throws IOException, ParseException {\n // zone and timezone items are queued for sorting first before they are\n // processed.\n\n for (JSONSection js : sections) {\n ArrayList<CldrItem> sortingItems = new ArrayList<CldrItem>();\n ArrayList<CldrItem> arrayItems = new ArrayList<CldrItem>();\n\n ArrayList<String> out = new ArrayList<String>();\n ArrayList<CldrNode> nodesForLastItem = new ArrayList<CldrNode>();\n String lastLeadingArrayItemPath = null;\n String leadingArrayItemPath = \"\";\n int valueCount = 0;\n String previousIdentityPath = null;\n List<CldrItem> theItems = sectionItems.get(js);\n if (theItems == null || theItems.size() == 0) {\n continue;\n }\n for (CldrItem item : theItems) {\n // items in the identity section of a file should only ever contain the lowest level, even if using\n // resolving source, so if we have duplicates ( caused by attributes used as a value ) then suppress\n // them here.\n if (item.getPath().contains(\"/identity/\")) {\n String[] parts = item.getPath().split(\"\\\\[\");\n if (parts[0].equals(previousIdentityPath)) {\n continue;\n } else {\n previousIdentityPath = parts[0];\n }\n }\n\n // some items need to be split to multiple item before processing. None\n // of those items need to be sorted.\n CldrItem[] items = item.split();\n if (items == null) {\n items = new CldrItem[1];\n items[0] = item;\n }\n valueCount += items.length;\n\n for (CldrItem newItem : items) {\n // alias will be dropped in conversion, don't count it.\n if (newItem.isAliasItem()) {\n valueCount--;\n }\n\n // Items like zone items need to be sorted first before write them out.\n if (newItem.needsSort()) {\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n sortingItems.add(newItem);\n } else {\n Matcher matcher = LdmlConvertRules.ARRAY_ITEM_PATTERN.matcher(\n newItem.getPath());\n if (matcher.matches()) {\n resolveSortingItems(out, nodesForLastItem, sortingItems);\n leadingArrayItemPath = matcher.group(1);\n if (lastLeadingArrayItemPath != null &&\n !lastLeadingArrayItemPath.equals(leadingArrayItemPath)) {\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n }\n lastLeadingArrayItemPath = leadingArrayItemPath;\n arrayItems.add(newItem);\n } else {\n resolveSortingItems(out, nodesForLastItem, sortingItems);\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n outputCldrItem(out, nodesForLastItem, newItem);\n lastLeadingArrayItemPath = \"\";\n }\n }\n }\n }\n\n resolveSortingItems(out, nodesForLastItem, sortingItems);\n resolveArrayItems(out, nodesForLastItem, arrayItems);\n\n closeNodes(out, nodesForLastItem.size() - 2, 0);\n String outFilename;\n outFilename = js.section + \".json\";\n writeToFile(outDirname, outFilename, out);\n\n System.out.println(String.format(\" %s = %d values\", outFilename, valueCount));\n }\n }",
"private void createList(String[] toAdd) {\n FixData fixedList;\n for (int i = 0; i < toAdd.length; ++i) {\n fixedList = new FixData(toAdd[i]);\n if (pickAdjacent(fixedList))\n this.head = createListWrap(this.head, fixedList);\n else\n fixedList = null;\n }\n }",
"@Override\n\tpublic INode build(List<INode> input) {\n\t\treturn null;\n\t}",
"@Test\n\tpublic void createListFromList() {\n\t\tList<String> list = new ArrayList<>();\n\t\tlist.add(\"AAPL\");\n\t\tlist.add(\"MSFT\");\n\n\t\t// Create a copy using constructor of ArrayList\n\t\tList<String> copy = new ArrayList<>(list);\n\n\t\tassertTrue(list.equals(copy));\n\t}",
"public void buildDict(String[] dict) {\n\t\tfor (String word : dict) {\n\t\t\tTrieNode node = root;\n\t\t\tfor (Character c : word.toCharArray()) {\n\t\t\t\tif (node.list[c - 'a'] == null) {\n\t\t\t\t\tnode.list[c - 'a'] = new TrieNode();\n\t\t\t\t}\n\t\t\t\tnode = node.list[c - 'a'];\n\t\t\t}\n\t\t\tnode.isLeaf = true;\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate List<Object> injectClassInvariantBuilder(List<Object> list) {\n\t\tList<Object> tempList = new ArrayList<Object>();\n\n\t\tfor (Object element : list) {\n\t\t\tif (element instanceof ArrayList) {\n\t\t\t\ttempList.add(injectClassInvariantBuilder((List<Object>) element));\n\t\t\t} else {\n\t\t\t\tif (element.equals(FIELDS_SUMMARY)) {\n\t\t\t\t\ttempList.add(CLASS_INVARIANT_SUMMARY);\n\t\t\t\t\ttempList.add(element);\n\t\t\t\t} else {\n\t\t\t\t\ttempList.add(element);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn tempList;\n\t}",
"public WordChain(String input_a, boolean caseSensitive) {\n\t\tint i;\n\t\tint start;\n\t\tint finish;\n\t\tString input;\n\n\t\t//Initialise\n\t\twc = new Vector();\n\t\tstart = 0;\n\t\tfinish = 0;\n\t\ti = 0;\n\n\t\t//Get rid of non-word characters\n\t\tinput = removePunctuation(input_a, caseSensitive);\n\n\t\t//Each word chain has a \"_start_node_\" and an \"_end_node_\"\n\t\twc.add(\"_start_node_\");\n\n\t\t//Search for white space and grab characters from in between\n\t\twhile ((start < input.length()) && (finish < input.length())) {\n\t\t\twhile (((input.charAt(start) == ' ') || (input.charAt(start) == '\\t') || (input.charAt(start) == '\\n'))\n\t\t\t\t\t && (start < input.length() - 1)) {\n\t\t\t\tstart++;\n\t\t\t}\n\n\t\t\tfinish = start;\n\t\t\twhile (((input.charAt(finish) != ' ') && (input.charAt(finish) != '\\t') && (input.charAt(finish) != '\\n'))\n\t\t\t\t\t && (finish < input.length() - 1)) {\n\t\t\t\tfinish++;\n\t\t\t}\n\n\t\t\t//Add new word to chain\n\t\t\tif (start < finish) {\n\t\t\t\twc.add(input.substring(start, finish));\n\t\t\t}\n\t\t\tstart = finish + 1;\n\t\t}\n\n\t\t//Add end node\n\t\twc.add(\"_end_node_\");\n\t}",
"public TreeNode<Integer> reconstruct(int[] inOrder, int[] preOrder) {\n Map<Integer, Integer> idxMap = new HashMap<>();\n for (int idx = 0; idx < inOrder.length; idx++) {\n idxMap.put(inOrder[idx], idx);\n }\n\n return construct(inOrder, 0, inOrder.length - 1, preOrder, 0, preOrder.length - 1, idxMap);\n }",
"@SuppressWarnings(\"UnusedReturnValue\")\n public List<String> depthFirstSearch(List<String> array) {\n // Write your code here.\n array.add(name);\n for (Node child : children) {\n child.depthFirstSearch(array);\n }\n return array;\n }",
"private List<MongoElement> arraysUnder (String documentName) {\n List<MongoElement> elements = new ArrayList<>();\n\n genElements.forEach(consumer -> {\n if (consumer.parent.equals(documentName))\n elements.add(consumer);\n });\n\n return elements;\n }",
"private ArrayList<ArrayList<String>> generateExpectedList(Alias[][] testAliasList) {\n ArrayList<ArrayList<String>> expectedList = new ArrayList<ArrayList<String>>();\n for (Alias[] row : testAliasList) {\n ArrayList<String> innerList = populateEmptyAlias();\n insertAliasAtPositions(row, innerList);\n expectedList.add(innerList);\n }\n return expectedList;\n }",
"protected ArrayList<Object[]> genObjectArrayListFromIDElementList(ArrayList<? extends IDElement> pIDElementList) throws Exception{\r\n\t\tObject[] vElement;\r\n\t\tArrayList<Object[]> vRet;\r\n \t\t\r\n \t\tif (pIDElementList != null) {\r\n \t\t\tvRet = new ArrayList<Object[]>();\r\n \t\t\t\r\n \t\t\tfor (IDElement vCur : pIDElementList) {\r\n \t\t\t\tvElement = new Object[2];\r\n \t \t\t\t\r\n \t \t\t\tvElement[0] = vCur.getId();\r\n \t \t\t\tvElement[1] = vCur.getName();\r\n \t \t\t\t\r\n \t \t\t\tvRet.add(vElement);\r\n \t\t\t}\r\n \t\t} else throw new Exception(\"04; gOALfIDEL,Edi\");\r\n \t\t\r\n \t\treturn vRet;\r\n\t}",
"private <T extends IDElement> ArrayList<Object[]> transformElementListToList(ArrayList<T> pElementList, int pElementType) throws Exception{\r\n\t\tArrayList<Object[]> vRet = new ArrayList<Object[]>();\r\n\t\t\r\n\t\tif (pElementList!= null) {\r\n\t\t\tfor (T vCur : pElementList) {\r\n\t\t\t\tswitch(pElementType) {\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tvRet.add(transformProbElementToList((ProbElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tvRet.add(transformPrioElementToList((PrioElement)vCur));\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception(\"02; tELtL,Edi\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else throw new Exception(\"04; tELtL,Edi\");\r\n\t\t\r\n\t\treturn vRet;\r\n\t}",
"static ArrayList<String> findWords(char boggle[][], WordNode root)\n {\n // Mark all characters as not visited\n boolean[][] visited = new boolean[boggle.length][boggle[0].length];\n WordNode pChild = root ;\n\n String str = \"\";\n ArrayList<String> list=new ArrayList<String>();\n\n // traverse all matrix elements\n for (int i = 0 ; i < boggle.length; i++)\n {\n for (int j = 0 ; j < boggle[0].length ; j++)\n {\n // we start searching for word in dictionary\n // if we found a character which is child\n // of Trie root\n if (pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'] != null)\n {\n str = str+Character.toLowerCase(boggle[i][j]);\n\n //String word=str;\n\n searchWord(pChild.child[(Character.toLowerCase(boggle[i][j])) - 'a'],\n boggle, i, j, visited, str, list);\n\n\n str = \"\";\n }\n }\n }\n return list;\n }",
"public InorderIterator() {\r\n\t\t\tinorder(); // Traverse binary tree and store elements in list\r\n\t\t}",
"private void prepareListData() {\n mCategoryList = new ArrayList<>();\n mFullList = new ArrayList<>();\n for (Category cat : fileSystem.getLocalInformationList())\n {\n List<Object> phraseList = cat.phraseList;\n mCategoryList.add(new Category(phraseList, cat.name));\n }\n mFullList.addAll(mCategoryList);\n\n }",
"@Test\n public void testSetCitiesSearchTree01() {\n System.out.println(\"setCitiesSearchTree\");\n sn10.setCitiesSearchTree();\n\n // Create order list with expected result\n List<CityAndUsers> expResult = new LinkedList<>();\n expResult.add(new CityAndUsers(new City(new Pair(41.243345, -8.674084), \"city0\", 28), 0));\n expResult.add(new CityAndUsers(new City(new Pair(41.237364, -8.846746), \"city1\", 72), 0));\n expResult.add(new CityAndUsers(new City(new Pair(40.822244, -8.794953), \"city7\", 11), 0));\n expResult.add(new CityAndUsers(new City(new Pair(40.519841, -8.085113), \"city2\", 81), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.118700, -8.589700), \"city3\", 42), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.467407, -8.964340), \"city4\", 64), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.337408, -8.291943), \"city5\", 74), 1));\n expResult.add(new CityAndUsers(new City(new Pair(41.314965, -8.423371), \"city6\", 80), 1));\n expResult.add(new CityAndUsers(new City(new Pair(40.851360, -8.136585), \"city9\", 65), 2));\n expResult.add(new CityAndUsers(new City(new Pair(40.781886, -8.697502), \"city8\", 7), 3));\n\n List<CityAndUsers> result = (List<CityAndUsers>) sn10.getCitiesAVL().inOrder();\n\n // Test if cities are ordered by ascendent order of users checked in & if AVL Tree is ordered & has the same size\n assertArrayEquals(expResult.toArray(), result.toArray());\n }",
"public InorderIterator() {\n inorder(); // Traverse binary tree and store elements in list\n }",
"private void createRuleList()\n {\n\n ArrayList<String> tempList0 = new ArrayList<String>();\n ArrayList<String> tempList1 = new ArrayList<String>();\n ArrayList<String> tempList2 = new ArrayList<String>();\n ArrayList<String> tempList3 = new ArrayList<String>();\n ArrayList<String> tempList4 = new ArrayList<String>();\n ArrayList<String> tempList5 = new ArrayList<String>();\n ArrayList<String> tempList6 = new ArrayList<String>();\n ArrayList<String> tempList7 = new ArrayList<String>();\n ArrayList<String> tempList8 = new ArrayList<String>();\n ArrayList<String> tempList9 = new ArrayList<String>();\n ArrayList<String> tempList10 = new ArrayList<String>();\n ArrayList<String> tempList11 = new ArrayList<String>();\n ArrayList<String> tempList12 = new ArrayList<String>();\n ArrayList<String> tempList13 = new ArrayList<String>();\n ArrayList<String> tempList14 = new ArrayList<String>();\n ArrayList<String> tempList15 = new ArrayList<String>();\n ArrayList<String> tempList16 = new ArrayList<String>();\n ArrayList<String> tempList17 = new ArrayList<String>();\n ArrayList<String> tempList18 = new ArrayList<String>();\n ArrayList<String> tempList19 = new ArrayList<String>();\n ArrayList<String> tempList20 = new ArrayList<String>();\n ArrayList<String> tempList21 = new ArrayList<String>();\n ArrayList<String> tempList22 = new ArrayList<String>();\n ArrayList<String> tempList23 = new ArrayList<String>();\n ArrayList<String> tempList24 = new ArrayList<String>();\n ArrayList<String> tempList25 = new ArrayList<String>();\n ArrayList<String> tempList26 = new ArrayList<String>();\n ArrayList<String> tempList27 = new ArrayList<String>();\n ArrayList<String> tempList28 = new ArrayList<String>();\n ArrayList<String> tempList29 = new ArrayList<String>();\n ArrayList<String> tempList30 = new ArrayList<String>();\n ArrayList<String> tempList31 = new ArrayList<String>();\n ArrayList<String> tempList32 = new ArrayList<String>();\n ArrayList<String> tempList33 = new ArrayList<String>();\n ArrayList<String> tempList34 = new ArrayList<String>();\n ArrayList<String> tempList35 = new ArrayList<String>();\n ArrayList<String> tempList36 = new ArrayList<String>();\n ArrayList<String> tempList37 = new ArrayList<String>();\n ArrayList<String> tempList38 = new ArrayList<String>();\n ArrayList<String> tempList39 = new ArrayList<String>();\n ArrayList<String> tempList40 = new ArrayList<String>();\n ArrayList<String> tempList41 = new ArrayList<String>();\n ArrayList<String> tempList42 = new ArrayList<String>();\n ArrayList<String> tempList43 = new ArrayList<String>();\n ArrayList<String> tempList44 = new ArrayList<String>();\n ArrayList<String> tempList45 = new ArrayList<String>();\n ArrayList<String> tempList46 = new ArrayList<String>();\n ArrayList<String> tempList47 = new ArrayList<String>();\n ArrayList<String> tempList48 = new ArrayList<String>();\n\n //There is no rule 0, so index 0 is left blank\n tempList0.add(\"\");\n ruleList.add(tempList0);\n //Create a list for each index position, then add it on to the overall list of lists\n tempList1.add(\"make-<PROGRAM>\");\n tempList1.add(\"DEFINITIONS\");\n ruleList.add(tempList1);\n tempList2.add(\"NULL\");\n ruleList.add(tempList2);\n tempList3.add(\"DEFINITIONS\");\n tempList3.add(\"DEF\");\n ruleList.add(tempList3);\n tempList4.add(\"make-<DEF>\");\n tempList4.add(\"BODY\");\n tempList4.add(\"TYPE\");\n tempList4.add(\"colon\");\n tempList4.add(\"rightParen\");\n tempList4.add(\"FORMALS\");\n tempList4.add(\"leftParen\");\n tempList4.add(\"make-<IDENTIFIER>\");\n tempList4.add(\"IDENTIFIER\");\n tempList4.add(\"function\");\n ruleList.add(tempList4);\n tempList5.add(\"make-<FORMALS>\");\n ruleList.add(tempList5);\n tempList6.add(\"NONEMPTYFORMALS\");\n ruleList.add(tempList6);\n tempList7.add(\"NEFREST\");\n tempList7.add(\"FORMAL\");\n ruleList.add(tempList7);\n tempList8.add(\"NONEMPTYFORMALS\");\n tempList8.add(\"comma\");\n ruleList.add(tempList8);\n tempList9.add(\"make-<FORMALS>\");\n ruleList.add(tempList9);\n tempList10.add(\"make-<FORMAL>\");\n tempList10.add(\"TYPE\");\n tempList10.add(\"colon\");\n tempList10.add(\"make-<IDENTIFIER>\");\n tempList10.add(\"IDENTIFIER\");\n ruleList.add(tempList10);\n tempList11.add(\"PRINTBODY\");\n ruleList.add(tempList11);\n tempList12.add(\"make-<BODY>\");\n tempList12.add(\"EXPR\");\n ruleList.add(tempList12);\n tempList13.add(\"BODY\");\n tempList13.add(\"PRINTSTATEMENT\");\n ruleList.add(tempList13);\n tempList14.add(\"make-integer\");\n tempList14.add(\"integer\");\n ruleList.add(tempList14);\n tempList15.add(\"make-boolean\");\n tempList15.add(\"boolean\");\n ruleList.add(tempList15);\n tempList16.add(\"EXPRREST\");\n tempList16.add(\"SIMPLEEXPR\");\n ruleList.add(tempList16);\n tempList17.add(\"EXPRREST\");\n tempList17.add(\"make-<BINARY>\");\n tempList17.add(\"EXPR\");\n tempList17.add(\"lessThan\");\n ruleList.add(tempList17);\n tempList18.add(\"EXPRREST\");\n tempList18.add(\"make-<BINARY>\");\n tempList18.add(\"EXPR\");\n tempList18.add(\"equals\");\n ruleList.add(tempList18);\n tempList19.add(\"make-<EXPR>\");\n ruleList.add(tempList19);\n tempList20.add(\"SIMPLEEXPRREST\");\n tempList20.add(\"TERM\");\n ruleList.add(tempList20);\n tempList21.add(\"SIMPLEEXPRREST\");\n tempList21.add(\"make-<BINARY>\");\n tempList21.add(\"SIMPLEEXPR\");\n tempList21.add(\"or\");\n ruleList.add(tempList21);\n tempList22.add(\"SIMPLEEXPRREST\");\n tempList22.add(\"make-<BINARY>\");\n tempList22.add(\"SIMPLEEXPR\");\n tempList22.add(\"plus\");\n ruleList.add(tempList22);\n tempList23.add(\"SIMPLEEXPRREST\");\n tempList23.add(\"make-<BINARY>\");\n tempList23.add(\"SIMPLEEXPR\");\n tempList23.add(\"minus\");\n ruleList.add(tempList23);\n tempList24.add(\"NULL\");\n ruleList.add(tempList24);\n tempList25.add(\"TERMREST\");\n tempList25.add(\"FACTOR\");\n ruleList.add(tempList25);\n tempList26.add(\"TERMREST\");\n tempList26.add(\"make-<BINARY>\");\n tempList26.add(\"TERM\");\n tempList26.add(\"and\");\n ruleList.add(tempList26);\n tempList27.add(\"TERMREST\");\n tempList27.add(\"make-<BINARY>\");\n tempList27.add(\"TERM\");\n tempList27.add(\"multiply\");\n ruleList.add(tempList27);\n tempList28.add(\"TERMREST\");\n tempList28.add(\"make-<BINARY>\");\n tempList28.add(\"TERM\");\n tempList28.add(\"divide\");\n ruleList.add(tempList28);\n tempList29.add(\"NULL\");\n ruleList.add(tempList29);\n tempList30.add(\"make-<if-EXPR>\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"else\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"then\");\n tempList30.add(\"EXPR\");\n tempList30.add(\"if\");\n ruleList.add(tempList30);\n tempList31.add(\"NOTFACTOR\");\n ruleList.add(tempList31);\n tempList32.add(\"IDENTIFIERMAIN\");\n ruleList.add(tempList32);\n tempList33.add(\"LITERAL\");\n ruleList.add(tempList33);\n tempList34.add(\"NEGFACTOR\");\n ruleList.add(tempList34);\n tempList35.add(\"rightParen\");\n tempList35.add(\"EXPR\");\n tempList35.add(\"leftParen\");\n ruleList.add(tempList35);\n tempList36.add(\"make-<UNARY>\");\n tempList36.add(\"FACTOR\");\n tempList36.add(\"not\");\n ruleList.add(tempList36);\n tempList37.add(\"make-<UNARY>\");\n tempList37.add(\"FACTOR\");\n tempList37.add(\"minus\");\n ruleList.add(tempList37);\n tempList38.add(\"IDENTIFIERREST\");\n tempList38.add(\"make-<IDENTIFIER>\");\n tempList38.add(\"IDENTIFIER\");\n ruleList.add(tempList38);\n tempList39.add(\"rightParen\");\n tempList39.add(\"ACTUALS\");\n tempList39.add(\"leftParen\");\n ruleList.add(tempList39);\n tempList40.add(\"NULL\");\n ruleList.add(tempList40);\n tempList41.add(\"NULL\");\n ruleList.add(tempList41);\n tempList42.add(\"NONEMPTYACTUALS\");\n ruleList.add(tempList42);\n tempList43.add(\"NEAREST\");\n tempList43.add(\"EXPR\");\n ruleList.add(tempList43);\n tempList44.add(\"NONEMPTYACTUALS\");\n tempList44.add(\"comma\");\n ruleList.add(tempList44);\n tempList45.add(\"make-Function-Call\");\n tempList45.add(\"make-<ACTUALS>\");\n ruleList.add(tempList45);\n tempList46.add(\"make-<NUMBER>\");\n tempList46.add(\"NUMBER\");\n ruleList.add(tempList46);\n tempList47.add(\"make-<BOOLEAN>\");\n tempList47.add(\"BOOLEAN\");\n ruleList.add(tempList47);\n tempList48.add(\"make-Function-Call\");\n tempList48.add(\"rightParen\");\n tempList48.add(\"EXPR\");\n tempList48.add(\"leftParen\");\n tempList48.add(\"make-<IDENTIFIER>\");\n tempList48.add(\"print\");\n ruleList.add(tempList48);\n }",
"public void duplicateAndInsertElements() {\n\t\t\n\t\tif (highlightedFields.isEmpty()) return;\n\t\t\n\t\t// highlighted fields change while adding. Make a copy first\n\t\tArrayList<XmlNode> tempArray = new ArrayList<XmlNode>(highlightedFields);\n\t\t\n\t\tcopyAndInsertElements(tempArray);\n\t}",
"public IcosahedronList(String listIn, ArrayList<Icosahedron> icosListIn) {\n list = listIn;\n icosList = icosListIn;\n }",
"ListString createListString();",
"public InitListExpr(DataStore data, Collection<? extends ClavaNode> children) {\n super(data, children);\n\n // isOldFormat = false;\n // this.data = null;\n }",
"public List<AnnotatedPluginDocument> performCloning(Enzyme enzyme, List<AnnotatedPluginDocument> documents) throws DocumentOperationException {\n List<AnnotatedPluginDocument> results = new LinkedList<AnnotatedPluginDocument>() {};\n List<AnnotatedPluginDocument> workingDocuments = new LinkedList<AnnotatedPluginDocument>();\n\n //Cut all the inserts.\n for (AnnotatedPluginDocument doc : documents) {\n workingDocuments.addAll(selectNeededSequence(enzyme, cutSequence(enzyme, doc)));\n }\n\n //We pick the first resulting fragment as the one to start the reaction from.\n //This we will wish to change for error handling later on: ie. Which part works and which does not.\n AnnotatedPluginDocument destinationFragment = workingDocuments.remove(0);\n\n //TODO: How do we avoid an endless ligation?\n //Now I implemented the removal of each used fragment. Probably not good in all cases.\n AnnotatedPluginDocument match = findMatchingDocument(destinationFragment, workingDocuments);\n while (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular() && match != null) { //The second part will be null if there is no match, or the insert list is already empty.\n destinationFragment = ligateSequences(destinationFragment, match);\n workingDocuments.remove(match);\n match = findMatchingDocument(destinationFragment, workingDocuments);\n }\n if (!((NucleotideSequenceDocument)destinationFragment.getDocument()).isCircular()) {\n Dialogs.showMessageDialog(\"Could not circularise the plasmid. The resulting linear fragment is presented.\");\n //TODO: Pop up an option to choose what to do.\n }\n results.add(cleanupAnnotations(destinationFragment));\n return results;\n }",
"@Override\n\tpublic ArrayList<T> toArrayList() {\n\t\tArrayList<T> out = new ArrayList<T>();\n\t\ttoArrayListRecursive(out,root);\n\t\treturn out;\n\t}",
"public void buildList(ArrayList<String> arrayList) {\n\t\t// write your code for buildList using the specification above\n\t\tfor(int counter=arrayList.size()-1; counter >= 0 ; counter--){\n\t\t\tString temp = arrayList.get(counter);\n\t\t\tadd(temp);\n\t\t}\n\t}",
"public void makeLowerCase () {\n tags = new StringBuilder (tags.toString().toLowerCase());\n }",
"private List<String> buildUpAlternateQueries(SolrParams solrParams, List<List<TextInQuery>> textsInQueryLists) {\n \n String originalUserQuery = getQueryStringFromParser();\n \n if (textsInQueryLists.isEmpty()) {\n return Collections.emptyList();\n }\n \n // initialize results\n List<AlternateQuery> alternateQueries = new ArrayList<>();\n for (TextInQuery textInQuery : textsInQueryLists.get(0)) {\n // add the text before the first user query token, e.g. a space or a \"\n StringBuilder stringBuilder = new StringBuilder(\n originalUserQuery.subSequence(0, textInQuery.getStartPosition()))\n .append(textInQuery.getText());\n alternateQueries.add(new AlternateQuery(stringBuilder, textInQuery.getEndPosition()));\n }\n \n for (int i = 1; i < textsInQueryLists.size(); i++) {\n List<TextInQuery> textsInQuery = textsInQueryLists.get(i);\n \n // compute the length in advance, because we'll be adding new ones as we go\n int alternateQueriesLength = alternateQueries.size();\n \n for (int j = 0; j < alternateQueriesLength; j++) {\n \n // When we're working with a lattice, assuming there's only one path to take in the next column,\n // we can (and MUST) use all the original objects in the current column.\n // It's only when we have >1 paths in the next column that we need to start taking copies.\n // So if a lot of this logic seems tortured, it's only because I'm trying to minimize object\n // creation.\n AlternateQuery originalAlternateQuery = alternateQueries.get(j);\n \n boolean usedFirst = false;\n \n for (int k = 0; k < textsInQuery.size(); k++) {\n \n TextInQuery textInQuery = textsInQuery.get(k);\n if (originalAlternateQuery.getEndPosition() > textInQuery.getStartPosition()) {\n // cannot be appended, e.g. \"canis\" token in \"canis familiaris\"\n continue;\n }\n \n AlternateQuery currentAlternateQuery;\n \n if (!usedFirst) {\n // re-use the existing object\n usedFirst = true;\n currentAlternateQuery = originalAlternateQuery;\n \n if (k < textsInQuery.size() - 1) {\n // make a defensive clone for future usage\n originalAlternateQuery = (AlternateQuery) currentAlternateQuery.clone();\n }\n } else if (k == textsInQuery.size() - 1) {\n // we're sure we're the last one to use it, so we can just use the original clone\n currentAlternateQuery = originalAlternateQuery;\n alternateQueries.add(currentAlternateQuery);\n } else {\n // need to clone to a new object\n currentAlternateQuery = (AlternateQuery) originalAlternateQuery.clone();\n alternateQueries.add(currentAlternateQuery);\n }\n // text in the original query between the two tokens, usually a space, comma, etc.\n CharSequence betweenTokens = originalUserQuery.subSequence(\n currentAlternateQuery.getEndPosition(), textInQuery.getStartPosition());\n currentAlternateQuery.getStringBuilder().append(betweenTokens).append(textInQuery.getText());\n currentAlternateQuery.setEndPosition(textInQuery.getEndPosition());\n }\n }\n }\n \n //Make sure result is unique\n HashSet<String> result = new LinkedHashSet<>();\n \n for (AlternateQuery alternateQuery : alternateQueries) {\n \n StringBuilder sb = alternateQuery.getStringBuilder();\n \n // append whatever text followed the last token, e.g. '\"'\n sb.append(originalUserQuery.subSequence(alternateQuery.getEndPosition(), originalUserQuery.length()));\n \n result.add(sb.toString());\n }\n return new ArrayList<>(result);\n }",
"TrieSet(String[] items, int start, int stop, int c) {\n \t // keep this -- it initializes the children array\n \t // (note all positions are initially null)\n this();\n \n //begin solution, replace with: //add code here\n if (items[start].length() == c) {\n terminal = true;\n start++;\n }\n for (char letter = 'A'; letter <= 'Z'; letter++) {\n int end = start;\n while (end < stop && items[end].charAt(c) == letter) end++;\n if (start != end)\n children[c2i(letter)] = new TrieSet(items, start, end, c+1);\n start = end;\n }\n //end solution\n }",
"protected ArrayList<Object[]> transformProbElementListToList(ArrayList<ProbElement> pProbElementList) throws Exception{\r\n\t\treturn transformElementListToList(pProbElementList, 0);\r\n\t}",
"List<PsdProduct> wrapConstituents(List<PsdProduct> productDtosList, List<CDSIndexConstituent> xmlConstituentsList);",
"public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }",
"private static List<CustomerDetails> buildInput() {\r\n\t\tList<CustomerDetails> iList = new ArrayList<CustomerDetails>();\r\n\t\tiList.add(new CustomerDetails(\"Abhay\", \"[email protected]\", \"11001\", 7402,\r\n\t\t\t\t\"22-06-2012 11:23\", \"2348723\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5000, \"22-06-2012 13:48\",\r\n\t\t\t\t\"3830283\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"[email protected]\", \"11002\",\r\n\t\t\t\t3839, \"22-06-2012 15:39\", \"2939303\"));\r\n\t\tiList.add(new CustomerDetails(\"Ashish\", \"[email protected]\", \"11003\",\r\n\t\t\t\t13890, \"22-06-2012 17:15\", \"2828939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11001\", 12083,\r\n\t\t\t\t\"23-06-2012 11:38\", \"3839403\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhimanyu\", \"[email protected]\", \"11004\",\r\n\t\t\t\t33283, \"23-06-2012 14:18\", \"1384839\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5984, \"23-06-2012 19:56\",\r\n\t\t\t\t\"8383939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11003\", 38103,\r\n\t\t\t\t\"24-06-2012 15:38\", \"9388383\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"[email protected]\", \"11002\",\r\n\t\t\t\t7281, \"24-06-2012 19:18\", \"2938381\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 1038, \"24-06-2012 20:00\",\r\n\t\t\t\t\"8383383\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhijeet\", \"[email protected]\", \"11005\",\r\n\t\t\t\t17937, \"25-06-2012 18:83\", \"3833838\"));\r\n\r\n\t\t// Collections.unmodifiableList(iList);\r\n\t\treturn iList;\r\n\t}",
"public List<DictionaryData> alphabeticalList() {\r\n //System.out.println(\"Checkpoint 5: alphabeticalList() not implemented yet\");\r\n //using the java collection set\r\n //wordlist here is the collection containing elements to be added to this set values\r\n Collection<DictionaryData> wordlist = dictionaryMap.values();\r\n //return list of words as an arrarylist using the same format as above\r\n return new ArrayList<DictionaryData>(wordlist);\r\n\r\n //return null;\r\n }",
"public List<T> preorder() {\n ArrayList<T> list = new ArrayList<T>();\n if (root != null) {\n list.add(root.getData());\n preorderHelper(list, root);\n }\n return list;\n }",
"public final List<l> apply(List<j> list) {\n kotlin.jvm.internal.h.e(list, \"it\");\n boolean a = this.dlr.a(this.dls, list);\n Iterable<j> iterable = list;\n Collection arrayList = new ArrayList(n.e(iterable, 10));\n for (j jVar : iterable) {\n kotlin.jvm.internal.h.d(jVar, \"it\");\n arrayList.add(new l(jVar, a ^ 1));\n }\n return (List) arrayList;\n }",
"public Object clone()\n {\n ElementInsertionList clone = new ElementInsertionList();\n\n for (int i = 0; i < list.size(); i++)\n {\n clone.addElementInsertionMap((ElementInsertionMap)list.elementAt(i));\n }\n\n return clone;\n }",
"@SuppressWarnings(\"unchecked\" )\n public ConstList<T> makeConst() {\n if (clist == null)\n clist = (list.isEmpty() ? emptylist : new ConstList<T>(list));\n return clist;\n }",
"private static <T> void cloneCollection(Collection<T> originalCollection, Collection<T> clonedCollection, PropertyFilter propertyFilter) {\n\t\tJpaCloner jpaCloner = new JpaCloner(propertyFilter);\n\t\tSet<Object> exploredEntities = new HashSet<Object>();\n\t\tfor (T root : originalCollection) {\n\t\t\tclonedCollection.add(clone(root, jpaCloner, exploredEntities));\n\t\t}\n\t}",
"private void collectAllElements(List<Node<E>> list) {\n list.add(root);\n for (int i = 0; i < list.size(); i++) {\n if (list.get(i).children != null) {\n list.addAll(list.get(i).children);\n }\n }\n }",
"public List<String> remake_array(List<String> lists){\n List<String> listItemtemp = new ArrayList<>();\n for (int i = 0; i < lists.size(); i++) {\n listItemtemp.add(i + 1 + \". \" + lists.get(i).substring(3).trim());\n }\n return listItemtemp;\n\n }",
"private Criteria buildFindExtDocCriteria(int idCase, String cdExtDocSort, List<String> docTypeList,\r\n String txtExtDocLocation, Date dtScrSearchDateFrom, Date dtScrSearchDateTo,\r\n List<Integer> personIds, List<Integer> sealedPersonIds,String sortBy, String indICPCDocument) {\r\n Criteria criteria = getSession().createCriteria(ExtDocumentation.class, \"e\");\r\n // Do a left outer Join only when the Person ID's are passed.\r\n if (personIds != null && personIds.size() > 0) {\r\n criteria.createAlias(\"e.extDocPerLinks\", \"edpl\", Criteria.FULL_JOIN);\r\n criteria.add(Restrictions.in(\"edpl.personByIdPerson.idPerson\", personIds));\r\n }\r\n if (sealedPersonIds != null && sealedPersonIds.size() > 0) {\r\n if (personIds == null || personIds.size() == 0) {\r\n criteria.createAlias(\"e.extDocPerLinks\", \"edpl\", Criteria.FULL_JOIN);\r\n }\r\n criteria.add(Restrictions.or(Restrictions.isNull(\"edpl.personByIdPerson.idPerson\"),Restrictions.not(Restrictions.in(\"edpl.personByIdPerson.idPerson\", sealedPersonIds))));\r\n }\r\n\r\n ProjectionList projectionList = Projections.projectionList();\r\n projectionList.add(Projections.property(\"e.idExtDocumentation\"));\r\n projectionList.add(Projections.property(\"e.dtLastUpdate\"));\r\n projectionList.add(Projections.property(\"e.capsCase\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocObtained\"));\r\n projectionList.add(Projections.property(\"e.txtExtDocDetails\"));\r\n projectionList.add(Projections.property(\"e.cdExtDocType\"));\r\n projectionList.add(Projections.property(\"e.txtExtDocLocation\"));\r\n projectionList.add(Projections.property(\"e.cdExtDocSort\"));\r\n projectionList.add(Projections.property(\"e.indExtDocSigned\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocUploaded\"));\r\n projectionList.add(Projections.property(\"e.txtFileName\"));\r\n projectionList.add(Projections.property(\"e.txtFormatType\"));\r\n projectionList.add(Projections.property(\"e.cdDocClass\"));\r\n projectionList.add(Projections.property(\"e.dtExtDocAdded\"));\r\n projectionList.add(Projections.property(\"e.indNaChecked\"));\r\n projectionList.add(Projections.property(\"e.indICPCDoc\"));\r\n projectionList.add(Projections.property(\"e.ucmDId\"));\r\n\r\n criteria.setProjection(Projections.distinct(projectionList));\r\n\r\n criteria.add(Restrictions.eq(\"e.capsCase.idCase\", idCase));\r\n\r\n if (dtScrSearchDateFrom != null) {\r\n criteria.add(Restrictions.ge(\"e.dtExtDocObtained\", dtScrSearchDateFrom));\r\n }\r\n if (dtScrSearchDateTo != null && dtScrSearchDateFrom != null && dtScrSearchDateTo.equals(dtScrSearchDateFrom)) {\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date idate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date();\r\n idate.setTime(dtScrSearchDateFrom);\r\n idate.addHours(23);\r\n idate.addMinutes(59);\r\n idate.addSeconds(59);\r\n dtScrSearchDateTo = idate.getTime();\r\n criteria.add(Restrictions.le(\"e.dtExtDocObtained\", dtScrSearchDateTo));\r\n } else if (dtScrSearchDateTo != null) {\r\n // R1 defect 952 fix to make the search to include the To date\r\n // criteria given\r\n gov.georgia.dhr.dfcs.sacwis.core.utility.Date tdate = new gov.georgia.dhr.dfcs.sacwis.core.utility.Date();\r\n tdate.setTime(dtScrSearchDateTo);\r\n tdate.addHours(23);\r\n tdate.addMinutes(59);\r\n tdate.addSeconds(59);\r\n dtScrSearchDateTo = tdate.getTime();\r\n criteria.add(Restrictions.le(\"e.dtExtDocObtained\", dtScrSearchDateTo));\r\n }\r\n\r\n if (docTypeList != null && docTypeList.size() > 0) {\r\n criteria.add(Restrictions.in(\"e.cdExtDocType\", docTypeList));\r\n }\r\n if (StringHelper.isValid(cdExtDocSort)) {\r\n criteria.add(Restrictions.eq(\"e.cdExtDocSort\", cdExtDocSort));\r\n }\r\n if (StringHelper.isValid(txtExtDocLocation)) {\r\n criteria.add(Restrictions.eq(\"e.txtExtDocLocation\", txtExtDocLocation));\r\n }\r\n //STGAP00017827: Filter for ICPC documents if corresponding checkbox is checked.\r\n if (StringHelper.isValid(indICPCDocument)\r\n \t\t&& \"Y\".equalsIgnoreCase(indICPCDocument)) {\r\n criteria.add(Restrictions.eq(\"e.indICPCDoc\", indICPCDocument));\r\n }\r\n\r\n if (SORT_BY_DOC_TYPE.equals(sortBy)){\r\n criteria.addOrder(Order.asc(\"e.cdExtDocType\"));\r\n }else if (SORT_BY_DATE_OBTAINED.equals(sortBy)){\r\n criteria.addOrder(Order.desc(\"e.dtExtDocObtained\"));\r\n } else if (SORT_BY_DOC_CLASS.equals(sortBy)){\r\n criteria.addOrder(Order.asc(\"e.cdDocClass\"));\r\n } else {\r\n criteria.addOrder(Order.asc(\"e.cdExtDocSort\"));\r\n }\r\n \r\n return criteria;\r\n }",
"public static ArrayList<FormulaTree> deepCopyTreeCollection(ArrayList<FormulaTree> subtrees){\n\t\tArrayList<FormulaTree> treesCopy = new ArrayList<FormulaTree>();\n\t\tfor (FormulaTree s : subtrees){\n\t\t\ttreesCopy.add(s.deepCopy());\n\t\t}\n\t\treturn treesCopy;\n\t}",
"public StringList createSorted() {\n StringList list = this.duplicate();\n list.sort();\n return list;\n }",
"public List<String> getListFromZipCodeElementList(List<WebElement> element);",
"private TreeMap<String, ArrayList<String>> fillLists (char guess) {\r\n \t//Tree Map to Return\r\n \tTreeMap <String, ArrayList<String>> lists = new TreeMap<String, ArrayList<String>>();\r\n \t\r\n \t//Loop through the Active Words\r\n \tfor (int word = 0; word < activeWords.size(); word ++) {\r\n \t\tStringBuilder currentPattern = new StringBuilder();\r\n \t\t//Use existing pattern as base\r\n \t\tcurrentPattern.append(pattern);\r\n \t\t\r\n \t\t//New pattern is created based on each Active Word's relation to guess\r\n \t\tfor (int letter = 0; letter < activeWords.get(word).length(); letter++) {\r\n \t\t\t//If match, update pattern\r\n \t\t\tif (activeWords.get(word).charAt(letter) == guess) {\r\n \t\t\t\tcurrentPattern.setCharAt(letter, guess);\r\n \t\t\t}\r\n \t\t}\t\r\n \t\t//Convert Builder to String here for simplicity\r\n \t\tString newPattern = currentPattern.toString();\r\n \t\t\r\n \t\t//Each temp is the ArrayList of words for each pattern\r\n \t\tArrayList <String> temp = new ArrayList <String>();\r\n \t\t//Below takes into account if this key's list already has other words in it.\r\n \t\tif (lists.containsKey(newPattern)) {\r\n \t\t\ttemp = lists.get(newPattern);\r\n \t\t}\t\r\n \t\t\r\n \t\t//Add current word\r\n\t\t\ttemp.add(activeWords.get(word));\r\n\t\t\t//Add updated list to key (pattern created)\r\n\t\t\tlists.put(newPattern, temp);\r\n \t} \t\r\n \treturn lists;\r\n }",
"public CaseClassRelation (scala.collection.Seq<A> data, scala.reflect.api.TypeTags.TypeTag<A> evidence$3) { throw new RuntimeException(); }",
"public Set (ArrayList<String> inputArray) { // Constructor, taking in an ArrayList\n\t\tstringArray = inputArray;\n\t\t// Setting that passed ArrayList to our private variable\n\t}"
]
| [
"0.6988018",
"0.67276096",
"0.5954786",
"0.56085795",
"0.5513654",
"0.5513654",
"0.54086256",
"0.5365783",
"0.52584463",
"0.5217732",
"0.5177175",
"0.5098874",
"0.49420935",
"0.49078178",
"0.48568386",
"0.4791309",
"0.47897816",
"0.47830564",
"0.46550697",
"0.46491408",
"0.4616148",
"0.46149468",
"0.46075112",
"0.45848176",
"0.45780575",
"0.45635957",
"0.45450807",
"0.45389253",
"0.45378065",
"0.45332998",
"0.4518199",
"0.4488989",
"0.44775814",
"0.44712088",
"0.44551915",
"0.43934542",
"0.4390453",
"0.43900555",
"0.43569344",
"0.43472502",
"0.434182",
"0.433941",
"0.43315554",
"0.4321647",
"0.43172044",
"0.4303643",
"0.43003953",
"0.42947653",
"0.42807558",
"0.42794424",
"0.42721814",
"0.4258948",
"0.42583027",
"0.42419454",
"0.42197287",
"0.42118162",
"0.4210404",
"0.4195359",
"0.41865095",
"0.41824952",
"0.41793683",
"0.41791838",
"0.4169896",
"0.4159285",
"0.41541508",
"0.4148755",
"0.41444758",
"0.4142325",
"0.4140279",
"0.41383776",
"0.4136118",
"0.41260773",
"0.41193876",
"0.4113152",
"0.41124183",
"0.41078615",
"0.41000283",
"0.4099927",
"0.40988934",
"0.40984663",
"0.40979886",
"0.40897894",
"0.40792698",
"0.4075326",
"0.40731022",
"0.40632173",
"0.4055373",
"0.40536717",
"0.40526226",
"0.40473375",
"0.40468204",
"0.40446132",
"0.404298",
"0.40384513",
"0.40363598",
"0.40268353",
"0.40265322",
"0.40231156",
"0.40218085",
"0.4018572",
"0.4018414"
]
| 0.0 | -1 |
Constructs a new cursor. | public CaseInsensitiveElementListIDataCursor() {
initialize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Cursor buildCursor();",
"public MyCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public CrimeCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public BorrowerCursor(Cursor cursor) {\n super(cursor);\n }",
"public GameCursor() {\n }",
"public static interface Cursor {\n\t\tpublic void open() throws RelationException;\n\n\t\t//the hasNext() method actually loads the object, so don't skip it\n\t\tpublic boolean hasNext() throws RelationException;\n\n\t\t//this retrieves the next object. use in confunction with hasNext();\n\t\tpublic Tuple next() throws RelationException;\n\n\t\tpublic void close() throws RelationException;\n\t}",
"@Override\n protected Cursor buildCursor() {\n return(db.getReadableDatabase().rawQuery(rawQuery, args));\n }",
"public Builder to(int cursor){\n MathUtils.assertInRange(cursor, 0, LENGTH - 1);\n this.cursor = cursor;\n return this;\n }",
"public void setCursor(Cursor c) {\n\n\t}",
"public RowDataCursor(MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata) {\n/* 112 */ this.currentPositionInEntireResult = -1;\n/* 113 */ this.metadata = metadata;\n/* 114 */ this.mysql = ioChannel;\n/* 115 */ this.statementIdOnServer = creatingStatement.getServerStatementId();\n/* 116 */ this.prepStmt = creatingStatement;\n/* 117 */ this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);\n/* */ }",
"public abstract long getCursor();",
"@Override\n public Optional<CursorResourceInfo> create(String queryId, CreateCursorRequest cursorRequest) {\n Optional<QueryResource> queryResource = this.resourceStore.getQueryResource(queryId);\n if (!queryResource.isPresent()) {\n return Optional.of(new CursorResourceInfo().error(\n new FuseError(Query.class.getSimpleName(), \"failed fetching next page for query \" + queryId)));\n }\n //outer query cursor id\n String cursorId = queryResource.get().getNextCursorId();\n //inner cursors for inner queries\n createInnerCursor(queryResource.get(),cursorRequest);\n CursorResource resource = this.createResource(queryResource.get(), cursorId, cursorRequest);\n this.resourceStore.addCursorResource(queryId, resource);\n\n return Optional.of(new CursorResourceInfo(\n urlSupplier.resourceUrl(queryId, cursorId),\n cursorId,\n cursorRequest,\n urlSupplier.pageStoreUrl(queryId, cursorId)));\n }",
"DataFrameCursor<R,C> cursor();",
"public X cursor(Cursor cursor) {\n component.setCursor(cursor);\n return (X) this;\n }",
"public Cursor getCursorWithRows() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length())\n .addLengths(\"val123\".length()).setValues(ByteString\n .copyFromUtf8(\"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS TEAMHELLO\"\n +\n \" TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123val123\"))).build());\n return cursor;\n }",
"protected abstract CursorResource createResource(QueryResource queryResource, String cursorId, CreateCursorRequest cursorRequest);",
"public static MyListItem fromCursor(Cursor cursor) {\n MyListItem m = new MyListItem();\n return m;\n }",
"public ItemCursor() {\n\t\tsetMaxStackSize(1);\n\t}",
"private Room cursorToRoom(Cursor cursor) {\n\t\tRoom room = new Room();\n\n\t\troom.setId(cursor.getLong(0));\n\t\troom.setName(cursor.getString(1));\n\t\troom.setDescription(cursor.getString(2));\n\n\t\treturn room;\n\t}",
"private static Cursor makePoiCursor(int count) {\n Random random = new Random();\n long id, radius;\n double lat, lgt;\n String poi, poiType, cellTowers, connectedWifi, wifiSsid;\n final int maxRadius = 2000;\n // COL_ID, COL_POI, COL_LAT, COL_LGT, COL_RADIUS, COL_POI_TYPE, COL_CELL_TOWERS, COL_CONNECTED_WIFI, COL_WIFI_SSID\n MatrixCursor cursor = new MatrixCursor(PoiTuple.COLUMNS);\n for (int i = 0; i < count; i++) {\n id = random.nextLong();\n if (id < 0) {\n id = id * -1L;\n } else if (id == 0) {\n id = 1L;\n }\n poi = String.valueOf(random.nextGaussian());\n lat = random.nextDouble();\n lgt = random.nextDouble();\n radius = random.nextInt(maxRadius) + 1;\n poiType = String.valueOf(random.nextGaussian());\n cellTowers = String.valueOf(random.nextGaussian());\n connectedWifi = String.valueOf(random.nextGaussian());\n wifiSsid = String.valueOf(random.nextGaussian());\n cursor.newRow().add(id).add(poi).add(lat).add(lgt).add(radius).add(poiType)\n .add(cellTowers).add(connectedWifi).add(wifiSsid);\n }\n cursor.moveToFirst();\n\n return cursor;\n }",
"public T createModel(Cursor cursor, String id);",
"@GuardedBy(\"this\")\n private Cursor createMergedCursor() {\n try {\n final boolean hasNewCalls = mNewCallsCursor.getCount() != 0;\n final boolean hasOldCalls = mOldCallsCursor.getCount() != 0;\n \n if (!hasNewCalls) {\n // Return only the old calls, without the header.\n MoreCloseables.closeQuietly(mNewCallsCursor);\n return mOldCallsCursor;\n }\n \n if (!hasOldCalls) {\n // Return only the new calls.\n MoreCloseables.closeQuietly(mOldCallsCursor);\n return new MergeCursor(\n new Cursor[]{ createNewCallsHeaderCursor(), mNewCallsCursor });\n }\n \n return new MergeCursor(new Cursor[]{\n createNewCallsHeaderCursor(), mNewCallsCursor,\n createOldCallsHeaderCursor(), mOldCallsCursor});\n } finally {\n // Any cursor still open is now owned, directly or indirectly, by the caller.\n mNewCallsCursor = null;\n mOldCallsCursor = null;\n }\n }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"protected AbstractForwardingNodeCursor() {}",
"public void cursorOn();",
"public int getCursor() { return curs; }",
"DataBaseReadStream createNewStream(Cursor beginCursor) throws SQLException;",
"@Override\n public CursorFactory getCursorFactory() {\n return null;\n }",
"public Cursor getCursorWithRowsAsNull() {\n Cursor cursor = new SimpleCursor(Query.QueryResult.newBuilder()\n .addFields(Query.Field.newBuilder().setName(\"col1\").setType(Query.Type.INT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col2\").setType(Query.Type.UINT8).build())\n .addFields(Query.Field.newBuilder().setName(\"col3\").setType(Query.Type.INT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col4\").setType(Query.Type.UINT16).build())\n .addFields(Query.Field.newBuilder().setName(\"col5\").setType(Query.Type.INT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col6\").setType(Query.Type.UINT24).build())\n .addFields(Query.Field.newBuilder().setName(\"col7\").setType(Query.Type.INT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col8\").setType(Query.Type.UINT32).build())\n .addFields(Query.Field.newBuilder().setName(\"col9\").setType(Query.Type.INT64).build())\n .addFields(Query.Field.newBuilder().setName(\"col10\").setType(Query.Type.UINT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col11\").setType(Query.Type.FLOAT32).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col12\").setType(Query.Type.FLOAT64).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col13\").setType(Query.Type.TIMESTAMP).build())\n .addFields(Query.Field.newBuilder().setName(\"col14\").setType(Query.Type.DATE).build())\n .addFields(Query.Field.newBuilder().setName(\"col15\").setType(Query.Type.TIME).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col16\").setType(Query.Type.DATETIME).build())\n .addFields(Query.Field.newBuilder().setName(\"col17\").setType(Query.Type.YEAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col18\").setType(Query.Type.DECIMAL).build())\n .addFields(Query.Field.newBuilder().setName(\"col19\").setType(Query.Type.TEXT).build())\n .addFields(Query.Field.newBuilder().setName(\"col20\").setType(Query.Type.BLOB).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col21\").setType(Query.Type.VARCHAR).build())\n .addFields(\n Query.Field.newBuilder().setName(\"col22\").setType(Query.Type.VARBINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col23\").setType(Query.Type.CHAR).build())\n .addFields(Query.Field.newBuilder().setName(\"col24\").setType(Query.Type.BINARY).build())\n .addFields(Query.Field.newBuilder().setName(\"col25\").setType(Query.Type.BIT).build())\n .addFields(Query.Field.newBuilder().setName(\"col26\").setType(Query.Type.ENUM).build())\n .addFields(Query.Field.newBuilder().setName(\"col27\").setType(Query.Type.SET).build())\n .addRows(Query.Row.newBuilder().addLengths(\"-50\".length()).addLengths(\"50\".length())\n .addLengths(\"-23000\".length()).addLengths(\"23000\".length())\n .addLengths(\"-100\".length()).addLengths(\"100\".length()).addLengths(\"-100\".length())\n .addLengths(\"100\".length()).addLengths(\"-1000\".length()).addLengths(\"1000\".length())\n .addLengths(\"24.52\".length()).addLengths(\"100.43\".length())\n .addLengths(\"2016-02-06 14:15:16\".length()).addLengths(\"2016-02-06\".length())\n .addLengths(\"12:34:56\".length()).addLengths(\"2016-02-06 14:15:16\".length())\n .addLengths(\"2016\".length()).addLengths(\"1234.56789\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"HELLO TDS TEAM\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"N\".length()).addLengths(\"HELLO TDS TEAM\".length())\n .addLengths(\"1\".length()).addLengths(\"val123\".length()).addLengths(-1).setValues(\n ByteString.copyFromUtf8(\n \"-5050-2300023000-100100-100100-1000100024.52100.432016-02-06 \" +\n \"14:15:162016-02-0612:34:562016-02-06 14:15:1620161234.56789HELLO TDS TEAMHELLO TDS \"\n +\n \"TEAMHELLO TDS TEAMHELLO TDS TEAMNHELLO TDS TEAM1val123\"))).build());\n return cursor;\n }",
"public int cursor();",
"public Cursor getCursor()\n {\n// Object localObject1;\n// if (!this.mCursorValid)\n// {\n// this.mCursor = new EsMatrixCursor(PROJECTION);\n// this.mCursorValid = true;\n// if ((this.mLocalProfilesLoaded) && (this.mGaiaIdsAndCirclesLoaded))\n// {\n// localObject1 = new HashSet();\n// HashSet localHashSet = new HashSet();\n// Object localObject3 = this.mLocalProfiles.iterator();\n// while (true)\n// {\n// long l1;\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject5 = this.mContacts.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject5).hasNext())\n// {\n// localObject2 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject2).hasNext())\n// {\n// localObject3 = this.mPublicProfiles.iterator();\n// while (true)\n// {\n// if (!((Iterator)localObject3).hasNext())\n// {\n// localObject1 = this.mCursor;\n// break;\n// }\n// localObject4 = (PublicProfile)((Iterator)localObject3).next();\n// localObject2 = ((PublicProfile)localObject4).gaiaId;\n// if (((HashSet)localObject1).contains(localObject2))\n// continue;\n// localObject5 = this.mCursor;\n// arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject4).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject2;\n// arrayOfObject[4] = ((PublicProfile)localObject4).name;\n// arrayOfObject[5] = null;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = ((PublicProfile)localObject4).snippet;\n// ((EsMatrixCursor)localObject5).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (PublicProfile)((Iterator)localObject2).next();\n// localObject5 = ((PublicProfile)localObject3).gaiaId;\n// localObject4 = (String)this.mGaiaIdsAndCircles.get(localObject5);\n// if ((((HashSet)localObject1).contains(localObject5)) || (TextUtils.isEmpty((CharSequence)localObject4)))\n// continue;\n// ((HashSet)localObject1).add(localObject5);\n// localObject6 = this.mCursor;\n// Object[] arrayOfObject = new Object[11];\n// l1 = this.mNextId;\n// this.mNextId = (1L + l1);\n// arrayOfObject[0] = Long.valueOf(l1);\n// arrayOfObject[1] = ((PublicProfile)localObject3).personId;\n// arrayOfObject[2] = null;\n// arrayOfObject[3] = localObject5;\n// arrayOfObject[4] = ((PublicProfile)localObject3).name;\n// arrayOfObject[5] = localObject4;\n// arrayOfObject[6] = null;\n// arrayOfObject[7] = null;\n// arrayOfObject[8] = null;\n// arrayOfObject[9] = null;\n// arrayOfObject[10] = null;\n// ((EsMatrixCursor)localObject6).addRow(arrayOfObject);\n// }\n// }\n// localObject3 = (Contact)((Iterator)localObject5).next();\n// if (l1.contains(((Contact)localObject3).name))\n// continue;\n// localObject2 = this.mCursor;\n// localObject4 = new Object[11];\n// l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject4[0] = Long.valueOf(l2);\n// localObject4[1] = ((Contact)localObject3).personId;\n// localObject4[2] = ((Contact)localObject3).lookupKey;\n// localObject4[3] = null;\n// localObject4[4] = ((Contact)localObject3).name;\n// localObject4[5] = null;\n// localObject4[6] = null;\n// localObject4[7] = ((Contact)localObject3).email;\n// localObject4[8] = ((Contact)localObject3).phoneNumber;\n// localObject4[9] = ((Contact)localObject3).phoneType;\n// localObject4[10] = null;\n// ((EsMatrixCursor)localObject2).addRow(localObject4);\n// }\n// }\n// Object localObject6 = (LocalProfile)((Iterator)localObject3).next();\n// Object localObject2 = ((LocalProfile)localObject6).gaiaId;\n// ((HashSet)localObject1).add(localObject2);\n// l1.add(((LocalProfile)localObject6).name);\n// Object localObject4 = this.mCursor;\n// Object localObject5 = new Object[11];\n// long l2 = this.mNextId;\n// this.mNextId = (1L + l2);\n// localObject5[0] = Long.valueOf(l2);\n// localObject5[1] = ((LocalProfile)localObject6).personId;\n// localObject5[2] = null;\n// localObject5[3] = localObject2;\n// localObject5[4] = ((LocalProfile)localObject6).name;\n// localObject5[5] = ((LocalProfile)localObject6).packedCircleIds;\n// localObject5[6] = ((LocalProfile)localObject6).email;\n// localObject5[7] = null;\n// localObject5[8] = ((LocalProfile)localObject6).phoneNumber;\n// localObject5[9] = ((LocalProfile)localObject6).phoneType;\n// localObject5[10] = null;\n// ((EsMatrixCursor)localObject4).addRow(localObject5);\n// }\n// }\n// localObject1 = this.mCursor;\n// }\n// else\n// {\n// localObject1 = this.mCursor;\n// }\n// return (Cursor)(Cursor)(Cursor)(Cursor)(Cursor)(Cursor)localObject1;\n return null;\n }",
"public com.google.protobuf.ByteString\n getCursorBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(cursor_);\n }",
"public Builder setCursorBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setCursorBytes(value);\n return this;\n }",
"public java.lang.String getCursor() {\n return cursor_;\n }",
"private MatrixCursor construct_MatrixCursor(Hashtable<String, String> records,String[] columnNames)\n {\n \tif(records == null) return null;\n \tMatrixCursor matCursor = new MatrixCursor(columnNames);\n \tString[] rowItem = new String[2];\n \tSet<String> keys = records.keySet();\n \tfor(String key:keys)\n \t{\n \t\trowItem[0] = key;\n \t\trowItem[1] = records.get(rowItem[0]);\n \t\tmatCursor.addRow(rowItem);\n \t}\n \treturn matCursor;\n }",
"public Builder setCursor(\n java.lang.String value) {\n copyOnWrite();\n instance.setCursor(value);\n return this;\n }",
"public void buildFromCursor(Cursor cursor) throws JSONException {\n\t\tthis.id = cursor.getString(cursor.getColumnIndex(\"id\"));\n\t\tthis.access_token = cursor.getString(cursor.getColumnIndex(\"access_token\"));\n\t\tthis.service = cursor.getString(cursor.getColumnIndex(\"service\"));\n\t\tthis.action = cursor.getString(cursor.getColumnIndex(\"action\"));\n\t\tthis.create_date = cursor.getString(cursor.getColumnIndex(\"create_date\"));\n\n\t\tthis.objects = new JSONObject(cursor.getString(cursor.getColumnIndex(\"objects\")));\n\t}",
"void addCursor(final Cursor c)\n {\n cursors.add(c);\n }",
"public ChatMessage(Cursor cursor) {\n // TODO\n this.id = Long.parseLong(MessageContract.getId(cursor));\n this.sender = MessageContract.getSender(cursor);\n this.messageText = MessageContract.getMessageText(cursor);\n this.timestamp = MessageContract.getTimestamp(cursor);\n this.longitude = MessageContract.getLongitude(cursor);\n this.latitude = MessageContract.getLatitude(cursor);\n }",
"public CursorWrapper getCursor() {\n\t\t\treturn cursor;\n\t\t}",
"public QuoteCursorAdapter(Context context, Cursor cursor) {\n super(context, cursor);\n mContext = context;\n }",
"public void setCursor(int l, int c);",
"@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.item_crow, parent, false);\n }",
"protected Caret createCaret() {\n return new BasicCaret();\n }",
"public SingleRowCursor(Row row) {\n this.row = row;\n }",
"private Angkot cursorToAngkot(Cursor cursor) {\n \tAngkot angkot = new Angkot();\n \n /* Set atribut pada objek barang dengan data kursor yang diambil dari database*/\n \tangkot.setId(cursor.getLong(0));\n \tangkot.setName(cursor.getString(1));\n \tangkot.setDescription(cursor.getString(2));\n \tangkot.setTime(cursor.getString(3));\n \n //kembalikan sebagai objek barang\n return angkot;\n }",
"@SuppressWarnings(\"unused\")\r\n Chapter(final Cursor cursor) {\r\n this(MmSdkUtils.getLong(cursor, SCHEMA_NAME, \"id\"),\r\n MmSdkUtils.getLong(cursor, SCHEMA_NAME, \"contentId\"),\r\n MmSdkUtils.getString(cursor, SCHEMA_NAME, \"title\", \"\"),\r\n new ThumbnailSpec(cursor),\r\n Uri.parse(MmSdkUtils.getString(cursor, SCHEMA_NAME, \"accessUri\", \"\")),\r\n MmSdkUtils.getLong(cursor, SCHEMA_NAME, \"lastAccessDate\"),\r\n MmSdkUtils.getLong(cursor, SCHEMA_NAME, \"browseCount\"),\r\n MmSdkUtils.getString(cursor, SCHEMA_NAME, \"description\", \"\"),\r\n MmSdkUtils.getString(cursor, SCHEMA_NAME, \"payload\", \"\")\r\n );\r\n }",
"private Track cursorToObject(Cursor cursor) {\n \tTrack track = new Track();\n \n /* Set atribut pada objek barang dengan data kursor yang diambil dari database*/\n \ttrack.setId(cursor.getLong(0));\n \ttrack.setConnection_id(cursor.getLong(1));\n \ttrack.setAngkot_id(cursor.getLong(2));\n \ttrack.setPath(cursor.getString(3));\n \n //kembalikan sebagai objek\n return track;\n }",
"public DBObject createNew() {\n DBObjectImpl obj = (DBObjectImpl) getNewObject();\n obj.DELETE_STMT_STR = DELETE_STMT_STR;\n obj.INSERT_STMT_STR = INSERT_STMT_STR;\n obj.UPDATE_STMT_STR = UPDATE_STMT_STR;\n obj.QUERY_STMT_STR = QUERY_STMT_STR;\n\n return obj;\n }",
"public static AdventureObject fromCursor(Cursor cursor){\n AdventureObject advObject = null;\n try {\n advObject = CustomGson.getGson().fromJson(cursor.getString(cursor.getColumnIndex(ROW_OBJECT)), AdventureObject.class);\n advObject.id = cursor.getInt(cursor.getColumnIndex(ROW_ID));\n advObject.mdateCreated = new Date(cursor.getLong(cursor.getColumnIndex(ROW_DATE_CREATED)));\n advObject.mdateUpdated = new Date(cursor.getLong(cursor.getColumnIndex(ROW_DATE_UPDATED)));\n advObject.madventureTitle = cursor.getString(cursor.getColumnIndex(ROW_TITLE));\n } catch(CursorIndexOutOfBoundsException e){\n e.printStackTrace();\n } catch(NullPointerException e){\n e.printStackTrace();\n }\n return advObject;\n }",
"private void initCursor() {\n cursor = new Rectangle();\n root.getChildren().add(cursor);\n cursor.setWidth(1.5);\n\n Timeline timeline = new Timeline();\n timeline.setCycleCount(Animation.INDEFINITE);\n\n KeyFrame keyFrame = new KeyFrame(Duration.seconds(0.5), new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (isVisiable) {\n cursor.setFill(Color.WHITE);\n isVisiable = !isVisiable;\n } else {\n cursor.setFill(Color.BLACK);\n isVisiable = !isVisiable;\n }\n actionEvent.consume();\n }\n });\n\n timeline.getKeyFrames().add(keyFrame);\n timeline.play();\n }",
"private Cursor getCursorObject() {\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n HabbitContract.HabbitEntry._ID,\n HabbitContract.HabbitEntry.COLUMN_HAD_BREAKFAST,\n HabbitContract.HabbitEntry.COLUMN_BREAKFAST_MEAL,\n HabbitContract.HabbitEntry.COLUMN_HAD_LUNCH,\n HabbitContract.HabbitEntry.COLUMN_LUNCH_MEAL,\n HabbitContract.HabbitEntry.COLUMN_HAD_SUPPER,\n HabbitContract.HabbitEntry.COLUMN_SUPPER_MEAL,\n HabbitContract.HabbitEntry.COLUMN_ADDITIONAL_DATA,\n HabbitContract.HabbitEntry.COLUMN_DATETIME_STAMP};\n\n // Perform a query on the nutrition table\n Cursor cursor = db.query(\n HabbitContract.HabbitEntry.TABLE_NAME, // The table to query\n projection, // The columns to return\n null, // The columns for the WHERE clause\n null, // The values for the WHERE clause\n null, // Don't group the rows\n null, // Don't filter by row groups\n null); // The sort order\n\n return cursor;\n }",
"private Task cursorToTask(Cursor cursor) {\n Task task = new Task(cursor.getString(1));\n task.set_id(cursor.getLong(0));\n return task;\n }",
"public SignBean(Cursor cursor) {\n userId = cursor.getString(cursor.getColumnIndex(SQLiteHelp.SignTable.KEY_SIGN_ID));\n signTime = cursor.getString(cursor.getColumnIndex(SQLiteHelp.SignTable.KEY_SIGN_TIME));\n }",
"PlatilloAdapter(final Context context, final Cursor cursor, final int flags) {\n super(context, cursor, flags);\n }",
"public ResourceCursorAdapter(Context context, int layout, Cursor c, int flags) {\n/* 81 */ super((Context)null, (Cursor)null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Builder clearCursor() {\n copyOnWrite();\n instance.clearCursor();\n return this;\n }",
"public View newView(Context context, Cursor cursor, ViewGroup parent) {\n/* 104 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public Cursor getCursor(){\n return mCursor;\n }",
"private Cursor createNewCallsHeaderCursor() {\n return createHeaderCursorFor(CallLogQuery.SECTION_NEW_HEADER);\n }",
"public DBCursor find(final DBObject query) {\n return new DBCursor(this, query, null, getReadPreference());\n }",
"@Override\n public Iterator<T> iterator() {\n return new CLITableIterator<T>(createNew(tables, cursor, rowIndex));\n }",
"public Cursor getCursor() throws SQLException\n {\n Cursor c = db.query( true, C_TABLA, columnas, null, null, null, null, null, null);\n\n return c;\n }",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor);",
"Data<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);",
"private void setCursor(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cursor_ = value;\n }",
"public WatercolorPane(FocusWidget cursor){\n this.cursor = cursor;\n }",
"public Photo( Cursor cursor )\n\t{\n\t\tthis( 0, null, null, null, null, 0, 0, 0, 0, 0, 0, null );\n\t\t\n\t\tthis.id = cursor.getLong( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry._ID ) );\n\t\tthis.title = cursor.getString( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_TITLE ) );\n\t\tthis.description = cursor.getString( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_DESCRIPTION ) );\n\t\t\n\t\tif ( !cursor.isNull( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_CREATION_DATE ) ) )\n\t\t{\n\t\t\tthis.creationDate = new Date( cursor.getLong( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_CREATION_DATE ) ) );\n\t\t}\n\t\t\n\t\tif ( !cursor.isNull( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_MODIFIED_DATE ) ) )\n\t\t{\n\t\t\tthis.modifiedDate = new Date( cursor.getLong( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_MODIFIED_DATE ) ) );\n\t\t}\n\t\t\n\t\tthis.width = cursor.getLong( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_WIDTH ) );\n\t\tthis.height = cursor.getLong( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_HEIGHT ) );\n\t\tthis.weight = cursor.getDouble( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_WEIGHT ) );\n\t\tthis.latitude = cursor.getDouble( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_LATITUDE) );\n\t\tthis.longitude = cursor.getDouble( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_LONGITUDE ) );\n\t\tthis.altitude = cursor.getDouble( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_ALTITUDE ) );\n\t\tthis.address = cursor .getString( cursor.getColumnIndex( CameraMinusDbContract.PhotoEntry.COLUMN_NAME_ADDRESS ) );\n\t}",
"public void setCursor(int row, int col);",
"public static MyListItem fromCursor(Cursor cursor) {\n MyListItem myListItem=new MyListItem();\n myListItem._id=cursor.getInt(0);\n myListItem.amount=cursor.getString(1);\n myListItem.dateTime=cursor.getString(2);\n myListItem.type=cursor.getShort(3);\n return myListItem;\n }",
"public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return cursorInflater.inflate(R.layout.list_row, parent, false);\n }",
"public com.google.protobuf.ByteString\n getCursorBytes() {\n return instance.getCursorBytes();\n }",
"private void clearCursor() {\n \n cursor_ = getDefaultInstance().getCursor();\n }",
"public ResourceCursorAdapter(Context context, int layout, Cursor c, boolean autoRequery) {\n/* 67 */ super((Context)null, (Cursor)null); throw new RuntimeException(\"Stub!\");\n/* */ }",
"private Task CursorToTask(Cursor c) {\n\t\tTask task = new Task();\r\n\t\ttask.setTaskName(c.getString(1));\r\n\t\ttask.setPrior(c.getString(2));\r\n\t\ttask.setList(c.getString(3));\r\n\t\ttask.setDuedate(StrToDate(c.getString(4)));\r\n\t\ttask.setReminder(StrToDate(c.getString(5)));\r\n\t\ttask.setRepeat(c.getString(6));\r\n\t\ttask.setGoal(c.getInt(7));\r\n\t\treturn task;\r\n\t}",
"Bindable getBindable( Meta.CursorFactory cursorFactory );",
"private void setCursorBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n cursor_ = value.toStringUtf8();\n }",
"public static FieldType create(Cursor cursor) {\n\t\tint idColon = cursor.getColumnIndex(ID);\n\t\tint nameColon = cursor.getColumnIndex(NAME);\n\t\tint createDateColumn = cursor.getColumnIndex(CREATE_DATE);\n\t\tint modifyDateColumn = cursor.getColumnIndex(MODIFY_DATE);\n\t\tFieldType field = new FieldType();\n\n\t\tif ((idColon > -1) && (cursor.getColumnCount() > idColon)) {\n\t\t\tfield.setId((cursor.getLong(idColon)));\n\t\t}\n\n\t\tif ((nameColon > -1) && (cursor.getColumnCount() > nameColon)) {\n\t\t\tfield.setName(cursor.getString(nameColon));\n\t\t}\n\t\tif ((createDateColumn > -1)\n\t\t\t\t&& (cursor.getColumnCount() > createDateColumn)) {\n\t\t\tfield.setCreateDate(cursor.getLong(createDateColumn));\n\t\t}\n\t\tif ((modifyDateColumn > -1)\n\t\t\t\t&& (cursor.getColumnCount() > modifyDateColumn)) {\n\t\t\tfield.setModifyDate(cursor.getLong(modifyDateColumn));\n\t\t}\n\t\tif (cursor.isLast()) {\n\t\t\tcursor.close();\n\t\t}\n\t\treturn field;\n\t}",
"public Memento(Buffer buffer, Buffer clipboard, Selection selection, int cursorPosition) {\n this.buffer = buffer;\n this.clipboard = clipboard;\n this.selection = selection;\n this.cursorPosition = cursorPosition;\n }",
"private void initMatrixCursor() {\n // if (mMatrixCursor != null) mMatrixCursor.close();\n mMatrixCursor = new MatrixCursor(BIND_PROJECTION, LIST_CAPACITY);\n mMatrixCursor.addRow(new String[] {\n \"1\", getResources().getString(R.string.voicemail), \"\", \"\", \"\", \"\"\n });\n mQueryTimes = SPEED_DIAL_MIN;\n }",
"public ResultSet construct(String szQuery) {\n\t\treturn null;\n\t}",
"@Override\n public IDataCursor getCursor() {\n return new CaseInsensitiveElementListIDataCursor();\n }",
"public abstract DBIterator NewIterator(ReadOptions options);",
"private Company cursorToCompany(Cursor cursor) {\n\t\t \n\t Company company = new Company();\n\t company.setAdministratorId(cursor.getInt(0));\n\t company.setCompanyName(cursor.getString(1));\n\t company.setCompanyPassword(cursor.getString(2));\n\t return company;\n\t }",
"private MatrixCursor construct_MatrixCursor(Cursor records,String[] columnNames)\n {\n \tif(records == null || records.getCount() == 0) return null;\n \tString[] rowItem = new String[2];\n \tMatrixCursor matCursor = new MatrixCursor(columnNames);\n \trecords.moveToFirst();\n \t\n \tint keyIndex = records.getColumnIndex(KEY_FIELD);\n\t\tint valueIndex = records.getColumnIndex(VALUE_FIELD);\n\t\t\n\t\trowItem[0] = records.getString(keyIndex);\n\t\trowItem[1] = records.getString(valueIndex);\n\t\tmatCursor.addRow(rowItem);\n\t\t\n\t\twhile(records.moveToNext())\n \t{\n \t\trowItem[0] = records.getString(keyIndex);\n \t\trowItem[1] = records.getString(valueIndex);\n \t\tmatCursor.addRow(rowItem);\n \t}\n\t\tmatCursor.moveToFirst();\n\t\trecords.moveToFirst();\n\t\treturn matCursor;\n }",
"public void draw_cursor(){\n }",
"DBCursor execute();",
"private Movement cursorToMovement(Cursor cursor) {\n\t\tMovement mv = new Movement();\n\n\t\tmv.set_id(cursor.getString(cursor.getColumnIndex(\"MOV_ID\")));\n\t\tmv.setMov_type_id(cursor.getString(cursor.getColumnIndex(\"MOV_TYPE_ID\")));\n\t\tmv.setMov_amount(cursor.getDouble(cursor.getColumnIndex(\"MOV_AMOUNT\")));\n\t\tmv.setMov_cat_id(cursor.getString(cursor.getColumnIndex(\"MOV_CAT_ID\")));\n\t\tmv.setMov_sub_cat_id(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_SUB_CAT_ID\")));\n\t\tmv.setMov_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_DESCRIPTION\")));\n\t\tmv.setMov_date(cursor.getString(cursor.getColumnIndex(\"MOV_DATE\")));\n\t\tmv.setMov_state(cursor.getString(cursor.getColumnIndex(\"MOV_STATE\")));\n\t\tmv.setMov_cat_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_CAT_DESCRIPTION\")));\n\t\tmv.setMov_sub_cat_desc(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_SUB_CAT_DESCRIPTION\")));\n\t\tmv.setMov_account_id(cursor.getString(cursor\n\t\t\t\t.getColumnIndex(\"MOV_ACCOUNT_ID\")));\n\t\tmv.setSgf_mov_id(cursor.getString(cursor.getColumnIndex(\"MOV_SGF_ID\")));\n\n\t\treturn mv;\n\t}",
"public BookCursorAdapter(Context context, Cursor c) {\n super(context, c, 0);\n }",
"public MouseCursor(ContentSystem contentSystem,\r\n\t\t\tMultiTouchInputComponent input, TableIdentity tableId,\r\n\t\t\tint cursorId, Color color) {\r\n\t\t\r\n\t\tBufferedImage cursorImage = null;\r\n\t\ttry {\r\n\t\t\tImage img = (new ImageIcon(\r\n\t\t\t\t\tMTDesktopConfigurations.class\r\n\t\t\t\t\t\t\t.getResource(\"tabletop/cursor.png\"))).getImage();\r\n\t\t\tcursorImage = new BufferedImage(img.getWidth(null),\r\n\t\t\t\t\timg.getHeight(null), BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tGraphics g = cursorImage.createGraphics();\r\n\t\t\tg.drawImage(img, 0, 0, null);\r\n\t\t\tg.dispose();\r\n\t\t\tcursorImage = ColorChanger.changeColor(cursorImage, Color.white,\r\n\t\t\t\t\tcolor);\r\n\t\t\tFile coloredImageFile = new File(\r\n\t\t\t\t\tMTDesktopConfigurations.tabletopTempFolder + \"/\" + tableId\r\n\t\t\t\t\t\t\t+ \".png\");\r\n\t\t\tImageIO.write(cursorImage, \"png\", coloredImageFile);\r\n\t\t\twhile (!coloredImageFile.exists()) {\r\n\t\t\t}\r\n\t\t\t;\r\n\t\t\tcursor = (LightImageLabel) contentSystem\r\n\t\t\t\t\t.createContentItem(LightImageLabel.class);\r\n\t\t\tif (cursorImage != null) {\r\n\t\t\t\tcursor.drawImage(new File(\r\n\t\t\t\t\t\tMTDesktopConfigurations.tabletopTempFolder + \"/\"\r\n\t\t\t\t\t\t\t\t+ tableId + \".png\").toURI().toURL());\r\n\t\t\t} else {\r\n\t\t\t\tcursor.drawImage(MTDesktopConfigurations.class\r\n\t\t\t\t\t\t.getResource(\"tabletop/cursor.png\"));\r\n\t\t\t}\r\n\t\t\tcursor.setAutoFitSize(false);\r\n\t\t\tcursor.setWidth(CURSOR_WIDTH);\r\n\t\t\tcursor.setHeight(CURSOR_WIDTH);\r\n\t\t\tcursor.centerItem();\r\n\t\t\tcursor.setAsTopObject();\r\n\t\t\tcursor.setBringToTopable(false);\r\n\t\t\tthis.input = input;\r\n\t\t\tthis.tableId = tableId;\r\n\t\t} catch (IOException e) {\r\n\t\t\t\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public Cursor I() {\n return this.m.a(D(), (Map<String, String>) this.f5843b);\n }",
"public Cursor raw(String query){\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor c = db.rawQuery(query, null);\n return c;\n }",
"void setCursor(int kind);",
"public DCursorMove() {\n super(COMMAND);\n }",
"public Cursor getCursor() {\n\t\treturn null;\n\t}",
"public abstract Cursor getMouseCursor();",
"public java.lang.String getCursor() {\n return instance.getCursor();\n }",
"public QueryResultIterator(DBObject cursorDocument, DBApiLayer db, DBCollectionImpl collection, int batchSize, DBDecoder decoder,\n final ServerAddress serverAddress) {\n this._db = db;\n _collection = collection;\n _batchSize = batchSize;\n _host = serverAddress;\n _limit = 0;\n _options = 0;\n _decoder = decoder;\n initFromCursorDocument(cursorDocument);\n _optionalFinalizer = getOptionalFinalizer(collection);\n }",
"static private Cursor readRawCursor(Context context, String positionSelection, String[] positionSelArgs) {\n Position.context = context;\r\n\r\n // Read GuardTracker database helper\r\n GuardTrackerDbHelper dbHelper = new GuardTrackerDbHelper(context);\r\n // Initialize database for read\r\n db = dbHelper.getReadableDatabase();\r\n\r\n // Define a projection that specifies which columns from the database\r\n // you will actually use after this query.\r\n String[] positionProjection = {\r\n GuardTrackerContract.PositionTable._ID,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_SESSION,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_LT,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_LG,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_TIME,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_ALTITUDE,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_NSAT,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_HDOP,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_FIXED\r\n };\r\n\r\n cursor = db.query(\r\n GuardTrackerContract.PositionTable.TABLE_NAME, // The table to query\r\n positionProjection, // The columns to return\r\n positionSelection, // The columns for the WHERE clause\r\n positionSelArgs, // The values for the WHERE clause\r\n null, // don't group the rows\r\n null, // don't filter by row groups\r\n null // The sort order\r\n );\r\n if (cursor.getCount() == 0) throw new IllegalStateException(\"No entries PositionTable\");\r\n\r\n // O cursor dependerá dos db ou dbHelper? Se não depender, deverei fechar db e dbHelper.\r\n return cursor;\r\n }",
"public CityCursorAdapter (Context context, Cursor cursor) {\n super(context, cursor, 0);\n\n alphaIndexer = new AlphabetIndexer(cursor, cursor.getColumnIndex(ForecastDBContracts.CountryTable.FIELD_NAME),\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }"
]
| [
"0.78976697",
"0.7117633",
"0.68738896",
"0.6648203",
"0.63155925",
"0.6311589",
"0.6271342",
"0.61225843",
"0.606397",
"0.60483646",
"0.60210896",
"0.6014658",
"0.59965163",
"0.5989282",
"0.59683573",
"0.5967269",
"0.595207",
"0.59437555",
"0.57649994",
"0.571358",
"0.570817",
"0.5707053",
"0.56866103",
"0.56819",
"0.5676746",
"0.5640534",
"0.56344134",
"0.56303054",
"0.5624257",
"0.56181645",
"0.56060416",
"0.5593033",
"0.5591078",
"0.55840325",
"0.55520326",
"0.5544616",
"0.55267483",
"0.5525291",
"0.55184734",
"0.5517422",
"0.5508073",
"0.5504269",
"0.5472454",
"0.5470291",
"0.5466628",
"0.5463742",
"0.54507965",
"0.54489213",
"0.5446491",
"0.54342926",
"0.54204273",
"0.5409144",
"0.53935534",
"0.53848106",
"0.5363791",
"0.5360219",
"0.5356772",
"0.53459346",
"0.5332154",
"0.5319225",
"0.5315223",
"0.53088725",
"0.53057444",
"0.529973",
"0.5286379",
"0.52822924",
"0.527628",
"0.52725637",
"0.5261986",
"0.5250344",
"0.5243617",
"0.524267",
"0.5231691",
"0.52254736",
"0.51912415",
"0.5190822",
"0.518943",
"0.5180274",
"0.5178974",
"0.517808",
"0.51775146",
"0.5169984",
"0.5168577",
"0.516054",
"0.5157958",
"0.51414996",
"0.5140588",
"0.5135314",
"0.5133754",
"0.5130347",
"0.51173776",
"0.5115992",
"0.5111406",
"0.5104833",
"0.51032597",
"0.5099152",
"0.5096772",
"0.50685024",
"0.5068129",
"0.50634575"
]
| 0.5225774 | 73 |
Constructs a new cursor initialized to the given position. | public CaseInsensitiveElementListIDataCursor(int position) {
initialize(position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract Cursor buildCursor();",
"public void setPosition ( TextPosition position ) throws OutOfBoundsException { _cursorPosition = position; }",
"public Builder to(int cursor){\n MathUtils.assertInRange(cursor, 0, LENGTH - 1);\n this.cursor = cursor;\n return this;\n }",
"public void setCursor(int l, int c);",
"public MyCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public Builder position(String position) {\n\n\t\t\tthis.position = position;\n\t\t\treturn this;\n\t\t}",
"public POS(int position) {\n \t\tthis.position = position;\n \t}",
"public TextPosition getPosition ( ) { return _cursorPosition; }",
"Position createPosition();",
"public void setCursor(int row, int col);",
"static private Cursor readRawCursor(Context context, String positionSelection, String[] positionSelArgs) {\n Position.context = context;\r\n\r\n // Read GuardTracker database helper\r\n GuardTrackerDbHelper dbHelper = new GuardTrackerDbHelper(context);\r\n // Initialize database for read\r\n db = dbHelper.getReadableDatabase();\r\n\r\n // Define a projection that specifies which columns from the database\r\n // you will actually use after this query.\r\n String[] positionProjection = {\r\n GuardTrackerContract.PositionTable._ID,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_SESSION,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_LT,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_LG,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_TIME,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_ALTITUDE,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_NSAT,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_HDOP,\r\n GuardTrackerContract.PositionTable.COLUMN_NAME_FIXED\r\n };\r\n\r\n cursor = db.query(\r\n GuardTrackerContract.PositionTable.TABLE_NAME, // The table to query\r\n positionProjection, // The columns to return\r\n positionSelection, // The columns for the WHERE clause\r\n positionSelArgs, // The values for the WHERE clause\r\n null, // don't group the rows\r\n null, // don't filter by row groups\r\n null // The sort order\r\n );\r\n if (cursor.getCount() == 0) throw new IllegalStateException(\"No entries PositionTable\");\r\n\r\n // O cursor dependerá dos db ou dbHelper? Se não depender, deverei fechar db e dbHelper.\r\n return cursor;\r\n }",
"public CrimeCursorWrapper(Cursor cursor) {\n super(cursor);\n }",
"public void setCursor(Cursor c) {\n\n\t}",
"public Builder setCursorBytes(\n com.google.protobuf.ByteString value) {\n copyOnWrite();\n instance.setCursorBytes(value);\n return this;\n }",
"public Memento(Buffer buffer, Buffer clipboard, Selection selection, int cursorPosition) {\n this.buffer = buffer;\n this.clipboard = clipboard;\n this.selection = selection;\n this.cursorPosition = cursorPosition;\n }",
"public Handle(int position) {\n this.position = position;\n }",
"public Position() {\n\n\t}",
"public GameCursor() {\n }",
"public Builder setCursor(\n java.lang.String value) {\n copyOnWrite();\n instance.setCursor(value);\n return this;\n }",
"public T at(final int position) {\n return Query.at(iterable, position);\n }",
"@Override\n public Cursor getItemCursor(final int position) {\n return BaseSimpleCursorSupportAdapter.getItemCursor(position, mCursor);\n }",
"private void drawCursor(int position, Point spritePos) {\n\t\tif (state.getSelectedEntity() != null || position != state.getCursorPos()) {\n\t\t\treturn;\n\t\t}\n\n\t\tcursor.setPosition(spritePos.x, 400);\n\t\tcursor.draw(batch);\n\t}",
"public X cursor(Cursor cursor) {\n component.setCursor(cursor);\n return (X) this;\n }",
"@Override\n public Object getItem(final int position) {\n return getItemCursor(position);\n }",
"Position_Position createPosition_Position();",
"public static MyListItem fromCursor(Cursor cursor) {\n MyListItem m = new MyListItem();\n return m;\n }",
"public DCursorMove() {\n super(COMMAND);\n }",
"public Position(Position position) {\n this.x = position.x;\n this.y = position.y;\n this.xVelocity = position.xVelocity;\n this.yVelocity = position.yVelocity;\n this.xAcceleration = position.xAcceleration;\n this.yAcceleration = position.yAcceleration;\n }",
"public int getCursor() { return curs; }",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public IDataCursor getCursorClone() {\n return new CaseInsensitiveElementListIDataCursor(this.position);\n }",
"protected void initialize(int position) {\n iterator = listIterator();\n\n if (position >= 0) {\n for (int i = 0; i <= position; i++) {\n next();\n }\n }\n }",
"public BorrowerCursor(Cursor cursor) {\n super(cursor);\n }",
"private void initCursor() {\n cursor = new Rectangle();\n root.getChildren().add(cursor);\n cursor.setWidth(1.5);\n\n Timeline timeline = new Timeline();\n timeline.setCycleCount(Animation.INDEFINITE);\n\n KeyFrame keyFrame = new KeyFrame(Duration.seconds(0.5), new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (isVisiable) {\n cursor.setFill(Color.WHITE);\n isVisiable = !isVisiable;\n } else {\n cursor.setFill(Color.BLACK);\n isVisiable = !isVisiable;\n }\n actionEvent.consume();\n }\n });\n\n timeline.getKeyFrames().add(keyFrame);\n timeline.play();\n }",
"public abstract long getCursor();",
"public Position (int r, int c) {\n\t\tthis.r = r;\n\t\tthis.c = c;\n\t}",
"private static Cursor makePoiCursor(int count) {\n Random random = new Random();\n long id, radius;\n double lat, lgt;\n String poi, poiType, cellTowers, connectedWifi, wifiSsid;\n final int maxRadius = 2000;\n // COL_ID, COL_POI, COL_LAT, COL_LGT, COL_RADIUS, COL_POI_TYPE, COL_CELL_TOWERS, COL_CONNECTED_WIFI, COL_WIFI_SSID\n MatrixCursor cursor = new MatrixCursor(PoiTuple.COLUMNS);\n for (int i = 0; i < count; i++) {\n id = random.nextLong();\n if (id < 0) {\n id = id * -1L;\n } else if (id == 0) {\n id = 1L;\n }\n poi = String.valueOf(random.nextGaussian());\n lat = random.nextDouble();\n lgt = random.nextDouble();\n radius = random.nextInt(maxRadius) + 1;\n poiType = String.valueOf(random.nextGaussian());\n cellTowers = String.valueOf(random.nextGaussian());\n connectedWifi = String.valueOf(random.nextGaussian());\n wifiSsid = String.valueOf(random.nextGaussian());\n cursor.newRow().add(id).add(poi).add(lat).add(lgt).add(radius).add(poiType)\n .add(cellTowers).add(connectedWifi).add(wifiSsid);\n }\n cursor.moveToFirst();\n\n return cursor;\n }",
"public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }",
"public void case4_Position() {\r\n Position testPosition = new Position(0,0);\r\n\r\n }",
"public static CursorPos cursorPos() {\n\n System.out.print(CSI + \"6n\");\n try {\n System.in.skip(2);\n int read = -1;\n StringBuilder row = new StringBuilder();\n while ((read = System.in.read()) != ';') {\n row.append((char) read);\n }\n StringBuilder col = new StringBuilder();\n while ((read = System.in.read()) != 'R') {\n col.append((char) read);\n }\n return new CursorPos(row.length() > 0 ? Integer.parseInt(row.toString()) : 1,\n col.length() > 0 ? Integer.parseInt(col.toString()) : 1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"protected AbstractForwardingNodeCursor() {}",
"public DocumentWordPosition() {}",
"@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n mCursorAdapter.getCursor().moveToPosition(position); //EDITED: added this line as suggested in the comments below, thanks :)\n mCursorAdapter.bindView(holder.itemView, mContext, mCursorAdapter.getCursor());\n\n }",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public ItemCursor() {\n\t\tsetMaxStackSize(1);\n\t}",
"public void setCursor(int cl, int cc) {\n if (cl >= lines || cl < 0 || cc >= columns || cc < 0)\n return;\n\n this.cl = cl;\n this.cc = cc;\n }",
"@Override\n protected Cursor buildCursor() {\n return(db.getReadableDatabase().rawQuery(rawQuery, args));\n }",
"@Contract(pure = true)\n public static <E> Node<E> listPosition(Node<E> head, int position) {\n Node<E> cursor;\n int i;\n\n if (position <= 0) { throw new IllegalArgumentException(\"The position must be greater than 0.\"); }\n\n cursor = head;\n for (i = 1; (i < position) && (cursor != null); i++) {\n cursor = cursor.getNext();\n }\n return cursor;\n }",
"public static void fillNodeAtCursor(TomlCompletionContext context) {\n Optional<SyntaxTree> st = context.getTomlSyntaxTree();\n if (st.isEmpty()) {\n return;\n }\n Position position = context.getCursorPosition();\n TextDocument textDocument = st.get().textDocument();\n int txtPos = textDocument.textPositionFrom(LinePosition.from(position.getLine(), position.getCharacter()));\n context.setCursorPositionInTree(txtPos);\n TextRange range = TextRange.from(txtPos, 0);\n NonTerminalNode nonTerminalNode = ((DocumentNode) st.get().rootNode()).findNode(range);\n while (nonTerminalNode.parent() != null && !TomlSyntaxTreeUtil.withinTextRange(txtPos, nonTerminalNode)) {\n //Takes the top-level Node of the immediate cursor position\n nonTerminalNode = nonTerminalNode.parent();\n }\n context.setNodeAtCursor(nonTerminalNode);\n }",
"@Override\n public Position getPosition() {\n return new Position(this.x, this.y);\n }",
"public Position(final int xPos, final int yPos) {\n this.posX = xPos;\n this.posY = yPos;\n this.charAlg = PositionTraductor.getAlgebraicNotation(posX, posY);\n }",
"Position getNewPosition();",
"public ChatMessage(Cursor cursor) {\n // TODO\n this.id = Long.parseLong(MessageContract.getId(cursor));\n this.sender = MessageContract.getSender(cursor);\n this.messageText = MessageContract.getMessageText(cursor);\n this.timestamp = MessageContract.getTimestamp(cursor);\n this.longitude = MessageContract.getLongitude(cursor);\n this.latitude = MessageContract.getLatitude(cursor);\n }",
"public void setPosition(Coordinate position) {\n cPosition = position;\n }",
"public Token setPos(String pos) {\n this.pos = pos;\n return this;\n }",
"public void cursorOn();",
"private void setCursorBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n cursor_ = value.toStringUtf8();\n }",
"public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}",
"public Coordinate(final Coordinate c) { row = c.row; col = c.col; }",
"public static interface Cursor {\n\t\tpublic void open() throws RelationException;\n\n\t\t//the hasNext() method actually loads the object, so don't skip it\n\t\tpublic boolean hasNext() throws RelationException;\n\n\t\t//this retrieves the next object. use in confunction with hasNext();\n\t\tpublic Tuple next() throws RelationException;\n\n\t\tpublic void close() throws RelationException;\n\t}",
"public int getCursorPosition();",
"public CDUFrame(Rectangle position) {\n\t\tinitialize(position);\n\t}",
"private static Position position(ParserRuleContext ctx) {\n return new Position(ctx.start.getLine(),\n ctx.start.getCharPositionInLine());\n }",
"public Position create() {\n\t\tfinal Actor actorLogged = this.actorService.findActorLogged();\n\t\tAssert.notNull(actorLogged);\n\t\tthis.actorService.checkUserLoginCompany(actorLogged);\n\n\t\tPosition result;\n\n\t\tresult = new Position();\n\t\tfinal Collection<Problem> problems = new HashSet<>();\n\t\tfinal Collection<Application> applications = new HashSet<>();\n\n\t\t// R4\n\t\tfinal String ticker = \"\"; //Será generado en el reconstruct\n\n\t\tresult.setTicker(ticker);\n\t\tresult.setProblems(problems);\n\t\tresult.setApplications(applications);\n\t\tresult.setIsFinalMode(false);\n\t\tresult.setIsCancelled(false);\n\n\t\treturn result;\n\t}",
"public Position()\n\t{\n\t\t// do not remove bean constructor.\n\t}",
"public ModifiedLocation position(Integer position) {\n this.position = position;\n return this;\n }",
"public LinkedPosition(IDocument document, int offset, int length) {\n\t\tthis(document, offset, length, LinkedPositionGroup.NO_STOP);\n\t}",
"private void setCursor(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cursor_ = value;\n }",
"public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }",
"public Position() {\n xCoord = 0;\n yCoord = 0;\n zCoord = 0;\n }",
"protected Item(Point pos)\n\t{\n\t\tthis.pos = pos;\n\t}",
"public TextPos() {\n lineNumber = -1;\n linePos = -1; \n }",
"public Position(Position p_p)\n {\n this.x = p_p.x;\n this.y = p_p.y;\n }",
"public Position(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public FaithMarker(int position) {\r\n this.position = position;\r\n }",
"public void setPosition(String position) {\n this.position = position;\n }",
"public void setPosition(String position) {\n this.position = position;\n }",
"public void setPosition(int position) {\r\n this.position = position;\r\n }",
"public Coordinate() { row = col = -1; }",
"public Position(String pos) {\n pos = pos.toLowerCase();\n x = (int) pos.charAt(0) - 97;\n y = (int) pos.charAt(1) - 49;\n }",
"public TextPos(int lineNumber, int linePos) {\n this.lineNumber = lineNumber;\n this.linePos = linePos;\n }",
"public RowDataCursor(MysqlIO ioChannel, ServerPreparedStatement creatingStatement, Field[] metadata) {\n/* 112 */ this.currentPositionInEntireResult = -1;\n/* 113 */ this.metadata = metadata;\n/* 114 */ this.mysql = ioChannel;\n/* 115 */ this.statementIdOnServer = creatingStatement.getServerStatementId();\n/* 116 */ this.prepStmt = creatingStatement;\n/* 117 */ this.useBufferRowExplicit = MysqlIO.useBufferRowExplicit(this.metadata);\n/* */ }",
"public java.lang.String getCursor() {\n return cursor_;\n }",
"SpacesInvaders_aUnVaisseauQuiOccupeLaPosition createSpacesInvaders_aUnVaisseauQuiOccupeLaPosition();",
"public Position(int rowIndex, int colIndex){\r\n this.rowPosition=rowIndex;\r\n this.colPosition=colIndex;\r\n }",
"public QuoteCursorAdapter(Context context, Cursor cursor) {\n super(context, cursor);\n mContext = context;\n }",
"@Override\n public View newView(Context context, Cursor cursor, ViewGroup parent) {\n return LayoutInflater.from(context).inflate(R.layout.item_crow, parent, false);\n }",
"Location newLocation(int line, int col);",
"public com.google.protobuf.ByteString\n getCursorBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(cursor_);\n }",
"private Room cursorToRoom(Cursor cursor) {\n\t\tRoom room = new Room();\n\n\t\troom.setId(cursor.getLong(0));\n\t\troom.setName(cursor.getString(1));\n\t\troom.setDescription(cursor.getString(2));\n\n\t\treturn room;\n\t}",
"public TextPos() {\n this.value = 1;\n }",
"Cursor getCursor(final Point p) {\n return getTarget().getCursor();\n }",
"public Word(Position position, CharSequence word) {\n this.position = position;\n this.word = word;\n }",
"public void setPosition(Integer position);",
"public void setPosition(Integer position) {\n this.position = position;\n }",
"public void setPosition(String position){\r\n\t\tthis.position = position;\r\n\t}",
"public void draw_cursor(){\n }",
"protected Caret createCaret() {\n return new BasicCaret();\n }",
"public LinkedPosition(IDocument document, int offset, int length, int sequence) {\n\t\tsuper(offset, length);\n\t\tAssert.isNotNull(document);\n\t\tfDocument= document;\n\t\tfSequenceNumber= sequence;\n\t}",
"public static String cursorPos(int row, int col) {\n\n if (row <= 0)\n row = 1;\n if (col <= 0)\n col = 1;\n\n return CSI + row + \";\" + col + \"H\";\n }"
]
| [
"0.6825151",
"0.64260346",
"0.6369599",
"0.6031318",
"0.598034",
"0.59481424",
"0.5943552",
"0.59369725",
"0.5912561",
"0.590933",
"0.5744949",
"0.57355994",
"0.573292",
"0.5699139",
"0.56888044",
"0.5639545",
"0.56257844",
"0.5590568",
"0.55891174",
"0.5561156",
"0.5559352",
"0.55516654",
"0.55406153",
"0.55305296",
"0.54352516",
"0.5429867",
"0.5413837",
"0.54132795",
"0.5398908",
"0.5390172",
"0.5365622",
"0.5356055",
"0.53547764",
"0.5338826",
"0.5319886",
"0.53136945",
"0.5308643",
"0.53071916",
"0.5305352",
"0.53050697",
"0.53024673",
"0.53016",
"0.52939546",
"0.52873605",
"0.5286434",
"0.5280093",
"0.5268555",
"0.5251773",
"0.5244581",
"0.5222045",
"0.52199876",
"0.5219919",
"0.5214613",
"0.52041864",
"0.5198216",
"0.519724",
"0.5189521",
"0.518672",
"0.51858836",
"0.5173726",
"0.51720434",
"0.516544",
"0.5163731",
"0.5162975",
"0.51604885",
"0.5156703",
"0.51452965",
"0.5118519",
"0.51139885",
"0.51120836",
"0.51015246",
"0.5100533",
"0.5099195",
"0.5098027",
"0.5093341",
"0.50849855",
"0.50849855",
"0.5072107",
"0.5070429",
"0.50611675",
"0.50605345",
"0.50591826",
"0.5052722",
"0.5045172",
"0.5043097",
"0.50395507",
"0.5035935",
"0.50354207",
"0.5034655",
"0.5027271",
"0.502506",
"0.502478",
"0.50109285",
"0.5004822",
"0.5001139",
"0.5000563",
"0.5000416",
"0.4999771",
"0.49737847",
"0.49645704"
]
| 0.6122513 | 3 |
Initializes this cursor with the given position. | protected void initialize(int position) {
iterator = listIterator();
if (position >= 0) {
for (int i = 0; i <= position; i++) {
next();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setPosition ( TextPosition position ) throws OutOfBoundsException { _cursorPosition = position; }",
"public CaseInsensitiveElementListIDataCursor(int position) {\n initialize(position);\n }",
"public void init() {\n position.print();\n }",
"public POS(int position) {\n \t\tthis.position = position;\n \t}",
"public void setPosition(BlockVector position)\n {\n this.position = position;\n }",
"public void setPosition(int position)\r\n {\r\n this.position = position;\r\n }",
"public void setPosition(Coordinate position) {\n cPosition = position;\n }",
"public void setPosition(int position) {\r\n this.position = position;\r\n }",
"public Position() {\n\n\t}",
"@Override\n public void setPosition(int position) {\n this.position = position;\n }",
"public void setPosition(int position) {\r\r\r\r\r\r\n this.position = position;\r\r\r\r\r\r\n }",
"public void setPosition(int position) {\r\n\t\tthis.position = position;\r\n\t}",
"public Position() {\n xCoord = 0;\n yCoord = 0;\n zCoord = 0;\n }",
"void setPosition(int position) {\n mPosition = position;\n }",
"public void setPosition(Position pos) {\n position = new Position(pos);\n }",
"public void setPosition(Integer position) {\n this.position = position;\n }",
"@Override\n public void setPosition(long position) throws IOException {\n super.setPosition(position - startPosition);\n }",
"public Builder position(String position) {\n\n\t\t\tthis.position = position;\n\t\t\treturn this;\n\t\t}",
"public Position(Position position) {\n this.x = position.x;\n this.y = position.y;\n this.xVelocity = position.xVelocity;\n this.yVelocity = position.yVelocity;\n this.xAcceleration = position.xAcceleration;\n this.yAcceleration = position.yAcceleration;\n }",
"public Handle(int position) {\n this.position = position;\n }",
"public void setPosition(int position);",
"public void initPos(){\r\n for (int i=0; i< MAX_LENGTH; i++){\r\n pos[i] = i;\r\n }\r\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(Position position) {\n this.position = position;\n }",
"public void setPosition(String position){\r\n\t\tthis.position = position;\r\n\t}",
"public void setPosition(String position) {\n this.position = position;\n }",
"public void setPosition(String position) {\n this.position = position;\n }",
"@Override\n public void initialize() {\n arm.setPosition(degrees);\n }",
"public void setPosition(int position)\n {\n put(\"Position\", position);\n }",
"public void setPosition(Point position) {\n this.position = position;\n }",
"public void setPosition(Integer position);",
"public void setPosition(Position pos);",
"public void setPosition(Position position_)\n\t{\n\t\tposition=position_;\n\t}",
"protected void setPosition(Vector3f position) {\r\n\t\tif (active) {\r\n\t\t\tsource.setPosition(position);\r\n\t\t}\r\n\t}",
"void setPosition(Position position);",
"void setPosition(Position position);",
"private void setCharacterPosition(Point position) {\n\t\tthis.characterPosition = position;\n\t}",
"public void setPosition(Point2 position) {\r\n this.position = position;\r\n }",
"public TextPos() {\n lineNumber = -1;\n linePos = -1; \n }",
"public void setPosition(String position) {\n if(position==null){\n position=\"\";\n }\n this.position = position;\n }",
"FloppyDriveTrackArea(int position) {\n this.startPosition = position;\n }",
"private void initCursor() {\n cursor = new Rectangle();\n root.getChildren().add(cursor);\n cursor.setWidth(1.5);\n\n Timeline timeline = new Timeline();\n timeline.setCycleCount(Animation.INDEFINITE);\n\n KeyFrame keyFrame = new KeyFrame(Duration.seconds(0.5), new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent actionEvent) {\n if (isVisiable) {\n cursor.setFill(Color.WHITE);\n isVisiable = !isVisiable;\n } else {\n cursor.setFill(Color.BLACK);\n isVisiable = !isVisiable;\n }\n actionEvent.consume();\n }\n });\n\n timeline.getKeyFrames().add(keyFrame);\n timeline.play();\n }",
"public void setCurrentPosition(String position){\n this.currentPosition = position;\n }",
"public CDUFrame(Rectangle position) {\n\t\tinitialize(position);\n\t}",
"protected void initialize() {\n\t\tthis.position = Point3D.ZERO;\n\t\t// reset subclasses properties if any\n\t\treset();\n\t}",
"public void setCursor(int row, int col);",
"public Position() {\r\n\t\tthis.positionX = 0;\r\n\t\tthis.positionY = 0;\r\n\t\tthis.angle = 0;\r\n\t\tthis.penState=true;\r\n\t\tthis.clearScreen=false;\r\n\t\tthis.color=0;\r\n\t}",
"Position()\n\t{\n\t\tsetFile('\\u0000');\n\t\tsetRank(0);\n\t}",
"public void setPosition(Point position);",
"public void setCursor(int l, int c);",
"public void setPos(int pos);",
"public void setPos(int pos);",
"public FaithMarker(int position) {\r\n this.position = position;\r\n }",
"public void init(float x, float y) {\n\t\tthis.position.set(x, y);\r\n\t\tthis.oriPosition.set(x, y);\r\n\t\talive = true;\r\n\t}",
"public Position()\n\t{\n\t\t// do not remove bean constructor.\n\t}",
"public void setPosition(Dot position) {\r\n\t\tthis.position = position;\r\n\t}",
"public void setPosition(final Vector2f position);",
"public void setCursor(Cursor c) {\n\n\t}",
"public void setStartPos(int startPos) {\r\n this.startPos = startPos;\r\n }",
"public void setPosition(Vector position) {\n this.posX = position.getX();\n this.posY = position.getY();\n this.posZ = position.getZ();\n this.posSet = true;\n }",
"public void setStartPos(int startPos) {\n this.startPos = startPos;\n }",
"public TextPos() {\n this.value = 1;\n }",
"public void setPosition(Point pos) {\n this.topLeft = pos.asVector();\n }",
"public Position(final int xPos, final int yPos) {\n this.posX = xPos;\n this.posY = yPos;\n this.charAlg = PositionTraductor.getAlgebraicNotation(posX, posY);\n }",
"public Builder to(int cursor){\n MathUtils.assertInRange(cursor, 0, LENGTH - 1);\n this.cursor = cursor;\n return this;\n }",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public Memento(Buffer buffer, Buffer clipboard, Selection selection, int cursorPosition) {\n this.buffer = buffer;\n this.clipboard = clipboard;\n this.selection = selection;\n this.cursorPosition = cursorPosition;\n }",
"public GameCursor() {\n }",
"public Position(Position p_p)\n {\n this.x = p_p.x;\n this.y = p_p.y;\n }",
"public void setPosition(Vector2 position);",
"public void setPosition(Point position) {\n this.position = new Point(position);\n update();\n }",
"public Position(int x, int y) {\n this.x = x;\n this.y = y;\n }",
"public DocumentWordPosition() {}",
"@Override\n public void setPosition(int position) throws IOException\n {\n if (position < 0)\n {\n throw new IOException(\"position is negative\");\n }\n if (position >= randomAccessRead.length())\n {\n throw new IOException(\"New position is out of range \" + position + \" >= \"\n + randomAccessRead.length());\n }\n randomAccessRead.seek(position);\n }",
"private void initMatrixCursor() {\n // if (mMatrixCursor != null) mMatrixCursor.close();\n mMatrixCursor = new MatrixCursor(BIND_PROJECTION, LIST_CAPACITY);\n mMatrixCursor.addRow(new String[] {\n \"1\", getResources().getString(R.string.voicemail), \"\", \"\", \"\", \"\"\n });\n mQueryTimes = SPEED_DIAL_MIN;\n }",
"public final void setPosition(int p) {\n this.position = p;\n }",
"public void setPosition(Point2D position)\n {\n mPosition = position;\n }",
"public void setPosition(Position pos) {\n \tthis.position = pos;\n \t//setGrade();\n }",
"protected void initialize() {\r\n if (dumper.isLimitSwitchPressed()){ \r\n dumper.stop();\r\n state = STATE_SUCCESS;\r\n }\r\n else {\r\n startPosition = dumper.getPosition();\r\n desiredPosition = startPosition + increment;\r\n dumper.backward();\r\n state = STATE_SEEK_LEFT;\r\n }\r\n }",
"public Position(final int row, final int col) {\r\n this.row = row;\r\n this.col= col;\r\n }",
"public abstract void setPosition(Position position);",
"public LinkedPosition(IDocument document, int offset, int length, int sequence) {\n\t\tsuper(offset, length);\n\t\tAssert.isNotNull(document);\n\t\tfDocument= document;\n\t\tfSequenceNumber= sequence;\n\t}",
"void initializeFromLiveData(int position) {\n nameView.setText(Objects.requireNonNull(liveData.getValue()).get(position).getSortableKey());\n }",
"@Override\n\tpublic void setPosition(Vector3d position) {\n\t\t\n\t}",
"public Position(int x, int y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public Builder setStartPosition(int value) {\n bitField0_ |= 0x00000008;\n startPosition_ = value;\n onChanged();\n return this;\n }",
"public void PositionSet(int position);",
"public Position (int r, int c) {\n\t\tthis.r = r;\n\t\tthis.c = c;\n\t}",
"public TextPos(int lineNumber, int linePos) {\n this.lineNumber = lineNumber;\n this.linePos = linePos;\n }",
"public LinkedPosition(IDocument document, int offset, int length) {\n\t\tthis(document, offset, length, LinkedPositionGroup.NO_STOP);\n\t}",
"public TextPosition getPosition ( ) { return _cursorPosition; }",
"public void setPosition(int position){\n this.alreadyPlayingService.setCurrentPosition(position);\n }",
"public void setPosition(Vector2fc position){\n glfwSetWindowPos(handle, (int) position.x(), (int) position.y());\n this.position.set(position);\n }",
"void setPosition(){\n Random random =new Random();\n position = new Position(random.nextInt(maxrows),random.nextInt(maxcols));\n\n }",
"@Override\n public void setPosition(int position) {\n\n // If the service has disconnected, the SSMusicService is restarted.\n if (!serviceBound) {\n setUpAudioService(); // Sets up the SSMusicService.\n }\n\n // Signals the SSMusicService to set the song position.\n else {\n musicService.setPosition(position);\n }\n }",
"public void setPosition(int position) {\r\n if (position > 24) position = 24;\r\n this.position = position;\r\n }",
"@Override\n protected void initialize() {\n if(inc){\n Robot.m_elevator.incrementPos();\n }else{\n Robot.m_elevator.decrementPos();\n }\n }",
"protected Item(Point pos)\n\t{\n\t\tthis.pos = pos;\n\t}"
]
| [
"0.67989916",
"0.6407932",
"0.6273226",
"0.6193409",
"0.61445814",
"0.61000395",
"0.60931975",
"0.6078197",
"0.6033975",
"0.60063064",
"0.6006163",
"0.5990316",
"0.59418",
"0.59260845",
"0.5903355",
"0.5892856",
"0.5888094",
"0.58817637",
"0.58776945",
"0.58576936",
"0.58537674",
"0.5852207",
"0.5848041",
"0.5833109",
"0.5833109",
"0.5833109",
"0.58316946",
"0.5831385",
"0.5831385",
"0.5792238",
"0.5783965",
"0.5779375",
"0.57639694",
"0.57283884",
"0.5719222",
"0.57181066",
"0.5717924",
"0.5717924",
"0.570678",
"0.5706771",
"0.57009786",
"0.56992996",
"0.5698304",
"0.5694231",
"0.56920356",
"0.5678465",
"0.5653879",
"0.5653692",
"0.5646578",
"0.5627775",
"0.5623367",
"0.5613175",
"0.5599349",
"0.5599349",
"0.5592098",
"0.55887985",
"0.55879474",
"0.55831325",
"0.5581071",
"0.5563301",
"0.5559943",
"0.5543192",
"0.55351806",
"0.55330646",
"0.5522364",
"0.55191046",
"0.5516907",
"0.5504218",
"0.5503224",
"0.55028754",
"0.54996324",
"0.5497451",
"0.5496778",
"0.5489852",
"0.54865706",
"0.5483845",
"0.5481673",
"0.5457063",
"0.5447362",
"0.54401296",
"0.54384863",
"0.5436233",
"0.54310197",
"0.54246086",
"0.53995985",
"0.5398147",
"0.5393497",
"0.5391943",
"0.53916943",
"0.5385831",
"0.53751713",
"0.5367409",
"0.5366388",
"0.5365834",
"0.5363147",
"0.53628635",
"0.535345",
"0.5350505",
"0.5344637",
"0.5342492"
]
| 0.6913159 | 0 |
Not implemented, does nothing. | public void setErrorMode(int mode) {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"public void doNothing(){\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"public void m23075a() {\n }",
"public final void mo91715d() {\n }",
"@Override\n public void perish() {\n \n }",
"public static void doNothing(){\n\t}",
"@Override\n protected void prot() {\n }",
"private final void i() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo8775b() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"public boolean method_218() {\r\n return false;\r\n }",
"public boolean method_216() {\r\n return false;\r\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"public abstract void mo56925d();",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public boolean method_196() {\r\n return false;\r\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21792Q() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public boolean method_210() {\r\n return false;\r\n }",
"public boolean method_208() {\r\n return false;\r\n }",
"public abstract void mo70713b();",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}",
"public void mo115190b() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public boolean method_4088() {\n return false;\n }",
"public boolean method_4093() {\n return false;\n }",
"public boolean method_108() {\r\n return false;\r\n }",
"private stendhal() {\n\t}",
"public void mo4359a() {\n }",
"public abstract void mo27386d();",
"void unavailable();",
"void unavailable();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"public void mo21825b() {\n }",
"public void mo21785J() {\n }",
"public void mo21779D() {\n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"void berechneFlaeche() {\n\t}",
"public void mo21791P() {\n }",
"public void mo6081a() {\n }",
"public boolean method_214() {\r\n return false;\r\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public boolean method_194() {\r\n return false;\r\n }",
"public void mo97908d() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo44053a() {\n }",
"public boolean method_2453() {\r\n return false;\r\n }",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo21781F() {\n }",
"public void mo9848a() {\n }",
"public abstract void mo6549b();",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void mo21782G() {\n }",
"public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }",
"public void mo21794S() {\n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public abstract void mo42329d();",
"public boolean method_4132() {\n return false;\n }",
"public void mo21878t() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public boolean method_3897() {\r\n return false;\r\n }",
"public void mo21877s() {\n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"public abstract void mo27385c();",
"private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}",
"protected void h() {}",
"@Override\n\tpublic void doIt() {\n\t\t\n\t}",
"public void mo6944a() {\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public boolean method_4102() {\n return false;\n }",
"public void mo115188a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public boolean method_2434() {\r\n return false;\r\n }",
"public void mo21793R() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}"
]
| [
"0.72510844",
"0.699856",
"0.6851293",
"0.68510765",
"0.68400985",
"0.6820389",
"0.6798686",
"0.6771418",
"0.6767583",
"0.67553794",
"0.67553794",
"0.6738845",
"0.6736227",
"0.6730237",
"0.67290866",
"0.66992116",
"0.66945934",
"0.6692118",
"0.6654185",
"0.66464686",
"0.66429853",
"0.66363907",
"0.66309476",
"0.66298556",
"0.6623383",
"0.6623383",
"0.66187465",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6605705",
"0.6603818",
"0.6594712",
"0.6593509",
"0.6592133",
"0.6582792",
"0.6569705",
"0.6569053",
"0.6565703",
"0.65637195",
"0.65563476",
"0.6553243",
"0.6550657",
"0.65480614",
"0.65442747",
"0.65442747",
"0.6543974",
"0.6540866",
"0.6540039",
"0.653448",
"0.65281385",
"0.6516512",
"0.651452",
"0.6512708",
"0.65102327",
"0.6509303",
"0.6508614",
"0.6505037",
"0.64987886",
"0.649853",
"0.649853",
"0.64916694",
"0.64877516",
"0.6482921",
"0.6467873",
"0.64473426",
"0.644614",
"0.64443666",
"0.6443591",
"0.6442325",
"0.6439132",
"0.6437514",
"0.6436729",
"0.64359987",
"0.64332414",
"0.6426768",
"0.64259386",
"0.6423242",
"0.64205205",
"0.6412069",
"0.64059377",
"0.6400074",
"0.6398139",
"0.63968027",
"0.63953537",
"0.63929045",
"0.63880193",
"0.638663",
"0.6383188",
"0.63829",
"0.6382699",
"0.63812095",
"0.63801277",
"0.6374239",
"0.63725865",
"0.6370585",
"0.636383"
]
| 0.0 | -1 |
Not implemented, does nothing. | public DataException getLastError() {
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"public void doNothing(){\n\t}",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"public void m23075a() {\n }",
"public final void mo91715d() {\n }",
"@Override\n public void perish() {\n \n }",
"public static void doNothing(){\n\t}",
"@Override\n protected void prot() {\n }",
"private final void i() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo8775b() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"public boolean method_218() {\r\n return false;\r\n }",
"public boolean method_216() {\r\n return false;\r\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"public abstract void mo56925d();",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public boolean method_196() {\r\n return false;\r\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21792Q() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public boolean method_210() {\r\n return false;\r\n }",
"public boolean method_208() {\r\n return false;\r\n }",
"public abstract void mo70713b();",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}",
"public void mo115190b() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public boolean method_4088() {\n return false;\n }",
"public boolean method_4093() {\n return false;\n }",
"public boolean method_108() {\r\n return false;\r\n }",
"private stendhal() {\n\t}",
"public void mo4359a() {\n }",
"public abstract void mo27386d();",
"void unavailable();",
"void unavailable();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"public void mo21825b() {\n }",
"public void mo21785J() {\n }",
"public void mo21779D() {\n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"void berechneFlaeche() {\n\t}",
"public void mo21791P() {\n }",
"public void mo6081a() {\n }",
"public boolean method_214() {\r\n return false;\r\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public boolean method_194() {\r\n return false;\r\n }",
"public void mo97908d() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo44053a() {\n }",
"public boolean method_2453() {\r\n return false;\r\n }",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo21781F() {\n }",
"public void mo9848a() {\n }",
"public abstract void mo6549b();",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void mo21782G() {\n }",
"public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }",
"public void mo21794S() {\n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public abstract void mo42329d();",
"public boolean method_4132() {\n return false;\n }",
"public void mo21878t() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public boolean method_3897() {\r\n return false;\r\n }",
"public void mo21877s() {\n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"public abstract void mo27385c();",
"private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}",
"protected void h() {}",
"@Override\n\tpublic void doIt() {\n\t\t\n\t}",
"public void mo6944a() {\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public boolean method_4102() {\n return false;\n }",
"public void mo115188a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public boolean method_2434() {\r\n return false;\r\n }",
"public void mo21793R() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}"
]
| [
"0.72510844",
"0.699856",
"0.6851293",
"0.68510765",
"0.68400985",
"0.6820389",
"0.6798686",
"0.6771418",
"0.6767583",
"0.67553794",
"0.67553794",
"0.6738845",
"0.6736227",
"0.6730237",
"0.67290866",
"0.66992116",
"0.66945934",
"0.6692118",
"0.6654185",
"0.66464686",
"0.66429853",
"0.66363907",
"0.66309476",
"0.66298556",
"0.6623383",
"0.6623383",
"0.66187465",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6607262",
"0.6605705",
"0.6603818",
"0.6594712",
"0.6593509",
"0.6592133",
"0.6582792",
"0.6569705",
"0.6569053",
"0.6565703",
"0.65637195",
"0.65563476",
"0.6553243",
"0.6550657",
"0.65480614",
"0.65442747",
"0.65442747",
"0.6543974",
"0.6540866",
"0.6540039",
"0.653448",
"0.65281385",
"0.6516512",
"0.651452",
"0.6512708",
"0.65102327",
"0.6509303",
"0.6508614",
"0.6505037",
"0.64987886",
"0.649853",
"0.649853",
"0.64916694",
"0.64877516",
"0.6482921",
"0.6467873",
"0.64473426",
"0.644614",
"0.64443666",
"0.6443591",
"0.6442325",
"0.6439132",
"0.6437514",
"0.6436729",
"0.64359987",
"0.64332414",
"0.6426768",
"0.64259386",
"0.6423242",
"0.64205205",
"0.6412069",
"0.64059377",
"0.6400074",
"0.6398139",
"0.63968027",
"0.63953537",
"0.63929045",
"0.63880193",
"0.638663",
"0.6383188",
"0.63829",
"0.6382699",
"0.63812095",
"0.63801277",
"0.6374239",
"0.63725865",
"0.6370585",
"0.636383"
]
| 0.0 | -1 |
Not implemented, does nothing. | public boolean hasMoreErrors() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void mo51373a() {\n }",
"public void doNothing(){\n\t}",
"public void m23075a() {\n }",
"@Override\n\tpublic int method() {\n\t\treturn 0;\n\t}",
"public final void mo91715d() {\n }",
"@Override\n public void perish() {\n \n }",
"public static void doNothing(){\n\t}",
"@Override\n protected void prot() {\n }",
"private final void i() {\n }",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo8775b() {\n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"public boolean method_218() {\r\n return false;\r\n }",
"public boolean method_216() {\r\n return false;\r\n }",
"protected void mo6255a() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\npublic int method() {\n\treturn 0;\r\n}",
"public void method_4270() {}",
"@Override\n public void func_104112_b() {\n \n }",
"public abstract void mo56925d();",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public boolean method_196() {\r\n return false;\r\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21792Q() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public boolean method_210() {\r\n return false;\r\n }",
"public boolean method_208() {\r\n return false;\r\n }",
"public abstract void mo70713b();",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}",
"public void mo115190b() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public boolean method_4088() {\n return false;\n }",
"public boolean method_4093() {\n return false;\n }",
"public boolean method_108() {\r\n return false;\r\n }",
"private stendhal() {\n\t}",
"public void mo4359a() {\n }",
"public abstract void mo27386d();",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"void unavailable();",
"void unavailable();",
"public void mo21825b() {\n }",
"public void mo21785J() {\n }",
"public void mo21779D() {\n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"void berechneFlaeche() {\n\t}",
"public void mo21791P() {\n }",
"public void mo6081a() {\n }",
"public boolean method_214() {\r\n return false;\r\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public boolean method_194() {\r\n return false;\r\n }",
"public void mo97908d() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo44053a() {\n }",
"public boolean method_2453() {\r\n return false;\r\n }",
"public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }",
"@Override\n\tpublic boolean isImplemented() {\n\t\treturn false;\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo21781F() {\n }",
"public void mo9848a() {\n }",
"public abstract void mo6549b();",
"public void smell() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void mo21782G() {\n }",
"public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }",
"public void mo21794S() {\n }",
"@Override\r\n\tpublic void method() {\n\t\r\n\t}",
"public abstract void mo42329d();",
"public boolean method_4132() {\n return false;\n }",
"public void mo21878t() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public boolean method_3897() {\r\n return false;\r\n }",
"public void mo21877s() {\n }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"public abstract void mo27385c();",
"private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}",
"protected void h() {}",
"@Override\n\tpublic void doIt() {\n\t\t\n\t}",
"public void mo6944a() {\n }",
"@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public boolean method_4102() {\n return false;\n }",
"public void mo115188a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"public boolean method_2434() {\r\n return false;\r\n }",
"public void mo21793R() {\n }",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}"
]
| [
"0.7253101",
"0.6998572",
"0.6852465",
"0.68521184",
"0.6841567",
"0.68216133",
"0.6798824",
"0.6772588",
"0.67693496",
"0.6756796",
"0.6756796",
"0.6740401",
"0.6737112",
"0.67312366",
"0.67302907",
"0.6700296",
"0.6695963",
"0.66939205",
"0.6656461",
"0.6647018",
"0.6643066",
"0.66376525",
"0.6632719",
"0.66307485",
"0.6624263",
"0.6624263",
"0.6619918",
"0.66088426",
"0.66088426",
"0.66088426",
"0.66088426",
"0.66088426",
"0.66088426",
"0.66088426",
"0.660703",
"0.6605126",
"0.65959036",
"0.6594774",
"0.65934974",
"0.65828025",
"0.65711766",
"0.65705466",
"0.6567178",
"0.65652597",
"0.6557512",
"0.6555647",
"0.6552242",
"0.6549109",
"0.65454906",
"0.65436316",
"0.65436316",
"0.65422904",
"0.65416366",
"0.6535886",
"0.6529088",
"0.6518369",
"0.65159327",
"0.65145403",
"0.6511417",
"0.6510597",
"0.65097487",
"0.650658",
"0.65002024",
"0.6500181",
"0.6500181",
"0.6493119",
"0.64893126",
"0.6483823",
"0.6466712",
"0.64486533",
"0.64478004",
"0.644588",
"0.64452904",
"0.64433724",
"0.64409995",
"0.6438925",
"0.64382386",
"0.6437389",
"0.64349496",
"0.6427289",
"0.6426913",
"0.6424735",
"0.64222485",
"0.64129794",
"0.64073277",
"0.64018625",
"0.6399349",
"0.6398052",
"0.63965064",
"0.63946384",
"0.63885087",
"0.6388152",
"0.6384599",
"0.63838613",
"0.6383531",
"0.6382679",
"0.6381533",
"0.63754535",
"0.6373939",
"0.63720495",
"0.6364294"
]
| 0.0 | -1 |
Returns the key at the cursor's current position. | public String getKey() {
return element == null ? null : element.getKey();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"int getKey();",
"int getKey();",
"public String getKey();",
"public String getKey();",
"public String getKey();",
"public String getKey();",
"public long getKey(int aPosition)\n\t{\n\t\tassert aPosition < itsLimit : \"\"+aPosition;\n\t\treturn itsKeyBuffer[aPosition];\n\t}",
"public char getKey() {\n return key;\n }",
"K getKey();",
"K getKey();",
"K getKey();",
"K getKey();",
"public int getKey() {\r\n return key;\r\n }",
"Object getKey();",
"public String getKey() { \n\t\treturn getKeyElement().getValue();\n\t}",
"public K getKey();",
"public K getKey();",
"String getKey(int index);",
"public SelectionKey getKey() {\n return this._key;\n }",
"public Object getKey()\n {\n return key;\n }",
"public int getKey() {\n return key;\n }",
"K key();",
"K key();",
"public K getKey()\r\n\t\t{\r\n\t\t\treturn key;\r\n\t\t}",
"public int getKey(){\n return key;\n }",
"public K getKey() {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public int getKey()\n {\n return key;\n }",
"public Object getKey() {\r\n return key;\r\n }",
"public char getKey(){ return key;}",
"public String getKey() {\n\t\tString t = doc.get(\"key\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}",
"public int getKey() {\n return this.key;\n }",
"public String getKey()\n\t{\n\t\treturn key;\n\t}",
"public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}",
"public Key getKey() {\n\t\treturn mKey;\n\t}",
"@Override\n public int getKey() {\n return this.key;\n }",
"public String getKey()\n\t{\n\t\treturn this.key;\n\t}",
"public final String getKey() {\n return key;\n }",
"public K getKey() {\n\t\treturn key;\n\t}",
"public K getKey() {\n return key;\n }",
"public K getKey() {\n return key;\n }",
"public K getKey() {\n return key;\n }",
"public Key getKey()\r\n { \r\n return key; \r\n }",
"public K getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey()\r\n {\r\n return getValue().toString();\r\n }",
"public static char getKey() {\n try {\n return (char) Input.read(true);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return 0;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"@Override\n public int getKey() {\n return key_;\n }",
"public Key getKey() {\n\t\treturn key;\n\t}",
"@Override\n public int getKey() {\n return key_;\n }",
"public int getKey() {\n\t\treturn 0;\n\t}",
"public Object getKey() {\n return key;\n }",
"public String getKey(){\n SQLiteDatabase db = this.getReadableDatabase();\n\n // Define a projection that specifies which columns from the database\n // you will actually use after this query.\n String[] projection = {\n SportPartnerDBContract.LoginDB.COLUMN_KEY_NAME\n };\n\n Cursor cursor = db.query(\n SportPartnerDBContract.LoginDB.TABLE_NAME,\n projection,\n null,\n null,\n null,\n null,\n null\n );\n cursor.moveToLast();\n String key = cursor.getString(0);\n cursor.close();\n\n return key;\n }",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n\t\treturn key;\n\t}",
"public String getKey() {\n\t\treturn key;\n\t}",
"public String getKey() {\n\t\treturn key;\n\t}",
"public Integer getKey()\r\n {\r\n return key;\r\n }",
"public String getKey() {\r\n return key;\r\n }",
"String key();",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getKey(){\n\t\treturn key;\n\t}"
]
| [
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.7538102",
"0.749421",
"0.749421",
"0.749421",
"0.749421",
"0.749421",
"0.749421",
"0.744254",
"0.744254",
"0.741942",
"0.741942",
"0.741942",
"0.741942",
"0.7393065",
"0.7392474",
"0.7380502",
"0.7380502",
"0.7380502",
"0.7380502",
"0.7187216",
"0.7170592",
"0.71632797",
"0.7130883",
"0.7130883",
"0.7126176",
"0.70923704",
"0.7082364",
"0.7079961",
"0.70764345",
"0.70764345",
"0.7072625",
"0.70712733",
"0.7069863",
"0.70660347",
"0.70660347",
"0.70660347",
"0.70660347",
"0.70642406",
"0.70623857",
"0.7059122",
"0.7048843",
"0.70327103",
"0.702354",
"0.70217323",
"0.7014539",
"0.70123345",
"0.7011275",
"0.70092094",
"0.70048887",
"0.70048887",
"0.70048887",
"0.70037663",
"0.6999281",
"0.6996139",
"0.6996139",
"0.6996139",
"0.6988026",
"0.6985638",
"0.69842947",
"0.69842947",
"0.6977573",
"0.6975543",
"0.6970925",
"0.69707304",
"0.69656193",
"0.6964912",
"0.696001",
"0.696001",
"0.696001",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6952279",
"0.6946917",
"0.6946917",
"0.6946917",
"0.6942813",
"0.69423544",
"0.6941461",
"0.6918416",
"0.6918416",
"0.6918416",
"0.6903966"
]
| 0.0 | -1 |
Sets the key at the cursor's current position. | public void setKey(String key) {
if (element != null) {
element.setKey(key);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setKey(int key);",
"public void setKey(int key);",
"public void setKey(char key){ this.key = key;}",
"public void setKey(SelectionKey key) {\n this._key = key;\n }",
"public void setKey(int key){\r\n this.key = key; \r\n }",
"void setKey(K key);",
"public void _setKey(String e)\n {\n _key = e;\n }",
"public void setKey(Key key) {\n this.key = key;\n }",
"public void setKey (K k) {\n key = k;\n }",
"void setKey(int key);",
"public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"public void setKey(final String key);",
"public void setKey(final String key);",
"void setKey(String key);",
"private void setKey() {\n\t\t \n\t}",
"void setKey(int i, int key);",
"void setKey(java.lang.String key);",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"void setKey(final String key);",
"public void setKey(String key) {\r\n\t\tthis.key = key;\r\n\t}",
"public void setKey(String key) {\r\n this.key = key;\r\n }",
"private void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key)\r\n {\r\n m_key = key;\r\n }",
"private void setKey(String key){\n\t\tthis.key=key;\n\t}",
"public final void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String aKey) {\n\t\tthis.key = aKey;\n\t}",
"public void setKey(String key) {\n\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"protected void setKey(String key) {\r\n this.key = key;\r\n }",
"public void setKey( Long key ) {\n this.key = key ;\n }",
"public void setKey(java.lang.String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(TableKey key) {\n\tthis.key = key;\n }",
"public void setKey(final String key) {\n this.key = key;\n }",
"public static void setUserKey(Key newKey) {\n\t\tlocalKey.set(newKey);\n\t}",
"public void set(String newKey)\n\t{\n\t\tthis.Key = newKey;\n\t}",
"public void setItskey(String newItskey) {\n keyTextField.setText(newItskey);\n itskey = newItskey;\n }",
"public void setKeyPressed(int keyCode){\n this.keys[keyCode] = true;\n\n }",
"public K setKey(K key);",
"public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }",
"public void setKey(MessageKey key) {\n\tthis.key = key;\n }",
"String setKey(String newKey);",
"private native void switchKey(String newKey);",
"private void setKeyCode() {\n if (key.equals(KeyCode.W) || key.equals(KeyCode.UP)) {\n key = KeyCode.UP;\n right_key = true;\n } else if (key.equals(KeyCode.S) || key.equals(KeyCode.DOWN)) {\n key = KeyCode.DOWN;\n right_key = true;\n } else if (key.equals(KeyCode.A) || key.equals(KeyCode.LEFT)) {\n key = KeyCode.LEFT;\n right_key = true;\n } else if (key.equals(KeyCode.D) || key.equals(KeyCode.RIGHT)) {\n key = KeyCode.RIGHT;\n right_key = true;\n } else {\n key = KeyCode.PLUS;\n }\n }",
"public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}",
"void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }",
"public void setKeyJump(final int key) {\n jumpKey = key;\n }",
"public void setKey(java.lang.String param){\n localKeyTracker = true;\n \n this.localKey=param;\n \n\n }",
"public void setKey(Boolean key) {\n this.key = key;\n }",
"void setKeyNumber(int number)\r\n {\r\n number_of_key = number;\r\n }",
"protected void setSearchKey(Key key)\n\t{\n\t\tint last_idx = _searchKeyList.size() - 1 ;\n\t\t_searchKeyList.set(last_idx, key) ;\n\t}",
"public void setKey(String e)\n {\n ScControlRegistry r;\n r = getRegistry();\n r.unregister(this);\n\n _key = e;\n r.register(this);\n }",
"@Override\n\tpublic ManagedFunctionObjectTypeBuilder<M> setKey(M key) {\n\t\tthis.key = key;\n\t\tthis.index = key.ordinal();\n\t\treturn this;\n\t}",
"public void setEventKey(final EventKey val) {\n eventKey = val;\n }",
"public void setKey(String s){\n this.key = s;\n this.blockLen = s.length();\n }",
"public void setCursor(int l, int c);",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"public void setLeft(int position,int key) {\r\n\t\tthis.treeLeft[position]=key;\r\n\t}",
"public void setKeyMoveLeft(KeyCode moveLeft) {\n this.moveLeft = moveLeft;\n }",
"public void changeKey(int x, int y) throws IndexOutOfBoundsException {\n\t\tMap m = rows.get(y).getMap(x);\n\t\tsuper.changeKey(m.getKey(), InputManager.enterString(\"New Key\"));\n\t}",
"public void setKey(byte[] argKey) {\n this.key = argKey;\n }",
"@Override\n public void setKey(byte[] key) {\n }",
"public void setKey(int nKey){\n\t\tkey = clamp(nKey, MINKEY, MAXKEY);\n\t}",
"public void setKeyField(KeyField k) {\n\tkeyField = k;\n }",
"@Override\n public void key() {\n \n }",
"public void setRight(int position,int key) {\r\n\t\tthis.treeRight[position]=key;\r\n\t}",
"public void handleKeyPressed(KeyEvent event) {\n keyInput.set(String.valueOf(event.getCode()));\n }",
"public void keyPressed() {\r\n \t\tkeys[keyCode] = true;\r\n \t}",
"public void setKey(String symKey) {\n this.symKey = symKey;\n }",
"public void key(){\n }",
"public final void setKeyId(int keyId)\r\n\t{\r\n\t\tthis.keyId = keyId;\r\n\t}",
"public void setKeyDown() {\r\n keys[KeyEvent.VK_P] = false;\r\n }",
"public static void setKey(byte[] key) {\n SquareAttack.key = key.clone();\n MainFrame.printToConsole(\"Chosen key:\");\n for (byte b : key) {\n MainFrame.printToConsole(\" \".concat(MainFrame.byteToHex(b)));\n }\n MainFrame.printToConsole(\"\\n\");\n }",
"void keyPress(int key);",
"public void setKey(String key) {\n this.key = key == null ? null : key.trim();\n }",
"public void setKey(String key) {\n this.key = key == null ? null : key.trim();\n }",
"public void setKeyShoot(final int key) {\n shootKey = key;\n }",
"private void setKeyListener() {\r\n this.addKeyListener(new KeyListener() {\r\n public void keyTyped(KeyEvent key) { }\r\n public void keyPressed(KeyEvent key) { \r\n keyPress(key);\r\n }\r\n public void keyReleased(KeyEvent key) { }\r\n });\r\n }",
"String setKey(String keyName, String value, KeyOptions opts)\n throws P4JavaException;",
"public void setCursor(int row, int col);",
"public void keyTyped(char keyIn){\n if(' '<=Character.toLowerCase(keyIn) && Character.toLowerCase(keyIn)<='~'){\n this.sOut.insert(curPos,keyIn);\n this.showCursor = true;\n this.frameCount = 0;\n this.curPos++;\n }\n }",
"public void setKey (String key, int value) {\n this.diccionario = new Diccionario(key,value);\n }",
"public void set_a_key(int selected_user_key) {\n switch (selected_user_key) {\n case 0:\n DES_key = key_k0;\n break;\n case 3:\n DES_key = key_k3;\n break;\n case 5:\n DES_key = key_k5;\n break;\n case 6:\n DES_key = key_k6;\n break;\n case 9:\n DES_key = key_k9;\n break;\n case 10:\n DES_key = key_k10;\n break;\n case 12:\n DES_key = key_k12;\n break;\n case 15:\n DES_key = key_k15;\n break;\n case 16:\n DES_key = key_user;\n break;\n // default: DES_key = key_Schneier;\n }\n }",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }",
"@Override\r\n\tpublic void keyPressed() {\n\t\tl.key();\r\n\t\t\r\n\t}",
"public void setCommandKey(String commandKey)\n\t{\n\t\tthis.commandKey = Toolbox.trim(commandKey, 1);\n\t}",
"@Override\n public void changeKey(Key oldKey, Key newKey){\n changeKey(this.root, oldKey, newKey);\n }",
"@Override\n public void keyPressed(KeyEvent key) {\n gsm.keyPressed(key.getKeyCode());\n }",
"public void setKeyData(String keyData)\n\t{\n\t\tthis.keyData = keyData;\n\t}",
"public void setKey(KeyField key)\n\tthrows SdpException {\n\tif (key == null)\n\t throw new SdpException(\"The key is null\");\n\tsetKeyField(key);\n }",
"@Override\n @NonNull\n public SliceActionImpl setKey(@NonNull String key) {\n mActionKey = key;\n return this;\n }",
"void xsetKey(org.apache.xmlbeans.XmlNMTOKEN key);",
"public void setPrimaryKey(String key) throws TorqueException\n {\n setPrimaryKey(new ComboKey(key));\n }"
]
| [
"0.7256104",
"0.7256104",
"0.72398907",
"0.71630025",
"0.7087297",
"0.70859444",
"0.70858157",
"0.7073709",
"0.7045561",
"0.70316374",
"0.69605106",
"0.6921008",
"0.6880597",
"0.6880597",
"0.6872566",
"0.6858962",
"0.6857535",
"0.6850103",
"0.68250424",
"0.6808773",
"0.6806779",
"0.6786232",
"0.67768466",
"0.67694485",
"0.6768386",
"0.6737614",
"0.67346835",
"0.6731659",
"0.6729646",
"0.6729646",
"0.6720273",
"0.6713956",
"0.6709819",
"0.6709819",
"0.6709819",
"0.666103",
"0.6598272",
"0.657281",
"0.6570015",
"0.65691566",
"0.6481586",
"0.64593464",
"0.6408217",
"0.63546324",
"0.63502103",
"0.63263816",
"0.6324122",
"0.6294104",
"0.62704",
"0.62573755",
"0.625463",
"0.6242832",
"0.6239695",
"0.6200654",
"0.6196054",
"0.61339617",
"0.6127449",
"0.61199415",
"0.6112659",
"0.6100223",
"0.6082028",
"0.60527414",
"0.60324675",
"0.60245657",
"0.6006481",
"0.59839654",
"0.5972559",
"0.5945212",
"0.59306735",
"0.59257275",
"0.58972514",
"0.58455867",
"0.5824752",
"0.58094656",
"0.58078665",
"0.58053714",
"0.57877964",
"0.57732904",
"0.57724035",
"0.57708144",
"0.57593834",
"0.57593834",
"0.5755991",
"0.573289",
"0.5731358",
"0.572485",
"0.5720979",
"0.56960094",
"0.5695691",
"0.5694883",
"0.56933856",
"0.56830984",
"0.5676307",
"0.56685233",
"0.5660686",
"0.56571424",
"0.56527793",
"0.56491506",
"0.5647953",
"0.56418216"
]
| 0.6260957 | 49 |
Returns the value at the cursor's current position. | public Object getValue() {
return element == null ? null : element.getValue();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public CursorPosition getCurrentCursorPosition(){\n return XSelection.getCurrentCursorPosition(this);\n }",
"@Override\n public E getCurrent() {\n if (isCurrent()) { return cursor.getData(); }\n else { throw new IllegalStateException(\"There is no current element.\"); }\n }",
"public TextPosition getPosition ( ) { return _cursorPosition; }",
"public Node<E> getCursor() {\n if (isCurrent()) { return cursor; }\n else { throw new IllegalStateException(\"There is no current element.\"); }\n }",
"public java.lang.String getCursor() {\n return cursor_;\n }",
"public java.lang.String getCursor() {\n return instance.getCursor();\n }",
"public int getPosition() {\n\treturn (_current);\n }",
"public Number getValue() {\n return currentVal;\n }",
"public int getCurrentValue() {\n\t\treturn this.currentValue;\n\t}",
"String getCurrentValue();",
"public int curValue(int mode) {\n\t\tif(mode==0)\n\t\t\treturn lineIndex;\n\t\tif(mode==1)\n\t\t\treturn cmdIndex;\n\t\tif(mode==2)\n\t\t\treturn memIndex;\n\t\treturn 0;\n\t}",
"public final T getValue() {\n return this.getValue(this.getBuffer());\n }",
"public Integer getCurrent() {\n return this.current;\n }",
"public int getCurrentPosition(){\n return Integer.parseInt(currentPosition);\n }",
"public Integer getPosition();",
"public Object currValue();",
"public int getCurrentPos() {\n return currentPos;\n }",
"public double getCurrent( )\r\n {\r\n\t double element = 0; \r\n\t if(isCurrent() != true){// Student will replace this return statement with their own code:\r\n\t throw new IllegalStateException (\"no current element, getCurrent may not be called\");\r\n\t }\r\n\t else\r\n\t \t element = element + (cursor.getData()) ;\r\n\t return element; \r\n }",
"@Override\r\n public int intValue() {\r\n return (int) this.m_current;\r\n }",
"int getCursorPosition();",
"public int getCurrentValue() throws DfException {\n\t\tfinal String valueStr = object.getString(CURRENT_VALUE);\n\t\tfinal int value = Integer.parseInt(valueStr);\n\t\treturn value;\n\t}",
"@Override\r\n\tpublic Text getCurrentValue() throws IOException, InterruptedException {\n\t\treturn this.value;\r\n\t}",
"public int getCursorPosition();",
"public int getCursor() { return curs; }",
"public Integer getPosition() {\n return this.position;\n }",
"public Integer getCurrentValue() {\n return currentValue;\n }",
"public Integer getCurrentValue() {\n return currentValue;\n }",
"synchronized public long peek() {\n return currValue;\n }",
"public int getValue ()\r\n\t{\r\n\t\treturn (m_value);\r\n\t}",
"public int getValue () {\n return value;\n }",
"@Override\n\tpublic Position getPosition() \n\t{\n\t\treturn currentPosition;\n\t}",
"public ItemStack getItemOnCursor ( ) {\n\t\treturn extract ( handle -> handle.getItemOnCursor ( ) );\n\t}",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public Integer getPosition()\n {\n return position;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue()\n {\n return value;\n }",
"public int getValue() {\n\t\treturn this.getValue();\n\t}",
"public int getValue()\r\n {\r\n return value;\r\n }",
"public char getCurrent(){\n return current_c;\n }",
"public int getValue() {\n return _value;\n }",
"public int getValue() {\n return value_;\n }",
"public Result getCurrentValue() throws IOException, InterruptedException {\n return value;\n }",
"public V getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() \n {\n return value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\r\n return value;\r\n }",
"public final int getCursorX() {\n return cursorX;\n }",
"public Position getCurrentPosition(){return this.currentPosition;}",
"public Prompt getCurrent() {\n\t\t\treturn current;\n\t\t}",
"public int getValue()\n {\n return value;\n }",
"public char getValue() {\n return value;\n }",
"public int getValue() {\n return value_;\n }",
"public int getValue() {\n return value_;\n }",
"public CursorWrapper getCursor() {\n\t\t\treturn cursor;\n\t\t}",
"public int getValue(int row, int column);",
"public Integer getPosition() {\n return position;\n }",
"public float getCurrentX(){\n return curX;\n }",
"public V value()\n\t\t{\n\t\t\treturn _value;\n\t\t}",
"public long getCurrent() {\n return current;\n }",
"public int getValue() {\n\t\treturn _value;\n\t}",
"public V getValue() {\n\t\treturn value;\n\t}",
"public V getValue() {\n\t\treturn value;\n\t}",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue() {\n return value;\n }",
"public int getValue(){\n return this.value;\n }",
"public V getValue()\r\n\t\t{\r\n\t\t\treturn val;\r\n\t\t}",
"public V getValue() {\n return value;\n }",
"public V getValue() {\n return value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() {\n return this.value;\n }",
"public int getValue() \n {\n return value;\n }",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue() {\r\n\t\treturn value;\r\n\t}",
"public int getValue(){\n\t\treturn value;\n\t}"
]
| [
"0.7053146",
"0.6983254",
"0.6956108",
"0.68555236",
"0.6821669",
"0.6816853",
"0.67865986",
"0.6738922",
"0.6692717",
"0.66381055",
"0.66044134",
"0.6584808",
"0.65480214",
"0.6544915",
"0.6524092",
"0.6520022",
"0.6509452",
"0.6503338",
"0.6494281",
"0.64916813",
"0.6488368",
"0.6473233",
"0.64485514",
"0.6425672",
"0.6420555",
"0.64022267",
"0.64022267",
"0.6369251",
"0.63501877",
"0.63484883",
"0.63439626",
"0.6343674",
"0.63212484",
"0.63212484",
"0.63212484",
"0.63212484",
"0.63212484",
"0.63212484",
"0.6312518",
"0.63051677",
"0.6300907",
"0.62977797",
"0.629206",
"0.6290404",
"0.6288229",
"0.6279615",
"0.6275741",
"0.6271366",
"0.62673366",
"0.6261222",
"0.62605983",
"0.62604743",
"0.6258546",
"0.62545025",
"0.62522",
"0.6249076",
"0.62465304",
"0.624628",
"0.624628",
"0.62457174",
"0.62456226",
"0.624084",
"0.62357014",
"0.6230917",
"0.6230055",
"0.6226705",
"0.62257093",
"0.62257093",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.6222919",
"0.62209064",
"0.62193626",
"0.6211916",
"0.6211916",
"0.62065315",
"0.62065315",
"0.62065315",
"0.62065315",
"0.6199376",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61990297",
"0.61986023"
]
| 0.0 | -1 |
Sets the value at the cursor's current position. | @SuppressWarnings("unchecked")
public void setValue(Object value) {
if (element != null) {
element.setValue((V)value);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentPosition(int value) {\n this.currentPosition = value;\n }",
"public void setValue(int val)\r\n {\r\n value = val;\r\n }",
"public void setCursor(int row, int col);",
"public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }",
"public void setCursor(int l, int c);",
"public void setValue(int value) {\r\n this.value = value;\r\n }",
"@Override\n public void setValue(Object val)\n {\n value = val;\n }",
"public void setValue(int value)\n {\n this.value = value;\n }",
"public void setValue(Object value) { this.value = value; }",
"public void setValue(Value value) {\n this.value = value;\n }",
"void setValue(int value);",
"public void setValue(int new_value){\n this.value=new_value;\n }",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value) {\r\n\t\tthis.value = value;\r\n\t}",
"public void setValue(int value);",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"public void setValue(int value) {\n this.value = value;\n }",
"void setValue(T value)\n\t\t{\n\t\t\tthis.value = value;\n\t\t}",
"public void setValue(final Object value) { _value = value; }",
"public void setValue(int value) {\n\t\tthis._value = value;\n\t}",
"private void setCursor(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cursor_ = value;\n }",
"public void setValue(int value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(int value) {\n\t\tthis.value = value;\n\t}",
"public void set(int pos);",
"public void setValue(Object value) {\n this.value = value;\n }",
"public void setValue(Integer value) {\n _value = value ;\n }",
"public void setValue(T value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(T value) {\n\t\tthis.value = value;\n\t}",
"public void setValue(char value)\n\t{\n\t\tthis.value = value;\n\t}",
"public void setValue(int value) {\n m_value = value;\n }",
"public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}",
"public void setValue(int value) {\n\t\tm_value = value;\n\t}",
"public void setValue(Object val);",
"public void setValue(T value) \n\t{\n\t\tthis.value = value;\n\t}",
"public void setValue(Object value) {\n\t\tthis.value = value;\n\t\tsetValueAction(value);\n\t}",
"public void updatePositionValue(){\n m_X.setSelectedSensorPosition(this.getFusedPosition());\n }",
"public void set(int value){\n val = value;\n }",
"public void setValue(T value) {\n this.value = value;\n }",
"public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }",
"public void setValueAt(Object val, int row, int col) {\r\n }",
"public void setValue(long value) {\n\t this.value = value;\n\t }",
"public void setValue(Object value);",
"protected final void seek(final int value) {\r\n bPtr = value;\r\n }",
"public void setValue (int newValue) {\n myValue = newValue;\n }",
"void setValue(V value);",
"@Generated\n @Selector(\"setPosition:\")\n public native void setPosition(@ByValue CGPoint value);",
"protected void setValue(T value) {\r\n this.value = value;\r\n }",
"public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}",
"public void setCursor(Cursor c) {\n\n\t}",
"public void setValue(AXValue value) {\n this.value = value;\n }",
"public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}",
"public void setValue(Number value) {\n this.value = value;\n }",
"private void setValue(double value) {\n this.value = value;\n }",
"protected abstract void setValue(V value);",
"public void mark() {\r\n\t\tmark = cursor;\r\n\t}",
"public void setValue(final V value) {\n this.value = value;\n }",
"public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }",
"public void setCurrentValue(Integer currentValue) {\n this.currentValue = currentValue;\n }",
"public void setValue(int value){\n selectedValue = value;\n currentValue.setText(String.valueOf(value));\n }",
"void setValue(Object value);",
"public void setPos(int pos);",
"public void setPos(int pos);",
"void setValue(byte value) {\n this.value = value;\n blockDrawables.get(selected).setValue(value);\n }",
"@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}",
"public void setValue(double newvalue){\n value = newvalue;\n }",
"private void setCursorBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n cursor_ = value.toStringUtf8();\n }",
"public Builder setCursor(\n java.lang.String value) {\n copyOnWrite();\n instance.setCursor(value);\n return this;\n }",
"public void setValueAt(Object aValue, int row, int column)\n {\n\n }",
"public void setPosition ( TextPosition position ) throws OutOfBoundsException { _cursorPosition = position; }",
"public void setValue(Integer value) {\n\t\tthis.value = value;\n\t}",
"public V setValue(V value);",
"public void setValue (V v) {\n value = v;\n }",
"public void setValue(float val)\n\t{\n\t\tthis.value = val;\n\t}",
"public void setValue(double val) {\n this.val = val;\n }",
"public void setValue(double value) {\n this.value = value; \n }",
"public void setX(int x){ xPosition = x; }",
"public void setValue(int value)\n {\n if(this.valueInt == value)\n {\n return;\n }\n this.valueInt = value;\n treeModel.nodeChanged(this.treeNode);\n }",
"public abstract void setValue(int value);",
"void setCurrentPosition(Square currentPosition);",
"public void\t\tset(int val) { value = val; }",
"protected void doSetValue(Object aValue) {\n \t\tthis.value = aValue;\n \n \t\tassert null != getText();\n \t\tgetText().removeModifyListener(getModifyListener());\n \t\tgetText().setText(aValue.toString());\n \t\tgetText().addModifyListener(getModifyListener());\n \t}",
"public void setCurrent(Prompt current) {\n\t\t\tthis.current = current;\n\t\t}",
"@Override\n public void set(T value) throws Exception {\n _curator.setData().forPath(_zkPath, toZkBytes(value));\n }",
"public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }",
"void setToValue(int val);",
"public int setValue (int val);",
"public void setValue (String Value);",
"public void setCurrentPosition(String position){\n this.currentPosition = position;\n }",
"void setValue(T value);",
"void setValue(T value);",
"void setValue(double value);",
"public void setValue (double value) {\n\t\tthis.value = value;\n\t}",
"public void setCurrentValue(float currentValue) {\n this.currentValue = currentValue;\n }",
"public void setValue(A value) {this.value = value; }",
"private void updateCursor() {\n if ((! editor.isCursorSet())\n || editor.getCursor() instanceof UIResource) {\n Cursor cursor = (editor.isEditable()) ? textCursor : null;\n editor.setCursor(cursor);\n }\n }"
]
| [
"0.6867903",
"0.6760759",
"0.66913384",
"0.66885054",
"0.6637262",
"0.6593114",
"0.65845853",
"0.65844184",
"0.65715337",
"0.65648884",
"0.65489787",
"0.6526079",
"0.65260017",
"0.65260017",
"0.65260017",
"0.65260017",
"0.65260017",
"0.6519044",
"0.6511719",
"0.6511719",
"0.6511719",
"0.6499966",
"0.6499966",
"0.64903617",
"0.64859134",
"0.6476075",
"0.647402",
"0.6463765",
"0.6463765",
"0.6453278",
"0.6436992",
"0.64290065",
"0.64105093",
"0.64105093",
"0.6409839",
"0.6395505",
"0.639126",
"0.6375243",
"0.63654447",
"0.63578117",
"0.6330762",
"0.6324552",
"0.63232034",
"0.6318176",
"0.6314895",
"0.6314072",
"0.6311399",
"0.6308792",
"0.6305615",
"0.63028866",
"0.63010854",
"0.6260284",
"0.6252799",
"0.6252174",
"0.6250162",
"0.6241576",
"0.62353224",
"0.6225413",
"0.62250596",
"0.6221274",
"0.6215093",
"0.6208157",
"0.620257",
"0.620257",
"0.61987793",
"0.61977684",
"0.6191442",
"0.6191442",
"0.6186995",
"0.6181515",
"0.6179849",
"0.6177965",
"0.61762905",
"0.6165374",
"0.6164954",
"0.6151748",
"0.6147986",
"0.61442715",
"0.6138341",
"0.61345714",
"0.6126993",
"0.6124502",
"0.61229384",
"0.61203367",
"0.61187446",
"0.6110639",
"0.6102084",
"0.6101143",
"0.6099074",
"0.60982615",
"0.6088577",
"0.6086133",
"0.6078604",
"0.6075532",
"0.6071864",
"0.6071864",
"0.60653436",
"0.6064872",
"0.6060862",
"0.6060298",
"0.6053681"
]
| 0.0 | -1 |
Deletes the element at the cursor's current position. | public boolean delete() {
boolean result = true;
try {
iterator.remove();
} catch(IllegalStateException ex) {
result = false;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void remove()\n {\n list.remove(cursor);\n cursor--;\n }",
"public void removeAtCursor() {\n lines.remove(cursor);\n if(cursor !=0 && cursor==lines.size())\n cursor--;\n }",
"public void delete(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //If a character is being removed from a single line\n if (characterIndex < currentText.getCharacterEdges().length - 1) {\n currentText = codeWindow.getTextLineController().backspace(currentText, characterIndex, false);\n }\n //If a newline character is being removed two lines need to be merged\n else if (lineIndex < texts.size() - 1) {\n currentText = codeWindow.getTextLineController().merge(currentText, codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex + 1), codeWindow);\n }\n //The cursors position is unchanged\n }\n }",
"void delete()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call delete() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call delete() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tdeleteFront(); //deletes the front if the cursor is at the front\n\n\t\t}\n\t\telse if(cursor == back)\n\t\t{\n\t\t\tdeleteBack(); //deletes the back if the cursor is at the back\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcursor.prev.next=cursor.next; \n\t\t\tcursor.next.prev=cursor.prev;\n\t\t\tcursor = null; \n\t\t\tindex = -1;\n\t\t\tlength--;\n\t\t}\n\t\t\n\t}",
"public void delete(int position) {\r\n dataTag.remove(position);\r\n data.remove(position);\r\n }",
"@Override\n\tpublic void delete()\n\t{\n\t\tif (!isAtEnd()) right.pop();\n\t}",
"public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }",
"public void deleteCurrentJoueur(){\n\t\tElement elementPreviousToCurrent = this.getCurrentElement().getPrevious();\n\t\tElement elementNextToCurrent = this.getCurrentElement().getNext();\n\t\t\n\t\telementPreviousToCurrent.setNext(elementNextToCurrent);\n\t\telementNextToCurrent.setPrevious(elementPreviousToCurrent);\n\t\t\n\t\t// l'element suivant devient l'element courant (on passe au suivant)\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}",
"@Override\r\n\tpublic void delete(T element) {\n\r\n\t}",
"public void deletePolynom(int position) {\n collection.remove(position);\n }",
"@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}",
"public void delete(T element);",
"private void deleteElement(final int idx) {\r\n\t\tserializer.setRandomAccess(idx, null);\r\n\t\tif (idx < firstFree) {\r\n\t\t\tsetNextPointer(idx, firstFree);\r\n\t\t\tsetPrevPointer(idx, 0);\r\n\t\t\tfirstFree = idx;\r\n\t\t} else {\r\n\t\t\tint free = firstFree;\r\n\t\t\tint lastFree = 0;\r\n\t\t\twhile (free < idx) {\r\n\t\t\t\tlastFree = free;\r\n\t\t\t\tfree = getNextPointer(free);\r\n\t\t\t}\r\n\t\t\tsetNextPointer(lastFree, idx);\r\n\t\t\tsetNextPointer(idx, free);\r\n\t\t}\r\n\t}",
"public void performDelete() {\n \t\tif (text.getSelectionCount() > 0)\n \t\t\ttext.insert(StringStatics.BLANK);\n \t\telse {\n \t\t\t// remove the next character\n \t\t\tint pos = text.getCaretPosition();\n \t\t\tif (pos < text.getCharCount()) {\n \t\t\t\ttext.setSelection(pos, pos + 1);\n \t\t\t\ttext.insert(StringStatics.BLANK);\n \t\t\t}\n \t\t}\n \t\tcheckSelection();\n \t\tcheckDeleteable();\n \t\tcheckSelectable();\n \t}",
"public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}",
"@Override\n\tpublic void posDelete() {\n\t\t\n\t}",
"@Override\n\tpublic void posDelete() {\n\t\t\n\t}",
"@Override\n\tpublic void posDelete() {\n\t\t\n\t}",
"protected void deleteSelection() {\n Iterator i = getCurrentSelection().iterator();\n while (i.hasNext()) {\n ZNode each = (ZNode) i.next();\n ZNode top = each.editor().getTop();\n ZGroup topParent = top.getParent();\n topParent.removeChild(top);\n\n fireEvent(ZGroupEvent.createNodeRemovedEvent(topParent, each, false));\n }\n }",
"public void deleteCurrentCharacter() {\n\t\tint currentCharacterIndex = 0;\n\t\tList<Entry<Long, String>> characters = m_characterRepo.queryList();\n\t\tlong characterForDeletion = m_currentCharacterID;\n\n\t\tfor (int i = 0; i < characters.size(); i++) {\n\t\t\tif (characterForDeletion == characters.get(i).getKey()){\n\t\t\t\tcurrentCharacterIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (characters.size() == 1) {\n\t\t\taddNewCharacterAndSelect();\n\t\t} else {\n\t\t\tint charToSelect = (currentCharacterIndex == 0) ? 1 : 0;\n\t\t\tsetSelectedCharacter(characters.get(charToSelect).getKey());\n\t\t\tloadSelectedCharacter();\n\t\t}\n\n\t\tm_characterRepo.delete(characterForDeletion);\n\t\tLog.i(TAG, \"Deleted current character: \" + characterForDeletion);\n\t}",
"void deleteElement(int elementId);",
"@Override\n public void removeCurrent() {\n if (!isCurrent()) { throw new IllegalStateException(\"There is no current element\"); }\n\n if (prev == null) { // The current element is referenced by the head\n head = head.getNext();\n cursor = head;\n } else if (cursor.getNext() == null) { // The current element is the final element\n prev = null;\n cursor = null;\n tail = null;\n } else {\n cursor = cursor.getNext();\n }\n\n size--;\n }",
"public void delete() {\n\t\tcmd = new DeleteCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}",
"public void deleteSelectedPosition() {\n if (selectedPosition != -1) {\n list.remove(selectedPosition);\n selectedPosition = -1;//after removing selectedPosition set it back to -1\n notifyDataSetChanged();\n }\n }",
"@Override\n public T remove(int position) {\n if (!validate(position)) {\n throw new NoSuchElementException(\"Element with given position not exist at the list!\");\n }\n T removed = (T) this.values[position];\n this.values[position] = null;\n this.cursor--;\n return removed;\n }",
"public abstract void removeElement(int id) throws PositionEX;",
"public void remove() {\n\n\t\t\tsuprimirNodo(anterior);\n\n\t\t}",
"public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }",
"public RNode deleteAt(int position) {\n if (position >= 0 && position < length() ) {\n\t if (position == 0) return next;\n\t else {\n\t\tnext = next.deleteAt(position - 1);\n\t\treturn this;\n\t }\n }\n\telse throw new RuntimeException(\"precondition violated\");\n }",
"private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }",
"@Override\n\t\t\tpublic void remove() {\n\t\t\t\tthrow new UnsupportedOperationException();\n//\t\t\t\tif (i == begin || removed)\n//\t\t\t\t\tthrow new IllegalStateException();\n//\t\t\t\telements.set(i-1, null);\n//\t\t\t\tremoved = true;\n\t\t\t}",
"@Override\r\n\tpublic void erase() {\n\t\t\r\n\t}",
"private static void OnDelete(Object sender, ExecutedRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(sender); \r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(args.Source)) \r\n {\r\n return;\r\n }\r\n\r\n TextEditorTyping._FlushPendingInputItems(This);\r\n\r\n // Note, that Delete and Backspace keys behave differently. \r\n ((TextSelection)This.Selection).ClearSpringloadFormatting();\r\n\r\n // Forget previously suggested horizontal position\r\n TextEditorSelection._ClearSuggestedX(This);\r\n\r\n using (This.Selection.DeclareChangeBlock()) \r\n {\r\n ITextPointer position = This.Selection.End; \r\n if (This.Selection.IsEmpty) \r\n {\r\n ITextPointer deletePosition = position.GetNextInsertionPosition(LogicalDirection.Forward); \r\n\r\n if (deletePosition == null)\r\n {\r\n // Nothing to delete. \r\n return;\r\n } \r\n\r\n if (TextPointerBase.IsAtRowEnd(deletePosition))\r\n { \r\n // Backspace and delete are a no-op at row end positions.\r\n return;\r\n }\r\n\r\n if (position is TextPointer && !IsAtListItemStart(deletePosition) &&\r\n HandleDeleteWhenStructuralBoundaryIsCrossed(This, (TextPointer)position, (TextPointer)deletePosition)) \r\n { \r\n // We are crossing structural boundary and\r\n // selection was updated in HandleDeleteWhenStructuralBoundaryIsCrossed. \r\n return;\r\n }\r\n\r\n // Selection is empty, extend selection forward to delete the following char. \r\n This.Selection.ExtendToNextInsertionPosition(LogicalDirection.Forward);\r\n } \r\n\r\n // Delete selected text.\r\n This.Selection.Text = String.Empty; \r\n }\r\n }",
"@Override\n public void eliminarElemento(Object elemento) {\n database.delete(elemento);\n }",
"private void onDeleteElement(View view) {\n\n\n Node exist = arSceneView.getScene().findByName(TEMP_LINE_STRING);\n if(exist !=null)\n\n {\n arSceneView.getScene().removeChild(exist);\n\n tempLine = null;\n\n }\n\n if(listElements.size()<1) {\n Toast.makeText(MainActivity.this, \"List empty\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n Description r = listElements.get(listElements.size() - 1);\n if (r != null) {\n arSceneView.getScene().removeChild(r.getNode());\n r.getNode().setParent(null);\n listElements.remove(listElements.size() - 1);\n\n }\n\n\n\n\n\n\n\n\n }",
"private void deleteElement(int index) {\n Object[] first = new Object[index];\n System.arraycopy(this.container, 0, first, 0, index);\n\n Object[] second = new Object[this.container.length - index - 1];\n System.arraycopy(this.container, index + 1, second, 0, second.length);\n\n this.container = new Object[this.container.length];\n System.arraycopy(first, 0, this.container, 0, first.length);\n System.arraycopy(second, 0, this.container, index, second.length);\n\n this.position--;\n }",
"private void popupDelete() {\n\t\taufzugschacht.removeElement(this);\n\t}",
"public void evt_DeleteCurrentObject()\r\n {\r\n rh2EventPos.hoOiList.oilNumOfSelected -= 1;\t\t\t\t\t// Un de moins dans l'OiList\r\n if (rh2EventPrev != null)\r\n {\r\n rh2EventPrev.hoNextSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = rh2EventPrev; // Car le courant est vire!\r\n }\r\n else\r\n {\r\n// rhPtr.rhOiList[rh2EventPosOiList].oilListSelected=rh2EventPos.hoNextSelected;\r\n rh2EventPrevOiList.oilListSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = null;\r\n }\r\n }",
"public E remove(Position<E> v) throws InvalidPositionException;",
"private static void deleteElement(RubyProjectElement element) {\r\n \t\tRubyProject projectInternal = element.getRubyProjectInternal();\r\n \t\tprojectInternal.getRubyElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \t}",
"@Override\n public void deleteItem(int position) {\n originalData.remove(currentData.get(position));\n //Removed of the current data using the current position gotten from the click listener\n currentData.remove(position);\n\n //Notify changes to adapter through presenter\n }",
"private void deleteItem(int position){\n deleteItem(dataset.get(position),position);\n }",
"public void deleteAt(int i) {\n if(i<0||i>this.length()-1) return;\n String oriContent = getText().toString();\n StringBuilder sBuilder = new StringBuilder(oriContent);\n sBuilder.deleteCharAt(i);\n setText(sBuilder.toString());\n }",
"void positionCleared();",
"public final void delete() {\n\t\tOllie.delete(this);\n\t\tOllie.removeEntity(this);\n\t\tnotifyChange();\n\t\tid = null;\n\t}",
"public void deleteSelection() {\r\n /* Delete the node */\r\n try {\r\n deleteNode();\r\n } catch (NullPointerException e1) {\r\n }\r\n /* Delete the edge */\r\n try {\r\n deleteEdge();\r\n } catch (NullPointerException e2) {\r\n }\r\n /* Reload the scroll */\r\n scrollPane().doLayout();\r\n }",
"@Override\n\tpublic void elementRemoved(int anIndex, Object aNewValue) {\n\t\tListEditObserved.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t\tdisplayOutput();\n\t\tListEditDisplayed.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t}",
"@Override\n\tpublic void deleteAttributeAt(final int position) {\n\n\t}",
"@Override\r\n\tpublic MorseCodeTree<String> delete(String element) throws UnsupportedOperationException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn null;\r\n\t}",
"public void removeCurrent( )\r\n {\r\n if(isCurrent() != true){\r\n \t throw new IllegalStateException (\"no current element\");// Implemented by student.\r\n }\r\n else{ \r\n if(precursor != null){\r\n \t precursor.removeNodeAfter();\r\n if(cursor.getLink() == null){\r\n \t\r\n \t cursor = null;\r\n \t tail = precursor;\r\n }\r\n else{\r\n \tprecursor = cursor; \r\n cursor = cursor.getLink();\r\n }\r\n \t \r\n }\r\n else{\r\n \thead = head.getLink();\r\n cursor = head;\r\n }\r\n manyNodes--; \r\n }\r\n \t\r\n }",
"void deleteModelElement(EObject modelElement);",
"public void delete() {\r\n if (this.selectedTag != null) {\r\n for (int i = uploads.size() -1; i >= 0 ; i--) {\r\n if (this.selectedTag.equals(uploads.get(i).getTag())) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n uploads.remove(i);\r\n break;\r\n }\r\n }\r\n }\r\n }",
"public void remove() {\n elements[index] = null;\n size--;\n next();\n }",
"public boolean remove(T element, Point2D pos);",
"public void removeSelection() {\n this.selection = null;\n }",
"void deleteBack()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteBack() on empty List\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1;\n\t\t}\n \n\t\tback = back.prev; //the back element becomes the previous element in the list\n\t\tlength--;\n\n\t}",
"public void delete() {\n\t if (input.getSelectedText() != null){\n\t input.setText(input.getText().replace(\n\t input.getSelectedText(), \"\"));}\n\t}",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"void deleteFront()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call deleteFront() on empty List\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tcursor = null;\n\t\t\tindex = -1; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t}\n \n\t\tfront = front.next; //front element becomes the next element in the list\n\t\tlength--;\n index --; //added because i was failing the test scripts because i wasn't managing the indicies\n\t\t\n\t}",
"private static void deleteElement(ProjectElement element) {\r\n \t\tProject projectInternal = element.getProjectInternal();\r\n projectInternal.getElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \r\n projectInternal.eResource().setModified(true);\r\n \t}",
"public void deleteCt() {\n\t\tlog.info(\"-----deleteCt()-----\");\n\t\t//int index = selected.getCtXuatKho().getCtxuatkhoThutu().intValue() - 1;\n\t\tlistCtKhoLeTraEx.remove(selected);\n\t\tthis.count = listCtKhoLeTraEx.size();\n\t\ttinhTien();\n\t}",
"@Override\n\t\tpublic void eliminar() {\n\t\t\tutilitario.getTablaisFocus().eliminar();\n\t\t}",
"public int delete() {\r\n int ret = heap.get(0);\r\n heap.set(0, heap.get(heap.size() - 1));\r\n heap.remove(heap.size() - 1);\r\n\r\n siftDown(0);\r\n\r\n return ret;\r\n }",
"private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}",
"public boolean deleteItem(int index);",
"public void removeIt() { \n\t\t\tcollection.remove(currIndex);\n\t\t\tcurrIndex--;\n\t\t}",
"public void DelTrack(int position);",
"@Override\r\n public void delete(Copiable obj) {\r\n if (locate(obj) != -1) {\r\n try {\r\n deleteAt(locate(obj));\r\n } catch (IndexRangeException ex) {\r\n //Shouldn't happen\r\n }\r\n }\r\n }",
"public int deletion() {\r\n\t\tif(isEmpty()) return -1;\r\n\t\treturn arr[cur_index--];\r\n\t}",
"public void clearSelection() {\n getElement().clearSelection();\n }",
"public void deleteNote() {\n if (cursor == 0) {\n JOptionPane.showMessageDialog(null, \"There's no note to delete!\", \"Invalid Delete\", JOptionPane.WARNING_MESSAGE);\n } else {\n if (sequence.getNote(cursor) == REST) {\n cursor--;\n controller.setSelected(cursor);\n\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n } else {\n sequence = sequence.withNote(REST, cursor);\n controller.setMidiSequence(sequence);\n }\n }\n }",
"public void remove()\n {\n if( current > 0 )\n {\n set(-- current);\n }\n }",
"public void delete(int position) {\n\t\tif (position >= 0 && position < size) {\n\t\t\t// first resize the storage array\n\t\t\tE[] newData = (E[]) new Object[size - 1];\n\t\t\t// copy the data prior to the delition\n\t\t\tfor (int i = 0; i < position; i++)\n\t\t\t\tnewData[i] = data[i];\n\t\t\t// move the data after the deletion\n\t\t\tfor (int i = position + 1; i < size; i++)\n\t\t\t\tnewData[i - 1] = data[i];\n\t\t\t// replace the storage with the new array\n\t\t\tdata = newData;\n\t\t\tsize = size - 1;\n\t\t}\n\t}",
"public E remove();",
"public E remove();",
"void erase();",
"public E remove () throws NoSuchElementException;",
"public T remove(int pos)\n {\n T el = _objs[pos];\n for (Integer i = pos; i < _size - 1; ++i)\n {\n _objs[i] = _objs[i + 1];\n }\n _size--;\n return el;\n }",
"public T delete(int index) {\n T delete = null;\n if (index >= 0 && index < this.container.length) {\n delete = (T) this.container[index];\n this.deleteElement(index);\n }\n return delete;\n }",
"public <T extends IDBEntities> void delete(T element) {\n\t\tif (element == null)\n\t\t\treturn;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tem.getTransaction().begin();\n\t\t\t// Entity must be attached\n\t\t\tif (!em.contains(element))\n\t\t\t\telement = em.merge(element);\n\t\t\tem.remove(element);\n\t\t\tem.getTransaction().commit();\n\t\t} catch (Exception ex) {\n\t\t\tem.getTransaction().rollback();\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}",
"public T remove (T element);",
"boolean remove(int pos);",
"public void remove(Declarator element) throws ChameleonProgrammerException;",
"public void removePos(String word, IPosition pos) throws WordException;",
"public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIconMarkerDescriptorRefPtr(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }",
"public boolean delete(T element) {\n boolean isDelete = false;\n int index = this.getIndex(element);\n if (index != -1) {\n this.deleteElement(index);\n isDelete = true;\n }\n return isDelete;\n }",
"public void remove () { this.setAsDown(); n.remove(); }",
"public void deleteLastPoint() {\n\t\tif(points.size() > 0) {\n\t\t\tpoints.remove(points.size() - 1);\n\t\t\tnotifyListeners();\n\t\t}\n\t}",
"public void delObject(int id) {\n\n\t\t// last element?\n\t\tif (elements.size() - 1 == id) {\n\t\t\t// remove it\n\t\t\telements.remove(id);\n\t\t} else {\n\t\t\t// reset only element\n\t\t\telements.get(id).setObject(createObject());\n\t\t\telements.get(id).setModified(true);\n\t\t}\n\n\t\t// inform tab\n\t\tbuildEmptyView();\n\t}",
"public void removeFirst() \r\n\t{\r\n\t\tint position = 1;\r\n\t\tif ( this.isEmpty() || position > numItems || position < 1 )\r\n\t\t{\r\n\t\t\tSystem.out.print(\"This delete can not be performed \"+ \"an element at position \" + position + \" does not exist \" );\r\n\t\t}\r\n\t\tfor (int i=position-1; i< numItems-1; i++)\r\n\t\t\tthis.bookArray[i] = this.bookArray[i+1];\r\n\t\t\tthis.bookArray[numItems-1] = null;\r\n\t\t\tnumItems--;\r\n\t\t\tSystem.out.println(\"DELETED first book from the Array \\n\");\r\n\t\t\r\n\t\t\treturn ;\r\n\t}",
"public synchronized void eliminar(int nombre){\n\n elemento.remove(nombre);\n \n }",
"public void deleteItem(int position) {\n Expense expense = expenses.get(position);\n expense.deleteInBackground();\n \n }",
"public E remove(int index);",
"public void deleteItem() {\n\t\tMobileElement el = driver.findElement(By.xpath(\"//android.view.View[@resource-id='\" + deleteButton + \"']\"));\n\t\tel.findElementByClassName(\"android.widget.Button\").click();\n\t\ttry {\n\t\t\tThread.sleep(2000);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void delete(int xposition, int yposition) throws IndexOutOfBoundsException {\n try {\n this.entries[yposition - 1][xposition - 1] = EMPTY_SYMBOL;\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new IndexOutOfBoundsException(\"The x or y position provided must be within the the dimensions of the\"\n + \"saver table!\");\n }\n }",
"public void removeElement() throws IndexOutOfBoundsException, UnsupportedOperationException {\n\t\tlist.remove(0);\n\t}",
"public void remove() {\r\n return;\r\n }"
]
| [
"0.6904179",
"0.68329763",
"0.6832452",
"0.6550805",
"0.6354069",
"0.6351611",
"0.6326879",
"0.63120735",
"0.6263454",
"0.626217",
"0.62514853",
"0.62407994",
"0.62288123",
"0.62084794",
"0.6175793",
"0.6157591",
"0.6157591",
"0.6157591",
"0.6050646",
"0.6042135",
"0.6032868",
"0.6030926",
"0.5995577",
"0.5960214",
"0.59555846",
"0.5953015",
"0.5917976",
"0.5905242",
"0.5873521",
"0.58581865",
"0.5813852",
"0.5811755",
"0.58116513",
"0.58036107",
"0.58017147",
"0.5799724",
"0.5794216",
"0.5792282",
"0.57845926",
"0.5783355",
"0.577858",
"0.57718086",
"0.57658404",
"0.57554454",
"0.57347775",
"0.57333404",
"0.5721858",
"0.5715526",
"0.5702656",
"0.5700767",
"0.56929547",
"0.5685761",
"0.5678549",
"0.56620306",
"0.5659989",
"0.5659917",
"0.5659396",
"0.56549805",
"0.56549805",
"0.56549805",
"0.56549805",
"0.56549805",
"0.56522626",
"0.5650889",
"0.56459904",
"0.5631172",
"0.5627768",
"0.56268024",
"0.5615006",
"0.56146467",
"0.5601009",
"0.56008124",
"0.55764866",
"0.55743515",
"0.557062",
"0.5560688",
"0.5559496",
"0.5559227",
"0.5559227",
"0.5556846",
"0.55545545",
"0.55489004",
"0.5547829",
"0.55454713",
"0.55424803",
"0.55275357",
"0.5524454",
"0.5522871",
"0.55083406",
"0.550398",
"0.5502655",
"0.54992795",
"0.5497029",
"0.5495147",
"0.5492387",
"0.5482228",
"0.5482206",
"0.54803973",
"0.54759103",
"0.54549605",
"0.54549104"
]
| 0.0 | -1 |
Inserts the key value pair before the cursor's current position. | @SuppressWarnings("unchecked")
public void insertBefore(String key, Object value) {
previous();
iterator.add(new CaseInsensitiveElement<V>(key, (V)value));
next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }",
"void insert(Object value, int position);",
"public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}",
"void insert(T value, int position);",
"public native String insertItemBefore(String newItem, Number index);",
"public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }",
"void insert(EntryPair entry);",
"protected void insertBeginning(T value) {\r\n\t\tthis.getHead().setPrev(new SNode<T>(value, this.getHead().getPrev()));\r\n\t\tthis.size++;\r\n\t}",
"public void insert( final char c ) {\n\t\tbuffer.insert( cursor++, c );\n\t}",
"abstract void insert(K key, V value);",
"abstract void insert(K key, V value);",
"void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void insertAfter(String key, Object value) {\n iterator.add(new CaseInsensitiveElement<V>(key, (V)value));\n }",
"public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }",
"public void insert(KeyedItem newItem);",
"Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;",
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"Object insert(String key, Object param);",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}",
"public void insertBefore(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node.prev, position.node);\n\tposition.node.prev = node;\n\tif (head == position.node) {\n\t head = node;\n\t}\n\telse {\n\t node.prev.next = node;\n\t}\n }",
"void insert(int pos, String s);",
"public void insertAtCurrentPos(String part)\n {\n StringBuffer newLine = new StringBuffer( this.getLine() );\n\n newLine.insert( this.getPos(), part + ' ' );\n this.line = newLine.toString();\n }",
"public void Insert(char ch)\n {\n if (map[ch] == -1) {\n map[ch] = pos;\n }\n else {\n map[ch] = -2;\n } \n pos ++;\n }",
"void insert(int idx, int val);",
"public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }",
"public String insertBefore(String v) {\n\t\t\t\t\tString result=\"\";\n\t\t\t\t\treturn result ;\n\t\t\t\t}",
"void insert(String delta) {\n \n if (!acceptInsert(delta)) {\n clear();\n } \n \n int cursor = mDisplay.getSelectionStart();\n mDisplay.getText().insert(cursor, delta);\n \n }",
"public abstract boolean insert(Key key);",
"public Node insertBefore(Node node);",
"@Override\r\n\tpublic void addKeyValuePair(String key, String value) {\r\n\t\t\r\n\t\t// if key is empty\r\n if (key == null || key.equals(\" \") || value == null || value.equals(\" \")) {\r\n System.out.println(\"Key cannot be Empty\");\r\n return;\r\n }\r\n // create new Node to be inserted\r\n Node newNode = new Node(new Data(key, value));\r\n // call recursive function traverse from root to correct Position to add newNode\r\n this.root = insertRecursively(this.root, newNode);\r\n return;\r\n\t\t\r\n\t}",
"private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}",
"protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore) {\n // this does a deep copy of the key byte[] because the CellSearcher\n // interface wants a Cell\n CellScannerPosition position = ptSearcher.seekForwardToOrBefore(kv);\n\n if (CellScannerPosition.AT == position) {\n if (seekBefore) {\n ptSearcher.previous();\n return 1;\n }\n return 0;\n }\n\n return 1;\n }",
"T put(CharSequence key, int pos, T addValue)\n\t\t{\n\t\t\tNode<T> nextNode;\n\t\t\tCharacter ch;\n\t\t\tT old;\n\n\t\t\tif(key.length() == pos)\n\t\t\t{\t// at terminating node\n\t\t\t\told = value;\n\t\t\t\tsetValue(addValue);\n\t\t\t\treturn old;\n\t\t\t}\n\t\t\tch = key.charAt(pos);\n\t\t\tif(nextMap == null)\n\t\t\t{\n\t\t\t\tnextMap = newNodeMap();\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch, nextNode);\n\t\t\t}\n\t\t\telse if((nextNode = nextMap.get(ch))==null)\n\t\t\t{\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch,nextNode);\n\t\t\t}\n\t\t\treturn nextNode.put(key,pos+1,addValue);\n\t\t}",
"public Entry insert(Object key, Object value) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n Entry entry = new Entry();\n entry.key = key;\n entry.value = value;\n\n defTable[index].insertFront(entry);\n size++;\n return entry;\n }",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"public void insert(KeyedItem o){\r\n\t\tinsert(this,o);\r\n\t}",
"void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }",
"public void insertToken(Token tok) {\r\n\t}",
"public Position<E> insertLeft(Position<E> v, E e) throws InvalidPositionException;",
"@Override\n public void insertAtBeginning(T value) {\n Node<T> new_node = new Node<>(value);\n new_node.next = start;\n start = new_node;\n }",
"@Override\n\tpublic void insertChar(char c)\n\t{\n\t\tleft.push(c);\n\t}",
"private static void insertion(int[] a){\n int size = a.length;\n int key = 0;\n \n for(int i = 1; i < size; i++){\n key = a[i];\n for(int j = i-1; j >= 0 && key < a[j]; j--){\n a[j+1] = a[j];\n a[j] = key;\n }\n }\n }",
"public void insertingANode(T key, E value) {\r\n\t\tRBNode<T, E> insertedNode = createRBNode(key, value);\r\n\t}",
"protected Object atInsert(Object value) {\n return null;\n }",
"@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}",
"public IData insertDataBefore(String key) {\n IData data = new CaseInsensitiveElementList<V>();\n insertBefore(key, data);\n return data;\n }",
"public Entry insert(Object key, Object value) {\n resize();//only if it needs to.\n Entry e = new Entry();\n e.key = key;\n e.value = value;\n int i = compFunction(key.hashCode());\n buckets[i].insertFront(e);\n size++;\n return e;\n }",
"public void insert (String val, Node ptr) {\n\n int toIndex = findKeyIndex(val);\n\n // if not full then just insert the key\n if (!full()) {\n insertSimple(val,ptr,toIndex);\n return;\n }\n // otherwise make a new right sibling for the current node, redistribute.\n Node ns = null;\n if (toIndex>lastindex) {\n ns = new InternalNode(degree,null,val,ptr,next,(Node) this);\n } else {\n ns = new InternalNode(degree, null,keys[lastindex], ptrs[lastindex], next,(Node) this);\t\n lastindex--;\n insertSimple(val,ptr,toIndex);\n }\n\n String toParent = redistribute();\n // recursively insert into parent if exists\n if (getParent()!=null) parentref.getNode().insert(toParent, ns);\t\t\t\t\n else new InternalNode(degree,this,toParent,ns,null,null);\n }",
"public static void Insert(char ch)\n {\n if(first.containsKey(ch))\n first.remove(ch);\n else\n first.put(ch,1);\n\n }",
"@Override\n\tpublic Entry<K, V> insert(K key, V value) throws InvalidKeyException {\n\t\treturn null;\n\t}",
"public TreeNode insert(TreeNode root, int key) {\n if (root == null) {\n root = new TreeNode(key);\n return root;\n }\n TreeNode cur = root, par = root;\n while (cur != null) {\n par = cur;\n if (cur.key == key) {\n return root;\n }\n if (key < cur.key) {\n cur = cur.left;\n } else {\n cur = cur.right;\n }\n }\n // this is when cur is null (out of the while)\n if (key < par.key) {\n par.left = new TreeNode(key);\n } else {\n par.right = new TreeNode(key);\n }\n \n return root;\n }",
"Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;",
"int insert(Position record);",
"@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }",
"public JsStatement insertBefore(String expression)\n\t{\n\t\tchain(ManipulatingHelper.insertBefore(expression));\n\t\treturn this;\n\t}",
"@Override\n public void insert(Comparable k, Object v) {\n\n if (k == null) { // Check for null key\n throw new IllegalArgumentException(\"null key\");\n }\n\n // If size 0, just add pair\n else if (this.size == 0) {\n ls[this.size] = new Pair(k, v);\n this.size++;\n return;\n }\n // If # of items reached capacity\n else if (this.CAPACITY == this.size) {\n Pair[] newLs = new Pair[this.CAPACITY + 100];\n\n // Deep copy of previous Pair[]\n for (int i = 0; i < this.size; i++) {\n if (ls[i].key.equals(k)) {\n throw new RuntimeException(\"duplicate key\");\n }\n newLs[i] = this.ls[i]; // Change this.ls value\n }\n this.ls = newLs; // Change field to new Pair[]\n this.ls[size] = new Pair(k, v); // Add the Pair\n this.CAPACITY += 100; // Increase capacity\n size++;\n return;\n\n } else {\n // Loop to check for duplicate exception\n for (int i = 0; i < this.size; i++) {\n if (ls[i].key.equals(k)) {\n throw new RuntimeException(\"duplicate key\");\n }\n }\n\n // Add pair to array\n ls[this.size] = new Pair(k, v);\n this.size++;\n }\n\n }",
"public void insert(DataItem item){\n\t\tint key = item.getKey();\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key); //get step size until empty cell or -1;\n\t\t\n\t\twhile(hashArray[hashVal] != null &&\n\t\t\t\thashArray[hashVal].getKey() != -1){\n\t\t\thashVal += stepSize; // go to the next cell\n\t\t\thashVal %= arraySize;\t\t\t\t\t//wrap around if necessary\n\t\t}\n\t\thashArray[hashVal] = item;\n\t}",
"public void searchAndInsert(T searchValue, T InsertValue){\n int index = searchByValue(searchValue) + 1;\n addAtIndex(index, InsertValue);\n }",
"public int insert( Map x ) {\n throw new UnsupportedOperationException(\n \"Method insert( Map ) not supported in MRC\" );\n }",
"@Override\n\tpublic void insert() {\n\t\t\n\t}",
"void insert(int key, String data)\n\t\tthrows IllegalArgumentException;",
"@Override\n\tpublic void preInsert() {\n\n\t}",
"public void add(K key,V value) {\n DictionaryPair pair = new DictionaryPair(key,value);\n int index = findPosition(key);\n\n if (index!=DsConst.NOT_FOUND) {\n list.set(index,pair);\n } else {\n list.addLast(pair);\n this.count++;\n }\n }",
"public void insert(char i);",
"public void insertAtPos(int val, int position){\n singlyListNode n = new singlyListNode(val, null);\n singlyListNode ptr = this.head;\n int previous = position - 1;\n //find insertion position\n for (int i = 0 ; i < this.listSize; i ++){\n if (i == position){\n singlyListNode temp = ptr.getNextNode();\n ptr.setNextNode(n);\n n.setNextNode(temp);\n break;\n }\n ptr = ptr.getNextNode();\n }\n this.listSize ++;\n }",
"@SuppressWarnings(\"unchecked\")\r\n private Node insertHelperSize1(Key key, Value value) {\r\n Node tmp;\r\n if(key.compareTo(keys[0]) < 0) { // add key:value before contents\r\n tmp = children[0].insert(key,value);\r\n if(tmp != children[0]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(merge.keys[0],merge.values[0],keys[0],values[0]);\r\n setChildren(merge.children[0],merge.children[1],children[1]);\r\n }\r\n } else { // add key:value after contents\r\n tmp = children[1].insert(key,value);\r\n if(tmp != children[1]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(keys[0],values[0],merge.keys[0],merge.values[0]);\r\n setChildren(children[0],merge.children[0],merge.children[1]);\r\n }\r\n }\r\n return this;\r\n }",
"public void insert(Integer k, Node curr) {\n\t\ttotalNodes++;\n\t\tif (k > curr.getKey()) {\n\t\t\tif (curr.getRight() == null) {\n\t\t\t\tcurr.setRight(new Node(curr, k));\n\t\t\t}\n\t\t} else if (k < curr.getKey()) {\n\t\t\tif (curr.getLeft() == null) {\n\t\t\t\tcurr.setLeft(new Node(curr, k));\n\t\t\t}\n\t\t}\n\n\t}",
"void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}",
"public Key insert(Transaction tx,Tuple t) throws RelationException;",
"public void insertKey(int x){\r\n\t\tSystem.out.println(\"insertKey: Leaf\");\r\n\t\t//check if input is duplicate entry\r\n\t\tif (this.containsKey(x)){\r\n\t\t\tSystem.out.println(\"Error: Duplicate key entry\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//makes sure inputs positive\r\n\t\tif(x<1){\r\n\t\t\tSystem.out.println(\"Input Error: You cannot input a negative value for a key\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ((!this.containsKey(x)) && (!this.isFull())){\r\n\t\t\tkeys[counter]=x;\r\n\t\t\tcounter++;\r\n\t\t\tArrays.sort(keys,0,counter);//sort\r\n\t\t}else if (this.isFull()){\r\n\t\t\tArrays.sort(keys);//sort\r\n\t\t\tBPlusTree.splitChild(this, x);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t}",
"@Override\n\tpublic void insertAttributeAt(final int position) {\n\n\t}",
"public boolean insertOntop(Integer topKey, Integer keytobeInserted, Integer bottomKey) {\n AppLogger.addLogMessage(AppLogger.DEBUG, CLASS_TAG, \"insertOnTop() \", \"actual key value: \"+keytobeInserted.intValue());\n int top = topKey.intValue();\n int actual = keytobeInserted.intValue();\n int bottom = bottomKey.intValue();\n if(actual > bottom){\n return false;\n } else if(actual < top){\n return true;\n }\n //TODO:\n //Here we have to handle else case where actual value is between top and bottom which should not happen\n\n return false;\n }",
"public ExtElement insertBefore(String element, BaseModel value) {\r\n\t\treturn insertBefore(element, value.getJsObj());\r\n\t}",
"public void moveCursorLeft();",
"public void insert(IndexRecord recordValue) {\n int j;\n for (j = next-1 ; j >=0 ; j--) {\n if (data[j].field.compareTo(recordValue.field) < 0) break;\n data[j+1] = data[j];\n }\n data[j+1] = recordValue;\n next++;\n }",
"public void insert(K key, E val) {\n MapEntry<K, E> newEntry = new MapEntry<K, E>(key, val);\n int b = hash(key);\n for (SLLNode<MapEntry<K,E>> curr = buckets[b]; curr != null; curr = curr.succ) {\n if (key.equals(((MapEntry<K, E>) curr.element).key)) {\n curr.element = newEntry;\n return;\n }\n }\n buckets[b] = new SLLNode<MapEntry<K,E>>(newEntry, buckets[b]);\n }",
"private void insertNonFull(BTNode x, DataPair k) {\n int i = x.mCurrentKeyNum-1;\n if (x.mIsLeaf){\n\n // The following loop does two things\n // a) Finds the location of new key to be inserted\n // b) Moves all greater keys to one place ahead\n while (i >= 0 && k.compareTo(x.mKeys[i]) < 0){\n x.mKeys[i+1] = x.mKeys[i];\n i--;\n }\n\n // Insert the new key at found location\n x.mKeys[i+1] = k;\n x.mCurrentKeyNum++;\n }else{\n // Find the child which is going to have the new key\n while (i>= 0 && k.compareTo(x.mKeys[i]) < 0)\n i--;\n\n i++;\n // See if the found child is full\n if (x.mChildren[i].mCurrentKeyNum == 2*t -1){\n splitChild(x,i,x.mChildren[i]);\n if (k.compareTo(x.mKeys[i]) > 0)\n i++;\n }\n insertNonFull(x.mChildren[i], k);\n }\n }",
"public void insertAtBegin(String v) {\n\tElementDPtr e = new ElementDPtr(v,null,head);\n\thead = e;\n\tlength ++;\n\tSystem.out.println(tail.getPrev().getValue() + \" insertB \" + length);\n}",
"public void insertBefore( int pos, T data ) \n {\n \tDLLIterator cycle = new DLLIterator();\n \t\n \t\n if(pos <= 0){\n \t \n \t insertFirst(data);\n }\n \n else if(pos >= capacity){\n \t insertLast(data);\n \t \n } \n \n else{\n \t \n \t int x = 0;\n \t \n \t DLLNode insert = cycle.currentNode;\n \t \n \t while(x != pos){\n \t\t x++;\n \t\t insert = cycle.nextNode();\n \t\t \n \t }\n \t \n \t DLLNode before = insert.prev;\n \t DLLNode newNode = new DLLNode(data, before, insert);\n \t \n \t before.next = newNode;\n \t insert.prev = newNode;\n \t \n }\n \n \t \n \t \n \n }",
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key insertNewKey(int i);",
"public void insert(int val, Node ptr) { // not sure\n\t\tif (full()) {\n\t\t\tNode nextNode = this.getNext();\n\t\t\tInternalNode newNode = new InternalNode(degree, null, val, ptr, nextNode, this);\n\t\t\tthis.next = newNode;\n\t\t\tif (nextNode != null) {\n\t\t\t\tnextNode.prev = newNode;\n\t\t\t}\n\t\t\tint newKey = this.redistribute();\n\n\t\t\tReference theParent = this.getParent();\n\t\t\tif (theParent == null) {\n\t\t\t\tnew InternalNode(degree, this, newKey, newNode, null, null);\n\t\t\t} else {\n\t\t\t\tNode parentNode = theParent.getNode();\n\t\t\t\tparentNode.insert(newKey, newNode);\n\t\t\t}\n\t\t} else {\n\t\t\tint index = findKeyIndex(val);\n\t\t\tif (val > keys[lastindex]) {\n\t\t\t\tindex = this.getLast() + 1;\n\t\t\t}\n\t\t\tthis.insertSimple(val, ptr, index);\n\t\t}\n\t}",
"public boolean insert(Integer key, String value) {\n\t\treturn root.insert(key, value);\n\t}",
"public void insert(int key, Object record) {\n throw new UnsupportedOperationException(\"implement me!\");\n }",
"public void Insert_3(char ch){\n sb.append(ch);\n if(hashMap.containsKey(ch)){\n hashMap.remove(ch);\n }else{\n hashMap.put(ch,ch);\n }\n }",
"void insert(K key, V value) {\r\n\r\n\r\n Node child = getChild(key);\r\n child.insert(key, value);\r\n // to check if the child is overloaded\r\n if (child.isOverflow()) {\r\n Node sibling = child.split();\r\n insertChild(sibling.getFirstLeafKey(), sibling);\r\n }\r\n\r\n // if the node is full then it requires to split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n\r\n }",
"public ExtElement insertBefore(ExtElement element, BaseModel value) {\r\n\t\treturn insertBefore(element, value.getJsObj());\r\n\t}",
"@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }",
"public void insertOneKeyPointer(byte[] new_key, int pointer_id){\n int total_number = prior_key_number + key_number + next_key_number;\n\n if (total_number == key_number){\n\n //node in one block\n if(total_number == M){\n //split\n byte[] old_biggest = getBiggestKey();\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n //add split node to parent node\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G)\n split_node = splitAt(mid-1);\n else\n split_node = splitAt(mid);\n }else{\n split_node = splitAt(mid);\n }\n if(parent_id != 0){\n //insert to left node\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }else{\n if(key_number == 0){\n insertKeyPointer(0,new_key,pointer_id);\n return;\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id,\n node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n updateNextBro(new_node.node_id);\n buffer.addNewNode(new_node);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }else{\n //node in many blocks\n if (total_number == M){\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n if (mid >= key_number + prior_key_number){\n //this node do not split\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n next_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }else if (mid < prior_key_number) {\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n }else{\n byte[] old_biggest = getBiggestKey();\n int old_next_id = next_id;\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G){\n if (mid == prior_key_number){\n //special case - split\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.updateNextBro(0);\n prior_node.updateNextKeyNumber(0);\n prior_node.updateNumberToLeft();\n //bro\n BTreeInternalNode head_node = (BTreeInternalNode) prior_node.getHeadNode();\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(prior_node.right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(node_id);\n prior_node.updateRightBro(node_id);\n\n updatePriorBro(0);\n updatePriorKeyNumber(0);\n updateNumberToRight();\n updateLeftBro(head_node.node_id);\n\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n if(parent_id !=0) {\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(prior_node.getBiggestKey(), head_node.node_id);\n parent_node.updateKeyPointer(getBiggestKey(), null, node_id);\n }else{\n createRootNode(prior_node,this);\n }\n return;\n }\n split_node = splitAt(mid- prior_key_number - 1);\n }\n else\n split_node = splitAt(mid - prior_key_number);\n }else{\n split_node = splitAt(mid - prior_key_number);\n }\n if(parent_id != 0){\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n if(old_next_id != 0)\n parent_node.updateKeyPointer(old_biggest,getBiggestKey(),getHeadNode().node_id);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid - prior_key_number),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }\n }else{\n if(next_id != 0){\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(compare2key(next_node.keys.get(0),new_key) != Util.G) {\n next_node.insertOneKeyPointer(new_key, pointer_id);\n return;\n }\n }\n if(prior_id != 0){\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n if(compare2key(prior_node.keys.get(prior_node.key_number - 1),new_key) != Util.L){\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node;\n Boolean create_new_node = false;\n if(next_id != 0){\n new_node =(BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(new_node.free_space < key_length + 2){\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n }else{\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n if(create_new_node && next_id != 0){\n BTreeNode origin_next_node = buffer.getNode(next_id,DB_name,table_name,index_attrs);\n origin_next_node.updatePriorBro(new_node.node_id);\n new_node.updateNextBro(origin_next_node.node_id);\n new_node.updateNextKeyNumber(origin_next_node.key_number + origin_next_node.next_key_number);\n }\n updateNextBro(new_node.node_id);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }\n }",
"@Test public void putAcc() {\n CSVLine c = new Sorterd();\n final Last a = new Last(\"strike\");\n c = c.put(a);\n azzert.that(c.keys().iterator().next() + \"\", is(\"strike\"));\n }",
"@Override\n public int insert(E value) {\n //noinspection DuplicateStringLiteralInspection\n log.trace(\"Adding '\" + value + \"' to pool '\" + poolName + \"'\");\n int insertPos = Collections.binarySearch(this, value, this);\n if (insertPos >= 0) {\n log.trace(\"Value '\" + value + \"' already exists in pool '\" + poolName + \"'\");\n return -1 * insertPos - 1;\n }\n insertPos = -1 * (insertPos + 1);\n add(insertPos, value); // Positive position\n return insertPos;\n }",
"public void insert(String key, String value) throws KeyCollisionException{\n if( lookup(key) != null){\n throw new KeyCollisionException(\"cannot insert dublicate key\");\n }\n else{\n if( front == null){\n Node N = new Node(key,value);\n front = N;\n numItems++;\n }\n else{\n Node N = front;\n while( N != null){\n if(N.next == null){\n break;\n }\n N = N.next;\n }\n N.next = new Node(key,value);\n numItems++;\n }\n }\n }",
"public void Insert(char ch)\n {\n Integer cnt= (Integer) map.get(ch);\n if(cnt==null){\n map.put(ch,1);\n }else{\n map.put(ch,cnt+1);\n }\n list.add(ch);\n }",
"public void Insert_2(char ch){\n sb.append(ch);\n if(map.containsKey(ch)){\n map.remove(ch);\n }else{\n map.put(ch,ch);\n }\n }",
"public void insertBefore(int value, int newVal) {\n try {\n ListNode nodeValue = new ListNode(value);\n ListNode newValue = new ListNode(newVal);\n ListNode current = this.root;\n\n while (current.data != value) {\n current = current.next;\n }\n newValue.next = current.next;\n current.next = newValue;\n } catch (NullPointerException e) {\n System.out.println(\"You have reached the end of the list.\");\n }\n }",
"public void insert(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null){\n\t\t\tif (currentNode.getKey() == key){\n\t\t\t\tSystem.out.println(\"This value already exists in the tree!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\t// once we reached the bottom of the tree, we insert the new node.\n\t\t// to do that we need to know the leaf node which is stored in the BSTNode parent\n\t\t// by comparing with its value, we know which side to insert the new node.\n\t\tif (key < parent.getKey()){\n\t\t\tparent.setLeft(new BSTNode(key, null, null));\n\t\t}else{\n\t\t\tparent.setRight(new BSTNode(key, null, null));\n\t\t}\n\t\tsize++;\n\t}",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"public void insert(int value){\n linkedList.insertLast(value);\n }",
"@Override\n protected final Void updateKeyAfterInsert(SupervisionstandardParagraph entity, long rowId) {\n return null;\n }",
"public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }"
]
| [
"0.6545065",
"0.64268446",
"0.62133974",
"0.6121285",
"0.60550725",
"0.6010797",
"0.596927",
"0.5896668",
"0.5847738",
"0.5823803",
"0.5823803",
"0.5815233",
"0.5811356",
"0.58027303",
"0.5782736",
"0.577597",
"0.5739579",
"0.56863976",
"0.56531334",
"0.5590476",
"0.5589747",
"0.5581527",
"0.5570231",
"0.5557523",
"0.5535483",
"0.5527693",
"0.5517418",
"0.55170965",
"0.55108225",
"0.5506568",
"0.54939914",
"0.54846925",
"0.5478521",
"0.54759455",
"0.54624313",
"0.5452128",
"0.5443629",
"0.5437767",
"0.5431981",
"0.54182553",
"0.535491",
"0.5350307",
"0.53156966",
"0.5270827",
"0.5265184",
"0.52593833",
"0.5258119",
"0.5252954",
"0.5246674",
"0.52379",
"0.523732",
"0.5233974",
"0.5227399",
"0.5208258",
"0.5200575",
"0.5200097",
"0.5197109",
"0.5196203",
"0.5194445",
"0.5190065",
"0.5183953",
"0.51725554",
"0.5170899",
"0.5166971",
"0.5149119",
"0.5143443",
"0.5133817",
"0.51282364",
"0.5120347",
"0.51110834",
"0.51108426",
"0.5110157",
"0.5106522",
"0.5104577",
"0.51041585",
"0.5101566",
"0.509814",
"0.5097124",
"0.509359",
"0.5086552",
"0.5086188",
"0.50832",
"0.5080771",
"0.5079839",
"0.50791276",
"0.50690544",
"0.50677574",
"0.50603634",
"0.5058087",
"0.5055744",
"0.50554657",
"0.5053667",
"0.5052255",
"0.5051264",
"0.50494653",
"0.50490725",
"0.5047949",
"0.50429475",
"0.5031317",
"0.5022241"
]
| 0.6662596 | 0 |
Inserts the key value pair after the cursor's current position. | @SuppressWarnings("unchecked")
public void insertAfter(String key, Object value) {
iterator.add(new CaseInsensitiveElement<V>(key, (V)value));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}",
"void insert(Object value, int position);",
"public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }",
"void insert(T value, int position);",
"public void insert(KeyedItem newItem);",
"public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }",
"abstract void insert(K key, V value);",
"abstract void insert(K key, V value);",
"T put(CharSequence key, int pos, T addValue)\n\t\t{\n\t\t\tNode<T> nextNode;\n\t\t\tCharacter ch;\n\t\t\tT old;\n\n\t\t\tif(key.length() == pos)\n\t\t\t{\t// at terminating node\n\t\t\t\told = value;\n\t\t\t\tsetValue(addValue);\n\t\t\t\treturn old;\n\t\t\t}\n\t\t\tch = key.charAt(pos);\n\t\t\tif(nextMap == null)\n\t\t\t{\n\t\t\t\tnextMap = newNodeMap();\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch, nextNode);\n\t\t\t}\n\t\t\telse if((nextNode = nextMap.get(ch))==null)\n\t\t\t{\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch,nextNode);\n\t\t\t}\n\t\t\treturn nextNode.put(key,pos+1,addValue);\n\t\t}",
"public void insert( final char c ) {\n\t\tbuffer.insert( cursor++, c );\n\t}",
"void insert(EntryPair entry);",
"public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }",
"@SuppressWarnings(\"unchecked\")\n public void insertBefore(String key, Object value) {\n previous();\n iterator.add(new CaseInsensitiveElement<V>(key, (V)value));\n next();\n }",
"Object insert(String key, Object param);",
"@Override\r\n\tpublic void addKeyValuePair(String key, String value) {\r\n\t\t\r\n\t\t// if key is empty\r\n if (key == null || key.equals(\" \") || value == null || value.equals(\" \")) {\r\n System.out.println(\"Key cannot be Empty\");\r\n return;\r\n }\r\n // create new Node to be inserted\r\n Node newNode = new Node(new Data(key, value));\r\n // call recursive function traverse from root to correct Position to add newNode\r\n this.root = insertRecursively(this.root, newNode);\r\n return;\r\n\t\t\r\n\t}",
"private HashEntry(K insertKey, V insertValue)\r\n\t\t{\r\n\t\t\tkey = insertKey;\r\n\t\t\tvalue.add(insertValue);\r\n\t\t}",
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"public native String insertItemBefore(String newItem, Number index);",
"Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;",
"public void insertAfter(SequiturSymbol toInsert){\n join(toInsert,n);\n join(this,toInsert);\n }",
"void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}",
"public void add(K key,V value) {\n DictionaryPair pair = new DictionaryPair(key,value);\n int index = findPosition(key);\n\n if (index!=DsConst.NOT_FOUND) {\n list.set(index,pair);\n } else {\n list.addLast(pair);\n this.count++;\n }\n }",
"void insert(int pos, String s);",
"public abstract boolean insert(Key key);",
"void insert(int idx, int val);",
"public void insertLast(int key, int value) {\n\t\t\tcount ++;\r\n\t\t\tif (last == null) {\r\n\t\t\t\tlast = new Node(key, value, null,null);\r\n\t\t\t\tfirst = last;\r\n\t\t\t}\r\n\t\t\t// put the new value after the last; and the last become the new value\r\n\t\t\telse {\r\n\t\t\t last.next = new Node(key, value, last, null);\r\n\t\t\t last = last.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }",
"public void insertAtCurrentPos(String part)\n {\n StringBuffer newLine = new StringBuffer( this.getLine() );\n\n newLine.insert( this.getPos(), part + ' ' );\n this.line = newLine.toString();\n }",
"void insert(String delta) {\n \n if (!acceptInsert(delta)) {\n clear();\n } \n \n int cursor = mDisplay.getSelectionStart();\n mDisplay.getText().insert(cursor, delta);\n \n }",
"public void insert(KeyedItem o){\r\n\t\tinsert(this,o);\r\n\t}",
"public void Insert(char ch)\n {\n if (map[ch] == -1) {\n map[ch] = pos;\n }\n else {\n map[ch] = -2;\n } \n pos ++;\n }",
"public void insert (String val, Node ptr) {\n\n int toIndex = findKeyIndex(val);\n\n // if not full then just insert the key\n if (!full()) {\n insertSimple(val,ptr,toIndex);\n return;\n }\n // otherwise make a new right sibling for the current node, redistribute.\n Node ns = null;\n if (toIndex>lastindex) {\n ns = new InternalNode(degree,null,val,ptr,next,(Node) this);\n } else {\n ns = new InternalNode(degree, null,keys[lastindex], ptrs[lastindex], next,(Node) this);\t\n lastindex--;\n insertSimple(val,ptr,toIndex);\n }\n\n String toParent = redistribute();\n // recursively insert into parent if exists\n if (getParent()!=null) parentref.getNode().insert(toParent, ns);\t\t\t\t\n else new InternalNode(degree,this,toParent,ns,null,null);\n }",
"public void insertAfter(String value, StringListIterator position)\n {\n\tStringListNode node = new StringListNode(value, position.node, position.node.next);\n\tposition.node.next = node;\n\tif (tail == position.node) {\n\t tail = node;\n\t}\n\telse {\n\t node.next.prev = node;\n\t}\n }",
"void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }",
"@Override\n public void insert(Comparable k, Object v) {\n\n if (k == null) { // Check for null key\n throw new IllegalArgumentException(\"null key\");\n }\n\n // If size 0, just add pair\n else if (this.size == 0) {\n ls[this.size] = new Pair(k, v);\n this.size++;\n return;\n }\n // If # of items reached capacity\n else if (this.CAPACITY == this.size) {\n Pair[] newLs = new Pair[this.CAPACITY + 100];\n\n // Deep copy of previous Pair[]\n for (int i = 0; i < this.size; i++) {\n if (ls[i].key.equals(k)) {\n throw new RuntimeException(\"duplicate key\");\n }\n newLs[i] = this.ls[i]; // Change this.ls value\n }\n this.ls = newLs; // Change field to new Pair[]\n this.ls[size] = new Pair(k, v); // Add the Pair\n this.CAPACITY += 100; // Increase capacity\n size++;\n return;\n\n } else {\n // Loop to check for duplicate exception\n for (int i = 0; i < this.size; i++) {\n if (ls[i].key.equals(k)) {\n throw new RuntimeException(\"duplicate key\");\n }\n }\n\n // Add pair to array\n ls[this.size] = new Pair(k, v);\n this.size++;\n }\n\n }",
"public Node insertAfter(Node node);",
"public void insertingANode(T key, E value) {\r\n\t\tRBNode<T, E> insertedNode = createRBNode(key, value);\r\n\t}",
"public String insertAfter(String v) {\n\t\t\t\t\tString result=\"\";\n\t\t\t\t\treturn result ;\n\t\t\t\t}",
"public void insertToken(Token tok) {\r\n\t}",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }",
"public void insert(int value){\n linkedList.insertLast(value);\n }",
"public void insert(DataItem item){\n\t\tint key = item.getKey();\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key); //get step size until empty cell or -1;\n\t\t\n\t\twhile(hashArray[hashVal] != null &&\n\t\t\t\thashArray[hashVal].getKey() != -1){\n\t\t\thashVal += stepSize; // go to the next cell\n\t\t\thashVal %= arraySize;\t\t\t\t\t//wrap around if necessary\n\t\t}\n\t\thashArray[hashVal] = item;\n\t}",
"public void insert(char i);",
"public Entry insert(Object key, Object value) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n Entry entry = new Entry();\n entry.key = key;\n entry.value = value;\n\n defTable[index].insertFront(entry);\n size++;\n return entry;\n }",
"public void insertAfterCurernt(T aData){\r\n if(curr == null){\r\n return;\r\n }\r\n curr.link = new ListNode(aData,curr.link);\r\n }",
"public IData insertDataAfter(String key) {\n IData data = new CaseInsensitiveElementList<V>();\n insertAfter(key, data);\n return data;\n }",
"@Override\n\tpublic void insert() {\n\t\t\n\t}",
"public void Insert_2(char ch){\n sb.append(ch);\n if(map.containsKey(ch)){\n map.remove(ch);\n }else{\n map.put(ch,ch);\n }\n }",
"int insert(Position record);",
"public void insert(int val, Node ptr) { // not sure\n\t\tif (full()) {\n\t\t\tNode nextNode = this.getNext();\n\t\t\tInternalNode newNode = new InternalNode(degree, null, val, ptr, nextNode, this);\n\t\t\tthis.next = newNode;\n\t\t\tif (nextNode != null) {\n\t\t\t\tnextNode.prev = newNode;\n\t\t\t}\n\t\t\tint newKey = this.redistribute();\n\n\t\t\tReference theParent = this.getParent();\n\t\t\tif (theParent == null) {\n\t\t\t\tnew InternalNode(degree, this, newKey, newNode, null, null);\n\t\t\t} else {\n\t\t\t\tNode parentNode = theParent.getNode();\n\t\t\t\tparentNode.insert(newKey, newNode);\n\t\t\t}\n\t\t} else {\n\t\t\tint index = findKeyIndex(val);\n\t\t\tif (val > keys[lastindex]) {\n\t\t\t\tindex = this.getLast() + 1;\n\t\t\t}\n\t\t\tthis.insertSimple(val, ptr, index);\n\t\t}\n\t}",
"protected void insertBeginning(T value) {\r\n\t\tthis.getHead().setPrev(new SNode<T>(value, this.getHead().getPrev()));\r\n\t\tthis.size++;\r\n\t}",
"private static void writePair(final StringBuffer buffer, final String key,\n \t\t\tfinal String value) {\n \t\tbuffer.append(key);\n \t\tbuffer.append('=');\n \t\tbuffer.append(value.replace(\"\\\\\", \"\\\\\\\\\").replace(\">\", \"\\\\>\").replace(\n \t\t\t\t\"<\", \"\\\\<\"));\n \t\tbuffer.append(\"\\\\p\");\n \t}",
"public void moveCursorRight();",
"@Test public void putAcc() {\n CSVLine c = new Sorterd();\n final Last a = new Last(\"strike\");\n c = c.put(a);\n azzert.that(c.keys().iterator().next() + \"\", is(\"strike\"));\n }",
"@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }",
"public void insert (k key, v val) {\n\t\tint b = hash(key);\n\t\tNode<k,v> curr = buckets[b];\n\t\t\n\t\twhile (curr != null) {\t\n\t\t\tif (key.equals(curr.getKey()) && val.equals(curr.getValue())) { \n\t\t\t\t\n\t\t\t\tSystem.err.println(\"Pair \" + key + \" \" + val + \" already exists\");\n\t\t\t\treturn;\t\t\t\t\t\t\t\t// if both key and value already exist, terminate\n\t\t\t}\n\t\t\telse if (curr.getNext() == null) {\t\t// if reached last element, append the new node to the end\n\t\t\t\tcurr.setNext(key, val);\n\t\t\t\treturn; \n\t\t\t}\n\t\t\tcurr = curr.getNext();\t\t\t\t\t// propagate on the SLL until key and value matched or end of SLL reached\n\t\t}\n\t\tbuckets[b] = new Node<k,v>(key, val, null);\t// if there are no nodes at the hashed index, place the new node there\n\t}",
"private void insercionOrdenada(BTreeNode<T> currentNode, T t) {\n int indexNewKey = findChildOrIndex(currentNode, (I)t.getId());\n\n for (int i = currentNode.getNumKeys() - 1; i >= indexNewKey; i--) {\n currentNode.setKey(currentNode.getKey(i), i + 1);\n }\n\n currentNode.setKey(t, indexNewKey);\n\n currentNode.increaseNumKeys();\n }",
"public void cursorUp() throws IndexOutOfBoundsException {\n if(cursor <= 0)\n throw new IndexOutOfBoundsException(\"Exception: Cursor is currently at line \"+cursor);\n //Setting the cursor to be the text line before its current position.\n cursor--;\n }",
"@Override\n protected final Void updateKeyAfterInsert(SupervisionstandardParagraph entity, long rowId) {\n return null;\n }",
"public void addData(Key key, Value value) {\r\n\t\t\tdata.reset();\r\n\t\t\t\r\n\t\t\t//if no data or should be placed first\r\n\t\t\tif (data.size() == 0 || data.get().getKey().compareTo(key) > 0) \r\n\t\t\t\tdata.insert(new KeyValuePair<Key, Value>(key, value));\r\n\t\t\telse {\r\n\t\t\t\t//find insert position\r\n\t\t\t\twhile (data.hasNext()) {\r\n\t\t\t\t\tif (data.next().getKey().compareTo(key) > 0) break;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//if before last\r\n\t\t\t\tif (data.get().getKey().compareTo(key) > 0) \r\n\t\t\t\t\tdata.insert(new KeyValuePair<Key, Value>(key, value));\r\n\t\t\t\t//if after last\r\n\t\t\t\telse\r\n\t\t\t\t\tdata.add(new KeyValuePair<Key, Value>(key, value));\r\n\t\t\t}\r\n\t\t}",
"void insert(int key, String data)\n\t\tthrows IllegalArgumentException;",
"@Override\r\n\tpublic void insert(Map<String, String> map) {\n\t\t\r\n\t}",
"Position<T> addLast(T data);",
"Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;",
"@Override\n\tpublic Position insertAfter(Position p, Object element) throws InvalidPositionException {\n\t\treturn null;\n\t}",
"public void Insert_3(char ch){\n sb.append(ch);\n if(hashMap.containsKey(ch)){\n hashMap.remove(ch);\n }else{\n hashMap.put(ch,ch);\n }\n }",
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key insertNewKey(int i);",
"@SuppressWarnings(\"unchecked\")\r\n private Node insertHelperSize1(Key key, Value value) {\r\n Node tmp;\r\n if(key.compareTo(keys[0]) < 0) { // add key:value before contents\r\n tmp = children[0].insert(key,value);\r\n if(tmp != children[0]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(merge.keys[0],merge.values[0],keys[0],values[0]);\r\n setChildren(merge.children[0],merge.children[1],children[1]);\r\n }\r\n } else { // add key:value after contents\r\n tmp = children[1].insert(key,value);\r\n if(tmp != children[1]) { // merge interior node that bubbled up\r\n InteriorNode merge = (InteriorNode)tmp;\r\n setKeyValuePairs(keys[0],values[0],merge.keys[0],merge.values[0]);\r\n setChildren(children[0],merge.children[0],merge.children[1]);\r\n }\r\n }\r\n return this;\r\n }",
"public boolean insert(Object KV_pair,String avd) // making this also synchronized -- bad idea -- raja may 8\n {\n \t/**\n \t * lock the DB when inserting -- query also uses this -- \n \t * To keep Query section from querying \n \t */\n \t \n\t\tsynchronized (_DBWRITE_Lock)\n\t\t{\n\t\t\tlong rowID = 0l;\n\t\t\tContentValues newValues = null;\n\t\t\tif(KV_pair instanceof String[])\n\t\t\t{\n\t\t\t\tnewValues = new ContentValues();\n\t\t\t\tString[] KV = (String[])KV_pair;\n\t\t\t\tnewValues.put(KEY_FIELD,(String)KV[0]);\n\t\t\t\tnewValues.put(VALUE_FIELD,(String)KV[1]);\n\t\t\t\t// insert or replace -- handle that\n\t\t\t\trowID = sqliteDB.insert(tableName, \"\", newValues);\n\t\t\t\t/*if(rowID < 0)\n\t\t\t\t{\n\t\t\t\t\trowID = sqliteDB.replace(tableName, \"\", newValues);\n\t\t\t\t}*/\n\t\t\t\t Log.v(\"window_shopper\", \"ins:\"+KV[0]+\"::\"+KV[1]+\" --- \"+rowID); // notify user debug statement\n\t\t\t}\n\t\t\telse if(KV_pair instanceof Hashtable) // when recovery happens !! FIXME -- RAJA\n\t\t\t{\n\t\t\t\tHashtable<String, String> values = (Hashtable<String, String>)KV_pair;\n\t\t\t\tSet<String> keys = values.keySet();\n\t\t\t\tfor(String key : keys)\n\t\t\t\t{\n\t\t\t\t\tnewValues = new ContentValues();\n\t\t\t\t\tnewValues.put(KEY_FIELD,key);\n\t\t\t\t\tnewValues.put(VALUE_FIELD,values.get(key));\n\t\t\t\t\trowID = sqliteDB.insert(tableName, \"\", newValues);\n\t\t\t\t\t// replace only if from predecessor\n\t\t\t\t\t/*if(rowID < 0) \n\t\t\t\t\t{\n\t\t\t\t\t\trowID = sqliteDB.replace(tableName, \"\", newValues);\n\t\t\t\t\t}*/\n\t\t\t\t\tLog.v(\"window_shopper\", \"ins:\"+key+\"::\"+values.get(key)+\" --- \"+rowID); // notify user debug statement\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(rowID < 0)\n\t {\n\t \tLog.e(\"window_shopper\"+\" insert\",\"INSERT FAIL\");\n\t \treturn false; //FIXME-- interpretation problems\n\t }\n\t return true;\n\t\t}\n\t}",
"public Key insert(Transaction tx,Tuple t) throws RelationException;",
"@Override\n\tpublic Entry<K, V> insert(K key, V value) throws InvalidKeyException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void insertChar(char c)\n\t{\n\t\tleft.push(c);\n\t}",
"@Override\n\tpublic Position insertLast(Object element) {\n\t\treturn null;\n\t}",
"public Entry insert(Object key, Object value) {\n resize();//only if it needs to.\n Entry e = new Entry();\n e.key = key;\n e.value = value;\n int i = compFunction(key.hashCode());\n buckets[i].insertFront(e);\n size++;\n return e;\n }",
"public void insertAtBack(L insertItem){\n\t\tListNode node = new ListNode(insertItem);\n\t\tif(isEmpty()) //firstNode and lastNode refer to same Object\n\t\tfirstNode = lastNode = node;\n\t\telse{ //lastNode's nextNode refers to new node\n\t\t\tlastNode.nextNode = node;\n\t\t\tlastNode = node;\n\t\t\t//you can replace the two previous lines with this line: lastNode = lastNode.nextNode = new ListNode( insertItem );\n\t\t}\n\t}",
"public void searchAndInsert(T searchValue, T InsertValue){\n int index = searchByValue(searchValue) + 1;\n addAtIndex(index, InsertValue);\n }",
"public boolean insert(Integer key, String value) {\n\t\treturn root.insert(key, value);\n\t}",
"private void insert(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n LivenessInfo info,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info);\n PartitionUpdate upd = partitionUpdate(valueKey, row);\n indexCfs.getWriteHandler().write(upd, ctx, false);\n logger.debug(\"Inserted entry into index for value {}\", valueKey);\n }",
"public Position<E> insertRight(Position<E> v, E e) throws InvalidPositionException;",
"public void insertAfterCurrent(T aData) {\r\n\t\t// Can't insert if there is nothing at current\r\n\t\tif (curr == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tListNode newNode = new ListNode(aData, curr.link);\r\n\t\tif (curr != null && prev == null) { // at the head\r\n\t\t\thead.link = newNode; // curr.link = newNode;\r\n\t\t} else if (curr != null && prev != null) { // If it's in the middle\r\n\t\t\tcurr.link = newNode;\r\n\t\t}\r\n\r\n\t}",
"public void insert(int key, Object record) {\n throw new UnsupportedOperationException(\"implement me!\");\n }",
"public void insertOneKeyPointer(byte[] new_key, int pointer_id){\n int total_number = prior_key_number + key_number + next_key_number;\n\n if (total_number == key_number){\n\n //node in one block\n if(total_number == M){\n //split\n byte[] old_biggest = getBiggestKey();\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n //add split node to parent node\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G)\n split_node = splitAt(mid-1);\n else\n split_node = splitAt(mid);\n }else{\n split_node = splitAt(mid);\n }\n if(parent_id != 0){\n //insert to left node\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }else{\n if(key_number == 0){\n insertKeyPointer(0,new_key,pointer_id);\n return;\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id,\n node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n updateNextBro(new_node.node_id);\n buffer.addNewNode(new_node);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }else{\n //node in many blocks\n if (total_number == M){\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n if (mid >= key_number + prior_key_number){\n //this node do not split\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n next_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }else if (mid < prior_key_number) {\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n }else{\n byte[] old_biggest = getBiggestKey();\n int old_next_id = next_id;\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G){\n if (mid == prior_key_number){\n //special case - split\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.updateNextBro(0);\n prior_node.updateNextKeyNumber(0);\n prior_node.updateNumberToLeft();\n //bro\n BTreeInternalNode head_node = (BTreeInternalNode) prior_node.getHeadNode();\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(prior_node.right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(node_id);\n prior_node.updateRightBro(node_id);\n\n updatePriorBro(0);\n updatePriorKeyNumber(0);\n updateNumberToRight();\n updateLeftBro(head_node.node_id);\n\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n if(parent_id !=0) {\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(prior_node.getBiggestKey(), head_node.node_id);\n parent_node.updateKeyPointer(getBiggestKey(), null, node_id);\n }else{\n createRootNode(prior_node,this);\n }\n return;\n }\n split_node = splitAt(mid- prior_key_number - 1);\n }\n else\n split_node = splitAt(mid - prior_key_number);\n }else{\n split_node = splitAt(mid - prior_key_number);\n }\n if(parent_id != 0){\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n if(old_next_id != 0)\n parent_node.updateKeyPointer(old_biggest,getBiggestKey(),getHeadNode().node_id);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid - prior_key_number),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }\n }else{\n if(next_id != 0){\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(compare2key(next_node.keys.get(0),new_key) != Util.G) {\n next_node.insertOneKeyPointer(new_key, pointer_id);\n return;\n }\n }\n if(prior_id != 0){\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n if(compare2key(prior_node.keys.get(prior_node.key_number - 1),new_key) != Util.L){\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node;\n Boolean create_new_node = false;\n if(next_id != 0){\n new_node =(BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(new_node.free_space < key_length + 2){\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n }else{\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n if(create_new_node && next_id != 0){\n BTreeNode origin_next_node = buffer.getNode(next_id,DB_name,table_name,index_attrs);\n origin_next_node.updatePriorBro(new_node.node_id);\n new_node.updateNextBro(origin_next_node.node_id);\n new_node.updateNextKeyNumber(origin_next_node.key_number + origin_next_node.next_key_number);\n }\n updateNextBro(new_node.node_id);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }\n }",
"private void insertNonFull(BTNode x, DataPair k) {\n int i = x.mCurrentKeyNum-1;\n if (x.mIsLeaf){\n\n // The following loop does two things\n // a) Finds the location of new key to be inserted\n // b) Moves all greater keys to one place ahead\n while (i >= 0 && k.compareTo(x.mKeys[i]) < 0){\n x.mKeys[i+1] = x.mKeys[i];\n i--;\n }\n\n // Insert the new key at found location\n x.mKeys[i+1] = k;\n x.mCurrentKeyNum++;\n }else{\n // Find the child which is going to have the new key\n while (i>= 0 && k.compareTo(x.mKeys[i]) < 0)\n i--;\n\n i++;\n // See if the found child is full\n if (x.mChildren[i].mCurrentKeyNum == 2*t -1){\n splitChild(x,i,x.mChildren[i]);\n if (k.compareTo(x.mKeys[i]) > 0)\n i++;\n }\n insertNonFull(x.mChildren[i], k);\n }\n }",
"private void addKeyToTuple(Tuple tuple, ByteBuffer key, CfDef cfDef, AbstractType comparator) throws IOException\n {\n if( comparator instanceof AbstractCompositeType )\n {\n StorageHelper.setTupleValue(tuple, 0, composeComposite((AbstractCompositeType) comparator, key));\n }\n else\n {\n StorageHelper.setTupleValue(tuple, 0, StorageHelper.cassandraToObj(getDefaultMarshallers(cfDef).get(MarshallerType.KEY_VALIDATOR), key, nativeProtocolVersion));\n }\n\n }",
"public void insert(String key, String value) throws KeyCollisionException{\n Node N, A, B;\n if(findKey(root, key)!=null){\n throw new KeyCollisionException(\"Dictionary Error: insert() cannot insert duplicate keys\");\n }\n N = new Node(new Pair(key, value));\n B = null;\n A = root;\n while( A != null ){\n B = A;\n if(A.item.key.compareToIgnoreCase(key)>0) A = A.left;\n else A = A.right;\n }\n \n if( B == null ) root = N;\n else if(B.item.key.compareToIgnoreCase(key)>0) B.left = N;\n else B.right = N;\n numItems++;\n }",
"protected Object atInsert(Object value) {\n return null;\n }",
"public void insert(K key, E val) {\n MapEntry<K, E> newEntry = new MapEntry<K, E>(key, val);\n int b = hash(key);\n for (SLLNode<MapEntry<K,E>> curr = buckets[b]; curr != null; curr = curr.succ) {\n if (key.equals(((MapEntry<K, E>) curr.element).key)) {\n curr.element = newEntry;\n return;\n }\n }\n buckets[b] = new SLLNode<MapEntry<K,E>>(newEntry, buckets[b]);\n }",
"public void insert(String newitem) {\n\t\t// TODO Write me!\n\t\t\n\t}",
"public boolean insert(int val) {\n if (val2Index.containsKey(val)) return false;\n // 新元素插入到最后\n data.add(val);\n val2Index.put(val, data.size() - 1);\n return true;\n }",
"public void insertAtEnd(Employee e) {\n\t}",
"public void put(Key key,Value value){\n\t\troot = insert(root,key,value);\n\t}",
"public void insert(ValueType element) {\r\n // TODO\r\n }",
"int insert(DictDoseUnit record);",
"void insertItem(Position position, IItem item);",
"void insert(K key, V value) {\r\n\r\n\r\n Node child = getChild(key);\r\n child.insert(key, value);\r\n // to check if the child is overloaded\r\n if (child.isOverflow()) {\r\n Node sibling = child.split();\r\n insertChild(sibling.getFirstLeafKey(), sibling);\r\n }\r\n\r\n // if the node is full then it requires to split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n\r\n }",
"public synchronized void append(K key, V val) throws IOException {\n\n\t\t\tlong pos = data.sync();\n\t\t\t// Only write an index if we've changed positions. In a block compressed\n\t\t\t// file, this means we write an entry at the start of each block\n\t\t\t// position.set(pos); // point to current eof\n\t\t\tindex.append(new Pair<K, Long>(key, keySchema, pos, Schema\n\t\t\t\t\t.create(Type.LONG)));\n\n\t\t\tdata.append(new Pair<K, V>(key, keySchema, val, valueSchema)); // append\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// key/value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to data\n\t\t\tsize++;\n\t\t}",
"@Override\n public Uri insert(Uri uri, ContentValues values) {\n while(flag)\n {}\n Log.i(\"insert\",values.getAsString(\"key\"));\n insertKeysToNode(values.getAsString(\"key\"), values.getAsString(\"value\"));\n return null;\n }"
]
| [
"0.6654868",
"0.62627774",
"0.6085834",
"0.59265965",
"0.5804589",
"0.5800378",
"0.5779413",
"0.5779413",
"0.5762144",
"0.5732306",
"0.57293296",
"0.5705555",
"0.56491464",
"0.56444055",
"0.5596228",
"0.55599767",
"0.55170006",
"0.54969877",
"0.5477753",
"0.5457748",
"0.5454623",
"0.54412735",
"0.54396117",
"0.5429418",
"0.53947735",
"0.53896123",
"0.5372493",
"0.53719926",
"0.535763",
"0.53526115",
"0.5320149",
"0.53173864",
"0.5303383",
"0.52796626",
"0.52451044",
"0.51828724",
"0.51828223",
"0.5182244",
"0.5173134",
"0.5168037",
"0.5163068",
"0.51500094",
"0.5146853",
"0.5135005",
"0.51228434",
"0.5122662",
"0.5113869",
"0.51125133",
"0.5111721",
"0.5086815",
"0.5083956",
"0.50766975",
"0.5066635",
"0.5061822",
"0.5047626",
"0.5045473",
"0.5042105",
"0.5042018",
"0.5041249",
"0.5024477",
"0.501969",
"0.5018526",
"0.5017546",
"0.5014806",
"0.50104016",
"0.5009053",
"0.5006974",
"0.5006514",
"0.50031155",
"0.5002617",
"0.5001927",
"0.4993105",
"0.49879164",
"0.49873826",
"0.49789435",
"0.4976662",
"0.49754372",
"0.49731463",
"0.4971077",
"0.49636757",
"0.496279",
"0.49538714",
"0.49530718",
"0.49417904",
"0.49400514",
"0.49377736",
"0.4931524",
"0.49301997",
"0.49298793",
"0.49284357",
"0.49265572",
"0.49228254",
"0.4919123",
"0.4918163",
"0.4917018",
"0.49160576",
"0.49151683",
"0.49078116",
"0.49061444",
"0.49008182"
]
| 0.6300298 | 1 |
Inserts the key with a new IData document before the cursor's current position. | public IData insertDataBefore(String key) {
IData data = new CaseInsensitiveElementList<V>();
insertBefore(key, data);
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key insertNewKey(int i);",
"public abstract boolean insert(Key key);",
"public void insert(KeyedItem newItem);",
"public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}",
"void insert(int key, String data)\n\t\tthrows IllegalArgumentException;",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"public void insert(int key, Object record) {\n throw new UnsupportedOperationException(\"implement me!\");\n }",
"@Override\n protected final Void updateKeyAfterInsert(SupervisionstandardParagraph entity, long rowId) {\n return null;\n }",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }",
"public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}",
"public void insertOneKeyPointer(byte[] new_key, int pointer_id){\n int total_number = prior_key_number + key_number + next_key_number;\n\n if (total_number == key_number){\n\n //node in one block\n if(total_number == M){\n //split\n byte[] old_biggest = getBiggestKey();\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n //add split node to parent node\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G)\n split_node = splitAt(mid-1);\n else\n split_node = splitAt(mid);\n }else{\n split_node = splitAt(mid);\n }\n if(parent_id != 0){\n //insert to left node\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }else{\n if(key_number == 0){\n insertKeyPointer(0,new_key,pointer_id);\n return;\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id,\n node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n updateNextBro(new_node.node_id);\n buffer.addNewNode(new_node);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }else{\n //node in many blocks\n if (total_number == M){\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n if (mid >= key_number + prior_key_number){\n //this node do not split\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n next_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }else if (mid < prior_key_number) {\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n }else{\n byte[] old_biggest = getBiggestKey();\n int old_next_id = next_id;\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G){\n if (mid == prior_key_number){\n //special case - split\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.updateNextBro(0);\n prior_node.updateNextKeyNumber(0);\n prior_node.updateNumberToLeft();\n //bro\n BTreeInternalNode head_node = (BTreeInternalNode) prior_node.getHeadNode();\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(prior_node.right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(node_id);\n prior_node.updateRightBro(node_id);\n\n updatePriorBro(0);\n updatePriorKeyNumber(0);\n updateNumberToRight();\n updateLeftBro(head_node.node_id);\n\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n if(parent_id !=0) {\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(prior_node.getBiggestKey(), head_node.node_id);\n parent_node.updateKeyPointer(getBiggestKey(), null, node_id);\n }else{\n createRootNode(prior_node,this);\n }\n return;\n }\n split_node = splitAt(mid- prior_key_number - 1);\n }\n else\n split_node = splitAt(mid - prior_key_number);\n }else{\n split_node = splitAt(mid - prior_key_number);\n }\n if(parent_id != 0){\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n if(old_next_id != 0)\n parent_node.updateKeyPointer(old_biggest,getBiggestKey(),getHeadNode().node_id);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid - prior_key_number),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }\n }else{\n if(next_id != 0){\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(compare2key(next_node.keys.get(0),new_key) != Util.G) {\n next_node.insertOneKeyPointer(new_key, pointer_id);\n return;\n }\n }\n if(prior_id != 0){\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n if(compare2key(prior_node.keys.get(prior_node.key_number - 1),new_key) != Util.L){\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node;\n Boolean create_new_node = false;\n if(next_id != 0){\n new_node =(BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(new_node.free_space < key_length + 2){\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n }else{\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n if(create_new_node && next_id != 0){\n BTreeNode origin_next_node = buffer.getNode(next_id,DB_name,table_name,index_attrs);\n origin_next_node.updatePriorBro(new_node.node_id);\n new_node.updateNextBro(origin_next_node.node_id);\n new_node.updateNextKeyNumber(origin_next_node.key_number + origin_next_node.next_key_number);\n }\n updateNextBro(new_node.node_id);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }\n }",
"public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}",
"public void insert(VertexRecord key) {\n throw new UnsupportedOperationException();\n }",
"public native String insertItemBefore(String newItem, Number index);",
"public IData insertDataAfter(String key) {\n IData data = new CaseInsensitiveElementList<V>();\n insertAfter(key, data);\n return data;\n }",
"@Override\n public void insert(K key) {\n try {\n this.rootNode = insertNode(this.rootNode, key);\n } catch (DuplicateKeyException e) {\n System.out.println(e.getMessage());\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }",
"@SuppressWarnings(\"unchecked\")\n public void insertBefore(String key, Object value) {\n previous();\n iterator.add(new CaseInsensitiveElement<V>(key, (V)value));\n next();\n }",
"public int insertDictData(SysDictData dictData);",
"Object insert(String key, Object param);",
"void insertBefore(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertBefore() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == front) \n\t\t{\n\t\t\tprepend(data); //if the cursor is at the front of the list, you can just call prepend since you will be inserting the element before the front element \n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.prev = cursor.prev; //the new node temp's previous becomes the cursors previous\t\n temp.next = cursor; //the new node temp's next becomes the cursor\n cursor.prev.next = temp; //cursor's previous next element becomes temp\n cursor.prev = temp; //cursor's previous becomes temp\n length++;\n index++;\n\t\t}\n\t}",
"abstract public void insert(final KeyClass data, final RID rid);",
"public void insert(KeyedItem o){\r\n\t\tinsert(this,o);\r\n\t}",
"@PreInsert\n public void onBeforeInsert() {\n if (this.key == null) {\n this.key = UUID.randomUUID();\n }\n onBeforeUpdate();\n }",
"void insert(Object value, int position);",
"@Override\n\tpublic void preInsert() {\n\n\t}",
"abstract void insert(K key, V value);",
"abstract void insert(K key, V value);",
"public void insert( final char c ) {\n\t\tbuffer.insert( cursor++, c );\n\t}",
"public long addDataFromCloud(String title, String key){\n\n long newRowId;\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(GroceryDBContract.GroceryList.COLUMN_NAME_TITLE, title);\n values.put(GroceryDBContract.GroceryList.COLUMN_NAME_ENTRY_KEY, key);\n newRowId = database.insert(\n GroceryDBContract.GroceryList.TABLE_NAME,\n null,\n values);\n database.close();\n return newRowId;\n }",
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();",
"public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }",
"int insert(DictDoseUnit record);",
"int insert(Position record);",
"Position<T> addBefore(Position<T> p, T data) throws IllegalStateException;",
"@Override\n\tpublic void insert() {\n\t\t\n\t}",
"void insertItem(Position position, IItem item);",
"@Insert(ADD_NEW)\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n @Override\n int addNew(Object position);",
"public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }",
"public void insertBefore( int pos, T data ) \n {\n \tDLLIterator cycle = new DLLIterator();\n \t\n \t\n if(pos <= 0){\n \t \n \t insertFirst(data);\n }\n \n else if(pos >= capacity){\n \t insertLast(data);\n \t \n } \n \n else{\n \t \n \t int x = 0;\n \t \n \t DLLNode insert = cycle.currentNode;\n \t \n \t while(x != pos){\n \t\t x++;\n \t\t insert = cycle.nextNode();\n \t\t \n \t }\n \t \n \t DLLNode before = insert.prev;\n \t DLLNode newNode = new DLLNode(data, before, insert);\n \t \n \t before.next = newNode;\n \t insert.prev = newNode;\n \t \n }\n \n \t \n \t \n \n }",
"void insert(T value, int position);",
"int insert(WdWordDict record);",
"int insert(GrpTagKey record);",
"public Key insert(Transaction tx,Tuple t) throws RelationException;",
"public void insert(long key,BookObj book)\r\n\t{\r\n\t\t//go through node to insert\r\n\t\troot = insert(root,key,book);\r\n\t}",
"public void insert(TKey key, TValue data) {\n Node n = new Node(key, data, true); // nodes start red\n // normal BST insert; n will be placed into its initial position.\n // returns false if an existing node was updated (no rebalancing needed)\n boolean insertedNew = bstInsert(n, mRoot); \n if (!insertedNew) return;\n // check cases 1-5 for balance violations.\n checkBalance(n);\n }",
"void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }",
"public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}",
"public void insert(long key) {\n\t\tDELink newLink = new DELink(key);\n\t\tDELink previous = first;\n\t\tDELink current = first;\n\n\t\tif (first == null) {\n\t\t\tnewLink.next = first;\n\t\t\tfirst = newLink;\n\t\t} else {\n\t\t\twhile (newLink.next == null) {\n\t\t\t\tif (current.getLData() <= key) {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tprevious.next = current;\n\t\t\t\t} else {\n\t\t\t\t\tif (current == first) {\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t\tfirst = newLink;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious.next = newLink;\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public BTreeSearchResult insert(String key, int info) throws IOException{\r\n\t\tint diskAccessNum = 0;\r\n\t\tif (this.length() == 0){\r\n\t\t\tthis.create();\r\n\t\t\tdiskAccessNum = 1; //create B-tree, 1 disk access\r\n\t\t}\r\n\t\tBTreeNode root = new BTreeNode(this.readPage(0), this.order); //read root, 1 disk access\r\n\t\t\r\n\t\tif (root.numKeys == root.key.length){//Create new root and split old one\r\n\t\t\tBTreeSearchResult newRoot = new BTreeSearchResult(new BTreeNode( this.order ), 0);\r\n\t\t\troot.parent = 0; //Always keep root as first page\r\n\t\t\tBTreeSearchResult oldRoot = new BTreeSearchResult(root, (int) (this.length()/this.pageSize)); //Move old root to end of file\r\n\t\t\tnewRoot.node.child[0] = oldRoot.pageFound;\r\n\t\t\tBTreeNode newChild = this.split(newRoot.node, 0, oldRoot); // 3 accesses for split\r\n\t\t\tdiskAccessNum = diskAccessNum + this.updatePointerOfChildren(oldRoot); // Access all children of old root to update their parent pointer\r\n\t\t\tdiskAccessNum = diskAccessNum + this.updatePointerOfChildren(new BTreeSearchResult(newChild, newRoot.node.child[1])); // Access all children of new node to update their parent pointer\r\n\t\t\tnewRoot.diskAccessNum = 4 + diskAccessNum;\r\n\t\t\treturn insertNonFull(newRoot, key, info);\r\n\t\t}else{\r\n\t\t\tBTreeSearchResult oldRoot = new BTreeSearchResult(root, 0);\r\n\t\t\toldRoot.diskAccessNum = 1 + diskAccessNum; // 1 access for root\r\n\t\t\treturn insertNonFull(oldRoot, key, info);\r\n\t\t}\r\n\t}",
"@Override\n protected final Void updateKeyAfterInsert(VaccineInjectTimes entity, long rowId) {\n return null;\n }",
"@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}",
"<K, V, R extends IResponse> R insert(IInsertionRequest<K, V> insertionRequest);",
"public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }",
"public void insert(T key, U data){\n\t\t\n\t\tAVLNode<T, U> parent = null;\n\t\tAVLNode<T, U> node = this.root;\n\t\tAVLNode<T, U> newNode = new AVLNode<T, U>(key, data);\n\t\t\n\t\tthis.amountOfNodes++;\n\t\t\n\t\twhile(node != null){\n\t\t\tparent = node;\n\t\t\tif(newNode.getKey().compareTo(node.getKey()) < 0){\n\t\t\t\tnode = node.getLeft();\n\t\t\t}else{\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t}\n\t\t\n\t\tnewNode.setParent(parent);\n\t\t\n\t\tif(parent == null){ //It is the first element of the tree.\n\t\t\tthis.root = newNode;\n\t\t}else if(newNode.getKey().compareTo(parent.getKey()) < 0){\n\t\t\tparent.setLeft(newNode);\n\t\t}else{\n\t\t\tparent.setRight(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tthis.balanceTree(parent);\n\t}",
"public void insertData(Data newData)\r\n\t\t{\r\n\t\t\tif (newData == null) //should never happen, but just incase\r\n\t\t\t\treturn;\r\n\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null) //search for duplicates and add their locations\r\n\t\t\t{\r\n\t\t\t\tif (currentData.getWord().compareTo(newData.getWord()) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentData.addPoint((Point) newData.getLocations().get(0));\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\r\n\t\t\tif (head == null)\r\n\t\t\t{\r\n\t\t\t\thead = newData;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentData = head;\r\n\t\t\tif (currentData.getWord().compareTo(newData.getWord()) > 0)\r\n\t\t\t{\r\n\t\t\t\t//will copy newData's greater to currentData's less;\r\n\t\t\t\tnewData.setNextData(currentData);\r\n\t\t\t\tcopyGreaterToLess(newData, currentData);\r\n\t\t\t\thead = newData;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\twhile ((currentData.nextData() != null) && currentData.nextData().getWord().compareTo(newData.getWord()) < 0)\r\n\t\t\t{\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tinserting the new data between currentData and tempData\r\n\t\t\twill copy currentData's greater to newData's less and\r\n\t\t\tnewData's greater to tempData's less\r\n\t\t\t */\r\n\t\t\tData tempData = currentData.nextData();\r\n\t\t\tcurrentData.setNextData(newData);\r\n\t\t\tcopyGreaterToLess(currentData, newData);\r\n\t\t\tnewData.setNextData(tempData);\r\n\t\t\tcopyGreaterToLess(newData, tempData);\r\n\t\t}",
"public void insert(DataItem item){\n\t\tint key = item.getKey();\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key); //get step size until empty cell or -1;\n\t\t\n\t\twhile(hashArray[hashVal] != null &&\n\t\t\t\thashArray[hashVal].getKey() != -1){\n\t\t\thashVal += stepSize; // go to the next cell\n\t\t\thashVal %= arraySize;\t\t\t\t\t//wrap around if necessary\n\t\t}\n\t\thashArray[hashVal] = item;\n\t}",
"int insert(Lbm83ChohyokanriPkey record);",
"public void insert()\n\t{\n\t}",
"public void insert(int data) {\n this.root = this.insertRec(this.root, data);\n }",
"int insert(LikedKey record);",
"public Entry insert(Object key, Object value) {\n int hashCode = key.hashCode();\n int index = compFunction(hashCode);\n\n Entry entry = new Entry();\n entry.key = key;\n entry.value = value;\n\n defTable[index].insertFront(entry);\n size++;\n return entry;\n }",
"@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }",
"public void insert(int key){\n\t\tBSTNode currentNode = root;\n\t\tBSTNode parent = null;\n\t\twhile (currentNode != null){\n\t\t\tif (currentNode.getKey() == key){\n\t\t\t\tSystem.out.println(\"This value already exists in the tree!\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tparent = currentNode;\n\t\t\tif (key < currentNode.getKey()){\n\t\t\t\tcurrentNode = currentNode.getLeft();\n\t\t\t}else{\n\t\t\t\tcurrentNode = currentNode.getRight();\n\t\t\t}\n\t\t}\n\t\t// once we reached the bottom of the tree, we insert the new node.\n\t\t// to do that we need to know the leaf node which is stored in the BSTNode parent\n\t\t// by comparing with its value, we know which side to insert the new node.\n\t\tif (key < parent.getKey()){\n\t\t\tparent.setLeft(new BSTNode(key, null, null));\n\t\t}else{\n\t\t\tparent.setRight(new BSTNode(key, null, null));\n\t\t}\n\t\tsize++;\n\t}",
"@Override\r\n\tpublic void insertPrestito(Prestito p) {\n\t\t\r\n\t}",
"void insert(int pos, String s);",
"public void insert(int data)\r\n {\r\n root = insert(root, data);\r\n }",
"private void insert(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n LivenessInfo info,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info);\n PartitionUpdate upd = partitionUpdate(valueKey, row);\n indexCfs.getWriteHandler().write(upd, ctx, false);\n logger.debug(\"Inserted entry into index for value {}\", valueKey);\n }",
"public void insert(int k, char fields[][]) throws IOException {\n root = insertHelper(root, k, fields);\r\n }",
"public int insertItem(DataItem newItem)\n\t{\n\t\tnumItems++;\n\t\tlong newKey = newItem.dData;\n\t\t\n\t\tfor(int j=ORDER-2; j>=0; j--)\n\t\t{\n\t\t\tif(itemArray[j] == null)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\tlong itsKey = itemArray[j].dData;\n\t\t\t\tif(newKey < itsKey)\n\t\t\t\t\titemArray[j+1] = itemArray[j];\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\titemArray[j+1] = newItem;\n\t\t\t\t\treturn j+1;\n\t\t\t\t}\n\t\t\t}//end else (not null)\n\t\t}//end for\n\t\titemArray[0] = newItem;\n\t\treturn 0;\n\t}",
"public void putDocumentAfterEdit() {\r\n\t\tif(pointer < strategy.getEntireHistory().size()-1) {\r\n\t\t\tstrategy.putVersion(currentDocument);\r\n\t\t}\r\n\t}",
"int insert(TagData record);",
"@Override\n\tpublic void insert(K key) throws DuplicateException {\n\t\tif (key != null) {// bad key handling\n\t\t\tif (isEmpty()) {// if is empty, the root will be the inserted node\n\t\t\t\troot = insert(root, key);\n\t\t\t} else {\n\t\t\t\tinsert(root, key);// if not empty just insert\n\t\t\t}\n\t\t}\n\t}",
"private void insertNonFull(BTNode x, DataPair k) {\n int i = x.mCurrentKeyNum-1;\n if (x.mIsLeaf){\n\n // The following loop does two things\n // a) Finds the location of new key to be inserted\n // b) Moves all greater keys to one place ahead\n while (i >= 0 && k.compareTo(x.mKeys[i]) < 0){\n x.mKeys[i+1] = x.mKeys[i];\n i--;\n }\n\n // Insert the new key at found location\n x.mKeys[i+1] = k;\n x.mCurrentKeyNum++;\n }else{\n // Find the child which is going to have the new key\n while (i>= 0 && k.compareTo(x.mKeys[i]) < 0)\n i--;\n\n i++;\n // See if the found child is full\n if (x.mChildren[i].mCurrentKeyNum == 2*t -1){\n splitChild(x,i,x.mChildren[i]);\n if (k.compareTo(x.mKeys[i]) > 0)\n i++;\n }\n insertNonFull(x.mChildren[i], k);\n }\n }",
"public void insertKey(int x){\r\n\t\tSystem.out.println(\"insertKey: Leaf\");\r\n\t\t//check if input is duplicate entry\r\n\t\tif (this.containsKey(x)){\r\n\t\t\tSystem.out.println(\"Error: Duplicate key entry\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t//makes sure inputs positive\r\n\t\tif(x<1){\r\n\t\t\tSystem.out.println(\"Input Error: You cannot input a negative value for a key\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ((!this.containsKey(x)) && (!this.isFull())){\r\n\t\t\tkeys[counter]=x;\r\n\t\t\tcounter++;\r\n\t\t\tArrays.sort(keys,0,counter);//sort\r\n\t\t}else if (this.isFull()){\r\n\t\t\tArrays.sort(keys);//sort\r\n\t\t\tBPlusTree.splitChild(this, x);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t}",
"public void addKey() {\n setBonusKeys(getBonusKeys() + 1);\n }",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void insert(int key){\n\t\tif(this.root == null){\n\t\t\tNode r = new Node(key);\n\t\t\tthis.root = r;\t\n\t\t}else{\n\t\t\t//if not recursively insert the node\n\t\t\trecInsert(this.root, key);\n\t\t}\n\t\treturn;\n\t}",
"private void insertFirst(T data){\n Node<T> node = new Node<T>(data);\n this.begin = node;\n this.end = node;\n }",
"private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n }\n ContentProviderOperation.Builder builder =\n newInsertCpo(Data.CONTENT_URI, mIsSyncOperation, mIsYieldAllowed);\n builder.withValues(mValues);\n if (mIsNewAlert) {\n builder.withValueBackReference(AlertContentProvider.KEY_ALERT_ID, mBackReference);\n }\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }",
"public void insert(int data) {\n root = insert(root, data, null);\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }",
"public boolean Insert(int v_key){\n\tTree new_node ;\n\tboolean ntb ;\n\tboolean cont ;\n\tint key_aux ;\n\tTree current_node ;\n\n\tnew_node = new Tree();\n\tntb = new_node.Init(v_key) ;\n\tcurrent_node = this ;\n\tcont = true ;\n\twhile (cont){\n\t key_aux = current_node.GetKey();\n\t if (v_key < key_aux){\n\t\tif (current_node.GetHas_Left())\n\t\t current_node = current_node.GetLeft() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Left(true);\n\t\t ntb = current_node.SetLeft(new_node);\n\t\t}\n\t }\n\t else{\n\t\tif (current_node.GetHas_Right())\n\t\t current_node = current_node.GetRight() ;\n\t\telse {\n\t\t cont = false ;\n\t\t ntb = current_node.SetHas_Right(true);\n\t\t ntb = current_node.SetRight(new_node);\n\t\t}\n\t }\n\t}\n\treturn true ;\n }"
]
| [
"0.67716634",
"0.67588603",
"0.6440841",
"0.6427346",
"0.6234466",
"0.61395544",
"0.61003757",
"0.60368985",
"0.59449494",
"0.5936355",
"0.59359705",
"0.59247357",
"0.5922982",
"0.5869519",
"0.5853302",
"0.58380353",
"0.5836353",
"0.57752454",
"0.57520634",
"0.575014",
"0.574614",
"0.5745199",
"0.57279456",
"0.5723656",
"0.5713139",
"0.5701175",
"0.5695605",
"0.5682143",
"0.56455934",
"0.56455934",
"0.56353706",
"0.5625169",
"0.56086445",
"0.5601586",
"0.5577463",
"0.55655605",
"0.5559784",
"0.5552441",
"0.5503992",
"0.55003273",
"0.54446614",
"0.5438877",
"0.54364115",
"0.54342943",
"0.5432257",
"0.5414127",
"0.5413774",
"0.53880525",
"0.53795314",
"0.53791726",
"0.5378601",
"0.5376674",
"0.537246",
"0.5369435",
"0.5351078",
"0.5347878",
"0.5333677",
"0.5329084",
"0.53269064",
"0.5322458",
"0.53161174",
"0.5306112",
"0.530173",
"0.52906126",
"0.5289372",
"0.52890563",
"0.5278869",
"0.5276053",
"0.5275268",
"0.52718073",
"0.5263915",
"0.52630955",
"0.52528745",
"0.52479994",
"0.524405",
"0.5242839",
"0.52424204",
"0.5240816",
"0.5234752",
"0.52329785",
"0.5232216",
"0.52291995",
"0.52282304",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201",
"0.5223201"
]
| 0.615795 | 5 |
Inserts the key with a new IData document after the cursor's current position. | public IData insertDataAfter(String key) {
IData data = new CaseInsensitiveElementList<V>();
insertAfter(key, data);
return data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key insertNewKey(int i);",
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}",
"public void insert(KeyedItem newItem);",
"public abstract boolean insert(Key key);",
"void insert(int key, String data)\n\t\tthrows IllegalArgumentException;",
"public void insert(int key, Object record) {\n throw new UnsupportedOperationException(\"implement me!\");\n }",
"@Override\n protected final Void updateKeyAfterInsert(SupervisionstandardParagraph entity, long rowId) {\n return null;\n }",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"abstract public void insert(final KeyClass data, final RID rid);",
"public void insertOneKeyPointer(byte[] new_key, int pointer_id){\n int total_number = prior_key_number + key_number + next_key_number;\n\n if (total_number == key_number){\n\n //node in one block\n if(total_number == M){\n //split\n byte[] old_biggest = getBiggestKey();\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n //add split node to parent node\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G)\n split_node = splitAt(mid-1);\n else\n split_node = splitAt(mid);\n }else{\n split_node = splitAt(mid);\n }\n if(parent_id != 0){\n //insert to left node\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }else{\n if(key_number == 0){\n insertKeyPointer(0,new_key,pointer_id);\n return;\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id,\n node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n updateNextBro(new_node.node_id);\n buffer.addNewNode(new_node);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }else{\n //node in many blocks\n if (total_number == M){\n int mid = (int) Math.ceil((double)M/2) - 1;\n BTreeInternalNode split_node;\n if (mid >= key_number + prior_key_number){\n //this node do not split\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n next_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }else if (mid < prior_key_number) {\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n }else{\n byte[] old_biggest = getBiggestKey();\n int old_next_id = next_id;\n if(M % 2 == 1){\n if(compare2key(keys.get(mid),new_key) == Util.G){\n if (mid == prior_key_number){\n //special case - split\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n prior_node.updateNextBro(0);\n prior_node.updateNextKeyNumber(0);\n prior_node.updateNumberToLeft();\n //bro\n BTreeInternalNode head_node = (BTreeInternalNode) prior_node.getHeadNode();\n BTreeInternalNode origin_right_node = (BTreeInternalNode) buffer.getNode(prior_node.right_bro_id,DB_name,table_name,index_attrs);\n origin_right_node.updateLeftBro(node_id);\n prior_node.updateRightBro(node_id);\n\n updatePriorBro(0);\n updatePriorKeyNumber(0);\n updateNumberToRight();\n updateLeftBro(head_node.node_id);\n\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n if(parent_id !=0) {\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n parent_node.insertOneKeyPointer(prior_node.getBiggestKey(), head_node.node_id);\n parent_node.updateKeyPointer(getBiggestKey(), null, node_id);\n }else{\n createRootNode(prior_node,this);\n }\n return;\n }\n split_node = splitAt(mid- prior_key_number - 1);\n }\n else\n split_node = splitAt(mid - prior_key_number);\n }else{\n split_node = splitAt(mid - prior_key_number);\n }\n if(parent_id != 0){\n BTreeInternalNode parent_node = (BTreeInternalNode)buffer.getNode(parent_id,DB_name,table_name,index_attrs);\n if(old_next_id != 0)\n parent_node.updateKeyPointer(old_biggest,getBiggestKey(),getHeadNode().node_id);\n parent_node.insertOneKeyPointer(split_node.getBiggestKey(),split_node.node_id);\n }\n if(compare2key(keys.get(mid - prior_key_number),new_key) == Util.G){\n insertOneKeyPointer(new_key,pointer_id);\n }else{\n split_node.insertOneKeyPointer(new_key,pointer_id);\n }\n for (int i = 0; i < split_node.key_number; i ++){\n buffer.getNode(split_node.getPointer(i),DB_name,table_name,index_attrs).updateParent(split_node.node_id);\n }\n }\n }else{\n if(next_id != 0){\n BTreeInternalNode next_node = (BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(compare2key(next_node.keys.get(0),new_key) != Util.G) {\n next_node.insertOneKeyPointer(new_key, pointer_id);\n return;\n }\n }\n if(prior_id != 0){\n BTreeInternalNode prior_node = (BTreeInternalNode) buffer.getNode(prior_id,DB_name,table_name,index_attrs);\n if(compare2key(prior_node.keys.get(prior_node.key_number - 1),new_key) != Util.L){\n prior_node.insertOneKeyPointer(new_key,pointer_id);\n return;\n }\n }\n int insert_index = BinarySearch(new_key,0,key_number - 1);\n if (free_space >= 2 + key_length){\n insertKeyPointer(insert_index,new_key,pointer_id);\n }else{\n BTreeInternalNode new_node;\n Boolean create_new_node = false;\n if(next_id != 0){\n new_node =(BTreeInternalNode) buffer.getNode(next_id,DB_name,table_name,index_attrs);\n if(new_node.free_space < key_length + 2){\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n }else{\n new_node = new BTreeInternalNode(M,buffer.getFreeId(DB_name,table_name,index_attrs),parent_id,left_bro_id,right_bro_id, node_id,0,prior_key_number + key_number,0,buffer,index_attrs,DB_name,table_name);\n buffer.addNewNode(new_node);\n create_new_node = true;\n }\n if(create_new_node && next_id != 0){\n BTreeNode origin_next_node = buffer.getNode(next_id,DB_name,table_name,index_attrs);\n origin_next_node.updatePriorBro(new_node.node_id);\n new_node.updateNextBro(origin_next_node.node_id);\n new_node.updateNextKeyNumber(origin_next_node.key_number + origin_next_node.next_key_number);\n }\n updateNextBro(new_node.node_id);\n byte[] biggest_key = keys.get(key_number - 1);\n short pt = getPointer(key_number - 1);\n deleteKeyPointer(key_number - 1);\n new_node.insertOneKeyPointer(biggest_key,pt);\n insertOneKeyPointer(new_key,pointer_id);\n }\n }\n }\n }",
"public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}",
"public void insert(Key key, Value value) {\r\n root.insert(key,value);\r\n size++;\r\n }",
"public void insertAfterCursor(String s) {\n if(this.isEmpty())\n {\n lines.addFirst(s);\n }\n else\n lines.addAfter(new PositionObject<>(lines.get(cursor)), s);\n cursor++;\n }",
"public long addDataFromCloud(String title, String key){\n\n long newRowId;\n SQLiteDatabase database = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(GroceryDBContract.GroceryList.COLUMN_NAME_TITLE, title);\n values.put(GroceryDBContract.GroceryList.COLUMN_NAME_ENTRY_KEY, key);\n newRowId = database.insert(\n GroceryDBContract.GroceryList.TABLE_NAME,\n null,\n values);\n database.close();\n return newRowId;\n }",
"public int insertDictData(SysDictData dictData);",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"public void insert(int i, K k, P p) {\n\t\tfor (int j = keyCount; j > i; j--) {\n\t\t\tkeys[j] = keys[j - 1];\n\t\t\tpointers[j] = pointers[j - 1];\n\t\t}\n\t\tkeys[i] = k;\n\t\tpointers[i] = p;\n\t\tkeyCount++;\n\t}",
"Object insert(String key, Object param);",
"public void insert(KeyedItem o){\r\n\t\tinsert(this,o);\r\n\t}",
"com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();",
"public void insert( final char c ) {\n\t\tbuffer.insert( cursor++, c );\n\t}",
"public void insert(VertexRecord key) {\n throw new UnsupportedOperationException();\n }",
"int insert(DictDoseUnit record);",
"@Insert(ADD_NEW)\n @Options(useGeneratedKeys = true, keyProperty = \"id\")\n @Override\n int addNew(Object position);",
"void insert(Object value, int position);",
"@Override\n\tpublic void insert() {\n\t\t\n\t}",
"abstract void insert(K key, V value);",
"abstract void insert(K key, V value);",
"int insert(Position record);",
"public IData insertDataBefore(String key) {\n IData data = new CaseInsensitiveElementList<V>();\n insertBefore(key, data);\n return data;\n }",
"@Override\n public void insert(K key) {\n try {\n this.rootNode = insertNode(this.rootNode, key);\n } catch (DuplicateKeyException e) {\n System.out.println(e.getMessage());\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void putDocumentAfterEdit() {\r\n\t\tif(pointer < strategy.getEntireHistory().size()-1) {\r\n\t\t\tstrategy.putVersion(currentDocument);\r\n\t\t}\r\n\t}",
"void insertItem(Position position, IItem item);",
"void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}",
"int insert(GrpTagKey record);",
"int insert(WdWordDict record);",
"public native String insertItemBefore(String newItem, Number index);",
"@Override\n protected final Void updateKeyAfterInsert(VaccineInjectTimes entity, long rowId) {\n return null;\n }",
"int insert(Lbm83ChohyokanriPkey record);",
"int insert(PmKeyDbObj record);",
"public void storeItemPosition(long position) {\n\t\tmEditor.putLong(\"KEY_DATA_POSITION\", position);\n\t\tmEditor.commit();\n\t}",
"@Override\r\n\tpublic String insert() {\n\t\treturn \"insert\";\r\n\t}",
"public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }",
"int insert(Lbt72TesuryoSumDPkey record);",
"public Key insert(Transaction tx,Tuple t) throws RelationException;",
"private void insert(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n LivenessInfo info,\n WriteContext ctx)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n Row row = BTreeRow.noCellLiveRow(buildIndexClustering(rowKey, clustering, cell), info);\n PartitionUpdate upd = partitionUpdate(valueKey, row);\n indexCfs.getWriteHandler().write(upd, ctx, false);\n logger.debug(\"Inserted entry into index for value {}\", valueKey);\n }",
"public synchronized void append(K key, V val) throws IOException {\n\n\t\t\tlong pos = data.sync();\n\t\t\t// Only write an index if we've changed positions. In a block compressed\n\t\t\t// file, this means we write an entry at the start of each block\n\t\t\t// position.set(pos); // point to current eof\n\t\t\tindex.append(new Pair<K, Long>(key, keySchema, pos, Schema\n\t\t\t\t\t.create(Type.LONG)));\n\n\t\t\tdata.append(new Pair<K, V>(key, keySchema, val, valueSchema)); // append\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// key/value\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// to data\n\t\t\tsize++;\n\t\t}",
"public com.guidewire.datamodel.TypekeyDocument.Typekey insertNewTypekey(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.TypekeyDocument.Typekey target = null;\r\n target = (com.guidewire.datamodel.TypekeyDocument.Typekey)get_store().insert_element_user(TYPEKEY$16, i);\r\n return target;\r\n }\r\n }",
"public BTreeSearchResult insert(String key, int info) throws IOException{\r\n\t\tint diskAccessNum = 0;\r\n\t\tif (this.length() == 0){\r\n\t\t\tthis.create();\r\n\t\t\tdiskAccessNum = 1; //create B-tree, 1 disk access\r\n\t\t}\r\n\t\tBTreeNode root = new BTreeNode(this.readPage(0), this.order); //read root, 1 disk access\r\n\t\t\r\n\t\tif (root.numKeys == root.key.length){//Create new root and split old one\r\n\t\t\tBTreeSearchResult newRoot = new BTreeSearchResult(new BTreeNode( this.order ), 0);\r\n\t\t\troot.parent = 0; //Always keep root as first page\r\n\t\t\tBTreeSearchResult oldRoot = new BTreeSearchResult(root, (int) (this.length()/this.pageSize)); //Move old root to end of file\r\n\t\t\tnewRoot.node.child[0] = oldRoot.pageFound;\r\n\t\t\tBTreeNode newChild = this.split(newRoot.node, 0, oldRoot); // 3 accesses for split\r\n\t\t\tdiskAccessNum = diskAccessNum + this.updatePointerOfChildren(oldRoot); // Access all children of old root to update their parent pointer\r\n\t\t\tdiskAccessNum = diskAccessNum + this.updatePointerOfChildren(new BTreeSearchResult(newChild, newRoot.node.child[1])); // Access all children of new node to update their parent pointer\r\n\t\t\tnewRoot.diskAccessNum = 4 + diskAccessNum;\r\n\t\t\treturn insertNonFull(newRoot, key, info);\r\n\t\t}else{\r\n\t\t\tBTreeSearchResult oldRoot = new BTreeSearchResult(root, 0);\r\n\t\t\toldRoot.diskAccessNum = 1 + diskAccessNum; // 1 access for root\r\n\t\t\treturn insertNonFull(oldRoot, key, info);\r\n\t\t}\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n public void insertAfter(String key, Object value) {\n iterator.add(new CaseInsensitiveElement<V>(key, (V)value));\n }",
"public void insert(long key,BookObj book)\r\n\t{\r\n\t\t//go through node to insert\r\n\t\troot = insert(root,key,book);\r\n\t}",
"<K, V, R extends IResponse> R insert(IInsertionRequest<K, V> insertionRequest);",
"public void insert(DataItem item){\n\t\tint key = item.getKey();\n\t\tint hashVal = hashFunc(key);\n\t\tint stepSize = hashFunc2(key); //get step size until empty cell or -1;\n\t\t\n\t\twhile(hashArray[hashVal] != null &&\n\t\t\t\thashArray[hashVal].getKey() != -1){\n\t\t\thashVal += stepSize; // go to the next cell\n\t\t\thashVal %= arraySize;\t\t\t\t\t//wrap around if necessary\n\t\t}\n\t\thashArray[hashVal] = item;\n\t}",
"public void insert()\n\t{\n\t}",
"public void addKey() {\n setBonusKeys(getBonusKeys() + 1);\n }",
"void insert(T value, int position);",
"@Override\n\tpublic void insertUpdate(DocumentEvent de) {\n\n\t}",
"int insert(TDictAreas record);",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }",
"public void testInsert3() throws Exception {\n DAS das = DAS.FACTORY.createDAS(getConnection());\n Command insert = das.createCommand(\"insert into COMPANY (NAME) values (?)\");\n insert.setParameter(1, \"AAA Rental\");\n insert.execute();\n // Integer key = (Integer) insert.getParameterValue(\"generated_key\");\n Integer key = new Integer(insert.getGeneratedKey());\n\n // Verify insert\n Command select = das.createCommand(\"Select ID, NAME from COMPANY where ID = ?\");\n select.setParameter(1, key);\n DataObject root = select.executeQuery();\n assertEquals(key, root.get(\"COMPANY[1]/ID\"));\n\n }",
"public long insert();",
"private void addInsertOp() {\n\n if (!mIsNewAlert) {\n mValues.put(AlertContentProvider.KEY_ALERT_ID, mRawAlertId);\n }\n ContentProviderOperation.Builder builder =\n newInsertCpo(Data.CONTENT_URI, mIsSyncOperation, mIsYieldAllowed);\n builder.withValues(mValues);\n if (mIsNewAlert) {\n builder.withValueBackReference(AlertContentProvider.KEY_ALERT_ID, mBackReference);\n }\n mIsYieldAllowed = false;\n mBatchOperation.add(builder.build());\n }",
"public void insert(T key, U data){\n\t\t\n\t\tAVLNode<T, U> parent = null;\n\t\tAVLNode<T, U> node = this.root;\n\t\tAVLNode<T, U> newNode = new AVLNode<T, U>(key, data);\n\t\t\n\t\tthis.amountOfNodes++;\n\t\t\n\t\twhile(node != null){\n\t\t\tparent = node;\n\t\t\tif(newNode.getKey().compareTo(node.getKey()) < 0){\n\t\t\t\tnode = node.getLeft();\n\t\t\t}else{\n\t\t\t\tnode = node.getRight();\n\t\t\t}\n\t\t}\n\t\t\n\t\tnewNode.setParent(parent);\n\t\t\n\t\tif(parent == null){ //It is the first element of the tree.\n\t\t\tthis.root = newNode;\n\t\t}else if(newNode.getKey().compareTo(parent.getKey()) < 0){\n\t\t\tparent.setLeft(newNode);\n\t\t}else{\n\t\t\tparent.setRight(newNode);\n\t\t}\n\t\tcomputeHeights(newNode);\n\t\tthis.balanceTree(parent);\n\t}",
"public void insert(TKey key, TValue data) {\n Node n = new Node(key, data, true); // nodes start red\n // normal BST insert; n will be placed into its initial position.\n // returns false if an existing node was updated (no rebalancing needed)\n boolean insertedNew = bstInsert(n, mRoot); \n if (!insertedNew) return;\n // check cases 1-5 for balance violations.\n checkBalance(n);\n }",
"Position<T> addAfter(Position<T> p, T data) throws IllegalStateException;",
"public void insert(char i);",
"public void insert(int data) {\n this.root = this.insertRec(this.root, data);\n }",
"int insert(TagData record);",
"public void insertData(Data newData)\r\n\t\t{\r\n\t\t\tif (newData == null) //should never happen, but just incase\r\n\t\t\t\treturn;\r\n\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null) //search for duplicates and add their locations\r\n\t\t\t{\r\n\t\t\t\tif (currentData.getWord().compareTo(newData.getWord()) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tcurrentData.addPoint((Point) newData.getLocations().get(0));\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\r\n\t\t\tif (head == null)\r\n\t\t\t{\r\n\t\t\t\thead = newData;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentData = head;\r\n\t\t\tif (currentData.getWord().compareTo(newData.getWord()) > 0)\r\n\t\t\t{\r\n\t\t\t\t//will copy newData's greater to currentData's less;\r\n\t\t\t\tnewData.setNextData(currentData);\r\n\t\t\t\tcopyGreaterToLess(newData, currentData);\r\n\t\t\t\thead = newData;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\twhile ((currentData.nextData() != null) && currentData.nextData().getWord().compareTo(newData.getWord()) < 0)\r\n\t\t\t{\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tinserting the new data between currentData and tempData\r\n\t\t\twill copy currentData's greater to newData's less and\r\n\t\t\tnewData's greater to tempData's less\r\n\t\t\t */\r\n\t\t\tData tempData = currentData.nextData();\r\n\t\t\tcurrentData.setNextData(newData);\r\n\t\t\tcopyGreaterToLess(currentData, newData);\r\n\t\t\tnewData.setNextData(tempData);\r\n\t\t\tcopyGreaterToLess(newData, tempData);\r\n\t\t}",
"public void insert(long key) {\n\t\tDELink newLink = new DELink(key);\n\t\tDELink previous = first;\n\t\tDELink current = first;\n\n\t\tif (first == null) {\n\t\t\tnewLink.next = first;\n\t\t\tfirst = newLink;\n\t\t} else {\n\t\t\twhile (newLink.next == null) {\n\t\t\t\tif (current.getLData() <= key) {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tprevious.next = current;\n\t\t\t\t} else {\n\t\t\t\t\tif (current == first) {\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t\tfirst = newLink;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious.next = newLink;\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"int insert(LikedKey record);",
"@Override\n\tpublic void preInsert() {\n\n\t}",
"public void insert(int k, char fields[][]) throws IOException {\n root = insertHelper(root, k, fields);\r\n }",
"public void add(Key key, Data data) {\n var curr = root;\n var next = root;\n while (next != null && next.key != key) {// search place for insertion\n curr = next;\n\n if (key.compareTo(curr.key) < 0) {\n next = curr.left; \n } else {\n next = curr.right;\n }\n }\n\n\n var newNode = new Node(key, data);\n if (curr == null) {// empty tree\n root = newNode;\n } else {\n if (key.compareTo(curr.key) < 0) {\n if (curr.left != null) {// save subtrees when replacing data\n curr.left.data = data;\n } else {\n curr.left = newNode;\n }\n } else {\n if (curr.right != null) {// save subtrees when replacing data\n curr.right.data = data;\n } else {\n curr.right = newNode;\n }\n }\n }\n }",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }",
"public void inc(String key);",
"public void insert(int data)\r\n {\r\n root = insert(root, data);\r\n }",
"@Override\n protected final Void updateKeyAfterInsert(FarmField entity, long rowId) {\n return null;\n }",
"int insertSelective(DictDoseUnit record);",
"public void insert( String token, int docID, int offset ) {\r\n PostingsList posting = this.getPostings(token);\r\n if(posting != null){\r\n posting.insertElement(docID, (double)0, offset);\r\n index.put(token, posting);\r\n }\r\n else{\r\n PostingsList newPosting = new PostingsList();\r\n newPosting.insertElement(docID, (double)0, offset);\r\n index.put(token, newPosting);\r\n }\r\n }",
"int insert(AccessKeyRecordEntity record);",
"void insert(int pos, String s);",
"public void insert(String newitem) {\n\t\t// TODO Write me!\n\t\t\n\t}",
"static void insert(WordNode root, String Key)\n {\n int n = Key.length();\n WordNode pChild = root;\n\n for (int i=0; i<n; i++)\n {\n int index = Key.charAt(i) - 'a';\n\n if (pChild.child[index] == null)\n pChild.child[index] = new WordNode();\n\n pChild = pChild.child[index];\n }\n\n // make last node as leaf node\n pChild.isWord = true;\n }",
"public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }",
"public native void insertData(double offset, String arg) /*-{\r\n\t\tvar jso = [email protected]::getJsObj()();\r\n\t\tjso.insertData(offset, arg);\r\n }-*/;",
"void insert(String delta) {\n \n if (!acceptInsert(delta)) {\n clear();\n } \n \n int cursor = mDisplay.getSelectionStart();\n mDisplay.getText().insert(cursor, delta);\n \n }",
"@PreInsert\n public void onBeforeInsert() {\n if (this.key == null) {\n this.key = UUID.randomUUID();\n }\n onBeforeUpdate();\n }",
"int insertSelective(PmKeyDbObj record);",
"int insertSelective(Lbm83ChohyokanriPkey record);",
"void insert(K key, V value) {\r\n // binary search\r\n int correct_place = Collections.binarySearch(keys, key);\r\n int indexing;\r\n if (correct_place >= 0) {\r\n indexing = correct_place;\r\n } else {\r\n indexing = -correct_place - 1;\r\n }\r\n\r\n if (correct_place >= 0) {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n } else {\r\n keys.add(indexing, key);\r\n values.add(indexing, value);\r\n }\r\n\r\n // to check if the node is overloaded then split\r\n if (root.isOverflow()) {\r\n Node sibling = split();\r\n InternalNode newRoot = new InternalNode();\r\n newRoot.keys.add(sibling.getFirstLeafKey());\r\n newRoot.children.add(this);\r\n newRoot.children.add(sibling);\r\n root = newRoot;\r\n }\r\n }",
"public void insertingANode(T key, E value) {\r\n\t\tRBNode<T, E> insertedNode = createRBNode(key, value);\r\n\t}",
"int insert(HelpInfo record);",
"public void insert(Object item);",
"public int insertItem(DataItem newItem)\n\t{\n\t\tnumItems++;\n\t\tlong newKey = newItem.dData;\n\t\t\n\t\tfor(int j=ORDER-2; j>=0; j--)\n\t\t{\n\t\t\tif(itemArray[j] == null)\n\t\t\t\tcontinue;\n\t\t\telse\n\t\t\t{\n\t\t\t\tlong itsKey = itemArray[j].dData;\n\t\t\t\tif(newKey < itsKey)\n\t\t\t\t\titemArray[j+1] = itemArray[j];\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\titemArray[j+1] = newItem;\n\t\t\t\t\treturn j+1;\n\t\t\t\t}\n\t\t\t}//end else (not null)\n\t\t}//end for\n\t\titemArray[0] = newItem;\n\t\treturn 0;\n\t}",
"public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}",
"public void insert(int data) {\n root = insert(root, data);\n size++;\n }"
]
| [
"0.67199457",
"0.6555589",
"0.6522243",
"0.6443879",
"0.62884605",
"0.5984308",
"0.5900755",
"0.58841246",
"0.58339435",
"0.57768285",
"0.5757824",
"0.5709749",
"0.5683006",
"0.56601846",
"0.5650625",
"0.56494266",
"0.5644727",
"0.5637133",
"0.56266487",
"0.5621594",
"0.56072634",
"0.5556707",
"0.5556025",
"0.55507606",
"0.552146",
"0.551621",
"0.549767",
"0.5468242",
"0.5468242",
"0.54667807",
"0.54664296",
"0.5451796",
"0.5441283",
"0.5439225",
"0.5370251",
"0.53679365",
"0.5361804",
"0.5356202",
"0.5335908",
"0.5324807",
"0.53242075",
"0.53193915",
"0.5319067",
"0.5317868",
"0.52918607",
"0.5281033",
"0.52639073",
"0.52601093",
"0.52466774",
"0.52453023",
"0.52411884",
"0.5235401",
"0.5234921",
"0.5232294",
"0.52310824",
"0.52269435",
"0.5224083",
"0.52238667",
"0.5220072",
"0.52171427",
"0.5212544",
"0.52053094",
"0.5205029",
"0.5196701",
"0.5185373",
"0.5172692",
"0.51579887",
"0.5157914",
"0.51537746",
"0.51536024",
"0.5146552",
"0.51454294",
"0.5141811",
"0.51396143",
"0.51340145",
"0.51273376",
"0.51146746",
"0.5112249",
"0.51114565",
"0.510966",
"0.51038104",
"0.50947094",
"0.50936574",
"0.5091464",
"0.5086582",
"0.5086275",
"0.5085765",
"0.50855374",
"0.508411",
"0.50830567",
"0.5073132",
"0.50685686",
"0.5068321",
"0.5066243",
"0.50659645",
"0.5062735",
"0.5059624",
"0.5057988",
"0.5056003",
"0.50498885"
]
| 0.59435564 | 6 |
Repositions this cursor's on the next element. | public boolean next() {
boolean result = true;
try {
element = iterator.next();
} catch(NoSuchElementException ex) {
result = false;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}",
"public void moveNext() {\n\t\tcurrentElement++;\n\t}",
"public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }",
"public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}",
"public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }",
"public void next() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getNextMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getNextModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }",
"public void setNext()\n {\n\t int currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex +1);\n\t \n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = firstObject;\n }",
"public void next() {\n\t\telements[(currentElement - 1)].turnOff();\n\t\tif (elements.length > currentElement) {\n\t\t\telements[currentElement].turnOn();\n\t\t\tcurrentElement++;\n\t\t} else {\n\t\t\texit();\n\t\t}\n\t}",
"public void nextTurn(){\n\t\tthis.setCurrentElement(this.getCurrentElement().getNext());\n\t}",
"public void next(){\n\t\tboundIndex = (boundIndex+1)%buttonBounds.length;\n\t\tupdateButtonBounds();\n\t}",
"public void next()\n {\n if (mHistoryIdx == mCommandList.size()) {\n return;\n }\n\n mCommandList.get(mHistoryIdx++).redo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"@Override\n void advance() {\n }",
"protected void resetNextAdvanceLineNumber() {\n this.nextAdvanceLineNumber = new Integer(1);\n }",
"public void moveToStart() {\r\n\t\tcurr = head;\r\n\t}",
"public void moveCursorRight();",
"void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}",
"@Override\n protected void moveToNextRow(){\n incrementRow();\n resetXPos();\n if(getRow()%2 == 1){\n incrementYPos(getHeight()+getHeight());\n }\n resetCol();\n setPointDirection();\n }",
"private void getNext() {\n Node currNode = getScreenplayElem().getChildNodes().item(currPos++);\n while (currNode.getNodeType() != Node.ELEMENT_NODE) {\n currNode = getScreenplayElem().getChildNodes().item(currPos++);\n }\n currElem = (Element) currNode;\n }",
"private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }",
"public void cursorDown() throws IndexOutOfBoundsException {\n if(cursor == size()-1)\n throw new IndexOutOfBoundsException(\"Exception: Current line is size()-1!\");\n //Setting the cursor to be the text line after its current position.\n cursor++;\n }",
"public void setNextElement(Element<T> nextElement) \n\t{\n\t\tthis.nextElement = nextElement;\n\t}",
"@Override\n public void start() {\n if (size > 0) {\n cursor = head;\n prev = null;\n } else {\n cursor = null; }\n }",
"private void advance() {\n assert currentItemState == ItemProcessingState.COMPLETED || currentIndex == -1\n : \"moving to next but current item wasn't completed (state: \" + currentItemState + \")\";\n currentItemState = ItemProcessingState.INITIAL;\n currentIndex = findNextNonAborted(currentIndex + 1);\n retryCounter = 0;\n requestToExecute = null;\n executionResult = null;\n assert assertInvariants(ItemProcessingState.INITIAL);\n }",
"@Override\n public void setNextElement(helpDesk next) {\n this.next = next;\n }",
"protected void next() {\n\t\t// Next node\n\t\tnode = path.remove(0);\n\t\ttransition(NavigatorState.ROTATE_TO);\n\t}",
"public void MoveNext()\r\n \t{\r\n\r\n\t try{\r\n\t\t if(!rsTution.next())rsTution.last();\r\n\t\t Display();\r\n\r\n\r\n\t }catch(SQLException sqle)\r\n\t {System.out.println(\"Move Next Error:\"+sqle);}\r\n \t}",
"public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }",
"public void cursorUp() throws IndexOutOfBoundsException {\n if(cursor <= 0)\n throw new IndexOutOfBoundsException(\"Exception: Cursor is currently at line \"+cursor);\n //Setting the cursor to be the text line before its current position.\n cursor--;\n }",
"public void moveCursorLeft();",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }",
"public void advance() {\n\t\tif(isFinalFrame(current)) {\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\"); // input sanitization if last frame (cant advance further )\n\t\t\t\n\t\t}\n\t\tif (!current.movesFinished()) { // input sanitization -- cant advance if the user hasnt exercised all the frames moves\n\t\t\tthrow new IllegalStateException(\"Invalid Entry\");\n\t\t}\n\t\telse current = frames.get(frames.indexOf(current) + 1); // else updates the current frame to frame at next index. \n\t}",
"public void moveRight(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex += 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex < currentText.getCharacterEdges().length) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very last line move to the beginning of the next line\n if (lineIndex < texts.size() - 1) {\n lineIndex++;\n currentText = texts.get(lineIndex);\n characterIndex = 0;\n updatePosition();\n }\n //If this is the last line character index should not change and position does not need to be updated\n else {\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n }\n }\n }",
"public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}",
"public void setNextCell(Cell next)\r\n {\r\n this.next = next;\r\n }",
"protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"public void next()\n {\n if (size != 0)\n {\n current = current.next();\n }\n }",
"public void set (Object element)\n {\n if(!isAfterNext){\n throw new IllegalStateException(); \n }\n position.data = element;\n \n \n }",
"public void goToNext() {\r\n\t\tif (curr == null)\r\n\t\t\treturn;\r\n\t\tprev = curr;\r\n\t\tcurr = curr.link;\r\n\t}",
"private void advanceRow(){\n\t\tfaceBackwards();\n\t\twhile(frontIsClear()){\n\t\t\tmove();\n\t\t}\n\t\tturnRight();\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t\tturnRight();\n\t\t}\n\t}",
"void setNext(Cell next) {\n if (this.next == null) {\n this.next = next;\n }\n }",
"public void jumpToNextLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == textBuffer.getMaxLine()-1) {\n textBuffer.setCurToTail();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo+1);\n lineJumpHelper(curX);\n }",
"protected final void moveToNextIndex() {\n\t\t\t// doing the assignment && < 0 in one line shaves\n\t\t\t// 3 opcodes...\n\t\t\tif ( (_index = nextIndex()) < 0 ) { throw new NoSuchElementException(); }\n\t\t}",
"public int nextIndex() {\n\t\t\treturn cursor;\n\t\t}",
"public void next() {\n\t\titerator.next();\n\t}",
"public abstract Position nextPosition(Position position);",
"public void move() {\n this.pposX = this.posX;\n this.pposY = this.posY;\n this.posX = newPosX;\n this.posY = newPosY;\n }",
"private void moveNext(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == (tracker.getMaxColumns() - 1)) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() + 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(0);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() + 1);\n\t\t }//end if-else\n\t }",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"public void reset() {\r\n\t\tcursor = mark;\r\n\t}",
"private Token advance() {\n if(!isAtEnd()) current++;\n return previous();\n }",
"public void resetCurrentElement() {\r\n\t\tcurrentNode = firstNode;\r\n\t}",
"@Override\n\tpublic void makeNextMove() \n\t{\n\t}",
"public void moveCursorToLine(int i) throws IndexOutOfBoundsException {\n if(i < 0 || i > size()-1)\n throw new IndexOutOfBoundsException();\n cursor = i;\n }",
"private final void advance() {\n if (currentIterator == null) {\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n if (!currentIterator.hasNext()) {\n // we want advance to next iterator only when this iterator is exhausted\n if (index < intMaps.length - 1) {\n // we can advance to next iterator only if currentIterator is not the last iterator\n ++index;\n if (!fetched[index]) {\n GetAllCustomMap.this.fetchValuesForIndex(index);\n }\n currentIterator = intMaps[index].entrySet().iterator();\n } else {\n // we can not advance to next iterator because this iterator is the last iterator\n }\n } else {\n // we do not want to advance to next iterator because this iterator is not fully exhausted\n }\n }\n }",
"public void stepForward() {\n\t\tposition = forwardPosition();\n\t}",
"private void moveToNextCard() {\r\n\t\t// This is simple enough: Move the card set to the next\r\n\t\t// card and update the label and database. If we're now on\r\n\t\t// the last card, disable the Next button and make sure\r\n\t\t// the Previous button is always enabled. Then rebuild the card\r\n\t\t// itself so the correct passcodes are displayed.\r\n \tif (cardSet.getLastCard() != Cardset.FINAL_CARD) {\r\n\t\t\tcardSet.nextCard();\r\n\t\t\tbtnPrevious.setEnabled(true);\r\n\t\t\tif (cardSet.getLastCard() == Cardset.FINAL_CARD)\r\n\t\t\t\tbtnNext.setEnabled(false);\r\n\t\t\t// Save the card set to the database:\r\n\t\t\tDBHelper.saveCardset(cardSet);\r\n\t\t\trebuildCard();\r\n\t lblCardNumber.setText(getResources().getString(R.string.cardview_card_num_prompt).replace(getResources().getString(R.string.meta_replace_token), String.valueOf(cardSet.getLastCard())));\r\n \t}\r\n }",
"public void setNext(CommitNode x){\r\n\t\tnext = x;\r\n\t}",
"public void rotateNextPlayer(){\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.nextElem + 1) % players.size();\n\t\telse\t\t\t\n\t\t\tthis.nextElem = (this.nextElem - 1 + players.size()) % players.size();\n\t}",
"public void setNext(ListElement<T> next)\n\t{\n\t\tthis.next = next;\n\t}",
"public void next() {\n\t\tSystem.out.println(al.get(pos));\r\n\t\tpos++;\r\n\t}",
"void setNext(MapElement next) {\n this.next = next;\n }",
"public void advance () {\n while (currentGroup == null ||\n (!actionIter.hasNext() && groupIter.hasNext()))\n {\n currentGroup = groupIter.next();\n actionIter = actions.iterator();\n }\n // now get the next action (assuming we're in valid state)\n currentAction = (actionIter.hasNext() ? actionIter.next() : null);\n }",
"MoveIterator() {\n _c = 1; _r = 1; _dir = NOWHERE;\n incr();\n }",
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"public Point next() {\n\t\t\tif (x < size) {\n\t\t\t\treturn get(x++, y).clone();\n\t\t\t}\n\t\t\tx = 0;\n\t\t\treturn get(x++, ++y).clone();\n\n\t\t}",
"public void next() {\n\t\t}",
"private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}",
"@Override\n public T next() {\n setCurrent();\n T returnValue = current;\n current = null;\n elementToRemove = returnValue;\n return returnValue;\n }",
"public void moveToPos(int pos) {\r\n\t\tassert (pos >= 0) && (pos <= cnt) : \"Position out of range\";\r\n\t\tcurr = head;\r\n\t\tfor (int i = 0; i < pos; i++)\r\n\t\t\tcurr = curr.next();\r\n\t}",
"public void setCursor(int l, int c);",
"public Object next()\n {\n if(!hasNext())\n {\n throw new NoSuchElementException();\n //return null;\n }\n previous= position; //Remember for remove;\n isAfterNext = true; \n if(position == null) \n {\n position = first;// true == I have not called next \n }\n else\n {\n position = position.next;\n }\n return position.data;\n }",
"public void setNext(ListElement next)\n\n\t {\n\t this.next = next;\n\t }",
"public void movePointerForward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tmove();\n\t\tputBeeper();\n\t}",
"public void setNext(DNode newNext) { next = newNext; }",
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }",
"public void setNext(Tile next){\n\t\tthis.next=next;\n\t}",
"public void nextButtonClicked()\r\n {\n manager = sond.getManager();\r\n String insertSearchDelete = sond.getInsertSearchDelete();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n // falls der Thread pausiert ist, wird er beim betätigen des\r\n // next-Buttons aufgeweckt\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n // Redo muss vor den weiteren if Anweisungen stehen, damit erst alle\r\n // Redo ausgeführt werden, bevor neue Aktionen dem manager hinzugefuegt\r\n // werden\r\n else if (manager.canRedo())\r\n {\r\n manager.redo();\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"insert\"))\r\n {\r\n sond.nextInsertPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"search\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n else if (!sond.getArrayPosition() && insertSearchDelete.equals(\"delete\"))\r\n {\r\n sond.nextSearchPosition();\r\n UndoRedoSetAnimation command = new UndoRedoSetAnimation(sond);\r\n manager.addEdit(command);\r\n }\r\n }",
"public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }",
"public void nextMove(Field field) {\n for (int i = 1; i <= 9; i++) {\n if (field.setMarker(i, marker)) {\n break;\n }\n }\n }",
"public void next() {\r\n\t\tif (curr != tail)\r\n\t\t\tcurr = curr.next();\r\n\t}",
"public void switchNextTabulator() {\r\n\t\tCTabItem[] tabItems = this.displayTab.getItems();\r\n\t\tfor (int i = 0; i < tabItems.length; i++) {\r\n\t\t\tCTabItem tabItem = tabItems[i];\r\n\t\t\tif (tabItem.getControl().isVisible()) {\r\n\t\t\t\tif (i + 1 <= tabItems.length - 1)\r\n\t\t\t\t\ttabItem.getParent().setSelection(i + 1);\r\n\t\t\t\telse\r\n\t\t\t\t\ttabItem.getParent().setSelection(0);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n\t\tpublic int next() {\n\t\t\treturn current++;\n\t\t}",
"public void mark() {\r\n\t\tmark = cursor;\r\n\t}",
"private void next() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n if (currentWindowIndex < currentTimeline.getWindowCount() - 1) {\n player.seekTo(currentWindowIndex + 1, C.TIME_UNSET);\n } else if (currentTimeline.getWindow(currentWindowIndex, new Timeline.Window(), false).isDynamic) {\n player.seekTo(currentWindowIndex, C.TIME_UNSET);\n }\n }",
"public void redoMove(){\n circleObj.setX(newX);\n circleObj.setY(newY);\n }",
"private void prepareNext() {\n this.hasNext = false;\n while (!this.hasNext && this.nodesIterator.hasNext()) {\n this.next = this.nodesIterator.next();\n this.hasNext = this.computeHasNext();\n }\n }",
"@Override\n public void updateToNextDoc() {\n if(idx < postingList.size())\n idx += postingList.get(idx+1)+2;\n }",
"public void setNext(Variable next){\n\t\tthis.next = next;\n\t}",
"public Node setNextNode(Node node);",
"public void move() {\n if (this.nextMove.equals(\"a\")) { // move down\n this.row = row + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"b\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"b\")) { // move right\n this.col = col + 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"c\";\n progress = 0;\n }\n } else if (this.nextMove.equals(\"c\")) { // move up\n this.row = row - 1;\n progress += 1;\n if (progress == steps) {\n nextMove = \"a\";\n progress = 0;\n }\n }\n }",
"public void setNext(ObjectListNode p) {\n next = p;\n }",
"public void setNext(Node<E> next) { this.next = next; }",
"public void AdvancePos() {\n \tswitch (data3d.TrackDirection){\n \tcase 0:\n \tc2.PositionValue += 1;\n \tc2.PositionValue = (c2.PositionValue % c2.getMaxPos());\n \tbreak;\n \tcase 1:\n \tc3.PositionValue += 1;\n \tc3.PositionValue = (c3.PositionValue % c3.getMaxPos());\n \tbreak;\n \tcase 2:\n \tc1.PositionValue += 1;\n \tc1.PositionValue = (c1.PositionValue % c1.getMaxPos());\n \tbreak;\n \tcase 3:\n \tdata3d.setElement((data3d.ActiveElement + 1) % data3d.Elements);\n \tcase 4:\n \tdata3d.setTime((data3d.ActiveTime + 1) % data3d.Times);\n \t}\n }",
"public void next() {\n\t\tif ((position == 0) && (pause != 3)) {\n\t\t\tpause++;\n\t\t} else {\n\t\t\tposition++;\n\t\t\tpause = 0;\n\t\t\tif (position == (origionalMessage.length() + 10)) {\n\t\t\t\tposition = 0;\n\t\t\t}\n\t\t}\n\n\t}",
"public boolean moveNext(\n )\n {\n // Scanning the current graphics object...\n ContentObject currentObject = getCurrent();\n if(currentObject != null)\n {\n \t\n \tString cmdStr = currentObject.toString();\n \t/*\n \tif(cmdStr.contains(\"f*\") || cmdStr.contains(\"{f }\")) {\n \t\tSystem.out.println(cmdStr);\n \t}\n \t*/\n \tif(!cmdStr.contains(\"{re [36, 270, 540, 720]}, {f }\")) {\n \t\tcurrentObject.scan(state);\n \t}\n }\n\n // Moving to the next object...\n if(index < objects.size())\n {index++; refresh();}\n\n return getCurrent() != null;\n }",
"@Override\n public IntVec3 next() {\n if(this.hasNext()){\n this.current = this.current.clone();\n } else throw new NoSuchElementException();\n if(this.current.x != this.end.x){\n this.current=this.current.incrX(this.xDir);\n } else if(this.current.y != this.end.y){\n this.current=IntVec3.get(0, this.current.y + this.yDir, this.current.z);\n } else if(this.current.z != this.end.z){\n this.current=IntVec3.get(0, 0, this.current.z + this.zDir);\n } else throw new NoSuchElementException();\n return this.current;\n }",
"private void setNextElement(Object entry)\n {\n __m_NextElement = entry;\n }"
]
| [
"0.7761292",
"0.7595016",
"0.7355598",
"0.7039067",
"0.66453475",
"0.6624353",
"0.65508825",
"0.65074223",
"0.6466183",
"0.6454243",
"0.635951",
"0.6334268",
"0.632952",
"0.6262397",
"0.6232246",
"0.6217547",
"0.6196411",
"0.61949515",
"0.6174354",
"0.61689687",
"0.6162328",
"0.61498415",
"0.61371094",
"0.61171687",
"0.6116884",
"0.6093718",
"0.60903794",
"0.60882485",
"0.6057692",
"0.6044761",
"0.604456",
"0.6016581",
"0.59142756",
"0.5898863",
"0.5894274",
"0.5884097",
"0.5875133",
"0.5873965",
"0.58693653",
"0.58580655",
"0.58568305",
"0.58524925",
"0.58272845",
"0.58194685",
"0.5795669",
"0.5785154",
"0.5751764",
"0.5749703",
"0.57454354",
"0.57346416",
"0.57291585",
"0.57167417",
"0.57152486",
"0.5714556",
"0.5707278",
"0.5689778",
"0.56731683",
"0.56725186",
"0.56594443",
"0.565846",
"0.56463194",
"0.56269383",
"0.5626166",
"0.5611823",
"0.5596432",
"0.55858636",
"0.5584892",
"0.5584749",
"0.55783194",
"0.5578151",
"0.5569237",
"0.55678445",
"0.556776",
"0.5566844",
"0.55663764",
"0.55611825",
"0.55599004",
"0.55556715",
"0.55550504",
"0.55531263",
"0.55507046",
"0.5542593",
"0.5541263",
"0.55330056",
"0.553082",
"0.55277145",
"0.5514366",
"0.55120885",
"0.54982644",
"0.5496685",
"0.54947764",
"0.54898345",
"0.54775727",
"0.54734",
"0.5472175",
"0.54684085",
"0.5467144",
"0.5465251",
"0.54644966",
"0.5455602",
"0.54553"
]
| 0.0 | -1 |
Repositions this cursor's on the next occurrence of the given key. | public boolean next(String key) {
while(next()) {
if (element.keyEquals(new CaseInsensitiveElement<V>(key, null))) return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }",
"public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }",
"public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}",
"protected void setSearchKey(Key key)\n\t{\n\t\tint last_idx = _searchKeyList.size() - 1 ;\n\t\t_searchKeyList.set(last_idx, key) ;\n\t}",
"public void inc(String key);",
"public void inc(String key) {\n if (!keyMap.containsKey(key)) {\n keyMap.put(key, 1);\n DLinkedListNode node = countMap.get(1);\n System.out.println(node);\n if (node == null) {\n node = new DLinkedListNode(1);\n countMap.put(1, node);\n dll.insertAfter(dll.head, node);\n }\n node.keySet.add(key);\n }\n else {\n int count = keyMap.get(key); \n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count++;\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertAfter(oldNode, newNode);\n }\n newNode.keySet.add(key);\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }\n }",
"protected void setGroupKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableGroup(key.getTableGroup()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"public int increment( K key ) {\n Integer i = map.get( key );\n if ( i == null ) i = 0;\n map.put( key, ++i );\n return i;\n }",
"protected void setSortKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableOrder(key.getTableOrder()) ;\n\t\t\t\tky.setTableDesc(key.getTableDesc()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"public void advance() {\n if( mMatches.hasNext() ) {\n setCurrent( mMatches.next() );\n }\n }",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"public void update(final long key) {\n update(key, 1);\n }",
"public void next() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getNextMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getNextModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }",
"public void Next(int key){\n\t\tNode res;\n\t\tif(search(key)!=nil){\n\t\t\tres = getNext(root,key,nil);\n\t\t}else{\n\t\t\tint next = findNext(root,key);\n\t\t\tres = getNode(root,next);\n\t\t}\n\t\t\n\t\tif(res != nil){\n\t\t\tSystem.out.println( res.id + \" \" + res.count);\n\t\t}else{\n\t\t\tSystem.out.println(\"0 0\");\n\t\t}\n\t}",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"private synchronized Pair<K, V> seekInternal(K key) throws IOException {\n\t\t\treadIndex(); // make sure index is read\n\n\t\t\tLong pos = keys.get(key);\n\t\t\tif (pos != null) {\n\t\t\t\tdata.seek(pos);\n\t\t\t\treturn data.next();\n\t\t\t} else\n\t\t\t\treturn null;\n\t\t}",
"public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public int incrementFirstValue(int key) {\n return array.incrementEntry(key << 1, 1);\n }",
"public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"public void put(int key) { root = put(root, key); }",
"public void inc(String key) {\n map.put(key, map.getOrDefault(key, 0) + 1);\n int val = map.get(key);\n vals.putIfAbsent(val, new HashSet<>());\n vals.get(val).add(key);\n if (vals.containsKey(val - 1)) {\n vals.get(val - 1).remove(key);\n if (vals.get(val - 1).size() == 0)\n vals.remove(val - 1);\n }\n if (map.get(key) > max) {\n max = map.get(key);\n maxKey = key;\n }\n if (map.get(key) - 1 == min) {\n if (vals.get(min) == null || vals.get(min).size() == 0) {\n min++;\n minKey = key;\n } else {\n minKey = vals.get(min).iterator().next();\n }\n }\n if (map.get(key) == 1) {\n min = 1;\n minKey = key;\n }\n }",
"public void setRight(int position,int key) {\r\n\t\tthis.treeRight[position]=key;\r\n\t}",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"public void setKey( Long key ) {\n this.key = key ;\n }",
"public void setKey(Key key) {\n this.key = key;\n }",
"public void setKey(int key);",
"public void setKey(int key);",
"public void insert(long key) {\n\t\tDELink newLink = new DELink(key);\n\t\tDELink previous = first;\n\t\tDELink current = first;\n\n\t\tif (first == null) {\n\t\t\tnewLink.next = first;\n\t\t\tfirst = newLink;\n\t\t} else {\n\t\t\twhile (newLink.next == null) {\n\t\t\t\tif (current.getLData() <= key) {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tprevious.next = current;\n\t\t\t\t} else {\n\t\t\t\t\tif (current == first) {\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t\tfirst = newLink;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious.next = newLink;\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"private void elementHit(K key) {\n\t\tint i = hitMap.get(key);\n\t\ti++;\n\t\thitMap.put(key, i);\n\t}",
"private void removeTwoStepForwardFromPositionCache(Key currentKey) {\n\n\t\t// Create a two square forward position\n\t\tKey newKey =createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\n\t\t// Remove key if it exists\n\t\tif (currentKeyMapping.contains(newKey)) {\n\t\t\tcurrentKeyMapping.remove(newKey);\n\t\t}\n\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void setKey(TableKey key) {\n\tthis.key = key;\n }",
"void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }",
"private static void move(String key) {\n\t\tif (settings.contains(key)) {\n\t\t\tString value = settings.getString(key, SAMPLE_TONE);\n\t\t\tmRecordsDatabase.insertRecord(value, value);\n\t\t\tsettings.edit().remove(key).apply();\n\t\t}\n\t}",
"@Override\n public Symbol put(String key, Symbol value) {\n value.setIndex(this.local++);\n return super.put(key, value);\n }",
"public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }",
"public void dec(String key) {\n if (!m.containsKey(key)) {\n return;\n }\n\n int val = m.get(key);\n delete(key, val);\n\n if (val == 1) {\n m.remove(key);\n } else {\n m.put(key, val - 1);\n insert(key, val - 1);\n }\n }",
"public long inc(final String key) {\n String c = get(key);\n if (c == null) c = \"0\";\n final long l = Long.parseLong(c) + 1;\n put(key, Long.toString(l));\n return l;\n }",
"@Nullable public GroupPartitionId nextKey(@NotNull final GroupPartitionId key) {\n return readMap.navigableKeySet().higher(key);\n }",
"public void nextMove(Field field) {\n for (int i = 1; i <= 9; i++) {\n if (field.setMarker(i, marker)) {\n break;\n }\n }\n }",
"public void setKey(int key){\r\n this.key = key; \r\n }",
"public void setKeyJump(final int key) {\n jumpKey = key;\n }",
"public Node increaseKey(Node root, int key, int incVal){\n\t\tif(root==nil){\n\t\t\treturn nil;\n\t\t}\n\t\t\n\t\tif(root.id == key){\n\t\t\tint temp = root.count+incVal;\n\t\t\troot.count = temp;\n\t\t\treturn root;\n\t\t}\n\t\t\n\t\tif(key<root.id){\n\t\t\troot = increaseKey(root.left,key,incVal);\n\t\t}else{\n\t\t\troot = increaseKey(root.right,key,incVal);\n\t\t}\n\t\t\n\t\treturn root;\n\t}",
"protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }",
"public void put(String key) {\n\t root = put(root, key, 0);\n\t }",
"public void changeKey(int x, int y) throws IndexOutOfBoundsException {\n\t\tMap m = rows.get(y).getMap(x);\n\t\tsuper.changeKey(m.getKey(), InputManager.enterString(\"New Key\"));\n\t}",
"public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}",
"void setKey(K key);",
"public void inc(String key) { \n \t//a 1 b 1 a 2\n // get key and update\n int val=\tmap.getOrDefault(key, 0)+1;\n if(val>max) {\n \t max=val;\n \t maxkey=key;\n }\n if(val==1||val<min) {\n \t min=val;\n \t minkey=key;\n }\n \t map.put(key,val); \t\n }",
"public abstract Position nextPosition(Position position);",
"public void setKey (K k) {\n key = k;\n }",
"public void setKey(SelectionKey key) {\n this._key = key;\n }",
"public void insert(int key) {\n\t\t// Make sure that the key is not present.\n\t\tassert (!find(key));\n\t\t\n\t\tif (head == null || key < head.key) {\n\t\t\thead = new IntNode(key, head);\n\t\t\treturn;\n\t\t}\n\n\t\tIntNode curr;\n\t\tfor (curr = head; curr.next != null && curr.next.key < key; curr = curr.next);\n\t\tcurr.next = new IntNode(key, curr.next);\n\t}",
"public void update(final long key, final long increment) {\n this.update_sum += increment;\n for (int i = 0; i < this.rows; i++) {\n final int index = indexForKey(key, i);\n counts[index] += increment;\n }\n }",
"public void setLeft(int position,int key) {\r\n\t\tthis.treeLeft[position]=key;\r\n\t}",
"public void setQueryKey(String key)\n throws TorqueException\n {\n setPrimaryKey(key);\n }",
"protected void setCollectKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tif (key.getTableCollect().equals(\"NULL\"))\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(null) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(key.getTableCollect()) ;\n\t\t\t\t}\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }",
"public void dec(String key) {\n if (!keyMap.containsKey(key)) return;\n int count = keyMap.get(key);\n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count--;\n if (count > 0) {\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertBefore(oldNode, newNode);\n }\n newNode.keySet.add(key);\n }\n else {\n keyMap.remove(key);\n }\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }",
"private int locate(Key key) {\n\t\tint index = hash(key);\n\t\twhile(this.keys[index] != null && !this.keys[index].equals(key)) {\n\t\t\tindex = increment(index);\n\t\t}\n\t\treturn index;\n\t}",
"public final void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key)\r\n {\r\n m_key = key;\r\n }",
"public void Previous(int key){\n\t\tif(search(key)!=nil){\n\t\t\tNode res = getPrev(root,key,nil);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}else{\n\t\t\tint prev = findPrev(root,key);\n\t\t\tNode res = getNode(root,prev);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}\n\t}",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\r\n\t\tthis.key = key;\r\n\t}",
"public void setKeyMoveRight(KeyCode moveRight) {\n this.moveRight = moveRight;\n }",
"public void remove(int key) {\n data[key % KEY] = -1;\n\n }",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void delete(Key key) {\n first = delete(first, key);\n }",
"public void next() {\n if (hasNext()) {\n setPosition(position + 1);\n }\n }",
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"private void forward() {\n index++;\n column++;\n if(column == linecount + 1) {\n line++;\n column = 0;\n linecount = content.getColumnCount(line);\n }\n }",
"public void addKey() {\n setBonusKeys(getBonusKeys() + 1);\n }",
"public void next()\n {\n if (mHistoryIdx == mCommandList.size()) {\n return;\n }\n\n mCommandList.get(mHistoryIdx++).redo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void moveNext() {\n\t\tcurrentElement++;\n\t}",
"public void appendRem(int keyTag) {\n \tappendRem(new Integer(keyTag));\n }",
"public void jumpToNextLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == textBuffer.getMaxLine()-1) {\n textBuffer.setCurToTail();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo+1);\n lineJumpHelper(curX);\n }",
"T put(CharSequence key, int pos, T addValue)\n\t\t{\n\t\t\tNode<T> nextNode;\n\t\t\tCharacter ch;\n\t\t\tT old;\n\n\t\t\tif(key.length() == pos)\n\t\t\t{\t// at terminating node\n\t\t\t\told = value;\n\t\t\t\tsetValue(addValue);\n\t\t\t\treturn old;\n\t\t\t}\n\t\t\tch = key.charAt(pos);\n\t\t\tif(nextMap == null)\n\t\t\t{\n\t\t\t\tnextMap = newNodeMap();\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch, nextNode);\n\t\t\t}\n\t\t\telse if((nextNode = nextMap.get(ch))==null)\n\t\t\t{\n\t\t\t\tnextNode = new Node();\n\t\t\t\tnextMap.put(ch,nextNode);\n\t\t\t}\n\t\t\treturn nextNode.put(key,pos+1,addValue);\n\t\t}",
"public void insert(Integer key){\r\n\t\tint start=this.root;\r\n\t\tint currentPos=avail;\r\n\t\tint temp=-1;\r\n\t\twhile(increaseCompares() && start!=-1) {\r\n\t\t\ttemp=start;\r\n\t\t\tcompares++;\r\n\t\t\tif(increaseCompares() && key<getKey(start)) {\r\n\t\t\t\tstart=getLeft(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstart=getRight(start);\r\n\t\t\t\tcompares++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Tree is empty. New Node is now root of tree\r\n\t\tif(increaseCompares() && temp==-1) {\r\n\t\t\tsetRoot(0);\r\n\t\t\tcompares++;\r\n\t\t\tsetKey(avail, key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\t//Compare values and place newNode either left or right of previous Node\r\n\t\telse if(increaseCompares() && key<getKey(temp)) {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetLeft(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//Set previous (parent) Node of new inserted Node\r\n\t\t\tsetRight(temp, currentPos);\r\n\t\t\tcompares++;\r\n\t\t\t//Initialize line of new Node\r\n\t\t\tsetKey(currentPos,key);\r\n\t\t\tcompares++;\r\n\t\t\tavail=getRight(currentPos);\r\n\t\t\tcompares++;\r\n\t\t\tsetRight(currentPos,-1);\r\n\t\t\tcompares++;\r\n\t\t}\r\n\t}",
"public void remove(Object key) {\r\n\t\tif (!containsKey(key)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize--;\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex].key.equals(key)) {\r\n\t\t\ttable[slotIndex] = table[slotIndex].next;\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> previousElement = table[slotIndex];\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex].next;// can't be null\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\tpreviousElement.next = currentElement.next;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tpreviousElement = currentElement;\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\t}",
"public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }",
"@Override\n\tpublic ManagedFunctionObjectTypeBuilder<M> setKey(M key) {\n\t\tthis.key = key;\n\t\tthis.index = key.ordinal();\n\t\treturn this;\n\t}",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }",
"public void setKey(String key) {\r\n this.key = key;\r\n }",
"public void setKey(String key) {\n\n this.key = key;\n }",
"private void setKey(String key) {\n this.key = key;\n }",
"public void setKey(final String key) {\n this.key = key;\n }",
"void setKey(int key);",
"public void setKey(String key) {\n if (element != null) {\n element.setKey(key);\n }\n }"
]
| [
"0.6296332",
"0.62312984",
"0.617595",
"0.6047586",
"0.6022671",
"0.6001179",
"0.5823138",
"0.58132535",
"0.57979524",
"0.56533974",
"0.5643725",
"0.5571737",
"0.5570943",
"0.55621463",
"0.5531793",
"0.55242884",
"0.55122215",
"0.5428208",
"0.53811526",
"0.53479725",
"0.53282964",
"0.5317087",
"0.53117955",
"0.53098315",
"0.53073263",
"0.53047013",
"0.53015023",
"0.5269722",
"0.52540016",
"0.52519834",
"0.5250952",
"0.5243859",
"0.5223057",
"0.5223057",
"0.5191778",
"0.51855314",
"0.51711404",
"0.5164673",
"0.51373535",
"0.5136028",
"0.5130821",
"0.5120355",
"0.51151246",
"0.51134706",
"0.511345",
"0.51124877",
"0.51089627",
"0.51086295",
"0.5108152",
"0.5103287",
"0.50899714",
"0.50895005",
"0.5078252",
"0.5059429",
"0.50489146",
"0.50370723",
"0.5031911",
"0.5030244",
"0.50246066",
"0.5023357",
"0.50173277",
"0.5015622",
"0.50020176",
"0.49984565",
"0.49914554",
"0.4988083",
"0.49871325",
"0.49675658",
"0.4957033",
"0.49505013",
"0.49427065",
"0.4938245",
"0.49372452",
"0.49370682",
"0.49313623",
"0.49313623",
"0.49297735",
"0.4922878",
"0.49215338",
"0.49161342",
"0.49159813",
"0.49157053",
"0.49017814",
"0.49014473",
"0.489843",
"0.48981985",
"0.48921946",
"0.48901913",
"0.48892242",
"0.48846978",
"0.4881111",
"0.48774537",
"0.48774537",
"0.48774537",
"0.4874614",
"0.48720855",
"0.48675534",
"0.4859286",
"0.48560363",
"0.4849844",
"0.48495883"
]
| 0.0 | -1 |
Repositions this cursor's on the previous element. | public boolean previous() {
boolean result = true;
try {
element = iterator.previous();
} catch(NoSuchElementException ex) {
result = false;
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void previous() {\n if (hasPrevious()) {\n setPosition(position - 1);\n }\n }",
"void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}",
"public void previous() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getPreviousMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getPreviousModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }",
"public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public void setPrev(Position pos) {\n prev = pos;\n }",
"public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }",
"public void previous()\n {\n if (size != 0)\n {\n current = current.previous();\n }\n\n }",
"private void moveToPreviousCard() {\r\n\t\t// This is simple enough: Move the card set to the previous\r\n\t\t// card and update the label and database. If we're now on\r\n\t\t// the first card, disable the Previous button and make sure\r\n\t\t// the Next button is always enabled. Then rebuild the card\r\n\t\t// itself so the correct passcodes are displayed.\r\n \tif (cardSet.getLastCard() != Cardset.FIRST_CARD) {\r\n\t\t\tcardSet.previousCard();\r\n\t btnNext.setEnabled(true);\r\n\t\t\tif (cardSet.getLastCard() == Cardset.FIRST_CARD)\r\n\t\t\t\tbtnPrevious.setEnabled(false);\r\n\t\t\t// Save the card set to the database:\r\n\t\t\tDBHelper.saveCardset(cardSet);\r\n\t\t\trebuildCard();\r\n\t lblCardNumber.setText(getResources().getString(R.string.cardview_card_num_prompt).replace(getResources().getString(R.string.meta_replace_token), String.valueOf(cardSet.getLastCard())));\r\n \t}\r\n }",
"public void MovePrevious()\r\n {\r\n\r\n \t try{\r\n \t\t if(!rsTution.previous())rsTution.first();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MovePrevious Error:\"+sqle);}\r\n }",
"public void setPreviousPosition(int xPos) {\n\t\tthis.previousPosition = xPos;\n\t}",
"public void movePrevious() throws CurrentNotSetException {\r\n\t\ttry {\r\n\t\t\taktu = aktu.getPrevious();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CurrentNotSetException();\r\n\t\t}\r\n\r\n\t}",
"private void previous() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n\n Timeline.Window currentWindow = currentTimeline.getWindow(currentWindowIndex, new Timeline.Window());\n if (currentWindowIndex > 0 && (player.getCurrentPosition() <= MAX_POSITION_FOR_SEEK_TO_PREVIOUS\n || (currentWindow.isDynamic && !currentWindow.isSeekable))) {\n player.seekTo(currentWindowIndex - 1, C.TIME_UNSET);\n } else {\n player.seekTo(0);\n }\n }",
"private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }",
"void setPrevPos(Vec3 pos);",
"public void setPreviousElement(Element<T> previousElement) \n\t{\n\t\tthis.previousElement = previousElement;\n\t}",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"private void previous() {\n if (position > 0) {\n Player.getInstance().stop();\n\n // Set a new position:w\n --position;\n\n ibSkipNextTrack.setImageDrawable(getResources()\n .getDrawable(R.drawable.ic_skip_next_track_on));\n\n try {\n Player.getInstance().play(tracks.get(position));\n } catch (IOException playerException) {\n playerException.printStackTrace();\n }\n\n setImageDrawable(ibPlayOrPauseTrack, R.drawable.ic_pause_track);\n setCover(Player.getInstance().getCover(tracks.get(position), this));\n\n tvTrack.setText(tracks.get(position).getName());\n tvTrackEndTime.setText(playerUtils.toMinutes(Player.getInstance().getTrackEndTime()));\n }\n\n if (position == 0) {\n setImageDrawable(ibSkipPreviousTrack, R.drawable.ic_skip_previous_track_off);\n }\n }",
"public DependencyElement previous() {\n\t\treturn prev;\n\t}",
"public void setPrevCell(Cell prev)\r\n {\r\n this.prev = prev;\r\n }",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"public void setPreviousPosition(int previousPosition)\n\t{\n\t\tsomethingChanged = true;\n\t\tthis.previousPosition = previousPosition;\n\t}",
"public void prev() {\n\t\tsynchronized (this) {\n\t\t\tint pos = getPreShuffledPos();\n\t\t\tif (pos > 0) {\n\t\t\t\tmPlayPos = mPlayOrder[pos - 1];\n\t\t\t} else {\n\t\t\t\tmPlayPos = mPlayOrder[mPlayListLen - 1];\n\t\t\t}\n\t\t\tstop(false);\n\t\t\tprepareAndPlayCurrent();\n\t\t}\n\t}",
"public void previous();",
"public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }",
"public Position2D getPreviousPosition()\n {\n return previousPosition;\n }",
"public void prev();",
"public boolean resetToPreviousPosition()\n {\n return setPosition( previousPosition);\n }",
"public void prevSlide() {\n\t\tif (currentSlideNumber > 0) {\n\t\t\tsetSlideNumber(currentSlideNumber - 1);\n\t }\n\t}",
"public void undoMove() {\n field.undoMove();\n }",
"@Override\r\n\tpublic String prev() {\n\t\tString pre;\r\n\r\n\t\tpre = p.getPrev();\r\n\r\n\t\tif (pre != null) {\r\n\t\t\tthisPrevious = true;\r\n\t\t\tinput(pre);\r\n\t\t}\r\n\t\treturn pre;\r\n\t}",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"public void setPrevious(ListElement previous)\n\t {\n\t this.previous = previous;\n\t }",
"public void inputPrev() {\n --this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"private void rewind() {\n currentPos = markPos;\n }",
"void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }",
"public void setPrevious(MyNode<? super E> _previous)\n\t{\n\t\tthis.previous = _previous;\n\t\t//this.previous = _previous;\n\t}",
"@Override\n public int previousIndex()\n {\n return idx-1;\n }",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"public ExtremeEntry previous() {\n\n\t\tsetLastReturned(getLastReturned().getPrevious());\n//\t\tnextIndex--;\n\t\tcheckForComodification();\n\t\treturn getLastReturned();\n\t}",
"public void switchPreviousTabulator() {\r\n\t\tCTabItem[] tabItems = this.displayTab.getItems();\r\n\t\tfor (int i = 0; i < tabItems.length; i++) {\r\n\t\t\tCTabItem tabItem = tabItems[i];\r\n\t\t\tif (tabItem.getControl().isVisible()) {\r\n\t\t\t\tif (i - 1 >= 0)\r\n\t\t\t\t\ttabItem.getParent().setSelection(i - 1);\r\n\t\t\t\telse\r\n\t\t\t\t\ttabItem.getParent().setSelection(tabItems.length - 1);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void prev() {\r\n\t\tif (curr == head)\r\n\t\t\treturn; // No previous element\r\n\t\tLink<E> temp = head;\r\n\t\t// March down list until we find the previous element\r\n\t\twhile (temp.next() != curr)\r\n\t\t\ttemp = temp.next();\r\n\t\tcurr = temp;\r\n\t}",
"public Node setPrevNode(Node node);",
"public void previousSlide() {\r\n\t\tpresentation.prevSlide();\r\n\t}",
"@Override\r\n public int previousIndex() {\r\n if (previous == null) {\r\n return -1;\r\n }\r\n return previousIndex;\r\n }",
"@Override\r\n\t\tpublic E previous() {\n\t\t\tcaret = caret.prev();\r\n\t\t\tif (caret == null)\r\n\t\t\t\tthrow new NoSuchElementException();\r\n\t\t\tnextIndex--;\r\n\t\t\treturn caret.n.data[caret.idx];\r\n\t\t}",
"@Override\n\t\tpublic int previousIndex() {\n\t\t\treturn 0;\n\t\t}",
"public CellCoord previousRow() {\n return new CellCoord(column, row - 1);\n }",
"void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }",
"public void setPrevious(AStarNode previous) {\n this.previous = previous;\n }",
"public void setPrevious(Node p) {\n previous = p;\n }",
"public void setPrev(ListElement<T> prev)\n\t{\n\t\tthis.prev = prev;\n\t}",
"private void movePrevious(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == 0) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() - 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getMaxColumns() - 1);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() - 1);\n\t\t }//end if-else\n\t }",
"public void setPrevious(Node<T> previous) {\r\n this.previous = previous;\r\n }",
"public void undo() {\n\t\tif (lastCommand != null) {\n\t\t\tlastCommand.undo();\n\t\t\tlastCommand = null;\n\t\t}\n\t}",
"private void prevSelect() {\n\t\tif (selectionIndex - 1 < 0) {\n\t\t\tselectionIndex = selections.size() - 1;\n\t\t} else {\n\t\tselectionIndex--;\n\t\t}\n\t\tselected.setVisible(true);\n\t\tselected = selections.get(selectionIndex);\n\t\t\n\t}",
"private Token previous() {\n return tokens.get(current-1);\n }",
"private void previous()\r\n {\r\n if(currentCard != 0) // if we are not at the first card\r\n {\r\n currentCard--; // make the previous card the current card\r\n \r\n // move through the cards: show the current card, hide the others\r\n for(int i = 0; i <= stack.getChildren().size()- 1; i++)\r\n {\r\n if(i == currentCard)\r\n {\r\n stack.getChildren().get(i).setVisible(true);\r\n }\r\n else\r\n {\r\n stack.getChildren().get(i).setVisible(false);\r\n }\r\n }\r\n }\r\n }",
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }",
"public static void previous() {\n\t\tsendMessage(PREVIOUS_COMMAND);\n\t}",
"private void previousQuestion() {\n if (mCurrentIndex > 0) {\n mCurrentIndex = (mCurrentIndex - 1) % questions.length;\n }\n else\n mCurrentIndex = questions.length - 1;\n int question = questions[mCurrentIndex].getTextResId();\n mText.setText(question);\n }",
"public void cursorUp() throws IndexOutOfBoundsException {\n if(cursor <= 0)\n throw new IndexOutOfBoundsException(\"Exception: Cursor is currently at line \"+cursor);\n //Setting the cursor to be the text line before its current position.\n cursor--;\n }",
"public void Prev();",
"public void setPrev(Level previous) {\n\t\tthis.prev = previous;\n\t}",
"public void setPrev(DListNode2 prev1){\r\n this.prev = prev1;\r\n }",
"public\tvoid setprevious (SNode previous) {\r\n\t\tthis.previous=previous;\r\n\t}",
"public void undoMove();",
"private void displayPrevious() {\r\n\t\ti--;\r\n\t\tdisplayCurrentPicture();\r\n\t}",
"public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }",
"public void undoMove(){\n circleObj.setX(oldX);\n circleObj.setY(oldY); \n }",
"public void setPrev(Node prev) {\n this.prev = prev;\n }",
"public void setPrevious(DSAGraphNode<E> inPrevious)\n {\n previous = inPrevious;\n }",
"public T previous()\n {\n // TODO: implement this method\n return null;\n }",
"public Move undoMove ()\n {\n Move lastPlayedMove = Move.undoMove();\n setGridElement(lastPlayedMove.getRow(), lastPlayedMove.getColumn(), Player.NONE);\n return lastPlayedMove;\n }",
"@Nonnull\n public Optional<ENTITY> previous()\n {\n currentItem = Optional.of(items.get(--index));\n update();\n return currentItem;\n }",
"public void resetCurrX() {\n currX = getStartX;\n }",
"public void focusPreviousComponent(Component paramComponent)\n/* */ {\n/* 1365 */ if (paramComponent != null) {\n/* 1366 */ paramComponent.transferFocusBackward();\n/* */ }\n/* */ }",
"public void moveCursorLeft();",
"public void setPrev(Node prev)\r\n\t{\r\n\t\tthis.prev = prev;\r\n\t}",
"public int previousIndex() {\r\n \treturn index - 1; \r\n }",
"public ListElement getPrevious()\n\t {\n\t return this.previous;\n\t }",
"public void undo()\r\n {\r\n if (changes!=null)\r\n {\r\n if (changes.getPrevious()!=null)\r\n {\r\n ignoreChange=true;\r\n changes.getElement().undo(doc);\r\n changes = changes.getPrevious();\r\n }\r\n }\r\n }",
"public AStarNode getPrevious() {\n return previous;\n }",
"public Node getPrevious() {\n return previous;\n }",
"private\t\tMiContainerIterator getPreviousIterator()\n\t\t{\n\t\tif (startAtTop)\n\t\t\t{\n\t\t\twhile (++layerNum <= editor.getNumberOfLayers() - 1)\n\t\t\t\t{\n\t\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t\t{\n\t\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn(null);\n\t\t\t}\n\t\twhile (--layerNum >= 0)\n\t\t\t{\n\t\t\tif (editor.getLayer(layerNum).isVisible())\n\t\t\t\t{\n\t\t\t\treturn(new MiContainerIterator(\n\t\t\t\t\teditor.getLayer(layerNum), !startAtTop, \n\t\t\t\t\titerateIntoPartsOfParts, iterateIntoAttachmentsOfParts));\n\t\t\t\t}\n\t\t\t}\n\t\treturn(null);\n\t\t}",
"private void prevButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prevButtonActionPerformed\n projectTree.setSelectionRow(projectTree.getSelectionRows()[0] + 1);\n }",
"public void setPrev(DNode newPrev) { prev = newPrev; }",
"@Override\n public final char previous() {\n if (--index >= lower) {\n return text.charAt(index);\n }\n index = lower;\n return DONE;\n }",
"public void goBack() {\n setEditor(currentEditor.getParentEditor());\n }",
"public int previousIndex() {\r\n throw new UnsupportedOperationException();\r\n }",
"public Vertex getPrev() {\n return prev;\n }",
"public void setPrev(String prev){\n\t\tthis.prev = prev;\n\t}",
"public E previous() {\r\n current--;\r\n return elem[current];\r\n }",
"public node getPrevious() {\n\t\t\treturn previous;\n\t\t}",
"public void setPrev(Node<T> prev) {\n\t\tthis.prev = prev;\n\t}",
"public DNode getPrev() { return prev; }",
"void prevSet(Entry e) {\r\n\t\t\tprev = e;\r\n\t\t}",
"public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }",
"public void undo() {\n\t\t\r\n\t}",
"public void setPrevious(DoublyLinkedNode<E> prev) {\n this.prevNode = prev;\n }",
"private void previousButtonMouseClicked(java.awt.event.MouseEvent evt) {\n if(previousButton.isEnabled() == false || checkUpdateInventoryError() == true) return;\n recordChanged();\n current --;\n displayCurrentStock();\n }",
"public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }"
]
| [
"0.7910565",
"0.7697611",
"0.73398805",
"0.73294884",
"0.7156966",
"0.7056169",
"0.7046098",
"0.6853121",
"0.6839226",
"0.6774662",
"0.6757567",
"0.6757081",
"0.66409665",
"0.65907776",
"0.6588324",
"0.65300196",
"0.6526085",
"0.65190333",
"0.6514188",
"0.64943224",
"0.64855635",
"0.6473849",
"0.6454715",
"0.6434057",
"0.64000535",
"0.6389332",
"0.63886964",
"0.6347918",
"0.6321575",
"0.63135624",
"0.63032883",
"0.629549",
"0.62948054",
"0.62839055",
"0.6273877",
"0.62557936",
"0.6250789",
"0.6246201",
"0.62437314",
"0.62182754",
"0.6217817",
"0.62002265",
"0.6197437",
"0.61904323",
"0.61822677",
"0.61763954",
"0.61700636",
"0.6158926",
"0.6150204",
"0.61492765",
"0.6132109",
"0.6115714",
"0.60882926",
"0.60882646",
"0.6085314",
"0.60555583",
"0.6047445",
"0.6042271",
"0.60395813",
"0.60284555",
"0.6015998",
"0.6014274",
"0.60137725",
"0.59955317",
"0.5992848",
"0.59891105",
"0.59875685",
"0.5962309",
"0.596133",
"0.5960776",
"0.5951728",
"0.5948739",
"0.59436864",
"0.594303",
"0.5942314",
"0.59357685",
"0.5915631",
"0.59119886",
"0.59094673",
"0.5900365",
"0.5891378",
"0.5888864",
"0.5888388",
"0.5886148",
"0.58821195",
"0.5879919",
"0.58796006",
"0.58762515",
"0.58751714",
"0.5855121",
"0.5853216",
"0.58496964",
"0.58489555",
"0.5839337",
"0.5838976",
"0.5828232",
"0.58274955",
"0.58247393",
"0.5823716",
"0.5814212",
"0.58138186"
]
| 0.0 | -1 |
Repositions this cursor's on the previous occurrence of the given key. | public boolean previous(String key) {
while(previous()) {
if (element.equals(new CaseInsensitiveElement<V>(key, null))) return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void Previous(int key){\n\t\tif(search(key)!=nil){\n\t\t\tNode res = getPrev(root,key,nil);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}else{\n\t\t\tint prev = findPrev(root,key);\n\t\t\tNode res = getNode(root,prev);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}\n\t}",
"public void previous() {\n if (highlight.getMatchCount() > 0) {\n Point point = highlight.getPreviousMatch(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n return;\n }\n Point point = file.getPreviousModifiedPoint(cursor.getY(), cursor.getX());\n if (point != null) {\n cursor.moveTo(point);\n }\n }",
"public void previous() {\n if (hasPrevious()) {\n setPosition(position - 1);\n }\n }",
"public void prev()\n {\n if (mHistoryIdx == 0) {\n return;\n }\n\n mCommandList.get(--mHistoryIdx).undo();\n this.setChanged();\n this.notifyObservers(mHistoryIdx);\n }",
"public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }",
"void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void setPreviousPosition(int xPos) {\n\t\tthis.previousPosition = xPos;\n\t}",
"public void setPrev(Position pos) {\n prev = pos;\n }",
"private Node locatePrevNode(K key) { \n\t\tNode p = null; \n\t\tNode current = first; \n\t\twhile (current != null && current.getData().getKey().compareTo(key) < 0) {\n\t\t\tp = current; \n\t\t\tcurrent = current.getNext(); \n\t\t}\n\t\treturn p; \n\t}",
"private void prevHistoryEntry()\n {\n if (this.historyPos > 0) {\n this.historyPos--;\n this.textInput.setText(this.history.get(this.historyPos));\n this.textInput.setSelection(this.history.get(this.historyPos).length());\n }\n }",
"private void removeTwoStepForwardFromPositionCache(Key currentKey) {\n\n\t\t// Create a two square forward position\n\t\tKey newKey =createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\n\t\t// Remove key if it exists\n\t\tif (currentKeyMapping.contains(newKey)) {\n\t\t\tcurrentKeyMapping.remove(newKey);\n\t\t}\n\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"protected void setSearchKey(Key key)\n\t{\n\t\tint last_idx = _searchKeyList.size() - 1 ;\n\t\t_searchKeyList.set(last_idx, key) ;\n\t}",
"public void MovePrevious()\r\n {\r\n\r\n \t try{\r\n \t\t if(!rsTution.previous())rsTution.first();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MovePrevious Error:\"+sqle);}\r\n }",
"public void movePrevious() throws CurrentNotSetException {\r\n\t\ttry {\r\n\t\t\taktu = aktu.getPrevious();\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CurrentNotSetException();\r\n\t\t}\r\n\r\n\t}",
"private void moveToPreviousCard() {\r\n\t\t// This is simple enough: Move the card set to the previous\r\n\t\t// card and update the label and database. If we're now on\r\n\t\t// the first card, disable the Previous button and make sure\r\n\t\t// the Next button is always enabled. Then rebuild the card\r\n\t\t// itself so the correct passcodes are displayed.\r\n \tif (cardSet.getLastCard() != Cardset.FIRST_CARD) {\r\n\t\t\tcardSet.previousCard();\r\n\t btnNext.setEnabled(true);\r\n\t\t\tif (cardSet.getLastCard() == Cardset.FIRST_CARD)\r\n\t\t\t\tbtnPrevious.setEnabled(false);\r\n\t\t\t// Save the card set to the database:\r\n\t\t\tDBHelper.saveCardset(cardSet);\r\n\t\t\trebuildCard();\r\n\t lblCardNumber.setText(getResources().getString(R.string.cardview_card_num_prompt).replace(getResources().getString(R.string.meta_replace_token), String.valueOf(cardSet.getLastCard())));\r\n \t}\r\n }",
"public void setLeft(int position,int key) {\r\n\t\tthis.treeLeft[position]=key;\r\n\t}",
"public boolean resetToPreviousPosition()\n {\n return setPosition( previousPosition);\n }",
"protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore) {\n // this does a deep copy of the key byte[] because the CellSearcher\n // interface wants a Cell\n CellScannerPosition position = ptSearcher.seekForwardToOrBefore(kv);\n\n if (CellScannerPosition.AT == position) {\n if (seekBefore) {\n ptSearcher.previous();\n return 1;\n }\n return 0;\n }\n\n return 1;\n }",
"@ActionTrigger(action=\"KEY-PRVREC\", function=KeyFunction.PREVIOUS_RECORD)\n\t\tpublic void spriden_PreviousRecord()\n\t\t{\n\t\t\t\n\t\t\t\tpreviousRecord();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\ttry { \n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(5));\n\t\t\t\t// \n\t\t\t\tnextBlock();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tnextBlock();\n\t\t\t\texecuteQuery();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\tpreviousBlock();\n\t\t\t\t// \n\t\t\t\t\n\t\t\t\t} finally {\n\t\t\t\t\t\t\t\n\t\t\t\t\tMessageServices.setMessageLevel(OracleMessagesLevel.decodeMessageLevel(0));\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}",
"private void rewind() {\n currentPos = markPos;\n }",
"void setPrevPos(Vec3 pos);",
"IntTree<V> changeKeysAbove(final long key, final int delta) {\n if (size == 0 || delta == 0) return this;\n\n if (this.key >= key)\n // adding delta to this.key changes the keys of _all_ children of this,\n // so we now need to un-change the children of this smaller than key,\n // all of which are to the left. note that we still use the 'old' relative key...:\n return new IntTree<V>(\n this.key + delta, value, left.changeKeysBelow(key - this.key, -delta), right);\n\n // otherwise, doesn't apply yet, look to the right:\n IntTree<V> newRight = right.changeKeysAbove(key - this.key, delta);\n if (newRight == right) return this;\n return new IntTree<V>(this.key, value, left, newRight);\n }",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"public void retreat() {\n if( mMatches.hasPrevious() ) {\n setCurrent( mMatches.previous() );\n }\n }",
"@Override\n public int previousIndex()\n {\n return idx-1;\n }",
"public void previous()\n {\n if (size != 0)\n {\n current = current.previous();\n }\n\n }",
"public void setPreviousPosition(int previousPosition)\n\t{\n\t\tsomethingChanged = true;\n\t\tthis.previousPosition = previousPosition;\n\t}",
"protected void setSortKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableOrder(key.getTableOrder()) ;\n\t\t\t\tky.setTableDesc(key.getTableDesc()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void setPrevious()\n {\n\tint currentIndex = AL.indexOf(currentObject);\n\t currentObject = AL.get(currentIndex -1);\n\t\n\t// never let currentNode be null, wrap to head\n\tif (currentObject == null)\n\t\tcurrentObject = lastObject;\n }",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }",
"protected void setGroupKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableGroup(key.getTableGroup()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void lowerKey(){\n\t\tkey = clamp(key-INCREMENT, MINKEY, MAXKEY);\n\t}",
"public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }",
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }",
"public void undoMove() {\n field.undoMove();\n }",
"public void inc(String key);",
"void undo() {\n Move rec = _history.get(_history.size() - 1);\n int to = rec.fromIndex();\n _directions.get(to).remove(_directions.get(to).size() - 1);\n if (rec.isJump()) {\n Move middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), null);\n rec = rec.jumpTail();\n while (rec != null) {\n middle = Move.move(rec.col1(), rec.row1(),\n rec.col0(), rec.row0(), middle);\n rec = rec.jumpTail();\n }\n while (middle != null) {\n set(middle.fromIndex(), EMPTY);\n set(middle.toIndex(), _whoseMove.opposite());\n set(middle.jumpedCol(), middle.jumpedRow(), _whoseMove);\n middle = middle.jumpTail();\n }\n\n } else {\n int from = rec.toIndex();\n set(to, _whoseMove.opposite());\n set(from, EMPTY);\n\n _directions.get(from).remove(_directions.get(from).size() - 1);\n }\n\n _whoseMove = _whoseMove.opposite();\n _history.remove(_history.size() - 1);\n setChanged();\n notifyObservers();\n }",
"public static String movePreviousLine(int n) {\n return CSI + n + \"F\";\n }",
"public int findPrev(Node root, int key){\n\t\tint res = key;\n\t\twhile(root != nil){\n\t\t\tif(key==root.id){\n\t\t\t\treturn root.left.id;\n\t\t\t}\n\t\t\tif(root.id > key ){\n\t\t\t\troot = root.left;\n\t\t\t}\n\t\t\tif( root != nil && root.id < key){\n\t\t\t\tres = root.id;\n\t\t\t\troot = root.right;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn res;\n\t}",
"public void prev() {\n\t\tsynchronized (this) {\n\t\t\tint pos = getPreShuffledPos();\n\t\t\tif (pos > 0) {\n\t\t\t\tmPlayPos = mPlayOrder[pos - 1];\n\t\t\t} else {\n\t\t\t\tmPlayPos = mPlayOrder[mPlayListLen - 1];\n\t\t\t}\n\t\t\tstop(false);\n\t\t\tprepareAndPlayCurrent();\n\t\t}\n\t}",
"public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}",
"IntTree<V> changeKeysBelow(final long key, final int delta) {\n if (size == 0 || delta == 0) return this;\n\n if (this.key < key)\n // adding delta to this.key changes the keys of _all_ children of this,\n // so we now need to un-change the children of this larger than key,\n // all of which are to the right. note that we still use the 'old' relative key...:\n return new IntTree<V>(\n this.key + delta, value, left, right.changeKeysAbove(key - this.key, -delta));\n\n // otherwise, doesn't apply yet, look to the left:\n IntTree<V> newLeft = left.changeKeysBelow(key - this.key, delta);\n if (newLeft == left) return this;\n return new IntTree<V>(this.key, value, newLeft, right);\n }",
"private void previous() {\n Timeline currentTimeline = simpleExoPlayerView.getPlayer().getCurrentTimeline();\n if (currentTimeline.isEmpty()) {\n return;\n }\n int currentWindowIndex = simpleExoPlayerView.getPlayer().getCurrentWindowIndex();\n\n Timeline.Window currentWindow = currentTimeline.getWindow(currentWindowIndex, new Timeline.Window());\n if (currentWindowIndex > 0 && (player.getCurrentPosition() <= MAX_POSITION_FOR_SEEK_TO_PREVIOUS\n || (currentWindow.isDynamic && !currentWindow.isSeekable))) {\n player.seekTo(currentWindowIndex - 1, C.TIME_UNSET);\n } else {\n player.seekTo(0);\n }\n }",
"public void undo() {\n if (!history.isEmpty()) {\n Command c = history.get(0);\n c.undo();\n history.remove(0);\n future.add(0, c);\n }\n }",
"public void jumpToPreLine() {\n int currentLineNo = getCurrentLineByCursor();\n if (currentLineNo == 1) {\n textBuffer.setCurToHead();\n return;\n }\n int curX = round(cursor.getX());\n textBuffer.setCurToTargetNo(currentLineNo-1);\n lineJumpHelper(curX);\n }",
"public void dec(String key) {\n if (!m.containsKey(key)) {\n return;\n }\n\n int val = m.get(key);\n delete(key, val);\n\n if (val == 1) {\n m.remove(key);\n } else {\n m.put(key, val - 1);\n insert(key, val - 1);\n }\n }",
"@Override\n public final char previous() {\n if (--index >= lower) {\n return text.charAt(index);\n }\n index = lower;\n return DONE;\n }",
"public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }",
"public K prev();",
"public T prev() {\n cursor = ((Entry<T>) cursor).prev;\n ready = true;\n return cursor.element;\n }",
"public void remove(int key) {\n data[key % KEY] = -1;\n\n }",
"public void setPrevious(MyNode<? super E> _previous)\n\t{\n\t\tthis.previous = _previous;\n\t\t//this.previous = _previous;\n\t}",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"public void moveCursorLeft();",
"public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}",
"public void previousRecord( View v){\n// \tClear out the display first\n \tclearBtn( v );\n \tLog.i(\"in prev record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \tcursor.moveToPrevious();\n \tLog.i(\"in prev record\", \"after moving the cursor \");\n \tthissheep_id = cursor.getInt(0);\n \tLog.i(\"in prev record\", \"this sheep ID is \" + String.valueOf(thissheep_id));\n \trecNo -= 1;\n \tfindTagsShowAlert(v, thissheep_id);\n\t\t// I've moved back so enable the next record button\n\t\tButton btn2 = (Button) findViewById( R.id.next_rec_btn );\n\t\tbtn2.setEnabled(true); \t\t\n \tif (recNo == 1) {\n \t\t// at beginning so disable prev record button\n \t\tButton btn3 = (Button) findViewById( R.id.prev_rec_btn );\n \tbtn3.setEnabled(false); \t\t\n \t}\n }",
"public void moveToCurrentRow() throws SQLException\n {\n m_rs.moveToCurrentRow();\n }",
"public void appendRem(int keyTag) {\n \tappendRem(new Integer(keyTag));\n }",
"public void back() throws JSONException {\n if(usePrevious || this.index <= 0) {\n throw new JSONException(\"Stepping back two steps is not supported\");\n }\n this.index -= 1;\n this.character -= 1;\n this.usePrevious = true;\n this.eof = false;\n }",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}",
"public void resetCurrX() {\n currX = getStartX;\n }",
"@Override\n\t\tpublic int previousIndex() {\n\t\t\treturn 0;\n\t\t}",
"public void inc(String key) {\n if (!keyMap.containsKey(key)) {\n keyMap.put(key, 1);\n DLinkedListNode node = countMap.get(1);\n System.out.println(node);\n if (node == null) {\n node = new DLinkedListNode(1);\n countMap.put(1, node);\n dll.insertAfter(dll.head, node);\n }\n node.keySet.add(key);\n }\n else {\n int count = keyMap.get(key); \n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count++;\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertAfter(oldNode, newNode);\n }\n newNode.keySet.add(key);\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }\n }",
"public void cursorUp() throws IndexOutOfBoundsException {\n if(cursor <= 0)\n throw new IndexOutOfBoundsException(\"Exception: Cursor is currently at line \"+cursor);\n //Setting the cursor to be the text line before its current position.\n cursor--;\n }",
"@Override\r\n public int previousIndex() {\r\n if (previous == null) {\r\n return -1;\r\n }\r\n return previousIndex;\r\n }",
"public void delete(Key key) {\n first = delete(first, key);\n }",
"public void setPrevCell(Cell prev)\r\n {\r\n this.prev = prev;\r\n }",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"void previous() throws NoSuchRecordException;",
"Position<T> before(Position<T> p) throws IllegalStateException;",
"void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }",
"private void movePrevious(PositionTracker tracker) {\n\t\t \n\t\t //initiate if-else statement\n\t\t if(tracker.getExactColumn() == 0) {\n\t\t\t \n\t\t\t //invoke the setExactRow method\n\t\t\t tracker.setExactRow(tracker.getExactRow() - 1);\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getMaxColumns() - 1);\n\t\t\t \n\t\t }else {\n\t\t\t \n\t\t\t //invoke the setExactColumn method\n\t\t\t tracker.setExactColumn(tracker.getExactColumn() - 1);\n\t\t }//end if-else\n\t }",
"public Node setPrevNode(Node node);",
"public ExtremeEntry previous() {\n\n\t\tsetLastReturned(getLastReturned().getPrevious());\n//\t\tnextIndex--;\n\t\tcheckForComodification();\n\t\treturn getLastReturned();\n\t}",
"private static void move(String key) {\n\t\tif (settings.contains(key)) {\n\t\t\tString value = settings.getString(key, SAMPLE_TONE);\n\t\t\tmRecordsDatabase.insertRecord(value, value);\n\t\t\tsettings.edit().remove(key).apply();\n\t\t}\n\t}",
"public void undoMove();",
"@Override\n public void changeKey(Key oldKey, Key newKey){\n changeKey(this.root, oldKey, newKey);\n }",
"public void dec(String key) {\n if (!keyMap.containsKey(key)) return;\n int count = keyMap.get(key);\n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count--;\n if (count > 0) {\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertBefore(oldNode, newNode);\n }\n newNode.keySet.add(key);\n }\n else {\n keyMap.remove(key);\n }\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }",
"@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\tmoveX=0;\n\t\t\t\tmoveY=0;\n\t\t\t}",
"public Row resetPosition() {\n rowNumber = -1;\n return this;\n }",
"public void undo() {\n\t\tif (lastCommand != null) {\n\t\t\tlastCommand.undo();\n\t\t\tlastCommand = null;\n\t\t}\n\t}",
"public void previous();",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void inputPrev() {\n --this.currentIndex;\n this.currentUnit = getUnit(this.currentIndex);\n this.currentChName = this.currentUnit.chName;\n }",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"public void setKeyMoveLeft(KeyCode moveLeft) {\n this.moveLeft = moveLeft;\n }",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"public Position2D getPreviousPosition()\n {\n return previousPosition;\n }",
"public void remove(Key key) {\n\n\t\tif (!contains(key)) return;\n\t\tint index = locate(key);\n\t\tkeys[index] = null;\n\t\tvalues[index] = null;\n\t\tthis.size--;\n\n\t\t// Check to see if any of the items in the table that follow\n\t\t// this one had collided with the key that was just removed.\n\t\t// If so, we need to rehash/reinsert them.\n\n\t\tint i = increment(index);\n\t\twhile (keys[i] != null) {\n\n\t\t\t// Save the key/value pair at this location.\n\n\t\t\tKey savedKey = keys[i];\n\t\t\tValue savedValue = values[i];\n\n\t\t\t// And temporarily remove it from the hash map.\n\n\t\t\tkeys[i] = null;\n\t\t\tvalues[i] = null;\n\n\t\t\t// Figure out where it should go now and reinsert it.\n\n\t\t\tindex = locate(savedKey);\n\t\t\tkeys[index] = savedKey;\n\t\t\tvalues[index] = savedValue;\n\n\t\t\t// Advance to the next item.\n\t\t\ti = increment(i);\n\t\t}\n\t}",
"public void setKey(TableKey key) {\n\tthis.key = key;\n }",
"private void undoPosition() {\r\n String undoingBoard = listOfBoards.pop();\r\n listOfMoves.pop();\r\n for (Square sq : map.keySet()) {\r\n char piece = undoingBoard.charAt(sq.index() + 1);\r\n if (piece == '-') {\r\n map.put(sq, EMPTY);\r\n }\r\n if (piece == 'B') {\r\n map.put(sq, BLACK);\r\n }\r\n if (piece == 'W') {\r\n map.put(sq, WHITE);\r\n }\r\n if (piece == 'K') {\r\n map.put(sq, KING);\r\n }\r\n board[sq.col()][sq.row()] = map.get(sq);\r\n }\r\n _moveCount -= 1;\r\n _turn = _turn.opponent();\r\n _repeated = false;\r\n }",
"public void insert(long key) {\n\t\tDELink newLink = new DELink(key);\n\t\tDELink previous = first;\n\t\tDELink current = first;\n\n\t\tif (first == null) {\n\t\t\tnewLink.next = first;\n\t\t\tfirst = newLink;\n\t\t} else {\n\t\t\twhile (newLink.next == null) {\n\t\t\t\tif (current.getLData() <= key) {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tprevious.next = current;\n\t\t\t\t} else {\n\t\t\t\t\tif (current == first) {\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t\tfirst = newLink;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious.next = newLink;\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void prevSlide() {\n\t\tif (currentSlideNumber > 0) {\n\t\t\tsetSlideNumber(currentSlideNumber - 1);\n\t }\n\t}",
"public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }",
"@Override\n\tpublic Position<E> before(Position<E> p) throws IllegalArgumentException {\n\t\tif (this.first() == p) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\treturn convert(p).prev;\n\t}"
]
| [
"0.63764834",
"0.61273",
"0.60970575",
"0.60047585",
"0.5964809",
"0.5955955",
"0.5878971",
"0.58100545",
"0.57876855",
"0.57388693",
"0.5717333",
"0.5702541",
"0.5645561",
"0.5585812",
"0.55534",
"0.54928464",
"0.54646635",
"0.5418329",
"0.53925663",
"0.5368441",
"0.536823",
"0.5353022",
"0.5340744",
"0.5334304",
"0.5319448",
"0.5318712",
"0.53172964",
"0.52792156",
"0.5275755",
"0.52753216",
"0.5247027",
"0.52441895",
"0.5233826",
"0.52297044",
"0.5212871",
"0.52104044",
"0.5195245",
"0.5156285",
"0.51550317",
"0.51239645",
"0.5120064",
"0.51127905",
"0.5107109",
"0.51060367",
"0.5089794",
"0.5080779",
"0.5069748",
"0.5065416",
"0.506165",
"0.50551754",
"0.5042396",
"0.5039086",
"0.5019409",
"0.50184846",
"0.5017144",
"0.5014552",
"0.50028664",
"0.5001931",
"0.49970293",
"0.498894",
"0.49866104",
"0.49751693",
"0.49683654",
"0.49564907",
"0.49564523",
"0.4956008",
"0.49550986",
"0.4951312",
"0.49480587",
"0.49471116",
"0.4933184",
"0.49322623",
"0.49269754",
"0.49259874",
"0.49144942",
"0.4913321",
"0.4912117",
"0.4898891",
"0.4897424",
"0.48825666",
"0.48822495",
"0.48797548",
"0.48735708",
"0.48723143",
"0.48708034",
"0.48549137",
"0.48544976",
"0.48531815",
"0.4850159",
"0.48483852",
"0.4848222",
"0.48469856",
"0.48453632",
"0.48428524",
"0.48414767",
"0.48411405",
"0.4841088",
"0.4837211",
"0.48367035",
"0.48336124"
]
| 0.5414013 | 18 |
Repositions this cursor's on the first element. | public boolean first() {
initialize();
return next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}",
"public void firstElement() {\r\n \t\tcurrentObject = 0;\r\n \t}",
"public void beforeFirst() {\n\t\tmoveTo(0);\n\t}",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"@Override\n public void start() {\n if (size > 0) {\n cursor = head;\n prev = null;\n } else {\n cursor = null; }\n }",
"public void start( )\r\n {\r\n if (cursor != head){\r\n \t cursor = head; // Implemented by student.\r\n \t precursor = null;\r\n }\r\n }",
"public void resetCurrentElement() {\r\n\t\tcurrentNode = firstNode;\r\n\t}",
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }",
"public void moveCursorLeft();",
"public void reset() {\r\n\t\tcursor = mark;\r\n\t}",
"public int getFirstPosition() {\n return mFirstPosition;\n }",
"public void moveToStart() {\r\n\t\tcurr = head;\r\n\t}",
"public void reset()\n {\n currentPosition = 0;\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void reset() {\n position = 0;\n }",
"public void MoveFirst()\r\n {\r\n\r\n \t try{\r\n \t\t rsTution.first();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MoveFirst Error:\"+sqle);}\r\n \t}",
"public void setFirst(boolean first){\r\n\t\tfirstCoordinate = first;\r\n\t}",
"void positionToStart () {\n currentRow = 0 - currentPiece.getOffset();\n currentColumn = board.columns / 2 - currentPiece.width / 2;\n }",
"public void moveFirst() throws CodeException {\n obj.moveFirst();\n \n showData();\n mf.setIcon(CLASSNAME);\n }",
"public boolean moveFirst(\n )\n {moveStart(); return moveNext();}",
"void seekToFirst();",
"public void moveSelectionLeft(){\n Cursor c = getCursor();\n int line = c.getLeftLine();\n int column = c.getLeftColumn();\n if(column - 1 >= 0){\n int toLeft = 1;\n if(column - 2 >= 0) {\n char ch = mText.charAt(line,column - 2);\n if(isEmoji(ch)) {\n column--;\n toLeft++;\n }\n }\n setSelection(line, column - 1);\n if(mACPanel.isShowing()) {\n String prefix = mACPanel.getPrefix();\n if(prefix.length() > toLeft) {\n prefix = prefix.substring(0,prefix.length() - toLeft);\n mACPanel.setPrefix(prefix);\n }else{\n mACPanel.hide();\n }\n }\n if(column - 1 <= 0) {\n mACPanel.hide();\n }\n }else{\n if(line == 0){\n setSelection(0, 0);\n }else{\n int c_column = getText().getColumnCount(line - 1);\n setSelection(line - 1, c_column);\n }\n }\n }",
"@Override\r\n\t\tpublic E setFirst(E first) {\n\t\t\treturn pair.setFirst(first);\r\n\t\t}",
"@Override\n public void setBeforeFirst(Wrapper beforeFirst)\n {\n\n }",
"@Override\n public int getPositionFirstOperand() {\n return position + 1;\n }",
"public Position getFirst() {\n return positions[0];\n }",
"public void goToStart() {\n\t\tsetPosition(0);\n\t}",
"protected void refillLeft(){\n\t\tif(!shouldRepeat && isSrollingDisabled) return; //prevent next layout calls to override first init to scrolling disabled by falling to this branch\n\t\tif(getChildCount() == 0) return;\n\t\t\n\t\tfinal int leftScreenEdge = getScrollX();\n\t\t\n\t\tView child = getChildAt(0);\n\t\tint childLeft = child.getLeft();\n\t\tint currLayoutRight = childLeft - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\twhile(currLayoutRight > leftScreenEdge){\n\t\t\tmFirstItemPosition--;\n\t\t\tif(mFirstItemPosition < 0) mFirstItemPosition = mAdapter.getCount()-1;\n\t\t\t\n\t\t\tchild = mAdapter.getView(mFirstItemPosition, getCachedView(), this);\n Validate.notNull(child,\"Your adapter has returned null from getView.\");\n\t\t\tchild = addAndMeasureChildHorizontal(child, LAYOUT_MODE_TO_BEFORE);\n\t\t\tcurrLayoutRight = layoutChildHorizontalToBefore(child, currLayoutRight, (LoopLayoutParams) child.getLayoutParams());\n\t\t\tchildLeft = child.getLeft() - ((LoopLayoutParams)child.getLayoutParams()).leftMargin;\n\t\t\t//update left edge of children in container\n\t\t\tmLeftChildEdge = childLeft;\n\t\t\t\n\t\t\t//if selected view is going to screen, set selected state on him\n\t\t\tif(mFirstItemPosition == mSelectedPosition){\n\t\t\t\tchild.setSelected(true);\n\t\t\t}\n\t\t}\n\t}",
"public void firstClick() {\n\t\tif(Main.player == 0) {\n\t\t\tif(piece == null || piece.getColor() == Color.WHITE)\n\t\t\t\treturn;\n\t\t\tMain.possiblePositions = piece.move(position);\n \thighlightTile(Main.possiblePositions);\n \tMain.prevPosition = this.position;\n \tMain.prevPiece = this.piece;\n \tMain.clickFlag = 1;\n\t\t}else {\n\t\t\tif(piece == null || piece.getColor() == Color.BLACK)\n\t\t\t\treturn;\n\t\t\tMain.possiblePositions = piece.move(position);\n \thighlightTile(Main.possiblePositions);\n \tMain.prevPosition = this.position;\n \tMain.prevPiece = this.piece;\n \tMain.clickFlag = 1;\n\t\t}\n\t}",
"public JsonCursor first() {\n JsonArray res = peekArray();\n\n assert res.size() > 0 && res.get(0) instanceof JsonObject;\n\n this.stack.push((JsonObject) res.get(0));\n\n return this;\n }",
"public void resetPosition()\n {\n resetPosition(false);\n }",
"private void clearCursor() {\n \n cursor_ = getDefaultInstance().getCursor();\n }",
"public void setFirstItemOffset(int offset){\n\t\tscrollTo(offset, 0);\n\t}",
"public boolean moveToFirst() {\r\n\t\t\tpointer = 0;\r\n\t\t\treturn !pointerOut();\r\n\t\t}",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"public void addFirst(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (firstCursor == 0) {\r\n resize(2 * items.length);\r\n }\r\n items[firstCursor--] = item;\r\n }",
"public void beforeFirst() throws TuplesException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Resetting \" + getRowCount() + \" rows of \" +\n tuples.getClass() + \" with columns \" +\n Arrays.asList(tuples.getVariables()));\n }\n \n tuples.beforeFirst();\n beforeEnd = true;\n }",
"@Override\r\n\t\tpublic T setFirst(T first) {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.setFirst(first);\r\n\t\t\t}\r\n\t\t}",
"@Override\n public void addFirst(E element) {\n Node<E> newNodeList = new Node<>(element, head);\n\n head = newNodeList;\n cursor = newNodeList;\n size++;\n }",
"public void moveSelectionHome(){\n setSelection(mCursor.getLeftLine(), 0);\n }",
"public Item removeFirst() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[++firstCursor];\r\n items[firstCursor] = null;\r\n return result;\r\n }",
"public void setFirst(Node first)\n {\n this.first = first;\n }",
"@Override\n\tpublic int getPosition() {\n\t\treturn 0;\n\t}",
"private void rewind() {\n currentPos = markPos;\n }",
"public final void Reset()\n\t{\n\t\t_curindex = -1;\n\t}",
"public void reset() {\n this.setIndex(0);\n }",
"public void firstSlide() {\r\n\t\tpresentation.setSlideNumber(0);\r\n\t}",
"Position<T> first();",
"public void resetCurrX() {\n currX = getStartX;\n }",
"@Override\r\n\tpublic E peekFirst() {\n\t\treturn peek();\r\n\t}",
"@Override\n void setupState(TYPE firstItem) {\n currentItem = 0;\n }",
"void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}",
"void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}",
"public void unsetFirstRow()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FIRSTROW$22, 0);\n }\n }",
"public void reset(){\n\t\tthis.currentIndex = 0;\n\t}",
"@Override\n\tpublic int getFirstVisiblePosition() {\n\t\treturn mLeftViewIndex < 0 ? 0 : mLeftViewIndex + 1;\n\t}",
"public Object getFirst() {\n\t\tcurrent = start;\n\t\treturn start == null ? null : start.item;\n\t}",
"public void resetX() {this.startX = 0f;}",
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"public void resetPaddleToStartingPosition(){\n myRectangle.setX(initialXLocation);\n }",
"void setFirst(Node node) {\n this.first = node;\n }",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"public Row resetPosition() {\n rowNumber = -1;\n return this;\n }",
"protected void refillOnChange(int firstItemPosition){\n\t\trefillInternal(firstItemPosition-1, firstItemPosition);\n\t}",
"public void setFirstClickCompMove(boolean firstClickCompMove) {\n this.firstClickCompMove = firstClickCompMove;\n }",
"public synchronized final void reset() {\r\n f_index = getDefaultIndex();\r\n f_userSetWidth = -1;\r\n // by default the first column is sorted the others unsorted\r\n f_sort = getDefaultSort();\r\n }",
"public void moveStart(\n )\n {\n index = StartIndex;\n if(state == null)\n {\n if(parentLevel == null)\n {state = new GraphicsState(this);}\n else\n {state = parentLevel.state.clone(this);}\n }\n else\n {\n if(parentLevel == null)\n {state.initialize();}\n else\n {parentLevel.state.copyTo(state);}\n }\n\n notifyStart();\n\n refresh();\n }",
"public void reset()\r\n/* 89: */ {\r\n/* 90:105 */ this.pos = 0;\r\n/* 91: */ }",
"private void firstClick(Tile tile) {\n possibleMoves = controller.getMovesForPieceAt(tile.getPosition());\n if (possibleMoves.size() > 0) {\n tile.highlight(Color.rgb(173, 216, 230, 0.6));\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).highlight(\n Color.rgb(60, 179, 113, 0.6));\n }\n isFirstClick = false;\n start = tile.getPosition();\n currentPlayingPiece = controller.getSymbolForPieceAt(start);\n lblCurrentPiece.setText(currentPlayingPiece.toString());\n }\n }",
"public int getFirstItemOffset(){\n\t\tif(isSrollingDisabled) return 0;\n\t\telse return getScrollX() - mLeftChildEdge;\n\t}",
"void setFirstResult(int offset);",
"public void updateFirstNode()\n {\n firstNode = (lastNode.getNext() == null) ? lastNode : lastNode.getNext();\n }",
"@Override\n public Cursor swapCursor(final Cursor cursor) {\n if (cursor == mCursor) return null;\n\n final Cursor prevCursor = mCursor;\n mCursor = cursor;\n return prevCursor;\n }",
"@Override\n\tpublic Position<E> addFirst(E e) {\n\t\treturn addBetween(head, head.next, e);\n\t}",
"public X cursor(Cursor cursor) {\n component.setCursor(cursor);\n return (X) this;\n }",
"public void moveLeft()\n {\n if (!this.search_zone.isLeftBorder(this.x_position))\n {\n this.x_position = (this.x_position - 1);\n }\n }",
"public void reset() {\n firstUpdate = true;\n }",
"public void setFirstCol(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle firstCol)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(FIRSTCOL$14, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(FIRSTCOL$14);\n }\n target.set(firstCol);\n }\n }",
"public void beforeFirst() throws SQLException {\n\n try {\n debugCodeCall(\"beforeFirst\");\n checkClosed();\n if (result.getRowId() >= 0) {\n resetResult();\n }\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }",
"public void setCursor(int renglon){\n panel.setCaretPosition(renglon);\n }",
"public void setFirstRow(org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle firstRow)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(FIRSTROW$22, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(FIRSTROW$22);\n }\n target.set(firstRow);\n }\n }",
"public void resetMove() {\n pointer = 0;\n }",
"public void resetDrag(){\n\t\tsetCurrentPosition( new Point(0,0) );\n\t\tsetScale(1);\n\t\tlengthsYShift = defaultYShift;\n\t}",
"private void resetScanner(SourcePosition start) {\n lastSourcePosition = start;\n scanner.setPosition(lastSourcePosition);\n }",
"public void SetBackToBeginning() {\n // starting word\n this.mStartWord = 0;\n // the words count that is displaying\n this.mDisplayWord = 0;\n this.mDisplayCount = 0;\n // reset index.\n this.mTextIndex = 0;\n // to enable to read and draw.\n this.mReadingF = true;\n this.mDisplayF = true;\n this.mWaitingF = false;\n // font size back default\n this.mFontSize = this.mFontDefaultSize;\n // font color back to default\n this.mFontColor = this.mFontDefaultColor;\n }",
"public VectorItem<O> firstVectorItem()\r\n {\r\n if (isEmpty()) return null; \r\n return first;\r\n }",
"public void reset() {\n\t\tif (marker >= 0) {\n\t\t\tsetSize(marker);\n\t\t\tmarker = -1;\n\t\t}\n\t}",
"private void resetMouseCursor() {\n GameContainer c = Main.getInstance().getContainer();\n c.setDefaultMouseCursor();\n }",
"void unsetBeginPosition();",
"public void unsetFirstCol()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(FIRSTCOL$14, 0);\n }\n }",
"public E getFirst() {\n return peek();\n }",
"public final void removeFirst() {\n this.size--;\n setFirst((Node) ((Node) get()).get());\n }",
"public void insertBeforeCursor(String s) {\n if(this.isEmpty() || cursor==-1)\n {\n lines.addFirst(s);\n }\n else\n lines.addBefore(new PositionObject<>(lines.get(cursor)), s);\n //cursor--;\n }",
"public boolean isFirstClickCompMove() {\n return firstClickCompMove;\n }",
"@Override\n\tpublic void mouseEntered(MouseEvent arg0) {\n\t\tthis.model.setCursorPosition(this.panel.getX(), this.panel.getY());\n\t\t\n\t}",
"public void setFirst(K first) {\r\n\t\tthis.first = first;\r\n\t}",
"public void reset() {\n this.index = this.startIndex;\n }",
"public int getFirstIndex() {\n return firstIndex;\n }",
"public void resetCurrent(){\r\n curr = head;\r\n }",
"private void rewindBlockIteratorToFirstInlineeBlock(\n ListIterator<BasicBlock> blockIterator, BasicBlock firstInlineeBlock) {\n while (blockIterator.hasPrevious() && blockIterator.previous() != firstInlineeBlock) {\n // Do nothing.\n }\n assert IteratorUtils.peekNext(blockIterator) == firstInlineeBlock;\n }",
"public GPoint getFirstPoint() {\n return(point1);\n }"
]
| [
"0.7543401",
"0.6987902",
"0.68785024",
"0.67250645",
"0.6499319",
"0.6494836",
"0.64203876",
"0.641393",
"0.63739675",
"0.6305814",
"0.62827426",
"0.6259256",
"0.62283874",
"0.62204295",
"0.6171929",
"0.61341095",
"0.6101193",
"0.60974485",
"0.60950506",
"0.60896266",
"0.60788584",
"0.59998876",
"0.59818715",
"0.59798753",
"0.5972513",
"0.5968905",
"0.5881125",
"0.5870506",
"0.5856715",
"0.58491236",
"0.5846425",
"0.58243144",
"0.57949895",
"0.57918394",
"0.5786632",
"0.57807046",
"0.5779068",
"0.5778434",
"0.5778114",
"0.5769067",
"0.57653934",
"0.57563925",
"0.574245",
"0.5716666",
"0.57127106",
"0.5655693",
"0.56510144",
"0.56476873",
"0.563612",
"0.56333166",
"0.5609009",
"0.5603863",
"0.55928814",
"0.55918044",
"0.5591788",
"0.55887693",
"0.557719",
"0.5560136",
"0.5557379",
"0.55559134",
"0.55480385",
"0.55375254",
"0.55264837",
"0.5520374",
"0.5518285",
"0.55166584",
"0.5512317",
"0.5505562",
"0.550381",
"0.54651713",
"0.54604393",
"0.54536045",
"0.54533434",
"0.54528725",
"0.5449184",
"0.54449475",
"0.54424953",
"0.5433218",
"0.54102695",
"0.54094386",
"0.5405347",
"0.54029953",
"0.54007995",
"0.54000205",
"0.538613",
"0.5384116",
"0.53788674",
"0.5371303",
"0.5366599",
"0.5361097",
"0.5359431",
"0.5345402",
"0.53444225",
"0.5344072",
"0.5331789",
"0.53304386",
"0.53231436",
"0.53133446",
"0.53066695",
"0.5305411",
"0.53037035"
]
| 0.0 | -1 |
Repositions this cursor's on the first occurrence of the given key. | public boolean first(String key) {
initialize();
return next(key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }",
"protected void setSearchKey(Key key)\n\t{\n\t\tint last_idx = _searchKeyList.size() - 1 ;\n\t\t_searchKeyList.set(last_idx, key) ;\n\t}",
"protected void setGroupKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableGroup(key.getTableGroup()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"protected void setSortKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableOrder(key.getTableOrder()) ;\n\t\t\t\tky.setTableDesc(key.getTableDesc()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void setLeft(int position,int key) {\r\n\t\tthis.treeLeft[position]=key;\r\n\t}",
"@Override\n public int incrementFirstValue(int key) {\n return array.incrementEntry(key << 1, 1);\n }",
"public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }",
"public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}",
"public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"public void inc(String key);",
"void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }",
"public void update(final long key) {\n update(key, 1);\n }",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"public void delete(Key key) {\n first = delete(first, key);\n }",
"public void setKey(Key key) {\n this.key = key;\n }",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"public void put(int key) { root = put(root, key); }",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"void setKey(K key);",
"protected void setCollectKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tif (key.getTableCollect().equals(\"NULL\"))\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(null) ;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tky.setTableCollect(key.getTableCollect()) ;\n\t\t\t\t}\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"public void setKey(int key);",
"public void setKey(int key);",
"public void inc(String key) {\n if (!keyMap.containsKey(key)) {\n keyMap.put(key, 1);\n DLinkedListNode node = countMap.get(1);\n System.out.println(node);\n if (node == null) {\n node = new DLinkedListNode(1);\n countMap.put(1, node);\n dll.insertAfter(dll.head, node);\n }\n node.keySet.add(key);\n }\n else {\n int count = keyMap.get(key); \n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count++;\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertAfter(oldNode, newNode);\n }\n newNode.keySet.add(key);\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }\n }",
"public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }",
"@Override\n @NonNull\n public SliceActionImpl setKey(@NonNull String key) {\n mActionKey = key;\n return this;\n }",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void setKey(SelectionKey key) {\n this._key = key;\n }",
"protected int seekToOrBeforeUsingPositionAtOrBefore(Cell kv, boolean seekBefore) {\n // this does a deep copy of the key byte[] because the CellSearcher\n // interface wants a Cell\n CellScannerPosition position = ptSearcher.seekForwardToOrBefore(kv);\n\n if (CellScannerPosition.AT == position) {\n if (seekBefore) {\n ptSearcher.previous();\n return 1;\n }\n return 0;\n }\n\n return 1;\n }",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"public int increment( K key ) {\n Integer i = map.get( key );\n if ( i == null ) i = 0;\n map.put( key, ++i );\n return i;\n }",
"private static void move(String key) {\n\t\tif (settings.contains(key)) {\n\t\t\tString value = settings.getString(key, SAMPLE_TONE);\n\t\t\tmRecordsDatabase.insertRecord(value, value);\n\t\t\tsettings.edit().remove(key).apply();\n\t\t}\n\t}",
"public void setKey(TableKey key) {\n\tthis.key = key;\n }",
"public void setQueryKey(String key)\n throws TorqueException\n {\n setPrimaryKey(key);\n }",
"public void setKey( Long key ) {\n this.key = key ;\n }",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"private int locate(Key key) {\n\t\tint index = hash(key);\n\t\twhile(this.keys[index] != null && !this.keys[index].equals(key)) {\n\t\t\tindex = increment(index);\n\t\t}\n\t\treturn index;\n\t}",
"public void setKey(int key){\r\n this.key = key; \r\n }",
"@Override\n\tpublic ManagedFunctionObjectTypeBuilder<M> setKey(M key) {\n\t\tthis.key = key;\n\t\tthis.index = key.ordinal();\n\t\treturn this;\n\t}",
"public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }",
"public void setRight(int position,int key) {\r\n\t\tthis.treeRight[position]=key;\r\n\t}",
"public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}",
"private synchronized Pair<K, V> seekInternal(K key) throws IOException {\n\t\t\treadIndex(); // make sure index is read\n\n\t\t\tLong pos = keys.get(key);\n\t\t\tif (pos != null) {\n\t\t\t\tdata.seek(pos);\n\t\t\t\treturn data.next();\n\t\t\t} else\n\t\t\t\treturn null;\n\t\t}",
"public void insert(String key){\n DataPair dp = getDataPair(key);\n insert(dp);\n }",
"public void put(String key) {\n\t root = put(root, key, 0);\n\t }",
"public void changeKey(int x, int y) throws IndexOutOfBoundsException {\n\t\tMap m = rows.get(y).getMap(x);\n\t\tsuper.changeKey(m.getKey(), InputManager.enterString(\"New Key\"));\n\t}",
"public void moveLeft(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex -= 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex >= 0) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very first line move to the end of the previous line\n if (lineIndex > 0) {\n lineIndex--;\n currentText = texts.get(lineIndex);\n characterIndex = currentText.getCharacterEdges().length - 1;\n if (characterIndex < 0) {\n characterIndex = 0;\n }\n updatePosition();\n }\n //If this is the first line character index should not change and position does not need to be updated\n else {\n characterIndex = 0;\n }\n }\n }\n }",
"public void remove(int key) {\n data[key % KEY] = -1;\n\n }",
"public final void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\r\n\t\tthis.key = key;\r\n\t}",
"public void setKey(String key)\r\n {\r\n m_key = key;\r\n }",
"public void setKey(String key) {\n if (element != null) {\n element.setKey(key);\n }\n }",
"public void moveCursorLeft();",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"public void setKey(String key) {\n\t\tthis.key = key;\n\t}",
"final int getKeyPosition(final Object key) {\r\n return Math.abs(key.hashCode()) % buckets.length;\r\n }",
"private void setKey(String key) {\n this.key = key;\n }",
"private void elementHit(K key) {\n\t\tint i = hitMap.get(key);\n\t\ti++;\n\t\thitMap.put(key, i);\n\t}",
"protected int firstIndex(Object key)\r\n {\r\n return key.hashCode() & mask;\r\n }",
"public void setKey (K k) {\n key = k;\n }",
"IntTree<V> changeKeysAbove(final long key, final int delta) {\n if (size == 0 || delta == 0) return this;\n\n if (this.key >= key)\n // adding delta to this.key changes the keys of _all_ children of this,\n // so we now need to un-change the children of this smaller than key,\n // all of which are to the left. note that we still use the 'old' relative key...:\n return new IntTree<V>(\n this.key + delta, value, left.changeKeysBelow(key - this.key, -delta), right);\n\n // otherwise, doesn't apply yet, look to the right:\n IntTree<V> newRight = right.changeKeysAbove(key - this.key, delta);\n if (newRight == right) return this;\n return new IntTree<V>(this.key, value, left, newRight);\n }",
"public void lowerKey(){\n\t\tkey = clamp(key-INCREMENT, MINKEY, MAXKEY);\n\t}",
"void setKey(int key);",
"public void setKey(String key) {\n this.key = key;\n }",
"private void removeTwoStepForwardFromPositionCache(Key currentKey) {\n\n\t\t// Create a two square forward position\n\t\tKey newKey =createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\n\t\t// Remove key if it exists\n\t\tif (currentKeyMapping.contains(newKey)) {\n\t\t\tcurrentKeyMapping.remove(newKey);\n\t\t}\n\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"void xsetKey(org.apache.xmlbeans.XmlNMTOKEN key);",
"public void setKeyJump(final int key) {\n jumpKey = key;\n }",
"public void setKey(String key) {\r\n this.key = key;\r\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"public void setKey(String key) {\n this.key = key;\n }",
"private void setKey(String key){\n\t\tthis.key=key;\n\t}",
"public void setKey(String key) {\n\n this.key = key;\n }",
"public void setKey(final String key) {\n this.key = key;\n }",
"public void Previous(int key){\n\t\tif(search(key)!=nil){\n\t\t\tNode res = getPrev(root,key,nil);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}else{\n\t\t\tint prev = findPrev(root,key);\n\t\t\tNode res = getNode(root,prev);\n\t\t\tif(res != nil){\n\t\t\t\tSystem.out.println(res.id + \" \" + res.count);\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"0 0\");\n\t\t\t}\n\t\t}\n\t}",
"public void setKey(MessageKey key) {\n\tthis.key = key;\n }",
"@Override\n public void insert(K key) {\n try {\n this.rootNode = insertNode(this.rootNode, key);\n } catch (DuplicateKeyException e) {\n System.out.println(e.getMessage());\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n }",
"public void setPrimaryKey(String key) throws TorqueException\n {\n setPrimaryKey(new ComboKey(key));\n }",
"public void reinstateKeyFromArchive(int key) throws PersistenceException {\n super.reinstateArchiveKey(key);\n }",
"public void inc(String key) {\n map.put(key, map.getOrDefault(key, 0) + 1);\n int val = map.get(key);\n vals.putIfAbsent(val, new HashSet<>());\n vals.get(val).add(key);\n if (vals.containsKey(val - 1)) {\n vals.get(val - 1).remove(key);\n if (vals.get(val - 1).size() == 0)\n vals.remove(val - 1);\n }\n if (map.get(key) > max) {\n max = map.get(key);\n maxKey = key;\n }\n if (map.get(key) - 1 == min) {\n if (vals.get(min) == null || vals.get(min).size() == 0) {\n min++;\n minKey = key;\n } else {\n minKey = vals.get(min).iterator().next();\n }\n }\n if (map.get(key) == 1) {\n min = 1;\n minKey = key;\n }\n }",
"public void setKey(final String key);",
"public void setKey(final String key);",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public void setKey(KeyField key)\n\tthrows SdpException {\n\tif (key == null)\n\t throw new SdpException(\"The key is null\");\n\tsetKeyField(key);\n }",
"public void setFirst(K first) {\r\n\t\tthis.first = first;\r\n\t}",
"public void dec(String key) {\n if (!m.containsKey(key)) {\n return;\n }\n\n int val = m.get(key);\n delete(key, val);\n\n if (val == 1) {\n m.remove(key);\n } else {\n m.put(key, val - 1);\n insert(key, val - 1);\n }\n }",
"public void setKeyMoveLeft(KeyCode moveLeft) {\n this.moveLeft = moveLeft;\n }",
"public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}",
"void setKey(final String key);",
"public K setKey(K key);",
"public void search(int key) {\n beginAnimation();\n queueNodeSelectAnimation(root, \"Start at root\",\n AnimationParameters.ANIM_TIME);\n valueSearch(key, root);\n stopAnimation();\n\n }",
"public ShootingPosition(double key, double value) {\n\t\tthis.key = key;\n\t\tthis.value = value;\n\t}",
"public void setLowKey(KeyClass low_key) throws ChainException, IOException {\n\t\tthis.lowKey = low_key;\r\n\t\tRID rid = new RID();\r\n\t\t\r\n\t\tKeyDataEntry dEntry = leaf.getFirst(rid);\r\n\t\tKeyClass curKey = dEntry.key;\r\n\t\t\r\n\t\twhile( BT.keyCompare(curKey, low_key) != 0 ){\r\n\t\t\tdEntry = leaf.getNext(rid);\r\n\t\t\tif( dEntry != null ){\r\n\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t}else{\r\n\t\t\t\tPageId nextPageId = leaf.getNextPage();\r\n\t\t\t\tif( nextPageId.pid != -1){\r\n\t\t\t\t\tSystemDefs.JavabaseBM.unpinPage(leaf.getCurPage(), true);\r\n\t\t\t\t\tSystemDefs.JavabaseBM.pinPage( nextPageId, leaf, false);\r\n\t\t\t\t\tleaf.dumpPage();\r\n\t\t\t\t\tdEntry = leaf.getFirst(rid);\r\n\t\t\t\t\tcurKey = dEntry.key;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//wasal le 2a5er 7aga:\r\n\t\t\t\t\tSystem.out.println(\"Invalid lower keyyyyyyy.\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}//end else.\r\n\t\t\t\t\r\n\t\t\t}//end else.\r\n\t\t\t\r\n\t\t}//end while.\r\n\t\t\r\n\t\t\r\n\t}",
"protected int findPosKey(KeyType key) {\n int kthOddNumber = 1;\n int index = myHashKey(key);\n\n while ((mArray[index].state != EMPTY) &&\n (mArray[index].data.equals(key))) {\n index += kthOddNumber;\n kthOddNumber += 2;\n if (index >= mTableSize) {\n index -= mTableSize;\n }\n }\n return index;\n }",
"public synchronized Object put( Object key, Object object ) {\n\t\tObject oldPos = mapKeyPos.get(key);\n\t\tif ( oldPos != null ) {\n\t\t\tint pos = ((Integer)oldPos).intValue();\n\t\t\tObject oldObject = values[pos];\n\t\t\tvalues[pos] = object;\n\t\t\tstatus[pos] = LRU_NEW;\n\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t} else {\n\t\t\t// skip to new pos -- for Cache, change walkStatus() to get lock....\n\t\t\twhile (walkStatus() != LRU_OLD) {}\n\n\t\t\tObject intvalue;// = null;\n\t\t\tif ( keys[cur] != null ) {\n\t\t\t\tintvalue = mapKeyPos.remove(keys[cur]);\n//\t\t\t\tif ( intvalue == null )\n//\t\t\t\t\tintvalue = new Integer(cur);\n\t\t\t} else {\n\t\t\t\tintvalue = new Integer(cur);\n\t\t\t}\n\t\t\tObject oldObject = values[cur];\n\t\t\tkeys[cur] = key;\n\t\t\tvalues[cur] = object;\n\t\t\tstatus[cur] = LRU_NEW;\n\t\t\t//System.out.println(\"mapKeyPos, key: \"+key+\" intvalue: \"+intvalue);\n\t\t\tmapKeyPos.put(key, intvalue);\n\t\t\tcur++;\n\t\t\tif ( cur >= size ) cur = 0;\n\t\t\tif ( oldObject != null )\n\t\t\t\tdispose( oldObject );\n\t\t\treturn oldObject;\n\t\t}\n\t}",
"void setKey(java.lang.String key);",
"public void insert(int key){\n\t\tif(this.root == null){\n\t\t\tNode r = new Node(key);\n\t\t\tthis.root = r;\t\n\t\t}else{\n\t\t\t//if not recursively insert the node\n\t\t\trecInsert(this.root, key);\n\t\t}\n\t\treturn;\n\t}"
]
| [
"0.6410121",
"0.6126454",
"0.5974966",
"0.58527",
"0.5607304",
"0.55506337",
"0.55333716",
"0.546483",
"0.5421819",
"0.53959954",
"0.5395757",
"0.53860074",
"0.53794295",
"0.5339371",
"0.533476",
"0.5312218",
"0.5283996",
"0.52652794",
"0.5260687",
"0.5254652",
"0.5237527",
"0.5230264",
"0.5228624",
"0.5221389",
"0.5221389",
"0.5213544",
"0.518874",
"0.5184374",
"0.5182537",
"0.518197",
"0.517884",
"0.517437",
"0.5169334",
"0.51648563",
"0.5159614",
"0.51531667",
"0.5152445",
"0.5144869",
"0.5132165",
"0.5129181",
"0.50895983",
"0.50723433",
"0.5066374",
"0.5047508",
"0.50346005",
"0.503277",
"0.5029793",
"0.50276077",
"0.5016767",
"0.501496",
"0.50111216",
"0.50105494",
"0.50028604",
"0.5002603",
"0.49996567",
"0.49908468",
"0.49889255",
"0.49889255",
"0.4961769",
"0.49570602",
"0.49557588",
"0.49549142",
"0.4950327",
"0.4948195",
"0.49467573",
"0.49455407",
"0.4934739",
"0.49301592",
"0.49281016",
"0.4923663",
"0.49218526",
"0.49183896",
"0.49183896",
"0.49183896",
"0.49016586",
"0.4898419",
"0.48951444",
"0.48922905",
"0.48836976",
"0.48774603",
"0.4873998",
"0.48571584",
"0.48486003",
"0.48451322",
"0.48451322",
"0.48428565",
"0.48425847",
"0.48425066",
"0.4836997",
"0.4831003",
"0.48160452",
"0.48158514",
"0.4815395",
"0.48110288",
"0.48068726",
"0.48037246",
"0.4800223",
"0.47957742",
"0.4786371",
"0.47853965"
]
| 0.48194835 | 90 |
Repositions this cursor's on the last element. | public boolean last() {
boolean result = false;
while(iterator.hasNext()) {
result = true;
next();
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void MoveLast()\r\n {\r\n\r\n \t try{\r\n \t\t rsTution.last();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MoveLast Error:\"+sqle);}\r\n \t}",
"private void setLast() { this._last = true; }",
"void seekToLast();",
"public void moveRight(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex += 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex < currentText.getCharacterEdges().length) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very last line move to the beginning of the next line\n if (lineIndex < texts.size() - 1) {\n lineIndex++;\n currentText = texts.get(lineIndex);\n characterIndex = 0;\n updatePosition();\n }\n //If this is the last line character index should not change and position does not need to be updated\n else {\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n }\n }\n }",
"public void moveCursorRight();",
"Position<T> last();",
"public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}",
"public int getLastPos ()\r\n {\r\n return (getFirstPos() + getThickness()) - 1;\r\n }",
"public void cursorDown() throws IndexOutOfBoundsException {\n if(cursor == size()-1)\n throw new IndexOutOfBoundsException(\"Exception: Current line is size()-1!\");\n //Setting the cursor to be the text line after its current position.\n cursor++;\n }",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"public void removeNodeAfter() { cursor = cursor.getNext().getNext(); }",
"@Override\n\tpublic Position insertLast(Object element) {\n\t\treturn null;\n\t}",
"private void resetCursorToMaxBufferedRowsPlus1() {\n if (cursorPosition > rows.size() + 1) {\n cursorPosition = rows.size() + 1;\n }\n }",
"public void undoLast() {\t\t\n\t\tCommand command = undoStack.pop();\n\t\tcommand.undo();\n\t}",
"public void resetToLast() {\r\n\t\taktu = last;\r\n\t}",
"public void reverseLastTranslation() {\r\n this.translate(-lastDx,-lastDy);\r\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}",
"void moveNext()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == back) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added cause i was failing the test scripts and forgot to manage the indices \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.next; //moves cursor toward back of the list\n index++; //added cause i was failing to the test scripts and forgot to manage the indicies\n\t\t\t}\n\t\t}\n\t}",
"public void moveToEnd() {\r\n\t\tcurr = tail;\r\n\t}",
"private void moveLastPart() {\n Field lastPart = snake.getCell(snake.getSize() - 1);\n fields[lastPart.getY()][lastPart.getX()] = lastPart;\n fields[lastPart.getPreviousY()][lastPart.getPreviousX()] = null;\n }",
"public void moveSelectionEnd(){\n int line = mCursor.getLeftLine();\n setSelection(line, getText().getColumnCount(line));\n }",
"public void moveEnd(\n )\n {moveLast(); moveNext();}",
"private void clearCursor() {\n \n cursor_ = getDefaultInstance().getCursor();\n }",
"public void removeAtCursor() {\n lines.remove(cursor);\n if(cursor !=0 && cursor==lines.size())\n cursor--;\n }",
"public boolean moveLast(\n )\n {\n int lastIndex = objects.size()-1;\n while(index < lastIndex)\n {moveNext();}\n\n return getCurrent() != null;\n }",
"public void moveFirst() {\n\t\tcurrentElement = 0;\n\t}",
"private void pushBack() {\n\t\tbufferLocal.insertarEnCabeza(listaTokens.get(listaTokens.size()-1));\n\t}",
"@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}",
"public void cursorUp() throws IndexOutOfBoundsException {\n if(cursor <= 0)\n throw new IndexOutOfBoundsException(\"Exception: Cursor is currently at line \"+cursor);\n //Setting the cursor to be the text line before its current position.\n cursor--;\n }",
"@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}",
"private void unsetLast() { this._last = false; }",
"void setLastTickPos(Vec3 pos);",
"@Override\n public void setAfterLast(Wrapper afterLast)\n {\n\n }",
"private void cursorMoveRightest() {\n\t\td(\"Warn cursorMoveRightest() NOT implemented\");\r\n\t}",
"@Override\n\tpublic Position last() throws EmptyContainerException {\n\t\treturn null;\n\t}",
"public void addLast(Item item) {\r\n if (item == null) {\r\n throw new NullPointerException();\r\n }\r\n if (lastCursor == items.length) {\r\n resize(2 * items.length);\r\n }\r\n items[lastCursor++] = item;\r\n }",
"public Object lastElement();",
"private void undoLastPoint() {\n \t\tif ( this.markers.isEmpty() ) {\n \t\t\treturn;\n \t\t}\n \n \t\tthis.markers.remove( this.markers.size() - 1 ).remove();\n \t\tthis.commitPolygon();\n \n \t\tif ( this.markers.size() > 1 ) {\n \t\t\tthis.moveCameraToPolygon( true );\n \t\t}\n \n \t\tthis.disableIfDissatisfied();\n \t}",
"public void lastSlide() {\t\t\r\n\t\tpresentation.setSlideNumber(presentation.getSize() - 1);\t\t\r\n\t}",
"public void setLastViewedPosition(long position) {\n mEditor.putLong(\"LastViewedPosition\", position);\n mEditor.commit();\n }",
"Position<T> addLast(T data);",
"public double getLastMoved();",
"public void reset() {\r\n\t\tcursor = mark;\r\n\t}",
"private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}",
"@Override\n\tpublic void redo() {\n\t\tthis.list.add(shape);\n\n\t}",
"private void rewind() {\n currentPos = markPos;\n }",
"void unsetEndPosition();",
"@Override\n public void redo(){\n this.parent.getSelectedArea().clear();\n \n //And add the point to the list again\n this.parent.getSelectedArea().add(this.selected);\n }",
"public void popToPointer() {\n while (this.size() > undoPointer + 1) {\n super.pop();\n }\n }",
"public void advance( )\r\n {\r\n\t if(isCurrent() != true){// Implemented by student.\r\n\t throw new IllegalStateException(\"no current element\");\r\n\t }\r\n\t else\r\n\t \t precursor = cursor;\r\n\t \t cursor = cursor.getLink(); // Implemented by student.\r\n }",
"public static void setLastCommandOrigin(final int iLast) {\n\n m_iLastCommandOrigin = iLast;\n\n }",
"public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }",
"@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}",
"public void moveRight() {\n this.position.addColumn(1);\n }",
"public void setLastCell(String positionValue) {\n\t\tlastCell = positionValue;\n\t}",
"public void addLast(Item x);",
"public E peekLast();",
"public void remove()\n {\n list.remove(cursor);\n cursor--;\n }",
"public boolean isLastPosition() {\n return this.value == LAST_VALUE;\n }",
"@Override\n\tpublic void backspace()\n\t{\n\t\tif (!isAtStart()) left.pop();\n\t}",
"public void moveSelectionRight(){\n Cursor c = getCursor();\n int line = c.getLeftLine();\n int column = c.getLeftColumn();\n int c_column = getText().getColumnCount(line);\n if(column + 1 <= c_column){\n char ch = mText.charAt(line,column);\n boolean emoji;\n if(emoji = isEmoji(ch)) {\n column ++;\n if(column + 1 > c_column){\n column--;\n }\n }\n if(!emoji && mACPanel.isShowing()) {\n if(!mLanguage.isAutoCompleteChar(ch)) {\n mACPanel.hide();\n }else{\n String prefix = mACPanel.getPrefix() + ch;\n mACPanel.setPrefix(prefix);\n }\n }\n setSelection(line, column + 1);\n }else{\n if(line + 1 == getLineCount()){\n setSelection(line, c_column);\n }else{\n setSelection(line + 1, 0);\n }\n }\n }",
"@Override\n public void advance() {\n if (isCurrent()) {\n prev = cursor;\n cursor = cursor.getNext();\n } else {\n throw new IllegalStateException(\"There is no current element.\");\n }\n }",
"public void displayLastValues()\r\n {\r\n coordX.setText(Float.toString(lastX));\r\n\r\n coordY.setText(Float.toString(lastY));\r\n\r\n coordZ.setText(Float.toString(lastZ));\r\n }",
"public void moveDown(){\n if(currentText != null) {\n //If this is not the very last text\n if (lineIndex < texts.size() - 1) {\n //Move down\n lineIndex++;\n currentText = texts.get(lineIndex);\n\n //Try to use the saved character index as the character index\n if (savedCharacterIndex != -1) {\n characterIndex = savedCharacterIndex;\n }\n\n //Ensure that character index is within the bounds of the text\n if (characterIndex > currentText.getCharacterEdges().length - 1) {\n //Save the character index\n if (characterIndex > savedCharacterIndex) {\n savedCharacterIndex = characterIndex;\n }\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n\n //Update the position\n updatePosition();\n }\n //If this is the last line then the cursor should be moved to the end of the line\n else {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n characterIndex = currentText.getCharacterEdges().length - 1;\n updateXPosition(true);\n }\n }\n }",
"public void setLastMove(SymbolType move){\n this.lastMove = move;\n }",
"void movePrev()\n\t{\n\t\tif (cursor != null) \n\t\t{\n\t\t\tif (cursor == front) \n\t\t\t{\n\t\t\t\tcursor = null;\n index = -1; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcursor = cursor.prev; //moves cursor toward front of the list\n index--; //added this because i kept failing the test cases on the grading script\n\t\t\t}\n\t\t}\n\t}",
"public void clearLastMarker(){\n lastMarker.remove();\n }",
"public void moveCursorLeft();",
"public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }",
"public void absMoveToLastRowAt(int index) {\n int lastIndex = getModel().getRowCount() - 1;\n if ((index < 0) || (index >= lastIndex)) {\n return;\n }\n\n Vector[] va = getAllRowsData();\n\n Vector vTemp = va[index];\n for (int i = index; i < lastIndex; ++i) {\n va[i] = va[i + 1];\n }\n va[lastIndex] = vTemp;\n\n setRows(va);\n }",
"void setLastPoint(Point lastPoint) {\n this.lastPoint = lastPoint;\n }",
"public void setLastMove(String lm) {\n\t\tlastMove = lm;\r\n\t}",
"@Override\n public void run() {\n gridLayoutItems.setSelection(botPrueba.getCount() - 1);\n }",
"@Override\r\n\tpublic void redo() {\n\t\tfor(IShape shape : tempList)\r\n\t\t\tshapeList.add(shape);\r\n\t}",
"public void backSpace(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //If a character is being removed from a single line\n if (characterIndex > 0) {\n currentText = codeWindow.getTextLineController().backspace(currentText, characterIndex, true);\n characterIndex--;\n }\n //If a newline character is being removed two lines need to be merged\n else if (lineIndex > 0) {\n characterIndex = codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex - 1).getCharacterEdges().length - 1;\n currentText = codeWindow.getTextLineController().merge(codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex - 1), currentText, codeWindow);\n lineIndex--;\n }\n //The cursors character or line index changed, update accordingly\n updatePosition();\n }\n }",
"public static native void SetLast(long lpjFbxArrayVector2, long pElement);",
"@Override\n public void redo() {\n shapeList.add((newShape));\n }",
"@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}",
"@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }",
"void undo() {\r\n if (_moveCount > 0) {\r\n undoPosition();\r\n }\r\n }",
"@Override\r\n protected void redrawCursor() {\n this.viewport.getCursor().moveAccordingly(this.finger.getFingerPitch(), this.finger.getFingerYaw());\r\n }",
"@Override\n public Wrapper getAfterLast()\n {\n return null;\n }",
"public void setCursor(int renglon){\n panel.setCaretPosition(renglon);\n }",
"@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}",
"public void reset()\n {\n currentPosition = 0;\n }",
"public void setCursor(int l, int c);",
"public void addLast(Object item){\n //Using the getNode() method to retrieve the reference and then call addAfter()\n MovieNode target = getNode(size);\t//yo retreive the last MovieNode\n addAfter(target, item);\t\t\t//call the addAfter method \n }",
"public Object last()throws ListExeption;",
"public void moveCursorToLine(int i) throws IndexOutOfBoundsException {\n if(i < 0 || i > size()-1)\n throw new IndexOutOfBoundsException();\n cursor = i;\n }",
"@Override\n\tpublic void commitOffsets() {\n\n\t}",
"public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }",
"public void addLast(E item);",
"public void moveUp() {\r\n\t\tmy_cursor_location.y--;\r\n\t}",
"public GJPoint2D lastControl();",
"@Override\n public void remove() {\n Entry<T> prev = ((Entry<T>) cursor).prev;\n super.remove();\n if(cursor!=tail){\n ((Entry<T>) cursor.next).prev = prev;\n }\n }",
"public void setLast(Node last)\n {\n this.last = last;\n }",
"public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}",
"void insertAfter(Object data)\n\t{\n\t\tNode temp = new Node(data);\n\t\tif (length==0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on empty List\");\n\t\t}\n\t\tif (cursor == null) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call insertAfter() on cursor that is off the list\");\n\t\t}\n\t\tif (cursor == back) \n\t\t{\n\t\t\tappend(data); //if the cursor is at the back of the list then you can just all append since you will be inserting the element into the back element\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\ttemp.next = cursor.next; //the new node temp's next will be the cursor's next\n\t\t\ttemp.prev = cursor; //the new node temp's previous will become the cursor\n\t\t\tcursor.next.prev = temp; //cursor's next previous element becomes temp\n\t\t\tcursor.next = temp; //cursor's next becomes temp\n\t\t\tlength++;\n\t\t}\n\t}",
"public void reset() {\n position = 0;\n }",
"public Item removeLast() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException();\r\n }\r\n Item result = items[--lastCursor];\r\n items[lastCursor] = null;\r\n return result;\r\n }"
]
| [
"0.6685716",
"0.6634527",
"0.6602752",
"0.651457",
"0.64809465",
"0.6342643",
"0.6319621",
"0.63175577",
"0.6310045",
"0.6234149",
"0.6234126",
"0.623122",
"0.62232816",
"0.6211544",
"0.6179932",
"0.6155363",
"0.6137947",
"0.6077708",
"0.6067768",
"0.6042363",
"0.6013526",
"0.59718174",
"0.59670144",
"0.5946713",
"0.59418994",
"0.594149",
"0.5933476",
"0.59314233",
"0.59100544",
"0.5907071",
"0.59046173",
"0.5862819",
"0.5860812",
"0.5856805",
"0.5819976",
"0.58115834",
"0.58086336",
"0.5805712",
"0.5803482",
"0.5800431",
"0.5785193",
"0.5778675",
"0.5765866",
"0.57622695",
"0.5759511",
"0.57295185",
"0.57283247",
"0.5721612",
"0.57184005",
"0.57148796",
"0.5691244",
"0.5663546",
"0.5650054",
"0.5644555",
"0.56441236",
"0.56430453",
"0.56352895",
"0.5632985",
"0.56183946",
"0.5612789",
"0.560906",
"0.5594165",
"0.55933",
"0.5589275",
"0.5576686",
"0.5575879",
"0.55756485",
"0.5572053",
"0.55651176",
"0.5559117",
"0.55556726",
"0.55537546",
"0.5552787",
"0.55500066",
"0.5549841",
"0.5548619",
"0.5547727",
"0.5524506",
"0.55242187",
"0.55234486",
"0.5508525",
"0.5495819",
"0.5492379",
"0.54882884",
"0.54693705",
"0.54676604",
"0.54671746",
"0.5458811",
"0.54527426",
"0.54488593",
"0.54480696",
"0.54202336",
"0.5416211",
"0.5408002",
"0.5405556",
"0.54006636",
"0.53996015",
"0.5394659",
"0.53946173",
"0.5392914",
"0.53905135"
]
| 0.0 | -1 |
Repositions this cursor's on the last occurrence of the given key. | public boolean last(String key) {
last();
previous(key);
return next();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addLast(int key)\r\n {\r\n if(numItems < maxSize)\r\n {\r\n mArray[numItems] = key;\r\n numItems++;\r\n }\r\n\r\n }",
"protected void setSearchKey(Key key)\n\t{\n\t\tint last_idx = _searchKeyList.size() - 1 ;\n\t\t_searchKeyList.set(last_idx, key) ;\n\t}",
"public void setRight(int position,int key) {\r\n\t\tthis.treeRight[position]=key;\r\n\t}",
"void addLast(Key key) {\n\t\tlastNode.next = new Node(key, null);\n\t\tlastNode = lastNode.next;\n\t\tsize++;\n\t}",
"public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }",
"public void moveRight(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //Try to move the cursor\n characterIndex += 1;\n //If the cursor did not wrap onto a new line then update it's position\n if (characterIndex < currentText.getCharacterEdges().length) {\n updateXPosition(true);\n }\n //If the cursor wrapped onto a new line\n else {\n //If this was not the very last line move to the beginning of the next line\n if (lineIndex < texts.size() - 1) {\n lineIndex++;\n currentText = texts.get(lineIndex);\n characterIndex = 0;\n updatePosition();\n }\n //If this is the last line character index should not change and position does not need to be updated\n else {\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n }\n }\n }",
"public void dec(String key) {\n if (!m.containsKey(key)) {\n return;\n }\n\n int val = m.get(key);\n delete(key, val);\n\n if (val == 1) {\n m.remove(key);\n } else {\n m.put(key, val - 1);\n insert(key, val - 1);\n }\n }",
"public void moveCursorRight();",
"public void appendRem(int keyTag) {\n \tappendRem(new Integer(keyTag));\n }",
"protected void setGroupKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableGroup(key.getTableGroup()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"void updateLastLogin(@Param(\"key\") int key);",
"public void setKeyMoveRight(KeyCode moveRight) {\n this.moveRight = moveRight;\n }",
"public void addTwoStepForwardToPositionCache(Key currentKey) {\n\n\t\tKey newKey = createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\t\tcurrentKeyMapping.add(newKey);\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"@Override\n\t\t\tpublic void keyReleased(KeyEvent arg0) {\n\t\t\t\tmoveX=0;\n\t\t\t\tmoveY=0;\n\t\t\t}",
"public void dec(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val--;\n\t\t\tif(n.val==0){\n\t\t\t\tremove(n);\n\t\t\t\tmap.remove(key);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmoveToTail(n);\n\t\t\t}\n\t\t}\n\t}",
"public void remove(int key) {\n data[key % KEY] = -1;\n\n }",
"public void update(final long key) {\n update(key, 1);\n }",
"public int dec(Object key)\r\n {\r\n return add(key, -1);\r\n }",
"private void removeTwoStepForwardFromPositionCache(Key currentKey) {\n\n\t\t// Create a two square forward position\n\t\tKey newKey =createTwoStepForwardFromCurrentKey(currentKey);\n\n\t\t// Gets current values stored with key and adds the extra position\n\t\tSet<Key> currentKeyMapping = positionCache.get(currentKey);\n\n\t\t// Remove key if it exists\n\t\tif (currentKeyMapping.contains(newKey)) {\n\t\t\tcurrentKeyMapping.remove(newKey);\n\t\t}\n\n\t\tpositionCache.put(currentKey, currentKeyMapping);\n\t}",
"public void removeKey() {\n \tthis.key =null;\n \tdungeon.keyLeft().set(\"Key possession: No\\n\");\n }",
"public void editRecord(Character key, int position, String newRecord){\n\t\trecList = map.get(key);\n\t\trecList.set(position, newRecord);\t\t\n\t\tmap.put(key, recList);\n\t}",
"public void dec(String key) {\n if (!keyMap.containsKey(key)) return;\n int count = keyMap.get(key);\n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count--;\n if (count > 0) {\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertBefore(oldNode, newNode);\n }\n newNode.keySet.add(key);\n }\n else {\n keyMap.remove(key);\n }\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }",
"void seekToLast();",
"public void remove(Key key) {\n\n\t\tif (!contains(key)) return;\n\t\tint index = locate(key);\n\t\tkeys[index] = null;\n\t\tvalues[index] = null;\n\t\tthis.size--;\n\n\t\t// Check to see if any of the items in the table that follow\n\t\t// this one had collided with the key that was just removed.\n\t\t// If so, we need to rehash/reinsert them.\n\n\t\tint i = increment(index);\n\t\twhile (keys[i] != null) {\n\n\t\t\t// Save the key/value pair at this location.\n\n\t\t\tKey savedKey = keys[i];\n\t\t\tValue savedValue = values[i];\n\n\t\t\t// And temporarily remove it from the hash map.\n\n\t\t\tkeys[i] = null;\n\t\t\tvalues[i] = null;\n\n\t\t\t// Figure out where it should go now and reinsert it.\n\n\t\t\tindex = locate(savedKey);\n\t\t\tkeys[index] = savedKey;\n\t\t\tvalues[index] = savedValue;\n\n\t\t\t// Advance to the next item.\n\t\t\ti = increment(i);\n\t\t}\n\t}",
"@Override public void setKey(IndexKey key) {\n listOfKeys.add(key);\n\n }",
"public void insertLast(int key, int value) {\n\t\t\tcount ++;\r\n\t\t\tif (last == null) {\r\n\t\t\t\tlast = new Node(key, value, null,null);\r\n\t\t\t\tfirst = last;\r\n\t\t\t}\r\n\t\t\t// put the new value after the last; and the last become the new value\r\n\t\t\telse {\r\n\t\t\t last.next = new Node(key, value, last, null);\r\n\t\t\t last = last.next;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public void updateIndex() {\n int i = this.index;\n if (i == -1 || i > HashBiMap.this.size || !Objects.equal(HashBiMap.this.keys[this.index], this.key)) {\n this.index = HashBiMap.this.findEntryByKey(this.key);\n }\n }",
"public void moveRight()\n {\n if (!this.search_zone.isRightBorder(this.x_position))\n {\n this.x_position = (this.x_position + 1);\n }\n }",
"protected void setSortKey(Key key)\n\t{\n\t\tfor (int i = 0; i < _searchKeyList.size(); i++)\n\t\t{\n\t\t\tKey ky = (Key)_searchKeyList.get(i) ;\n\t\t\tif (ky.getTableColumn().equals(key.getTableColumn()))\n\t\t\t{\n\t\t\t\tky.setTableOrder(key.getTableOrder()) ;\n\t\t\t\tky.setTableDesc(key.getTableDesc()) ;\n\t\t\t\t_searchKeyList.set(i, ky) ;\n\t\t\t\tbreak ;\n\t\t\t}\n\t\t}\n\t}",
"public void inc(String key) {\n int val = 0;\n\n if (!m.containsKey(key)) {\n m.put(key, val + 1);\n } else {\n val = m.get(key);\n m.put(key, val + 1);\n delete(key, val);\n }\n\n insert(key, val + 1);\n }",
"public void remove(long key) {\r\n removeElement(key);\r\n }",
"public void delete(Key key) {\n first = delete(first, key);\n }",
"public void moveRight() {\n this.position.addColumn(1);\n }",
"public void moveRight() {\n locX = locX + 1;\n }",
"public void moveRight() {\r\n\t\tif (x < space.getSize() - 1) x++; \r\n\t}",
"public void raiseKey(){\n\t\tkey = clamp(key+INCREMENT, MINKEY, MAXKEY);\n\t}",
"void invalidate(String key);",
"public void append(int key) {\r\n\t\tif (size != 0 && key <= keys[size - 1]) {\r\n\t\t\tadd(key);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tint pos = size;\r\n\t\tif (pos >= keys.length) {\r\n\t\t\tint n = ArrayUtils.idealArraySize(pos + 1);\r\n\r\n\t\t\tint[] nkeys = new int[n];\r\n\r\n\t\t\tSystem.arraycopy(keys, 0, nkeys, 0, keys.length);\r\n\r\n\t\t\tkeys = nkeys;\r\n\t\t}\r\n\r\n\t\tkeys[pos] = key;\r\n\t\tsize = pos + 1;\r\n\t}",
"public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}",
"public void setLastViewedPosition(long position) {\n mEditor.putLong(\"LastViewedPosition\", position);\n mEditor.commit();\n }",
"public void put(int key) { root = put(root, key); }",
"public void MoveLast()\r\n {\r\n\r\n \t try{\r\n \t\t rsTution.last();\r\n \t\t Display();\r\n\r\n\r\n \t }catch(SQLException sqle)\r\n \t {System.out.println(\"MoveLast Error:\"+sqle);}\r\n \t}",
"private static void move(String key) {\n\t\tif (settings.contains(key)) {\n\t\t\tString value = settings.getString(key, SAMPLE_TONE);\n\t\t\tmRecordsDatabase.insertRecord(value, value);\n\t\t\tsettings.edit().remove(key).apply();\n\t\t}\n\t}",
"public void inc(String key);",
"private void moveLastPart() {\n Field lastPart = snake.getCell(snake.getSize() - 1);\n fields[lastPart.getY()][lastPart.getX()] = lastPart;\n fields[lastPart.getPreviousY()][lastPart.getPreviousX()] = null;\n }",
"public void setKey( Long key ) {\n this.key = key ;\n }",
"public void onKeyReleased(String key) {\r\n if (key.equals(\"r\")) {\r\n if (this.worklist.size() == 0) {\r\n this.currTurn = 0;\r\n this.initializeBoard();\r\n }\r\n }\r\n }",
"void keyEnd();",
"public void inc(String key) {\n if (!keyMap.containsKey(key)) {\n keyMap.put(key, 1);\n DLinkedListNode node = countMap.get(1);\n System.out.println(node);\n if (node == null) {\n node = new DLinkedListNode(1);\n countMap.put(1, node);\n dll.insertAfter(dll.head, node);\n }\n node.keySet.add(key);\n }\n else {\n int count = keyMap.get(key); \n DLinkedListNode oldNode = countMap.get(count);\n oldNode.keySet.remove(key);\n count++;\n keyMap.put(key, count);\n DLinkedListNode newNode = countMap.get(count);\n if (newNode == null) {\n newNode = new DLinkedListNode(count);\n countMap.put(count, newNode);\n dll.insertAfter(oldNode, newNode);\n }\n newNode.keySet.add(key);\n if (oldNode.keySet.size() == 0) {\n dll.remove(oldNode);\n countMap.remove(oldNode.count);\n }\n }\n }",
"public void setKey(K newKey) {\n this.key = newKey;\n }",
"@Override\n\tpublic void keyBack() {\n\t\t\n\t}",
"public void setLastMove(SymbolType move){\n this.lastMove = move;\n }",
"private void cursorMoveRightest() {\n\t\td(\"Warn cursorMoveRightest() NOT implemented\");\r\n\t}",
"@Override\r\n public K lastKey() {\n return null;\r\n }",
"public void InsertAtEnd(K pk){\n\t\tsuper.append(pk);\n\t}",
"public void remove(Object key) {\r\n\t\tif (!containsKey(key)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tmodificationCount++;\r\n\t\tsize--;\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex].key.equals(key)) {\r\n\t\t\ttable[slotIndex] = table[slotIndex].next;\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> previousElement = table[slotIndex];\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex].next;// can't be null\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\tpreviousElement.next = currentElement.next;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tpreviousElement = currentElement;\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\t}",
"public void insert(long key) {\n\t\tDELink newLink = new DELink(key);\n\t\tDELink previous = first;\n\t\tDELink current = first;\n\n\t\tif (first == null) {\n\t\t\tnewLink.next = first;\n\t\t\tfirst = newLink;\n\t\t} else {\n\t\t\twhile (newLink.next == null) {\n\t\t\t\tif (current.getLData() <= key) {\n\t\t\t\t\tcurrent = current.next;\n\t\t\t\t\tprevious.next = current;\n\t\t\t\t} else {\n\t\t\t\t\tif (current == first) {\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t\tfirst = newLink;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprevious.next = newLink;\n\t\t\t\t\t\tnewLink.next = current;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void cursorDown() throws IndexOutOfBoundsException {\n if(cursor == size()-1)\n throw new IndexOutOfBoundsException(\"Exception: Current line is size()-1!\");\n //Setting the cursor to be the text line after its current position.\n cursor++;\n }",
"public void insert(int key)\n {\n root = insertRec(root,key);\n }",
"public String lpop(String key) {\n\t\tListOperations<String, String> opsForList = redisTemplate.opsForList();\n\t\treturn opsForList.leftPop(key);\n\t}",
"public void inc(String key) {\n\t\tif(map.containsKey(key)){\n\t\t\tNode n=map.get(key);\n\t\t\tn.val++;\n\t\t\tmoveToHead(n);\n\t\t}\n\t\telse{\n\t\t\tNode n=new Node(key, 1);\n\t\t\tmap.put(key, n);\n\t\t\tinsert(n, tail);\n\t\t}\n\t}",
"Position<T> last();",
"private void setLast(int x, int y) {\n\t\tthis.lastx = x;\n\t\tthis.lasty = y;\n\t}",
"public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}",
"public final void redo() {\n\t\tthis.historyManager.redo();\n\t}",
"@Override\n\tpublic void invalidate(S key) {\n\t\t\n\t}",
"@Override\n public void update(String key) {\n lName = key;\n if (nTable != null)\n value = nTable.getNumber(key, 0);\n }",
"public void setKey(K newKey) {\r\n\t\tkey = newKey;\r\n\t}",
"void delete(final Key key) {\n int r = rank(key);\n if (r == size || keys[r].compareTo(key) != 0) {\n return;\n }\n for (int i = r; i < size - 1; i++) {\n keys[i] = keys[i + 1];\n values[i] = values[i + 1];\n }\n size--;\n keys[size] = null;\n values[size] = null;\n }",
"public void unlock(int key);",
"public void backSpace(){\n if(currentText != null) {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n //If a character is being removed from a single line\n if (characterIndex > 0) {\n currentText = codeWindow.getTextLineController().backspace(currentText, characterIndex, true);\n characterIndex--;\n }\n //If a newline character is being removed two lines need to be merged\n else if (lineIndex > 0) {\n characterIndex = codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex - 1).getCharacterEdges().length - 1;\n currentText = codeWindow.getTextLineController().merge(codeWindow.getTextLineController().getCodeWindowTextLines().get(lineIndex - 1), currentText, codeWindow);\n lineIndex--;\n }\n //The cursors character or line index changed, update accordingly\n updatePosition();\n }\n }",
"public void setLast(Set<F> keys) {\n\t\tfor(F s : keys) {\n\t\t\tthis.backingStore.get(s).k = this.count;\n\t\t}\n\t}",
"public void remove(int key) {\n store[key] = -1; // If the key is removed, the value of that key is replaced with -1, \n \t\t\t\t// that the item doesn't exist because hashmap requires removal of keys.\n }",
"@Override\n public void unmarkCell() {\n MNKCell last = MC.getLast();\n super.unmarkCell();\n key = nextZobrist(last.i, last.j);\n value = previousValues.pop();\n }",
"public void deleteItineraryItem(String key) {\n\t\tmEditor.remove(key);\n\t\tmEditor.commit();\n\t}",
"public void resetToLast() {\r\n\t\taktu = last;\r\n\t}",
"public int updateKeyValue_of_updatekey(UpdateKeyStorer key){\n SQLiteDatabase db=this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(updateKeyValue,key.getUpdateKey());\n return db.update(key_table_name, values, key_id + \" = ?\", new String[]{String.valueOf(getId(key.getUpdateKey()))});\n }",
"protected abstract void _del(String key);",
"final int getKeyPosition(final Object key) {\r\n return Math.abs(key.hashCode()) % buckets.length;\r\n }",
"void remove(@NotNull final ByteBuffer key) {\n final ClusterValue prev = storage.put(key, ClusterValue.deadCluster());\n if (prev == null) {\n tableSize = tableSize + key.remaining();\n } else if (!prev.isTombstone()) {\n tableSize = tableSize - prev.getData().remaining();\n }\n }",
"public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }",
"IntTree<V> changeKeysBelow(final long key, final int delta) {\n if (size == 0 || delta == 0) return this;\n\n if (this.key < key)\n // adding delta to this.key changes the keys of _all_ children of this,\n // so we now need to un-change the children of this larger than key,\n // all of which are to the right. note that we still use the 'old' relative key...:\n return new IntTree<V>(\n this.key + delta, value, left, right.changeKeysAbove(key - this.key, -delta));\n\n // otherwise, doesn't apply yet, look to the left:\n IntTree<V> newLeft = left.changeKeysBelow(key - this.key, delta);\n if (newLeft == left) return this;\n return new IntTree<V>(this.key, value, newLeft, right);\n }",
"public void put(String key) {\n\t root = put(root, key, 0);\n\t }",
"void setKey(int key) {\n if (key < 0) {\n throw new IllegalArgumentException(String.format(\"Error: key (%d) < 0\\n\", key));\n } else {\n this.key = key;\n }\n }",
"Position<T> addLast(T data);",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"@Override\n public void keyReleased(KeyEvent key) {\n gsm.keyReleased(key.getKeyCode());\n }",
"public void setPosition(){\r\n currentPosition = 0; \r\n }",
"public int inc(Object key)\r\n {\r\n return add(key, 1);\r\n }",
"public QueryResult addLastEvaluatedKeyEntry(String key, AttributeValue value) {\n if (null == this.lastEvaluatedKey) {\n this.lastEvaluatedKey = new java.util.HashMap<String, AttributeValue>();\n }\n if (this.lastEvaluatedKey.containsKey(key))\n throw new IllegalArgumentException(\"Duplicated keys (\" + key.toString() + \") are provided.\");\n this.lastEvaluatedKey.put(key, value);\n return this;\n }",
"public void moveSelectionRight(){\n Cursor c = getCursor();\n int line = c.getLeftLine();\n int column = c.getLeftColumn();\n int c_column = getText().getColumnCount(line);\n if(column + 1 <= c_column){\n char ch = mText.charAt(line,column);\n boolean emoji;\n if(emoji = isEmoji(ch)) {\n column ++;\n if(column + 1 > c_column){\n column--;\n }\n }\n if(!emoji && mACPanel.isShowing()) {\n if(!mLanguage.isAutoCompleteChar(ch)) {\n mACPanel.hide();\n }else{\n String prefix = mACPanel.getPrefix() + ch;\n mACPanel.setPrefix(prefix);\n }\n }\n setSelection(line, column + 1);\n }else{\n if(line + 1 == getLineCount()){\n setSelection(line, c_column);\n }else{\n setSelection(line + 1, 0);\n }\n }\n }",
"public void setLeft(int position,int key) {\r\n\t\tthis.treeLeft[position]=key;\r\n\t}",
"public void remove(int key) {\n map.remove(key);\n }",
"public void moveDown(){\n if(currentText != null) {\n //If this is not the very last text\n if (lineIndex < texts.size() - 1) {\n //Move down\n lineIndex++;\n currentText = texts.get(lineIndex);\n\n //Try to use the saved character index as the character index\n if (savedCharacterIndex != -1) {\n characterIndex = savedCharacterIndex;\n }\n\n //Ensure that character index is within the bounds of the text\n if (characterIndex > currentText.getCharacterEdges().length - 1) {\n //Save the character index\n if (characterIndex > savedCharacterIndex) {\n savedCharacterIndex = characterIndex;\n }\n characterIndex = currentText.getCharacterEdges().length - 1;\n }\n\n //Update the position\n updatePosition();\n }\n //If this is the last line then the cursor should be moved to the end of the line\n else {\n //The saved character index should no longer be restored\n savedCharacterIndex = -1;\n\n characterIndex = currentText.getCharacterEdges().length - 1;\n updateXPosition(true);\n }\n }\n }",
"private Node getReplacementKeyNode(Key key, Node node) {\n\t\tNode ret = node.getChild(node.getDataNumber(key));\r\n\t\t\r\n\t\twhile (!ret.isLeaf()) {\r\n\t\t\tret = ret.getChild(ret.getChildren().size() - 1);\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}",
"public void insert(String key) {\n if (getRoot().getN() == 2 * T_VAR - 1) {\n splitRoot();\n }\n getRoot().insert(key.toLowerCase());\n }",
"public void setQueryKey(String key)\n throws TorqueException\n {\n setPrimaryKey(key);\n }",
"public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}",
"public void appendRem(Integer keyTag) {\n\t\tif (remKeyTag == null) {\n\t\t\tremKeyTag = new ArrayList();\n\t\t}\n \tif (keyTag == null) {\n \t\tremKeyTag.add(new Integer(EPPSecDNSExtDsData.UNSPEC_KEY_TAG));\n \t}\n \telse {\n \t\tremKeyTag.add(keyTag);\n \t}\n }",
"public void setLastPosition(String playerID, float x, float y) {\n\t\tfor (GamePlayer player : listOfPlayers) {\n\t\t\tif (player != null && player.playerID.contains(playerID)) {\n\t\t\t\t// set last position\n\t\t\t\tplayer.lastPosition = new Vector2(x, y);\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.58034885",
"0.5787397",
"0.5622031",
"0.5489226",
"0.5452881",
"0.5423385",
"0.5329035",
"0.5286483",
"0.51953477",
"0.5188331",
"0.5176001",
"0.51747173",
"0.51668304",
"0.5135837",
"0.5133453",
"0.51182055",
"0.5109801",
"0.5093826",
"0.50903445",
"0.50824594",
"0.50744665",
"0.50580317",
"0.50433624",
"0.5036747",
"0.50116897",
"0.5000247",
"0.4988147",
"0.4983968",
"0.49420694",
"0.49237648",
"0.49113426",
"0.4909875",
"0.49072668",
"0.48930955",
"0.48924664",
"0.48890373",
"0.48869747",
"0.48826805",
"0.48799843",
"0.48747757",
"0.48712394",
"0.4868147",
"0.4865788",
"0.48560682",
"0.48341846",
"0.48302218",
"0.48276195",
"0.48128188",
"0.48027012",
"0.48017582",
"0.4791456",
"0.478692",
"0.4782391",
"0.47755766",
"0.4773773",
"0.4756059",
"0.47429156",
"0.47422796",
"0.47364193",
"0.47358367",
"0.4734889",
"0.47324675",
"0.4728916",
"0.47268596",
"0.47245166",
"0.4722436",
"0.47212937",
"0.4711965",
"0.47086346",
"0.47063467",
"0.46976954",
"0.46940416",
"0.46929777",
"0.46913466",
"0.46898255",
"0.46862003",
"0.46855384",
"0.46773076",
"0.46737054",
"0.46605337",
"0.4655752",
"0.46554056",
"0.46542612",
"0.4653651",
"0.46510455",
"0.46442625",
"0.4641076",
"0.4639623",
"0.46376422",
"0.46352476",
"0.4626371",
"0.4622717",
"0.46222937",
"0.4621479",
"0.4620434",
"0.46187943",
"0.46149322",
"0.46128723",
"0.46086735",
"0.460273"
]
| 0.55399346 | 3 |
Returns true if this cursor has more data to be iterated over. | public boolean hasMoreData() {
return iterator.hasNext();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasMore() {\n if (currentCursor != null && !NULL.equalsIgnoreCase(currentCursor)) {\n return true;\n } else {\n return false;\n }\n }",
"@Override\n\t\tpublic boolean hasMoreElements() {\n\t\t\treturn cursor != size();\n\t\t}",
"private boolean isThereMoreData() {\n return nextUrl != null;\n }",
"public boolean hasNext() {\n\t\t\treturn cursor != size();\n\t\t}",
"public boolean hasNext() {\n return cursor < size(); \n }",
"public boolean hasRemaining() {\r\n\t\treturn cursor < limit - 1;\r\n\t}",
"public boolean hasNext()\n {\n return (!isEmpty() && (cursor < numberOfEntries));\n }",
"public boolean hasNext()\n {\n return (!isEmpty() && (cursor < numberOfEntries));\n }",
"public boolean moreToIterate() {\r\n\t\treturn curr != null;\r\n\t}",
"public boolean hasNext()\r\n {\r\n return cursor != null;\r\n }",
"public boolean hasNext() {\n return (itrCounter < size());\n }",
"public boolean hasNext() {\n return current < len;\n }",
"public boolean hasMore(){\r\n return curr != null;\r\n }",
"public boolean hasNext()\n {\n return (count > 0);\n }",
"public boolean hasMoreElements() {\n/* 64 */ return this.iterator.hasNext();\n/* */ }",
"public boolean hasNext() {\n return cursor <= arrayLimit;\n }",
"public boolean hasMoreRecords() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\treturn myData.record.hasMoreRecords(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t\treturn false;\n\t}",
"public boolean hasNext() {\n return fakeSize > 0;\n }",
"public boolean hasMoreCommands() {\n return fileStream.hasNext();\n }",
"public boolean hasNext() { return cursor != lastIndex; }",
"public boolean hasNext() {\r\n return (length > 0);\r\n }",
"public boolean hasNext() {\r\n \r\n return now != null;\r\n }",
"@Override\r\n public boolean hasNext() {\r\n return (next.data != null);\r\n }",
"public boolean hasNext() {\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }",
"public boolean hasNext() {\n\t if(nextCount>=size) {\n\t \treturn false;\n\t }\n\t return true;\n\t }",
"public boolean hasNextResults() {\n\t\tif(totalCount != null && totalCount <= currentOffset) return false;\n\t\treturn true;\n\t}",
"public boolean hasNext() {\n\t\t\treturn nextPosition > -1;\n\t\t\t\n\t\t}",
"public Boolean hasMorePages() {\n return (this.paging.hasMore());\n }",
"public boolean hasNext() {\n return position < history.size() - 1;\n }",
"public boolean hasNext() {\n return index < results.size();\n }",
"public boolean hasNext() {\n\t\t\t\t\treturn !record.isEmpty();\n\t\t\t\t}",
"@Override\n public boolean getMoreResults() throws SQLException {\n\n return (result != null);\n\n }",
"public boolean getHasNext() {\n\t\t\treturn !endsWithIgnoreCase(getCursor(), STARTEND);\n\t\t}",
"public boolean hasNext() {\n\t\t\treturn ! this.isDone();\n\t\t}",
"@Override\n public boolean hasNext() {\n return this.nextObject != null;\n }",
"public boolean hasNext() throws SQLException {\n/* 285 */ if (this.fetchedRows != null && this.fetchedRows.size() == 0) {\n/* 286 */ return false;\n/* */ }\n/* */ \n/* 289 */ if (this.owner != null && this.owner.owningStatement != null) {\n/* 290 */ int maxRows = this.owner.owningStatement.maxRows;\n/* */ \n/* 292 */ if (maxRows != -1 && this.currentPositionInEntireResult + 1 > maxRows) {\n/* 293 */ return false;\n/* */ }\n/* */ } \n/* */ \n/* 297 */ if (this.currentPositionInEntireResult != -1) {\n/* */ \n/* 299 */ if (this.currentPositionInFetchedRows < this.fetchedRows.size() - 1)\n/* 300 */ return true; \n/* 301 */ if (this.currentPositionInFetchedRows == this.fetchedRows.size() && this.lastRowFetched) {\n/* 302 */ return false;\n/* */ }\n/* */ \n/* 305 */ fetchMoreRows();\n/* */ \n/* 307 */ return (this.fetchedRows.size() > 0);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* 313 */ fetchMoreRows();\n/* */ \n/* 315 */ return (this.fetchedRows.size() > 0);\n/* */ }",
"private boolean moreServerContent() {\n Stopwatch stopwatch = Stopwatch.createStarted();\n boolean moreDataAvailable;\n try {\n if (resIterator == null) {\n return false;\n }\n moreDataAvailable = resIterator.hasNext();\n recordSuccessMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS));\n } catch (Exception e) {\n recordErrorMetric(MESSAGE_LATENCY_MS, stopwatch.elapsed(MILLISECONDS), e);\n throw e;\n }\n if (!moreDataAvailable) {\n cancelCurrentRequest();\n }\n return moreDataAvailable;\n }",
"public boolean getMoreResults() throws SQLException {\n return currentPreparedStatement.getMoreResults();\n }",
"@Override\r\n public boolean hasMoreObjects() {\r\n return hasMore;\r\n }",
"public boolean getMoreResults() throws SQLException {\n return false;\r\n }",
"public boolean hasNext() {\n\t\t\treturn mCurrentIndex < mSize;\n\t\t}",
"@Override\r\n\tpublic boolean hasMoreElements() {\n\t\treturn it.hasNext();\r\n\t}",
"@Override\n\tpublic boolean hasMore() {\n\t\treturn false;\n\t}",
"public boolean hasNext() {\n return nextIndex < size;\n }",
"public boolean hasNext() {\n return getPage() + 1 < getTotalPage();\n }",
"public boolean more() throws JSONException {\n this.next();\n if(this.end()) {\n return false;\n }\n this.back();\n\n return true;\n }",
"public boolean hasNext(){\n return ci < size;\n }",
"public boolean isAfterLast() {\n/* 125 */ return (this.lastRowFetched && this.currentPositionInFetchedRows > this.fetchedRows.size());\n/* */ }",
"private boolean reachedEnd() {\n return current >= source.length();\n }",
"public final boolean hasNext() {\n return rowIndex < tables.getTablesHeader().getRowCount(getTableId())-1;\n }",
"public boolean hasMoreElements() {\r\n \t\tif(numItems == 0 || currentObject == numItems) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t\treturn true;\r\n \t}",
"public boolean hasMoreTokens() {\n return pointer < tokens.size();\n }",
"public boolean hasNext() {\n\t\t\treturn index < size;\n\t\t}",
"boolean hasMore();",
"public boolean hasNext() {\n return wrappedIterator.hasNext();\n }",
"public boolean isHasMorePages() {\n\t\treturn (this.skipEntries + this.NUM_PER_PAGE - 1) < this.totalEntries;\n\t}",
"@Override\n public boolean hasNext() {\n if(dataPageIterator.hasNext()) {\n return true;\n }\n while(dataPage.getNextPageId().isValid()) {\n PageId next = dataPage.getNextPageId();\n DBComponent.BUFFER_MANAGER().unpin(dataPageId, false);\n dataPage = getDataPage(next);\n dataPageId = next;\n dataPageIterator = new DataPageIterator(dataPage);\n if(dataPageIterator.hasNext()) return true;\n }\n return false;\n }",
"public boolean hasNext() {\n\t\treturn actual!=null;\t\t\n\t}",
"public boolean hasNext() {\r\n\r\n\t\treturn counter < links.size();\r\n\t}",
"public boolean hasMoreInstances() {\n\t\treturn scanner.hasNextLine();\n\t}",
"boolean moreRecords() { return (tok != null && tok.length() > 0); }",
"public boolean getMoreResults(int current) throws SQLException {\n return false;\r\n }",
"public boolean hasNext() {\r\n\t\treturn hasNext;\r\n\t}",
"public boolean hasMoreTokens()\n {\n return (currentPosition >= maxPosition) ? false : true;\n }",
"public boolean hasNext() {\n return !finished;\n }",
"private boolean hasNext() {\n\t\treturn iterator != null;\n\t}",
"@Override\n public boolean hasNext() {\n return this.index < this.endIndex;\n }",
"public synchronized boolean hasNext() {\n\t\treturn peek(1) != CharacterIterator.DONE;\n\t}",
"public boolean hasNext() {\n return this.next != null;\n }",
"@Override\n public boolean hasNext() {\n return nextRowSet || setNextObject();\n }",
"public boolean hasMoreTokens(){\n return !ended;\n }",
"public boolean hasMoreCommands(){\r\n\t\t/*\r\n\t\tif (nextCommand != null)\r\n\t\t\treturn true;\r\n\t\telse return false;\r\n\t\t*/\r\n\t\treturn (tokenizer.ttype != StreamTokenizer.TT_EOF);\r\n\t}",
"@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn _current < (_items.length -1);\n\t\t}",
"public boolean hasNext() {\r\n\t\t\trequireModificationCountUnchanged();\r\n\r\n\t\t\treturn nextEntry != null;\r\n\t\t}",
"public boolean hasNext() { \n\t\t\t\n\t\t\tif ( collection.size() <= 0 ) \n\t\t\t{\t\n\t\t\t\treturn false; \n\t\t\t}\n\t\t\tif ( currIndex == (collection.size() - 1)) \n\t\t\t{\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"public boolean hasNext() \n {\n return next < size;\n }",
"public boolean getMoreResults() {\n return moreResults_;\n }",
"public boolean hasNext() {\n return current != null;\n }",
"public boolean hasNext() {\n return current != null;\n }",
"public boolean hasNext() {\n\t\tMemoryBlock dummyTail = new MemoryBlock(-1, -1); // Dummy for tail\n\t\tboolean hasNext = (current.next.block.equals(dummyTail));\n\t\treturn (!hasNext);\n\t}",
"public boolean hasMoreElements() {\n\t return hasMoreTokens();\n\t}",
"public boolean getMoreResults() {\n return moreResults_;\n }",
"public boolean hasNext() {\n if (entries != null && \n size > 0 &&\n position > 0 &&\n position < size) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean hasMoreItems();",
"public boolean hasNext(){\n\t\treturn hasNext;\n\t}",
"@Override\r\n\t\tpublic boolean hasNext() {\n\t\t\treturn itemsViewed < HashMap.this.size();\r\n\t\t}",
"public final boolean hasNext() {\n return this.hasNext;\n }",
"public boolean hasNext() {\n return true;\n }",
"@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (this.next != null);\n\t\t}",
"public boolean hasNext()\n/* */ {\n/* 73 */ return this.m_offset < this.m_limit;\n/* */ }",
"public boolean hasNext() {\n\t\t\t\t\treturn lastReadChar != ']' && lastReadChar != -1;\n\t\t\t\t}",
"public boolean isFull()\r\n\t\t{\r\n\t\t\tint count = 0;\r\n\t\t\tData currentData = head;\r\n\t\t\twhile (currentData != null)\r\n\t\t\t{\r\n\t\t\t\tcount++;\r\n\t\t\t\tcurrentData = currentData.nextData();\r\n\t\t\t}\r\n\t\t\treturn (count > 2); //if the count is > 2 then it is full\r\n\t\t}",
"public boolean hasNext()\n {\n return current != null;\n }",
"public boolean hasNext() {\r\n return true;\r\n }",
"boolean isMore();",
"public boolean getMoreResults(int current) throws SQLException {\n return currentPreparedStatement.getMoreResults();\n }",
"public boolean hasNext()\n {\n return position < text.length;\n }",
"@Override\n public boolean hasNext() {\n return (nextItem != null);\n }",
"@Override\n public boolean hasNext() {\n setCurrent();\n return current != null;\n }",
"public boolean hasNext() {\r\n\t\treturn curr != null;\r\n\t}"
]
| [
"0.84877515",
"0.7886905",
"0.78560233",
"0.78451985",
"0.7788912",
"0.77407646",
"0.77361155",
"0.77361155",
"0.7661228",
"0.7578902",
"0.7436663",
"0.73871887",
"0.7363116",
"0.7363078",
"0.73577374",
"0.7344688",
"0.73363847",
"0.733465",
"0.7285001",
"0.72757864",
"0.7273005",
"0.7257887",
"0.72255707",
"0.71974075",
"0.71974075",
"0.7189985",
"0.71831536",
"0.7175877",
"0.71743333",
"0.7173488",
"0.7152452",
"0.7146367",
"0.71380824",
"0.7133057",
"0.713019",
"0.7126405",
"0.7122904",
"0.71029955",
"0.70897746",
"0.7070299",
"0.70694244",
"0.70623446",
"0.7042249",
"0.70331",
"0.69993734",
"0.69826996",
"0.6963442",
"0.6957826",
"0.6954258",
"0.6949909",
"0.6944432",
"0.6940052",
"0.69378746",
"0.69316125",
"0.6920398",
"0.6910717",
"0.68974525",
"0.68892777",
"0.68889105",
"0.68724656",
"0.6865636",
"0.68642133",
"0.68590283",
"0.6856727",
"0.68564844",
"0.6854131",
"0.6852944",
"0.6851202",
"0.6845657",
"0.6843157",
"0.68408585",
"0.68304694",
"0.6816013",
"0.68103564",
"0.68089867",
"0.6808417",
"0.6804061",
"0.6802552",
"0.6802552",
"0.6802132",
"0.6794449",
"0.6793927",
"0.67886657",
"0.6786386",
"0.678628",
"0.6785428",
"0.6776909",
"0.6773826",
"0.6773659",
"0.67651075",
"0.6752664",
"0.6750976",
"0.67466915",
"0.6739771",
"0.6733081",
"0.6727961",
"0.6725454",
"0.67199975",
"0.6715354",
"0.6712298"
]
| 0.8717077 | 0 |
Returns a clone of this cursor. | public IDataCursor getCursorClone() {
return new CaseInsensitiveElementListIDataCursor(this.position);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Object clone(){\n \t\n \treturn this;\n \t\n }",
"public Object clone() {\n return this.copy();\n }",
"public Object clone()\n {\n PSRelation copy = new PSRelation(new PSCollection(m_keyNames.iterator()),\n new PSCollection(m_keyValues.iterator()));\n \n copy.m_componentState = m_componentState;\n copy.m_databaseComponentId = m_databaseComponentId;\n copy.m_id = m_id;\n\n return copy;\n }",
"public Object clone() {\n SetQuery copy = new SetQuery(this.operation);\n\n this.copyMetadataState(copy);\n\n copy.leftQuery = (QueryCommand)this.leftQuery.clone();\n copy.rightQuery = (QueryCommand)this.rightQuery.clone();\n\n copy.setAll(this.all);\n\n if(this.getOrderBy() != null) {\n copy.setOrderBy(this.getOrderBy().clone());\n }\n\n if(this.getLimit() != null) {\n copy.setLimit( this.getLimit().clone() );\n }\n\n copy.setWith(LanguageObject.Util.deepClone(this.getWith(), WithQueryCommand.class));\n\n if (this.projectedTypes != null) {\n copy.setProjectedTypes(new ArrayList<Class<?>>(projectedTypes), this.metadata);\n }\n\n return copy;\n }",
"@Override\n public Object clone ( ) throws CloneNotSupportedException {\n CTEUser clonedUser = (CTEUser) _user.clone();\n MoveCursorToHome clone = new MoveCursorToHome(clonedUser);\n return clone;\n }",
"public /*@ non_null @*/ Object clone() {\n return this;\n }",
"public IStore<T> clone();",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return super.clone();\n }",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Object clone();",
"public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}",
"public /*@ non_null @*/ Object clone() { \n //@ assume owner == null;\n return this;\n }",
"public Function clone();",
"Object clone();",
"Object clone();",
"public Object clone() {\n\t\ttry {\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch(CloneNotSupportedException exc) {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n public Board clone() {\n return new Board(copyOf(this.board));\n }",
"public Object clone() {\r\n try {\r\n return super.clone();\r\n } catch (CloneNotSupportedException e) {\r\n return null;\r\n }\r\n }",
"public Object clone() {\n \n\tQuerynotyfyaddressbol obj = new Querynotyfyaddressbol(getObjectsDatastore());\n\n\tobj.iNotifyaddress = iNotifyaddress; \n\n\treturn obj;\n }",
"public Position copy() {\n return new Position(values.clone());\n }",
"public Object clone() {\n try {\n // clones itself\n return super.clone();\n } catch (Exception exception) {\n ;\n }\n return null;\n }",
"public VCalendar clone() {\n\t\treturn new VCalendar(this.content, this.collectionId, this.resourceId, this.earliestStart, this.latestEnd, null);\n\t}",
"public BufferTWeak cloneMe() {\r\n BufferTWeak ib = new BufferTWeak(uc);\r\n ib.increment = increment;\r\n ib.set(new Object[objects.length]);\r\n for (int i = 0; i < objects.length; i++) {\r\n ib.objects[i] = this.objects[i];\r\n }\r\n ib.offset = this.offset;\r\n ib.count = this.count;\r\n return ib;\r\n }",
"@Override\n public DatabaseQueryColumn clone() {\n return new DatabaseQueryColumn(this.formula, this.name);\n }",
"public Query copy() {\r\n\tQuery queryCopy = new Query();\r\n\tqueryCopy.terms = (LinkedList<String>) terms.clone();\r\n\tqueryCopy.weights = (LinkedList<Double>) weights.clone();\r\n\treturn queryCopy;\r\n }",
"@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }",
"public Binaire clone(){\n\t\treturn new Binaire(this.symbole, this.gauche.clone(), this.droit.clone());\n\t}",
"public Object clone() {\n \t\treturn new Term(this);\n \t}",
"public Vector clone()\r\n {\r\n Vector<O> v = new Vector<O>();\r\n \r\n VectorItem<O> vi = first;\r\n while (vi != null)\r\n {\r\n v.pushBack (vi.getObject());\r\n vi = vi.getNext();\r\n }\r\n \r\n return v;\r\n }",
"@Override\n public Drop clone() {\n try {\n return (Drop) super.clone();\n } catch (CloneNotSupportedException ex) {\n // Never.\n return null;\n }\n }",
"public Object clone() {\n return new PointImpl( this );\n }",
"public Object clone()\n {\n return new ReturnStatement((Expression) expression.clone(), -1, -1);\n }",
"public Object clone() {\n\t\treturn new RelExpr((Term)getTerm(0).clone(), op, (Term)getTerm(1).clone());\n\t}",
"public Object clone() {\n AggregateSymbol copy = new AggregateSymbol(getName(), getAggregateFunction(), isDistinct(), LanguageObject.Util.deepClone(getArgs()));\n if (orderBy != null) {\n copy.setOrderBy(orderBy.clone());\n }\n if (condition != null) {\n copy.setCondition((Expression) condition.clone());\n }\n copy.isWindowed = this.isWindowed;\n copy.type = this.type;\n copy.setFunctionDescriptor(getFunctionDescriptor());\n return copy;\n }",
"@Override\n public Object clone() {\n return super.clone();\n }",
"public Object clone() {\n try {\n return super.clone();\n } catch (Exception exception) {\n throw new InternalError(\"Clone failed\");\n }\n }",
"public Entity clone() {\n try {\n return (Entity) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public GameBoard clone(){\r\n\t\tGameBoard result = new GameBoard();\r\n\t\ttry{\r\n\t\t\tresult = (GameBoard) super.clone();\r\n\t\t}catch(CloneNotSupportedException e){\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t\tresult.board = (Box[]) board.clone();\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic Box clone()\n\t{\n\t\treturn new Box(center.clone(), xExtent, yExtent, zExtent);\n\t}",
"public Object clone()\n {\n Object o = null;\n try \n { o = super.clone(); } \n catch(CloneNotSupportedException e) \n { System.err.println(\"Erreur dans le clonage de la cellule...\"); }\n return o;\n }",
"public Update clone() {\n return (Update)cloneContent(new Update());\n }",
"@Override\n public User clone(){\n return new User(this);\n }",
"public LinkedList<AnyType> clone() {\n LinkedList<AnyType> clone = new LinkedList<AnyType>();\n LinkedListIterator<AnyType> itr = this.first();\n LinkedListIterator<AnyType> cloneitr = clone.zeroth();\n while (itr.current != null) {\n clone.insert(itr.current.element, cloneitr);\n itr.advance();\n cloneitr.advance();\n }\n return clone;\n }",
"public Restaurant clone() {\r\n return new Restaurant(this);\r\n }",
"public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }",
"public AgwCslOper clone() {\n return (AgwCslOper)cloneContent(new AgwCslOper());\n }",
"public T copy() {\n T ret = createLike();\n ret.getMatrix().setTo(this.getMatrix());\n return ret;\n }",
"Player getClone() {\n Player clone = new Player();\n clone.brain = brain.getClone();\n return clone;\n }",
"public Object clone() throws CloneNotSupportedException { return super.clone(); }",
"public Line copy() {\n return new Line(getWords());\n }",
"@Override public T clone() {\n T x = (T)super.clone();\n x.setCompleter(this); // Set completer, what used to be a final field\n x._topLocal = false; // Not a top job\n x._nleft = x._nrite = null;\n x. _left = x. _rite = null;\n x._fs = _fs;\n x._profile = null; // Clone needs its own profile\n x.setPendingCount(0); // Volatile write for completer field; reset pending count also\n return x;\n }",
"public abstract Object clone();",
"public Cliente clone(){\r\n return new Cliente(this.nome, this.email, this.endereco, this.id);\r\n }",
"public Object clone() {\n return new RelevantObjectsCommand(name, \n relevantStateVariables, \n relevantObjects,\n relevancyRelationship);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic <T> T clon(){\n\t\ttry {\n\t\t\treturn (T) this.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn (T) new Object();\n\t}",
"public final PaintObject clone() {\n \t\n \ttry {\n\t\t\treturn (PaintObject) super.clone();\n\t\t} catch (CloneNotSupportedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"public Object clone () {\n\t\t\ttry {\n\t\t\t\treturn super.clone();\n\t\t\t} catch (CloneNotSupportedException e) {\n\t\t\t\tthrow new InternalError(e.toString());\n\t\t\t}\n\t\t}",
"public Object clone() {\n GlobalizedAnswer cloned;\n try {\n cloned = (GlobalizedAnswer)super.clone();\n }\n catch (CloneNotSupportedException e) {\n throw new Error(getClass() + \" must support cloning\", e);\n }\n assert cloned != null;\n \n // Copy mutable fields by value\n cloned.tuples = (Tuples) tuples.clone();\n \n return cloned;\n }",
"public Paper clone() \r\n\t{\r\n\t\tPaper copy = null;\r\n\t\ttry\r\n\t\t{ \r\n\t\t\tcopy = new Paper(this.getId(), new String(this.getTitle()), new String(this.getURI()),\r\n\t\t\t\tthis.year, new String(this.biblio_info), \r\n\t\t\t\tnew String(this.authors), new String(this.url) ); \r\n\t\t}\r\n\t\tcatch (Exception e) { e.printStackTrace(System.out); }\r\n\t\treturn copy;\r\n\t}",
"public abstract Object clone() ;",
"public EnbOper clone() {\n return (EnbOper)cloneContent(new EnbOper());\n }",
"public Object clone()\n{\n\tOzTextArea ta = new OzTextArea();\n\tta.setFont(textArea().getFont());\n\tta.setCursor(getCursor());\n\treturn ta;\n}",
"@SuppressWarnings(\"unchecked\")\n\tpublic Object clone() {\n\t\tLongOpenHashSet c;\n\t\ttry {\n\t\t\tc = (LongOpenHashSet) super.clone();\n\t\t} catch (CloneNotSupportedException cantHappen) {\n\t\t\tthrow new InternalError();\n\t\t}\n\t\tc.key = key.clone();\n\t\tc.state = state.clone();\n\t\treturn c;\n\t}",
"@Override\n public LineSymbolizer<R> clone() {\n final var clone = (LineSymbolizer<R>) super.clone();\n clone.selfClone();\n return clone;\n }",
"public Object clone()\n\t{\n\t\treturn new Tree();\n\t}",
"public Record copy() {\n return new Record(\n this.id,\n this.location.copy(),\n this.score\n );\n }",
"public Line copy() {\r\n Line l = new Line();\r\n l.line = new ArrayList < Point > (this.line);\r\n l.direction = this.direction;\r\n l.clickedPoint = this.clickedPoint;\r\n return l;\r\n }",
"public Object clone(){\n\t\tSongRecord cloned = new SongRecord();\n\t\tif (this.title == null){\n\t\t\tcloned.title = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.title = new String(this.getTitle());\n\t\t}\n\t\tif (this.artist == null){\n\t\t\tcloned.artist = null;\n\t\t}\n\t\telse {\n\t\t\tcloned.artist = new String(this.getArtist());\n\t\t}\n\t\tcloned.min = this.getMin();\n\t\tcloned.sec = this.getSec();\n\t\treturn cloned;\n\t}",
"@Override\n public IWord clone() {\n IWord w = null;\n try {\n w = (IWord) super.clone();\n } catch (CloneNotSupportedException e) {\n e.printStackTrace();\n }\n\n return w;\n }",
"public Instance clone() {\n Instance copy;\n try {\n copy = new Instance(getNameValue().toString());\n } catch (JNCException e) {\n copy = null;\n }\n return (Instance)cloneContent(copy);\n }",
"@Override\n public GeoPoint clone() {\n return new GeoPoint(this.latitude, this.longitude);\n }",
"public Object clone() {\r\n\t\tUser cloned = new User();\r\n\t\tif (this.password != null)\r\n\t\t\tcloned.setPassword(new String(this.password));\r\n\t\tif (this.name != null)\r\n\t\t\tcloned.setName(new String(this.name));\r\n\t\tif (this.roles.get(0) != null)\r\n\t\t\tcloned.roles.add(new Role(this.roles.get(0).getRole()));\r\n\t\treturn cloned;\r\n\t}",
"@Override\n\tpublic PhyphoxBuffer clone() {\n\t\treturn new PhyphoxBuffer(this, 0);\n\t}",
"@Override\n public SharedObject clone() {\n SharedObject c;\n try {\n c = (SharedObject)super.clone();\n } catch (CloneNotSupportedException e) {\n // Should never happen.\n throw new ICUCloneNotSupportedException(e);\n }\n c.refCount = new AtomicInteger();\n return c;\n }",
"public Object clone() throws CloneNotSupportedException {\r\n\t\tthrow new CloneNotSupportedException();\r\n\t}",
"public Clone() {}",
"@Override\n\tpublic citation_view clone() {\n\t\treturn this;\n\t}",
"public IDataKey clone() {\n return new IDataKey(this);\n }",
"public CellIdentityCdma copy() {\n return new CellIdentityCdma(this);\n }",
"@Override\n public RawStore copy() {\n return new RawStore(this.toRawCopy2D(), myNumberOfColumns);\n }",
"public MS2Scan clone(){\n\t\tMS2Scan result = cloneNoData();\n\t\tfor (int m=0; m<mzint.size(); m++){\n\t\t\tresult.addscan(mzint.get(m).getmz(), mzint.get(m).getint());\n\t\t}\n\t\treturn result;\n\t}",
"public Builder clearCursor() {\n copyOnWrite();\n instance.clearCursor();\n return this;\n }",
"@Override\n\tpublic Object clone() {\n\t\treturn null;\n\t}",
"@Override\n public MetaContainer clone() {\n return clone(false);\n }",
"public Object clone ()\n\t{\n\t\ttry \n\t\t{\n\t\t\treturn super.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e) \n\t\t{\n throw new InternalError(e.toString());\n\t\t}\n\t}",
"public Term clone() {\n\t\treturn new Term(this.coefficient, this.exponent);\n\t}",
"protected T copy() {\n\n // Initialize.\n T copy = null;\n\n try {\n\n // Create an instance of this entity class.\n copy = this.entityClass.newInstance();\n\n // Create a copy.\n copy.setCreateTime(this.getCreateTime());\n copy.setId(this.getId());\n copy.setModifyTime(this.getModifyTime());\n }\n catch (IllegalAccessException e) {\n // Ignore.\n }\n catch (InstantiationException e) {\n // Ignore.\n }\n\n return copy;\n }",
"public Object clone() throws CloneNotSupportedException {\n // return INSTANCE\n throw new CloneNotSupportedException();\n }",
"public Object clone() {\n // No problems cloning here since private variables are immutable\n return (InstTexes) super.clone();\n }",
"public QueryNode cloneTree() throws CloneNotSupportedException;",
"private QARange cloneThis(){\n QARange retval = new QARange();\n retval.setName(this.getName());\n retval.setCardTypes(this.getCardTypes());\n retval.setCustom(this.getCustom());\n if (retval.getRangeValues()==null){\n retval.setRangeValues(new RealmList<QARangeValue>());\n }\n\n for (QARangeValue val: getRangeValues()) {\n retval.getRangeValues().add(val);\n }\n for (String cardType : getSupportedCardList()){\n retval.getSupportedCardList().add(cardType);\n }\n return retval;\n }",
"@Override\n public MultiCache clone () {\n return new MultiCache(this);\n }",
"public MedMdrClassExtentRel clone()\n {\n MedMdrClassExtentRel clone =\n new MedMdrClassExtentRel(\n getCluster(),\n mdrClassExtent,\n connection);\n clone.inheritTraitsFrom(this);\n return clone;\n }",
"@Override\n public AggregationBuilder clone() {\n try {\n AggregationBuilder clone = (AggregationBuilder) super.clone();\n clone.root = root.clone();\n clone.current = clone.root;\n return clone;\n } catch(CloneNotSupportedException ex){\n return null;\n }\n }",
"public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }",
"public Square copy() {\n\t\tSquare s = new Square(x,y);\n\t\ts.z = z;\n\t\ts.c = new Color(c.getRGB());\n\t\treturn s;\n\t}",
"public Object clone()\n {\n PSSearchField copy = null;\n\n copy = (PSSearchField) super.clone();\n\n //don't call getFieldValues because that makes a clone\n copy.setValues(getOperator(), getExternalOperator(), m_values);\n\n return copy;\n }",
"public d clone() {\n ArrayList arrayList = this.e;\n int size = this.e.size();\n c[] cVarArr = new c[size];\n for (int i = 0; i < size; i++) {\n cVarArr[i] = ((c) arrayList.get(i)).clone();\n }\n return new d(cVarArr);\n }"
]
| [
"0.7202379",
"0.7103724",
"0.69377863",
"0.6919166",
"0.6904711",
"0.68521315",
"0.6835365",
"0.67236257",
"0.67202675",
"0.67202675",
"0.67202675",
"0.67202675",
"0.67154056",
"0.668998",
"0.6673678",
"0.66667116",
"0.66667116",
"0.6635035",
"0.66242003",
"0.66207886",
"0.6586842",
"0.65866333",
"0.6582154",
"0.65580195",
"0.65085816",
"0.64978296",
"0.6497008",
"0.648187",
"0.6481201",
"0.6443701",
"0.6410279",
"0.63826966",
"0.63559294",
"0.6345325",
"0.6341428",
"0.6324027",
"0.6298796",
"0.62884593",
"0.62823004",
"0.6278325",
"0.6275288",
"0.6265032",
"0.6257105",
"0.62422574",
"0.624062",
"0.6234007",
"0.6233544",
"0.62106085",
"0.62036127",
"0.62027186",
"0.6199988",
"0.6199428",
"0.6189168",
"0.6188424",
"0.61825275",
"0.6181359",
"0.6173472",
"0.6168932",
"0.6161817",
"0.6161271",
"0.6153257",
"0.6147865",
"0.61362654",
"0.61117756",
"0.6108228",
"0.6096178",
"0.6094808",
"0.6087583",
"0.6083799",
"0.6080817",
"0.60807484",
"0.6071146",
"0.6056167",
"0.6052004",
"0.60495996",
"0.6044668",
"0.60395753",
"0.60373545",
"0.60288966",
"0.60241264",
"0.6020465",
"0.60163623",
"0.6009075",
"0.6007393",
"0.6006877",
"0.60038936",
"0.60005945",
"0.5995473",
"0.59929454",
"0.5991467",
"0.59798807",
"0.5979337",
"0.5977497",
"0.5968648",
"0.59628576",
"0.5962774",
"0.5957391",
"0.5956886",
"0.5952173",
"0.59507775"
]
| 0.73965096 | 0 |
Simple server main function: | public static void main(String[] args) {
int port = 5000;
Server server = new Server(port);
//Start the server thread:
server.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n Server server = new Server(1234);\n server.listen();\n \n // YOUR CODE HERE\n // It is not required (or recommended) to implement the server in\n // this runner class.\n }",
"public static void main(String[] args) {\n\n Server server = new Server();\n \n\n }",
"public static void main(String[] args) {\n\n try (ServerSocket ss = new ServerSocket(PORT)) {\n System.out.println(\"chat.Server is started...\");\n System.out.println(\"Server address: \" + getCurrentIP() + \":\" + PORT);\n\n while (true) {\n Socket socket = ss.accept();\n new Handler(socket).start();\n }\n\n } catch (IOException e) {\n System.out.println(\"chat.Server error.\");\n }\n }",
"public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}",
"public static void main(String[] args) {\n\t\tServer.Serv();\n\t}",
"public static void main(String[] args) {\n loadServer();\n\n }",
"public static void main(String[] args)\n\t{\n\t\tnew Server().runServer();\n\t}",
"public static void main(String[] args) {\r\n new Server();\r\n }",
"public static void main(String[] args) \n {\n int port = DEFAULT_PORT; //Port to listen on\n\n\n ServerGui serverGui = new ServerGui();\n serverGui.setVisible(true);\n serverGui.setSize(450, 300);\n \n \n //----------------------------------\n // EchoServer sv = new EchoServer(port);\n \n }",
"public static void main(String[] args) {\n\t\tnew Server();\n\t}",
"public static void main(String[] args) {\n\t\tnew sever();\n\t}",
"public static void main(String[] args) throws IOException {\n int port = 7788;\n Server server = new Server(port);\n server.listen();\n }",
"public static void main(String[] args) {\n try {\n Thread t = new GreetingServer(4445);\n System.out.println(\"started\");\n t.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) {\n\t\tServer s = new Server(args);\n\t\ttry {\n\t\t\ts.runServer();\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\tSystem.err.println(\"Cannot accept client\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main(String[] args) {\n Server se = new Server();\n }",
"public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws Exception {\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }",
"public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(8080);\n try\n {\n while (true)\n {\n Socket clientSocket = listener.accept();\n new Thread(new JavaServer(clientSocket)).start();\n }\n }\n finally\n {\n listener.close();\n }\n }",
"public static void main(String[] args) throws Exception {\n System.out.println(\"The chat server is running.\");\n ServerSocket listener = new ServerSocket(PORT);\n try {\n while (true) {\n new Handler(listener.accept()).start();\n }\n } finally {\n listener.close();\n }\n }",
"public static void main(String[] args) throws IOException {\t\t\t\n\t\t\n\t\tSystem.out.println(\"Starting server...\");\n\t\tGameServer gameServer = new GameServer(4321);\n\t\tgameServer.serve();\n\n\t}",
"public static void main(String[] args) throws IOException \n {\t \n\tScanner scannerIn = new Scanner(System.in);\n\tSystem.out.print(\"Please enter port number for the Chat Server to run on : \");\n\tint port = scannerIn.nextInt();\n\t//starts new ChatServer\n\tChatServer cs = new ChatServer(port);\n }",
"public static void main(String[] args) {\r\n ChatServer server = new ChatServer(portNumber);\r\n server.startServer();\r\n }",
"public static void main(String[] args) throws IOException {\n int port = 8080;\n\n try {\n if (args.length == 1) {\n port = Integer.parseInt(args[0]);\n }\n ServerSocket serverSocket = new ServerSocket(port);\n ChatServer server = new ChatServer(serverSocket);\n server.startServer();\n } catch (NumberFormatException ne) {\n System.out.println(\"Illegal inputs provided when starting the server!\");\n return;\n }\n }",
"public static void main (String[] args) {\n\t\tAbstractServer as = new FirstServer();\n\t\tString ip = \"localhost\";\n\t\tas.connect(ip);\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tServerSocket so = new ServerSocket(8888);\n\t\t\t\n\t\t\twhile(true)\n\t\t\t{\n\t\t\t\tSocket sock = so.accept();\n\t\t\t\tInputStream in = sock.getInputStream();\n\t\t\t\tDataInputStream din = new DataInputStream(in);\n\t\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\tString str = din.readUTF();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Someone is connecting\");\n\t\t\t\tSystem.out.println(\"The client says: \"+ str);\n\t\t\t\t\n\t\t\t\tOutputStream out = sock.getOutputStream();\n\t\t\t\tDataOutputStream dout = new DataOutputStream(out);\n\t\t\t\t\n\t\t\t\tif(str.equals(\"Hello,Server\"))\n\t\t\t\t{\n\t\t\t\t\tdout.writeUTF(\"Hello,Client\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tdout.writeUTF(\"What do you want to say ??\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdin.close();\n\t\t\t\tin.close();\n\t\t\t\tdout.close();\n\t\t\t\tout.close();\n\t\t\t\tso.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"@SuppressWarnings(\"resource\")\n public static void main(String[] args) {\n final Scanner in = new Scanner(System.in);\n\n // Enter the port to listen\n System.out.print(\"Port: \");\n final int port = in.nextInt();\n in.nextLine();\n\n // Start the server\n Server server = new ServerImpl(port);\n server.start();\n }",
"public static void main(String[] args) throws Exception\r\n\t{\r\n\t\tSystem.out.println(\"The server is running.\");\r\n\t\tint clientNumber = 0;\r\n\t\tServerSocket listener = new ServerSocket(9898);\r\n\t\ttry\r\n\t\t{\r\n\t\t\twhile (true)\r\n\t\t\t{\r\n\t\t\t\tnew RequestHandler(listener.accept(), clientNumber++).start();\r\n\t\t\t}\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tSystem.out.println(\"closed server\");\r\n\t\t\tlistener.close();\r\n\t\t}\r\n\t}",
"public static void main(String args[]){\r\n\t\tnew ChatServer();\r\n\t}",
"public static void main(String[] args) {\n\t\tEndpoint.publish(\"http://127.0.0.1:1111/cs\", new Calculator());\r\n\t\tSystem.out.println(\"Server has started\");\r\n\r\n\t}",
"public static void main(final String[] args) throws IOException {\n startServer();\n }",
"@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tinitialiseServer(args[0]);\n\t\t\twhile (running == true) {\n\t\t\t\tif (((numLiveThreads.get()) == 0) && (running == false)) {\n\t\t\t\t\tshutdown();\n\t\t\t\t}\n\t\t\t\thandleIncomingConnection();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\toutputServiceErrorMessageToConsole(e.getMessage());\n\t\t} finally {\n\t\t\tshutdown();\n\t\t}\n\t}",
"public static void main(String[] args){\n ChatRoomServer server = new ChatRoomServer(portNumber);\n server.startServer();\n }",
"private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}",
"public static void main(String[] argv) throws Exception {\n int port = 7777;\n if (argv.length > 0) {\n port = Integer.parseInt(argv[0]);\n }\n HttpsServer server = HttpsServerFactory.createServer(\"localhost\", port);\n server.createContext(\"/\", new LogHandler());\n server.start();\n while (true) {\n }\n }",
"public static void main(String[] args) {\r\n\t\t// create a server object and start it\r\n\t\tServer server = new Server(1500);\r\n\t\tserver.start();\r\n\t}",
"public void runServer() throws IOException {\n runServer(0);\n }",
"public static void main(String[] args) {\n\t\tSettingUI serverUI = new SettingUI(\"server\");\n\n\t\t//System.out.print(\"Port(eg.1111): \");\n\t\t// int portNumber = 1111;\n\t\t// int portNumber = console.nextInt();\n\t\t// GameServer gameServer = new GameServer(portNumber);\n\t\t// gameServer.setUpChat();\n\t\t// gameServer.start();\n\t}",
"public static void main(String[] args) {\n\n\t\tint port = 8080;\n\t\t\n\t\tif(args.length == 1)\n\t\t{\n\t\t\ttry {\n\t\t\t\tport = Integer.parseInt(args[0]);\n\t\t\t}\n\t\t\tcatch (NumberFormatException nfe)\n\t\t\t{\n\t\t\t\tSystem.err.println(\"[SERVER REPLY]> Integer Port is not provided. Server will start at default port.\");\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(\"[SERVER REPLY]> Using Server Port : \" + port);\n\t\t\n\t\tWeb_Server Server = new Web_Server(port);\n\t\t\n\t\tnew Thread(Server).start(); //starts a new thread\n\t}",
"public static void main(String[] args) {\n\t\tnew Servidor();\n\t}",
"public static void main(String[] args){\n\t\tif (args.length != 1) {\n\t\t\tSystem.out.println(\"Usage: java EchoServer <EchoServer port>\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\tEchoServerMultiThreaded echoServerMultiThreaded = new EchoServerMultiThreaded();\n\t\techoServerMultiThreaded.start(args);\n\t}",
"public static void main(final String[] args) {\n\t\tServer server = new Server();\n\t\tSocketConnector connector = new SocketConnector();\n\t\tconnector.setPort(9090);\n\t\tserver.setConnectors(new Connector[] {connector});\n\n\t\tWebAppContext context = new WebAppContext();\n\t\tcontext.setServer(server);\n\t\tcontext.setContextPath(\"/biomedcalib\");\n\t\tcontext.setWar(\"src/main/webapp\");\n\n\t\tserver.addHandler(context);\n\t\ttry {\n\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint port=5000;\r\n\t\t\r\n\t\tSystem.out.println(\"server is running at:\"+port);\r\n\t\tCLientHandler handler=CLientHandler.getInstance();\r\n\t\r\n\t\t\r\n\t\tUserDao dao=new UserDaoImpl();\r\n\t\tUserLoader.loadUser(dao);\r\n\t\ttry {\r\n\t\t\tServerSocket conn=new ServerSocket(port);\r\n\t\t\t\r\n\t\t\twhile(true) {\r\n\t\t\t\tSocket socket=conn.accept();\r\n\t\t\t\r\n\t\t\t\tClientListner listner=new ClientListner(socket,dao);\r\n//\t\t\t\tlistner.setHandler(handler);\r\n\t\t\t\tlistner.start();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tThread t = new Thread(new Server());\n\t\tt.start();\n\t\ttry {\n\t\t\tt.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws Exception {\n\n List<RequestHandle> requestHandleList = new ArrayList<RequestHandle>();\n requestHandleList.add(new LsfRequestServerHandle());\n\n final Server server = new Server(new DefaultServerRoute(),new ServerHandler(requestHandleList), GlobalManager.serverPort);\n Thread t= new Thread(new Runnable() {\n public void run() {\n //start server\n try {\n server.run();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n t.start();\n\n ServerConfig serverBean = new ServerConfig();\n serverBean.setAlias(\"test\");\n serverBean.setInterfaceId(IService.class.getCanonicalName());\n serverBean.setImpl(new IServerImpl());\n server.registerServer(serverBean);\n\n\n }",
"public static void main(String[] args) {\r\n\r\n\t\tboolean server = false;\r\n\r\n\t\tif (server) {\r\n\t\t\t// This is the server setup.\r\n\t\t\tSystem.out.println(\"STARTING SERVER.\");\r\n\t\t\tServer s = new Server(8222);\r\n\t\t\ts.addPacketHandler(new PacketHandler() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleServerPacket(int id, String[] data, ServerConnection connection) {\r\n\t\t\t\t\tSystem.out.println(\"SERVER HANDLE PACKET\");\r\n\t\t\t\t\tSystem.out.println(\"PACKET TYPE: \" + id);\r\n\t\t\t\t\tSystem.out.println(\"PACKET DATA:\");\r\n\t\t\t\t\tint num = 0;\r\n\t\t\t\t\tfor (String s : data) {\r\n\t\t\t\t\t\tSystem.out.println(\"INDEX \" + num + \" - \" + s);\r\n\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleClientPacket(int id, String[] data, Client client) {\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t});\r\n\t\t\ts.addClientDisconnectHandler(new DisconnectHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\r\n\t\t\t\t\t// this is ran when on the server side when a clients connection is terminated.\r\n\t\t\t\t\tSystem.out.println(\"CLIENT DISCONNECTED FROM SERVER.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\r\n\t\t\t\t\t// this is never ran if added to the Server.\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t} else {\r\n\t\t\t// This is the client setup.\r\n\t\t\tSystem.out.println(\"STARTING CLIENT\");\r\n\t\t\tClient c = new Client(\"localhost\", 8222);\r\n\t\t\tSystem.out.println(\"CLIENT ID: \" + c.getID().toString());\r\n\t\t\tc.addPacketHandler(new PacketHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleClientPacket(int id, String[] data, Client client) {\r\n\t\t\t\t\tSystem.out.println(\"CLIENT HANDLE PACKET\");\r\n\t\t\t\t\tSystem.out.println(\"PACKET TYPE: \" + id);\r\n\t\t\t\t\tSystem.out.println(\"PACKET DATA:\");\r\n\t\t\t\t\tint num = 0;\r\n\t\t\t\t\tfor (String s : data) {\r\n\t\t\t\t\t\tSystem.out.println(\"INDEX \" + num + \" - \" + s);\r\n\t\t\t\t\t\tnum++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void handleServerPacket(int id, String[] data, ServerConnection connection) {\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tc.addClientDisconnectHandler(new DisconnectHandler() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClientDisconnect(ServerConnection sc) {\r\n\t\t\t\t\t// this is never ran if added to the Client.\r\n\t\t\t\t}\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onServerDisconnect() {\r\n\t\t\t\t\t// this is ran when the connection to the server is terminated.\r\n\t\t\t\t\tSystem.out.println(\"CONNECTION HAS BEEN LOST.\");\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n}",
"public static void main(String[] args) {\n\t\tServer server = new Server();\n\t\tnew Thread(server).start();\n\n\t}",
"public void run() {\n ServerSocketChannelFactory acceptorFactory = new OioServerSocketChannelFactory();\n ServerBootstrap server = new ServerBootstrap(acceptorFactory);\n\n // The pipelines string together handlers, we set a factory to create\n // pipelines( handlers ) to handle events.\n // For Netty is using the reactor pattern to react to data coming in\n // from the open connections.\n server.setPipelineFactory(new EchoServerPipelineFactory());\n\n server.bind(new InetSocketAddress(port));\n }",
"public static void main(String[] args) {\n Runner.runExample(Server.class);\n }",
"public static void main(String[] args) throws Exception {\n HelloWorldServer server = new HelloWorldServer(8980);\n server.start();\n server.blockUntilShutdown();\n }",
"public static void main(String[] args) throws IOException {\n log.info(\"The ticket to ride server is running.\");\n\n try (ServerSocket listener = new ServerSocket(9001)) {\n while (true) {\n Socket socket = listener.accept();\n\n MiniServer h = new MiniServer(socket);\n\n new Thread(h::go).start();\n }\n } catch (BindException be) {\n log.error(\"Cannot start server\", be);\n JOptionPane.showMessageDialog(null, \"Cannot start server\",\n be.getMessage(), JOptionPane.ERROR_MESSAGE);\n System.exit(1);\n }\n }",
"public static void main(String[] args) throws IOException, URISyntaxException {\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n } catch (Exception e) { \r\n \tSystem.out.println(\"algo no jalo\"); \t\r\n }\r\n\t\t\r\n \tHost host=new Host();\r\n \t \t \t\r\n \thttpServer = HttpServer.create(new InetSocketAddress(puerto), 0);\r\n \t\r\n \thttpServer.createContext(\"/\", new Principal());\t\t//esta es la pagina principal\r\n \thttpServer.createContext(\"/apagado\", new Apagado());\r\n \thttpServer.createContext(\"/descarga\", new Descarga());// llama a la pagina como video1.mp4\r\n \thttpServer.createContext(\"/openFileDialog\", new OpenFileDialog());\r\n \r\n \thttpServer.setExecutor(null);\r\n \thttpServer.start();\r\n \t\r\n\r\n \thost.abreLocalHost();\r\n \thost.cargaGPIO();\r\n\t}",
"final public static void main(String[] args)\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tServerSocket test = new ServerSocket(9999);\r\n\t\t\ttest.close();\r\n\t\t\ttest = null;\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tCommonMethods.displayErrorMessage(Text.MAIN.PORT9999_TAKEN_ERROR);\r\n\t\t\tCommonMethods.terminate();\r\n\t\t}\r\n\t\t//start the program\r\n\t\tStartUp startUp = new StartUp();\r\n\t\tstartUp.addStartUpListener(new StartUpListener(startUp));\r\n\t}",
"public static void main(String[] args) {\n\n Server server = new Server();\n // Accepts any new connections and opens a new socket for data transfer\n while (true) {\n Socket connectionSocket = server.AcceptIncomingConnections();\n if (connectionSocket != null) {\n new Thread(new ServerInstance(connectionSocket)).start();\n } else {\n // Error accepting , terminate server\n System.out.println(\"Error accepting incoming connections. Server shutting down\");\n break;\n }\n }\n }",
"public static void main(String[] arg) {\n // start server on port 1500\n new SnesNETsrv(13375);\n }",
"public static void main(String[] args) throws IOException {\n\t\tString hostName = \"192.168.3.76\";\n\t\tSystem.out.println(\"run\");\n\t\tServerSocket socketServer;\n\t\tSocket socket;\n\t\tInputStream is = null;\n\t\tOutputStream os = null;\n\t\tsocketServer = new ServerSocket(port_number);\n\t\tSystem.out.println(\"sockect created on \" + hostName); \n\t\tsocket = socketServer.accept();\n\t\tSystem.out.println(\"accepted\");\n\t\tis = socket.getInputStream();\n\t\tos = socket.getOutputStream();\n\t\tSystem.out.println(\"start listening\");\n\t\tPrintStream write = new PrintStream(os);\n\t\tBufferedReader read = new BufferedReader(new InputStreamReader(is));\n\t\tSystem.out.println(is.read());\n\t\twhile(true) {\n\t\t\tSystem.out.println((char)is.read());\n\t\t}\n\t}",
"private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }",
"public static void main(String[] args) {\n PingPongServerFactory factory = new RealFactory();\n Skeleton<PingPongServerFactory> skeleton = null;\n\n\n try {\n // take the localHost's hostname and create the skeleton at port 80\n InetSocketAddress inet = new InetSocketAddress(InetAddress.getLocalHost().getHostName(), 80);\n\n skeleton = new Skeleton<PingPongServerFactory>(PingPongServerFactory.class, factory, inet);\n // start the skeleton and wait for requests\n skeleton.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n try {\n skeleton.stop();\n } catch (NullPointerException e1) {\n e1.printStackTrace();\n }\n }\n }",
"public static void main(String[] args) {\n Webserver server = new Webserver();\n server.run();\n }",
"public static void main(String args[]) {\r\n try {\r\n int serverPort = 7896; // the server port\r\n ServerSocket listenSocket = new ServerSocket(serverPort);\r\n while (true) {\r\n Socket clientSocket = listenSocket.accept();\r\n Connection c = new Connection(clientSocket);\r\n }\r\n } catch (IOException e) {\r\n System.out.println(\"Listen socket:\" + e.getMessage());\r\n\r\n }\r\n }",
"public static void main(String[] args) throws IOException, InterruptedException {\r\n MMServer server = new MMServer(new ServerSocket(50000));\r\n }",
"public static void main(String[] args) {\n int port = 8899;\n ServerBootstrap serverBootstrap = new ServerBootstrap();\n EventLoopGroup boss = new NioEventLoopGroup();\n EventLoopGroup work = new NioEventLoopGroup();\n\n try {\n serverBootstrap.group(boss, work)\n .channel(NioServerSocketChannel.class)\n .localAddress(new InetSocketAddress(port))\n .childHandler(new ChannelInitializer() {\n\n @Override\n protected void initChannel(Channel ch) throws Exception {\n ch.pipeline()\n .addLast(\"codec\", new HttpServerCodec()) // HTTP 编解码\n .addLast(\"compressor\", new HttpContentCompressor()) // HttpContent 压缩\n .addLast(\"aggregator\", new HttpObjectAggregator(65536)) // HTTP 消息聚合\n .addLast(\"handler\", new HttpServerHandler());\n }\n })\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture f = serverBootstrap.bind().sync();\n System.out.println(\"Http Server started, Listening on \" + port);\n f.channel().closeFuture().sync();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n work.shutdownGracefully();\n boss.shutdownGracefully();\n }\n }",
"public static void main(String[] args) throws UnknownHostException, IOException\r\n {\n Socket clientSocket = new Socket(\"localhost\", 12345);\r\n\r\n // get writer for connection\r\n PrintWriter output = new PrintWriter(clientSocket.getOutputStream());\r\n\r\n // write message\r\n output.write(\"Hello world!\\n\");\r\n output.flush();\r\n \r\n // write message\r\n output.write(\"Hello again, world!\\n\");\r\n output.flush();\r\n\r\n // tell server to quit\r\n output.write(\"Quit\\n\");\r\n output.flush();\r\n\r\n // close connection\r\n clientSocket.close();\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tRunnable server = new ServerWorker(3000);\n\t\tnew Thread(server).start();\n\n\t\ttry {\n\t\t Thread.sleep(1000);\n\t\t} catch (InterruptedException e) {\n\t\t e.printStackTrace();\n\t\t}\n\t\t\t\t\n\t}",
"public static void main(String... args) {\n HttpServer httpServer = httpServerBuilder()\n .setPort(8080).build();\n\n /* Setting up a request Consumer with Java 8 Lambda expression. */\n httpServer.setHttpRequestConsumer(httpRequest -> {\n\n Map<String, Object> results = new HashMap<>();\n results.put(\"method\", httpRequest.getMethod());\n results.put(\"uri\", httpRequest.getUri());\n results.put(\"body\", httpRequest.getBodyAsString());\n results.put(\"headers\", httpRequest.getHeaders());\n results.put(\"params\", httpRequest.getParams());\n httpRequest.getReceiver().response(200, \"application/json\", toJson(results));\n });\n\n /* Start the server. */\n httpServer.start();\n\n\n /* Setup an httpClient. */\n HttpClient httpClient = httpClientBuilder().setHost(\"localhost\").setPort(8080).build();\n httpClient.startClient();\n\n sendGets(httpClient);\n sendPosts(httpClient);\n sendPuts(httpClient);\n\n\n Sys.sleep(1000);\n\n httpServer.stop();\n httpClient.stop();\n }",
"public static void main (String[] args) throws IOException {\n\tint portNumber = 0;\n\tboolean listeningY = true;\n\t//Checks to see if a argument of 1 is present\n\t\tif (args.length != 1) {\n\t\t\tSystem.err.println (\"Wrong arguments! Use as 'java server <port number>',\"\n\t\t\t\t+\"where <port number> is a valid integer over 1024!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//converts argumentn to number and stores it as portNumber\n\t\tportNumber = Integer.parseInt(args[0]);\n\n\t\t//error checking to see if portNumber is in accepted range\n\t\tif (portNumber < 1025) {\n\t\t\tSystem.err.println (\"Invalid Argument: Please enter a port number greater than 1025, less then 49151\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\telse if (portNumber > 49151) {\n\t\t\tSystem.err.println (\"Invalid Argument: Please enter a port number greater than 1025, less then 49151\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//started up fine, so print to screen that server ris running\n\t\tSystem.out.println(\"Server Running...\");\n\n\t\t//try portion to create server socket\n\t\ttry (\n\t\t\tServerSocket a1Socket = new ServerSocket(portNumber);\n\t\t\t) {\n\t\t\t\twhile (listeningY) {\n\t\t\t\t\t//creates a new instance of serverThread whenever it accepts a client socket request\n\t\t\t\t\tnew serverThread(a1Socket.accept()).start();\n\t\t\t\t}\n\t\t}\n\t\t//catches and deals with IOExceptions\n\t\tcatch (IOException e) {\n\t\t\t//prints out error messages \n\t\t\tSystem.err.println (\"Error! Exception caught (server side) while trying to listen for a connection or while trying to listen on the specified port number.\");\n\t\t\tSystem.err.println(\"Exception Message: \"+e.getMessage());\n\t\t}\n\t}",
"void startServer(String name, Config.ServerConfig config);",
"public static void main(String[] args) {\n\n\t\ttry {\n\t\t\tServerSocket serverSocket = new ServerSocket(9001);\n\t\t\t \n\t\t\twhile (true) {\n\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t//요청정보 대기 하다가 접근되면 주소값 리턴\n\t\t\t\tObjectInputStream inStream = new ObjectInputStream(socket.getInputStream()) ;\n\t\t\t\t\n\t\t\t\tString msg = inStream.readUTF();\n\t\t\t\tSystem.out.println(\"클라이언트가 전송해 온 메세지\" + msg);\n\t\t\t\t\n\t\t\t\tif (msg.equals(\"exit\")) {\n\t\t\t\t\tbreak; //while 문 빠져나가기 위한 (클라이언트 종료 선언을 하면 빠져나가기 위함) 조치\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tObjectOutputStream outStream = new ObjectOutputStream(socket.getOutputStream());\n\t\t\t\t\n\t\t\t\toutStream.writeUTF(\"김우현이 전달한 메세지 : \" + msg + \"잘 받았어요!\");\n\t\t\t\toutStream.flush();\n\t\t\t\t\n\t\t\t\toutStream.close();\n\t\t\t\tinStream.close();\n\t\t\t\tsocket.close();\n\t\t\t}\n\t\t\tserverSocket.close();\n\t\t\t\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tint port = Integer.parseInt(args[0]);\n\t\topenServerSocket(port);\n\n\t\twhile(true){\n\t\t\tSocket clientSocket = null;\n\t\t\ttry {\n\t\t\t\tclientSocket = serverSocket.accept();\n\t\t\t\tSystem.out.println(\"Client accepted\");\n\t\t\t\tnew Thread(new WorkerRunnable(clientSocket, port)).start();\n\t\t\t} catch (IOException e) {\n\t\t\t\tout = new PrintWriter(clientSocket.getOutputStream());\n\t\t\t\tout.println(\"HTTP/1.1 500 Server Error\");\n\t\t\t\tout.println('\\r' + '\\n' + '\\r' + '\\n');\n\t\t\t\tout.flush();\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) \r\n {\r\n\r\n int portNumber = 5007;\r\n\r\n if (args.length != 2) {\r\n System.err.println(\"Syntax: java Server <port number>\");\r\n System.exit(1);\r\n }\r\n\r\n portNumber = Integer.parseInt(args[1]);\r\n\r\n chatd server = new chatd(\"-port\", portNumber);\r\n server.launch();\r\n }",
"public static void main(String[] args) throws IOException {\n int puerto=1212,mode=1;\n for (int i = 0; i< args.length;i++ ){\n if(args[i].equals(\"-p\")){\n i++;\n puerto =Integer.parseInt(args[i]);\n }\n if(args[i].equals(\"-i\")){\n i++;\n mode =Integer.parseInt(args[i]);\n }\n }\n Server s = new Server(puerto,mode);\n s.StartThreads();\n }",
"public static void main(String[] args)throws IOException{\n new Client(\"localhost\", 12000);\n }",
"public static void main(String[] args) {\n\t\tDMMainServer server = new DMMainServer();\n\t}",
"public static void main(String[] args){\r\n\t\tnew Client();\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tServerSocket ss= new ServerSocket(5000); \r\n\t\tSocket s = null; \r\n\t\twhile(true) {\r\n\t\t\ts = ss.accept();\r\n\t\t\t\r\n\t\t\tDataOutputStream out = new DataOutputStream(s.getOutputStream());\r\n\t\t\tDataInputStream in = new DataInputStream(s.getInputStream());\r\n\t\t\t\r\n\t\t\tserverHelper c = new serverHelper(s,\"client\"+clientCount,in,out);\r\n\t\t\t\r\n\t\t\tThread t = new Thread(c);\r\n\t\t\t//System.out.println(\"client\"+clientCount+\"is online\");\r\n\t\t\tclients.add(c);\r\n\t\t\tt.start();\r\n\t\t\tclientCount++;\r\n\t\t}\r\n\t}",
"public ServerMain( int port )\r\n\t{\r\n\t\tthis.port = port;\r\n\t\tserver = new Server( this.port );\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tServerSocket server_socket = new ServerSocket(13267);\n\n\t\tserver_obj s0 = new server_obj(server_socket);\n\t\ts0.connect_db();\n\n\t\t/*server_obj[] ser = new server_obj[100];\n\t\tfor(int i=0; i<20; i++){\n\t\t\tser[i] = new server_obj(server_socket);\n\t\t\tser[i].start();\n\t\t}*/\n\t\t\n\t\t//과부하 방지용, 테스트용 소스. 서비스용은 위 20개 클라이언트 오픈\n\t\tserver_obj s1 = new server_obj(server_socket);\n\t\ts1.start();\t\n\n\t\tserver_obj s2 = new server_obj(server_socket);\n\t\ts2.start();\n\n\t}",
"public static void main(String[] args) throws Exception {\n\tint port = 8989;\n\t \n AsynchronousServerSocketChannel server = AsynchronousServerSocketChannel\n .open();\n InetSocketAddress sAddr = new InetSocketAddress(port);\n server.bind(sAddr);\n System.out.format(\"Server is listening at %s%n\", sAddr);\n \n InetAddress iAddress = InetAddress.getLocalHost();\n String currentIp = iAddress.getHostAddress();\n System.out.println(\"Current IP address : \" +currentIp); //gives only host address\n \n DesertedServer dserver = new DesertedServer(server);\n Attachment attach = new Attachment();\n attach.server = dserver;\n server.accept(attach, new ConnectionHandler());\n Thread.currentThread().join();\n }",
"public static void main (String[] args) throws Exception{\n try {\n parse_args(args);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return;\n }\n\n if( is_server ){\n run_server();\n } else {\n run_client();\n }\n\n }",
"public static void main(String[] args){\n\t\t/**************************************************\n\t\t * \t\t\tProcess command line arguments\n\t\t * ************************************************/\n\t\tboolean server = false;\n\t\tint nclients = 1;\n\t\tString url = null; \n\t\tint broadcastClock = DEFAULT_BROADCAST_CLK_PERIOD;\n\t\tint port = DEFAULT_PORT;\n\t\t\n\t\tfor (int i = 0; i != args.length; ++i) {\n\t\t\tif (args[i].startsWith(\"-\")) {\n\t\t\t\tString arg = args[i];\n\t\t\t\tif(arg.equals(\"-server\")) {\n\t\t\t\t\tserver = true;\n\t\t\t\t\tnclients = Integer.parseInt(args[++i]);\n\t\t\t\t} else if(arg.equals(\"-connect\")) {\n\t\t\t\t\turl = args[++i];\n\t\t\t\t}else if(arg.equals(\"-port\")) {\n\t\t\t\t\tport = Integer.parseInt(args[++i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tInetAddress address;\n\t\ttry {\n\t\t\taddress = InetAddress.getByName(DEFAULT_HOST);\n\t\t\tGame game = new Game();\n\t\t\tParser p = new Parser(game);\n\t\t\tgame = p.createGameFromFiles(1);\n\t\t\trunServer(address, DEFAULT_PORT, 1, DEFAULT_BROADCAST_CLK_PERIOD, PLAYER_UID++, game, 1);\n\t\t} catch (UnknownHostException e) {\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void run(){\n\t\tstartServer();\n\t}",
"public static void main(String[] args) {\n\t\ttry{\n\t\t\tServerSocket socket = new ServerSocket(5004);\n\t\t\tSystem.out.println(\"Server is up and running!!!\");\n\t\t\twhile(true){\n\t\t\t\tSocket serverSocket = socket.accept();\n\t\t\t\t//thread creation\n\t\t\t\tThread t = new Thread(new PeerConnect(serverSocket));\n\t\t\t\tt.start();\n\t\t\t}\t\t\n\t\t}\n\t\tcatch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\ttry { NetworkServerControl server = new NetworkServerControl(InetAddress.getByName(\"localhost\"),1527);\n\t\tserver.start(null);\n\t\tSystem.out.println(\"DB Server Started!\");\n\t\t//server.shutdown();\n\t\t//cn = DriverManager.getConnection(dbURL);\n\t\t} catch(Exception e) {System.out.println(\"Cannot Start DB Server!\"); }\n\t\t\n\t\tfinal JettyServer jettyServer = new JettyServer();\n\t\tString jetty_home = System.getProperty(\"jetty.home\",\".\");\n Server server = new Server(8080);\n WebAppContext webapp = new WebAppContext();\n webapp.setContextPath(\"/\");\n //webapp.setWar(jetty_home+\"/target/vrscloud-1.war\");\n webapp.setWar(\"ROOT.war\");\n server.setHandler(webapp);\n // server.start();\t\n\t\t\n\t\t\n jettyServer.setHandler(webapp);\t\n\t\t\n\t\tRunnable runner = new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tnew ServerRunner(jettyServer);\n\t\t\t}\n\t\t};\n\t\tEventQueue.invokeLater(runner);\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tint port = 3030;\n\t\tServerSocket serverSocket = null;\n\n\t\t// Establish the listen socket\n\t\ttry {\n\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tSystem.out.println(\"TCP server created on port =\" + port);\n\n\n\t\t// Process HTTP service requests in an infinite loop.\n\t\twhile (true) {\n\t\t\tSocket clientSocket = null;\n\n\t\t\tclientSocket = serverSocket.accept();\n\n\t\t\t// Construct an object process the HTTP request message\n\t\t\tHttpRequest request = new HttpRequest(clientSocket);\n\t\t\t// create a new thread to process the request\n\t\t\tThread thread = new Thread(request);\n\t\t\t// Start the thread\n\t\t\tthread.start();\n\n\t\t}\n\t\t}\n\t\t catch (IOException ex) {\n\t\t\t\tSystem.out.println(\"Error : The server with port=\" + port + \"cannot be created\");\n\t\t\t}\n\t\t// Closing the socket\n\t\tfinally {\n\t\t try { \n\t\t \tserverSocket.close();\n\t\t } catch(Exception e) {\n\t\t // If you really want to know why you can't close the ServerSocket, like whether it's null or not\n\t\t }\n\t\t}\n\n\t}",
"public static void main(String[] args)throws Exception {\n\t\t@SuppressWarnings(\"resource\")\r\n\t\tServerSocket ss=new ServerSocket(10003);\r\n\t\twhile (true) {\r\n\t\t\tSocket s=ss.accept();\r\n\t\t\tInputStream in= s.getInputStream();\r\n\t\t\tbyte [] buf=new byte[1024];\r\n\t\t\tin.read(buf);\r\n\t\t\tSystem.out.println(new String(buf));\r\n\t\t\tOutputStream out=s.getOutputStream();\r\n\t\t\tSystem.out.println(s.getInetAddress().getHostAddress()+\"connected...\");\r\n\t\t\tout.write((\"收到,服务器地址为:\"+InetAddress.getLocalHost().getHostAddress()).getBytes());\r\n\t\t\ts.close();\r\n\t\t}\r\n\t}",
"public void runServer()\n\t{\n\t\taddText(\"Server started at \" + LocalDateTime.now());\n\t\t\n\t\tint cnt = 0;\n\t\twhile(true)\n\t\t{\n\t\t\ttry {\n\t\t\t\t// Accept a request\n\t\t\t\taddText(\"Server is waiting for connection....\");\n\t\t\t\tSocket client = server.accept();\n\t\t\t\tConnectionThread connect = new ConnectionThread(client);\n\t\t\t\t\n\t\t\t\t// Show message\n\t\t\t\taddText(\"Server is connect!\");\n\t\t\t\taddText(\"Player\" + cnt + \"'s IP address is\" + client.getInetAddress());\n\t\t\t\tcnt++;\n\t\t\t\t\n\t\t\t\t// Add to List\n\t\t\t\tconnectionPool.add(connect);\n\t\t\t\t\n\t\t\t\t// If at least two players, Start the game\n\t\t\t\taddText(\"Pool has \" + connectionPool.size() + \" connection\");\n\t\t\t\tif(connectionPool.size() >= 2)\n\t\t\t\t\tclientStart();\n\t\t\t\t\n\t\t\t\t// Start connectionThread\n\t\t\t\tconnect.start();\n\t\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\t//System.setSecurityManager(new RMISecurityManager());\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Server is starting...\");\n\t\t\n\t\ttry {\n\t\t\tServer server = new Server(sPort);\n\t\t\tserver.start();\n\t\t\tSystem.out.println(\"Press Enter to exit.\") ;\n\t\t\t\n\t\t\tin.nextLine() ;\n\t\t\t\n\t\t\t//Naming.rebind(Utilities.SERVER_NAME, gc);\n\t\t\tSystem.out.println(\"Server is started\");\n\t\t} catch (RemoteException | UnknownHostException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tin.close(); \n\t}",
"public static void main(String[] args) {\n ServerSocket serverSocket = null;\n \n /* Create the server socket */\n try {\n serverSocket = new ServerSocket(9999);\n } catch (IOException e) {\n System.out.println(\"IOException: \" + e);\n System.exit(1);\n }\n room r = new room(\"Lobby\");\n ChatServerThread.addRoom(r);\n /* In the main thread, continuously listen for new clients and spin off threads for them. */\n while (true) {\n try {\n /* Get a new client */\n Socket clientSocket = serverSocket.accept();\n \n /* Create a thread for it and start! */\n ChatServerThread clientThread = new ChatServerThread(clientSocket);\n ChatServerThread.addClient(clientThread);\n new Thread(clientThread).start();\n\n } catch (IOException e) {\n System.out.println(\"Accept failed: \" + e);\n System.exit(1);\n }\n }\n }",
"public static void main(String[] args) throws Exception {\n Application app = new Application();\r\n\r\n // Plug the server resource.\r\n app.setInboundRoot(HelloServerResource.class);\r\n\r\n // Instantiating the HTTP server and listening on port 8111\r\n new Server(Protocol.HTTP, 8111, app).start();\r\n }",
"private static void server() throws IOException {\n\t\tServerSocket serverSocket = new ServerSocket(10999);\n\t\t//listener, waiting connection\n\t\tSocket socket = serverSocket.accept();//block\n\t\t//input --> receive / output --> send\n\t\tInputStream inputStream = socket.getInputStream();\n\t\tOutputStream outputStream = socket.getOutputStream();\n\t\t//byte array (stream)\n\t\tbyte[] b = new byte[1024];\n\t\t//read/receive\n\t\tinputStream.read(b);\n\t\t//\n\t\tString resp = client(b);\n\t\t//\n\t\toutputStream.write(resp.getBytes());\n\t\t//closing\n\t\tsocket.close();\n\t\t//close server\n\t\tserverSocket.close();\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tServerSocket serverSocket = new ServerSocket(8989);\n\t\t\tApplication app = new Application();\n\t\t\tapp.startServer(serverSocket);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"服务器端口已经被占用!!!\");\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException \n\t{\n\t\tServerSocket s= new ServerSocket(8000);\n\t\twhile (true)\n\t\t{\n\t\t\t\tSocket s1=s.accept();\n\t\t\t\tSystem.out.println(\"CONNECTED\");\n\t\t\t\tInputStream inp = s1.getInputStream();\n\t\t\t\tDataInputStream in = new DataInputStream(inp);\n\t\t\t\twhile(true)\n\t\t\t\t\t{\n\t\t\t\t\t\tString command = in.readUTF();\n\t\t\t\t\t\tSystem.out.println(command);\n\t\t\t\t\t\tif(command.compareTo(\"exit\")==0)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\t\t\t\tProcess p = rt.exec(command);\n\t\t\t\t\t}\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tServerSocket welcomeSocket = new ServerSocket(6789);\n\t\tSystem.out.println(\"The chat server is running.\");\n\n\t\twhile (true) {\n\t\t\tMessenger request = new Messenger(welcomeSocket.accept());\n\n\t\t\tThread thread = new Thread(request);\n\t\t\t// Start the thread.\n\t\t\tthread.start();\n\t\t}\n\t}",
"public static void main(String [] args) throws IOException {\n Main main = new Main();\n Map stockList = main.createStockList();\n\n Server server = new Server(2000); \n server.setMap(main.stockList);\n server.server_loop(); // run server\n\n }",
"public static void main(String[] argv)\n {\n int p = determinePort(argv, 10000);\n XmlRpc.setKeepAlive (true);\n SecureWebServer webserver = new SecureWebServer (p);\n\n try\n {\n webserver.addDefaultHandlers();\n webserver.start();\n }\n catch (Exception e)\n {\n System.err.println(\"Error running secure web server\");\n e.printStackTrace();\n System.exit(1);\n }\n }",
"public static void main(String[] args) throws Exception {\n\t\tServerSocket socket = new ServerSocket(port);\n\t\tSystem.out.println(\"Port \"+port+\" open\");\n\t\tServer server = new Server();\n\t\tnew ScoreThread().start();\n\t\twhile(true){\n\t\t\tSocket client = socket.accept();\n\t\t\tnew ServerThread(client, server).start();\n\t\t\tSystem.out.println(\"New connection with client \"+client.getInetAddress().getHostAddress());\n\t\t}\n\t}",
"public static void main(String[] args){\n \n Chat m = new Chat();\n m.connectChat(new String[]{\"100.1.215.220\",\"8889\"});\n //m.runServer(new String[]{\"192.168.1.164\",\"8889\"});\n }",
"public static void main(String[] args) {\n\t\tserverManager = new ServerManager(8031);\n\t\t\n\t}",
"public static void main (String[] args){\n AudioServer main = new AudioServer(args);\n }",
"public static void main(String[] args) {\n\t\tif (args[1] != null)\n\t\t{\n\t\t\thost = args[1];\n\t\t} else {\n\t\t\thost = \"127.0.0.1\";\n\t\t}\n\t\ttry {\n\t\t\tcreateUI();\n\t\t\tclientSocket = new Socket(host, port);\n\t\t\tout = new PrintWriter(clientSocket.getOutputStream(), true);\n\t\t\tin = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tclientSocket.getInputStream()));\n\t\t\tmessageHandler(out, in);\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t}"
]
| [
"0.83141404",
"0.7942366",
"0.785935",
"0.78078276",
"0.779505",
"0.7774306",
"0.7757288",
"0.7750284",
"0.77223086",
"0.76988983",
"0.76591176",
"0.76575357",
"0.76151246",
"0.75830126",
"0.75807744",
"0.7556788",
"0.7547722",
"0.75277823",
"0.74876565",
"0.74698603",
"0.74638826",
"0.7441034",
"0.7438228",
"0.74298733",
"0.74218076",
"0.7409354",
"0.739841",
"0.73761696",
"0.73735195",
"0.7368372",
"0.7363527",
"0.7356797",
"0.73440987",
"0.73286366",
"0.73211706",
"0.73111826",
"0.7307707",
"0.7296818",
"0.72812116",
"0.72759867",
"0.7269685",
"0.72694784",
"0.7267384",
"0.7265091",
"0.72640955",
"0.7255291",
"0.72465056",
"0.72464025",
"0.7241073",
"0.7239717",
"0.72391415",
"0.72261757",
"0.7223226",
"0.72119427",
"0.7210127",
"0.72005075",
"0.7182971",
"0.7177664",
"0.7162262",
"0.71487355",
"0.7139394",
"0.7127407",
"0.7114671",
"0.710804",
"0.71055",
"0.7103565",
"0.7103394",
"0.70980126",
"0.7095723",
"0.70954996",
"0.70911336",
"0.7088618",
"0.7077206",
"0.7075014",
"0.7073705",
"0.70722854",
"0.7070173",
"0.70694757",
"0.706884",
"0.7068503",
"0.70679027",
"0.70667875",
"0.70664364",
"0.70661443",
"0.7062696",
"0.70561665",
"0.70478505",
"0.70468926",
"0.70463675",
"0.70278776",
"0.7022957",
"0.70227575",
"0.70186645",
"0.70116806",
"0.70008504",
"0.6998165",
"0.6997178",
"0.69958633",
"0.69901013",
"0.6986013"
]
| 0.7752312 | 7 |
create HashMap to store String keys and Integer values | public static void main(String[] args) {
Map<Character, Integer> myMap = new HashMap<>();
createMap(myMap); // create map based on user input
displayMap(myMap); // display map content
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) \r\n {\n TreeMap<Employee, Integer> hashMap = new TreeMap<Employee, Integer>(); \r\n \r\n // Mapping string values to int keys \r\n hashMap.put(new Employee(10,\"uday\"), 10); \r\n hashMap.put(new Employee(11,\"uday\"), 11); \r\n hashMap.put(new Employee(12,\"uday\"), 12); \r\n hashMap.put(new Employee(13,\"uday\"), 13); \r\n \r\n for (Entry<Employee, Integer> e : hashMap.entrySet()) \r\n System.out.println(e.getKey().toString() + \" \" + e.getValue()); \r\n \r\n HashMap<String, Integer> map = new HashMap<>(); \r\n \r\n }",
"private static Map<Character, Integer> createKey(String subString) {\n Map map = new HashMap<Character, Integer>();\n for (int i = 0; i < subString.length(); i++) {\n Character c = subString.charAt(i);\n\n if (map.containsKey(c)) {\n int count = (int) map.get(c);\n map.put(c, ++count);\n } else {\n map.put(c, 1);\n }\n }\n return map;\n }",
"public static void createHashMap() {\n\t\t// create hash map\n\t\tHashMap<Integer, String> students = new HashMap<Integer, String>();\n\t\tstudents.put(1, \"John\");\n\t\tstudents.put(2, \"Ben\");\n\t\tstudents.put(3, \"Eileen\");\n\t\tstudents.put(4, \"Kelvin\");\n\t\tstudents.put(5, \"Addie\");\n\t\t// print the hash map\n\t\tfor (Map.Entry<Integer, String> e : students.entrySet()) {\n\t\t\tSystem.out.println(e.getKey() + \" \" + e.getValue());\n\t\t}\n\t}",
"private void mapValues() {\n\t\tmap.put(1, \"I\");\r\n\t\tmap.put(5, \"V\");\r\n\t\tmap.put(10, \"X\");\r\n\t\tmap.put(50, \"L\");\r\n\t\tmap.put(100, \"C\");\r\n\t\tmap.put(500, \"D\");\r\n\t\tmap.put(1000, \"M\");\r\n\t}",
"private HashMap<String, Integer> createFieldMap(ObjectDefinition context) {\r\n\r\n\t\tHashMap<String, Integer> map = new HashMap<String, Integer>();\r\n\r\n\t\tArrayList<Field> fields = context.getFields();\r\n\r\n\t\tfor (int i = 0; i < fields.size(); i++) {\r\n\t\t\tmap.put(fields.get(i).getName(), i);\r\n\t\t}\r\n\t\treturn map;\r\n\t}",
"@Test\n\tpublic void testIdentityHashMap() {\n\t\tInteger i1 = new Integer(10);\n\t\tInteger i2 = new Integer(10);\n\n\t\tHashMap m = new HashMap();\n\t\tm.put(i1, \"evyaan\");\n\t\tm.put(i2, \"varun\");\n\n\t\tassertEquals(\"{10=varun}\", m.toString());\n\n\t\tIdentityHashMap im = new IdentityHashMap();\n\t\tim.put(i1, \"evyaan\");\n\t\tim.put(i2, \"varun\");\n\n\t\t// System.out.println(im);\n\n\t}",
"abstract Map<String, Integer> mapOfNamesToSalary();",
"@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }",
"String put(Integer key, String value);",
"private HashMap<String, String> generateHashMapFromStringList(String...strings) throws Exception {\n\n\t\tif(strings.length % 2 != 0)\n\n\t\t\tthrow InvalidStringListException;\n\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\n\t\tfor(int i = 0; i < strings.length; i += 2) // Each key will be i, with the following becoming its value\n\n\t\t\tmap.put(strings[i], strings[i + 1]);\n\n\t\treturn map;\n\t}",
"public Map<T, V> populateMap() {\n Map<T, V> map = new HashMap<>();\n for (int i = 0; i < entryNumber; i++) {\n cacheKeys[i] = (T) Integer.toString(random.nextInt(1000000000));\n String key = cacheKeys[i].toString();\n map.put((T) key, (V) Integer.toString(random.nextInt(1000000000)));\n }\n return map;\n }",
"public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }",
"public HashMap<String, Integer> getHashMap(){\n\t\tHashMap <String, Integer> hm1 = new HashMap <String, Integer>();\n\t\t//get each line of the book and store it as an arrayList\n\t\twords = wordData.getLines();\n\t \n\t\tfor(int i =0; i<words.size(); i++){\n\t\t\t \n\t\t\tString[] aLine = words.get(i).split(\" \");\n\t\t\t\n\t\t\tfor(int j = 0; j<aLine.length; j++){\n\t\t\t\t\n\t\t\t\t// convert all upper case to lower case & remove all non-alphabetic symbols;\n\t\t\t\t\t\n\t\t\t\tsparsedWords.add(aLine[j].toLowerCase().replaceAll(\"[^\\\\w]\", \"\"));\n\t\t\t}\n\t\t}\n\t\t//put in key and value in hashmap\n\t\tfor(int key = 0; key < sparsedWords.size(); key++){\n\t\t\t\n\t\t\tif (hm1.containsKey(sparsedWords.get(key))){\n\t\t\t\tint count = hm1.get(sparsedWords.get(key));\n\t\t\t\thm1.put(sparsedWords.get(key), count + 1);\n\t\t\t}else{\n\t\t\t\thm1.put(sparsedWords.get(key), 1);\n\t\t\t}\n\t\t}\n\t\treturn hm1;\n\t\t \t\n\t\t}",
"public static HashMap<String, Integer> getHashMap() {\n String query;\n HashMap<String, Integer> catID = new HashMap<String, Integer>();\n\n try {\n Connection con = Database.createDBconnection();\n Statement stmt = con.createStatement();\n query = \"SELECT category_id, category FROM category;\";\n ResultSet rs = stmt.executeQuery(query);\n\n while(rs.next()) {\n catID.put(rs.getString(\"category\"), rs.getInt(\"category_id\"));\n }\n\n Database.closeDBconnection(con);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n return catID;\n }",
"public static HashMap<Integer, String> createDictionary(HashSet<Integer> byteKey, ArrayList<String> bitsValue){\n HashMap<Integer, String> dictionary = new HashMap<>();\n ArrayList <Integer> bytesKey = new ArrayList<>(byteKey);\n for (int i = 0; i < bytesKey.size(); i++) {\n dictionary.put(bytesKey.get(i), bitsValue.get(i));\n }\n return dictionary;\n }",
"@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }",
"private static void createMap(Map<Character, Integer> map) {\n Scanner scanner = new Scanner(System.in); // create scanner\n System.out.println(\"Enter a string:\"); // prompt for user input\n String input = scanner.nextLine();\n\n char[] chars = input.replace(\" \", \"\").toCharArray();\n\n for (Character chr : chars) {\n if (map.containsKey(chr)) {\n int count = map.get(chr); // get current count\n map.put(chr, count + 1); // increment count\n } else\n map.put(chr, 1); // add new char with a count of 1 to map\n }\n }",
"public HashEntityMap()\n\t\t{\n\t\t\tmapNameToValue = new HashMap<String, Integer>();\n\t\t}",
"@Test\n public void hashMapInitialised()\n {\n Map<Integer, String> strings = MapUtil.<Integer, String>hashMap().keyValue(1, \"Me\").keyValue(2, \"You\");\n // Is this really better than calling strings.put(..)?\n\n assertEquals(\"You\", strings.get(2));\n }",
"private static Map<String, Integer> getHashTags(){\n\t\t\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tHashtagEntity[] entitles = status.getHashtagEntities();\n\t\t\tfor(HashtagEntity entity : entitles){\n\t\t\t\tString str = entity.getText();\n\t\t\t\t\n\t\t\t\tif(map.containsKey(str)){\n\t\t\t\t\tint count = map.get(str);\n\t\t\t\t\tmap.put(str, ++count);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(str, 1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }",
"public static HashMap<String, Integer> readHashMap(Hessian2Input dis, Integer[] allInts) {\n int count;\n HashMap<String, Integer> tileMap = null;\n String[] keys;\n try {\n // TODO - The following read is necessary, but could be removed in a future version\n dis.readInt();//size = dis.readInt();\n count = dis.readInt();\n tileMap = new HashMap<String, Integer>(count);\n keys = new String[count];\n for (int i = 0; i < keys.length; i++) {\n keys[i] = dis.readString();\n }\n for (int i = 0; i < count; i++) {\n tileMap.put(keys[i], allInts[dis.readInt()]);\n }\n\n } catch (IOException e) {\n MessageGenerator.briefErrorAndExit(\"Error in readHashMap()\");\n }\n return tileMap;\n }",
"public static HashMap<String,Integer> counter(ArrayList<String> arr){\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\n\t\t\tfor(String s : arr){\n\t\t\t\tif (map.keySet().contains(s)){\n\t\t\t\t\tmap.put(s, map.get(s)+1);\n\t\t\t\t}else{\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn map;\t\n\t}",
"public HashMap<String, String> convertToHashMapOfStrings()\n {\n HashMap<String, String> hashMapOfStrings = new HashMap<String, String>();\n for (DataPreferenceEnum key : preferencesHashMap.keySet())\n {\n String valueString = preferencesHashMap.get(key).toString();\n hashMapOfStrings.put(key.toString(), valueString);\n }\n\n return (hashMapOfStrings);\n }",
"public static void main(String[] args) {\n\t\tInteger u=new Integer(10);\n\t\tInteger u1=new Integer(10);\n\t\tIdentityHashMap<Integer,String> g=new IdentityHashMap();\n\t\tg.put(u, \"dhdanas\");\n;\n\t\tg.put(u1,\"dtttt\");\n\t\t\nSystem.out.println(g);\n}",
"public HashMap<String, Integer> makeEmpty() {\r\n\t\tHashMap<String, Integer> newMap = new HashMap<>();\r\n\t\tnewMap.put(new Gloom(\"Gloom\", null, 30, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Golbat(\"Golbat\", null, 28, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Growlithe(\"Growlithe\", null, 26, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Jigglypuff(\"Jigglypuff\", null, 24, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Persian(\"Persian\", null, 22, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Pidgeotto(\"Pidgeotto\", null, 20, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Pikachu(\"Pikachu\", null, 18, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Seaking(\"Seaking\", null, 16, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Staryu(\"Staryu\", null, 14, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Tentacool(\"Tentacool\", null, 12, 25, 20, 10).getName(), 0);\r\n\t\tnewMap.put(new Zubat(\"Zubat\", null, 10, 25, 20, 10).getName(), 0);\r\n\t\treturn newMap;\r\n\t}",
"public CountingMap() {\n this( new HashMap<K, Integer>() );\n }",
"java.util.Map<java.lang.Integer, java.lang.Integer>\n getInfoMap();",
"public static void getHashMapValues() {\n\t\tMap<Integer, String> map = createHashMap();\n\t\t\n\t\t//Get value from key.\n\t\tSystem.out.println(\"Map value for key 1: \" + map.get(1));\n\n\t\t\n\t\t//2. using custom object as key\n\t\tMap<Account, String> accountMap = createAccountMap();\n\t\t\n\t\tAccount account = new Account(\"John\", 1, 100);\n\t\t\n\t\tSystem.out.println(\"**********Get value from Map:*********** \");\n\t\tSystem.out.println(\"Map Value for key as Account: \"\n\t\t\t\t+ accountMap.get(account));\n\t}",
"public static HashMap<String, Integer> convertArrayToHashMap(String[] arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.length; i++)\n hm.put(arr[i], i);\n\n return hm;\n\n }",
"public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}",
"public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }",
"private void setUpHashMap(int number)\n {\n switch (number)\n {\n case 1:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n break;\n }\n case 2:\n {\n this.hourly.put(\"Today\",new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }\n case 3:\n {\n this.hourly.put(\"Today\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Tomorrow\", new ArrayList<HourlyForecast>());\n this.hourly.put(\"Day After Tomorrow\", new ArrayList<HourlyForecast>());\n break;\n }default:\n break;\n }\n }",
"public Dictionary createDictionary(){\n Dictionary dict = new Dictionary(9973);\n return dict;\n }",
"public Map<Integer, Integer> generateMap(int size){\n Map<Integer, Integer> data = new HashMap<>();\n for (int i = 0; i < size; i++){\n data.put(i, i);\n }\n return data;\n }",
"private IMapData<Integer, String> getHashMapData2() {\n List<IKeyValueNode<Integer, String>> creationData = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(2, \"c\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"a\"),\n KeyValueNode.make(3, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<IKeyValueNode<Integer, String>> data = ArrayLists.make(\n KeyValueNode.make(1, \"a\"),\n KeyValueNode.make(2, \"b\"),\n KeyValueNode.make(3, \"c\"));\n\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }",
"private void createHashtable()\n {\n int numLanguages = languages.length;\n mapping = new Hashtable(numLanguages, 1.0f);\n for (int i = 0; i < numLanguages; i++)\n mapping.put(languages[i], values[i]);\n }",
"private IMapData<Integer, String> getHashMapData1() {\n List<IKeyValueNode<Integer, String>> creationData = new ArrayList<>();\n List<IKeyValueNode<Integer, String>> data = new ArrayList<>();\n List<Integer> keys = this.createKeys(data);\n List<String> values = this.createValues(data);\n\n return new MapData<>(\n creationData,\n data,\n keys,\n values);\n }",
"public Map<Integer, String> getCustomFieldNumberValues() {\n\n Map<Integer, String> map = new LinkedHashMap<>(20);\n map.put(0, \"\");\n for (int i = 1; i <= 8; i++) {\n map.put(i + 10, String.format(\"Custom%02d\", i));\n }\n for (int i = 9; i <= 20; i++) {\n map.put(i + (73 - 9), String.format(\"Custom%02d\", i));\n }\n return Collections.unmodifiableMap(map);\n }",
"public static void main(String[] args) {\n\t\tString2Int.put(\"Location1\", new Integer(0));\n\t\tString2Int.put(\"Location2\", new Integer(1));\n\t\tString2Int.put(\"Location3\", new Integer(2));\n\t\tString2Int.put(\"Location4\", new Integer(3));\n\t\t\n\t\t\n\t\t// populate it\n\t\tInt2String.put(new Integer(0), \"Location1\");\n\t\tInt2String.put(new Integer(1), \"Location2\");\n\t\tInt2String.put(new Integer(2), \"Location3\");\n\t\tInt2String.put(new Integer(3), \"Location4\");\n\t\t\n\t\t\n\t\t//HashMap<String,List<Integer>> NHMap = new HashMap<String,List<Integer>>();\n\t\tArrayList<Integer[]> NHMap = new ArrayList<Integer[]>();\n\t\tInteger[] NHMapedge1 ={String2Int.get(\"Location1\"),100,30};\n\t\tInteger[] NHMapedge2 ={String2Int.get(\"Location2\"),20,40};\n\t\tInteger[] NHMapedge3 ={String2Int.get(\"Location4\"),30,15};\n\t\tInteger[] NHMapedge4 ={String2Int.get(\"Location3\"),140,60};\n\t\t//edges.add(edge);\n\t\tNHMap.add(NHMapedge1);\n\t\tNHMap.add(NHMapedge2);\n\t\tNHMap.add(NHMapedge3);\n\t\tNHMap.add(NHMapedge4);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//HashMap<String,List<Integer>> EHMap = new HashMap<String,List<Integer>>();\n\t\tArrayList<Integer[]> EHMap = new ArrayList<Integer[]>();\n\t\tInteger[] EHMapedge1 ={String2Int.get(\"Location1\"),String2Int.get(\"Location2\"),10,30};\n\t\tInteger[] EHMapedge2 ={String2Int.get(\"Location2\"),String2Int.get(\"Location3\"),20,40};\n\t\tInteger[] EHMapedge3 ={String2Int.get(\"Location4\"),String2Int.get(\"Location4\"),30,50};\n\t\tInteger[] EHMapedge4 ={String2Int.get(\"Location3\"),String2Int.get(\"Location2\"),40,60};\n\t\t//edges.add(edge);\n\t\tEHMap.add(EHMapedge1);\n\t\tEHMap.add(EHMapedge2);\n\t\tEHMap.add(EHMapedge3);\n\t\tEHMap.add(EHMapedge4);\n\t\t\n\t\tArrayList<Integer[]> edges = new ArrayList<Integer[]>();\n\t\tInteger[] edge ={String2Int.get(\"Location1\"),String2Int.get(\"Location2\"),10};\n\t\tInteger[] edge1 ={String2Int.get(\"Location2\"),String2Int.get(\"Location3\"),20};\n\t\tInteger[] edge2 ={String2Int.get(\"Location1\"),String2Int.get(\"Location3\"),30};\n\t\tInteger[] edge4 ={String2Int.get(\"Location3\"),String2Int.get(\"Location4\"),40};\n\t\tInteger[] edge5 ={String2Int.get(\"Location4\"),String2Int.get(\"Location3\"),40};\n\t\t\n\t\t\n\t\tedges.add(edge);\n\t\tedges.add(edge1);\n\t\tedges.add(edge2);\n\t\tedges.add(edge4);\n\t\tedges.add(edge5);\n\t\t\n\t\t\n \n\t //int[][] adj_matrix = MapArrayList(edges1);\n int[][] adj_matrix = MapArrayList(edges);\n\t\tfor(int i=0;i<5;i++){\n\t\t\t//System.out.println(\"\");\n\t\t\tfor(int j=0;j<5;j++){\n\t\t\t\t\n\t\t\t\t//System.out.print(adj_matrix[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//dijkstra(edges1);\n\t\t//System.out.print(edges2);\n\t\t//System.out.println(\"Ehtesham\");\n\t\tArrayList<ArrayList<Integer>> finalpaths = dijkstra(adj_matrix);\n\t\t for (ArrayList<Integer> item : finalpaths) { \n\t\t\t System.out.println(\"\");\n\t\t\t \tfor(Integer node: item)\n\t\t\t \t{\t\n\t\t\t \t\tSystem.out.print(Int2String.get(node)+\"->\");\n\t\t\t \t}\n\t\t\n\t\t }\n\t\t int cost = 210;\n\t\t int time = 190;\n\t\t //ArrayList<ArrayList<Integer>> finalp1aths1 = Pathinbound(finalp1aths1);\n\t\t ArrayList<ArrayList<Integer>> finalp1aths1 = Pathinbound(NHMap,EHMap,finalpaths,cost,time);\n\t\t System.out.println(\"\");\n\t\t System.out.println(\"-----------------------------Final answer-------------------------------\");\n\t\t for (ArrayList<Integer> item : finalp1aths1) { \n\t\t\t\tSystem.out.println(item);\n\t\t\t\t\n\t\t }\n\t\t\t\t \n\t}",
"public static <K, V> HashMap<K, V> initHashMap() {\n\t\treturn new HashMap<K, V>();\n\t}",
"public static void main(String[] args) {\n System.out.println(\"HW1\");\n Map<String, Integer> map = new HashMap<>();\n map.put(\"Ivan\",19);\n map.put(\"Dm\",20);\n map.put(\"Petr\",19);\n\n\n }",
"private void insertIntegers(Map<String,Integer> mapValues) {\n mapFieldsIntegers.putAll(mapValues);\n }",
"public static void main(String[] args) {\n\tMap <String, Integer>phones=new HashMap<>();\r\n\tphones.put(\"Mila\", 98232433);\r\n\tphones.put(\"Jenia\", 2834732);\r\n\tphones.put(\"Yerlan\", 77398274);\r\n\tphones.put(\"Mila\",1263584);\r\n\t//last one will override the first one\r\n\t\r\n\tIterator <String> iterator=phones.keySet().iterator();\r\n\twhile (iterator.hasNext()){\r\n\t\tString key=iterator.next();\r\n\t\tInteger value=phones.get(key);\r\n\t\tSystem.out.println(key+\" \"+value);\r\n\t}\r\n\t\r\n\t//store keys in Set\r\n\tSet<String> keys=phones.keySet();\r\n\tfor (String key : keys) {\r\n\t\tSystem.out.println(key);\r\n\t}\r\n\t//store values in Collection\r\n Collection <Integer> val=phones.values();\r\n for (Integer values : val) {\r\n \tSystem.out.println(values);\r\n\t\t\r\n\t}\r\n \r\n Set<Entry<String,Integer>> entry=phones.entrySet();\r\n for (Entry<String, Integer> entry2 : entry) {\r\n\t\t//System.out.println(entry2);\r\n\t\tSystem.out.println(entry2.getKey()+\" \"+entry2.getValue());\r\n\t}\r\n}",
"private static <T> Map<T, String> createSimpleMap(T key, String value) {\n\t\tMap<T, String> map = new HashMap<>();\n\t\tmap.put(key, value);\n\t\treturn map;\n\t}",
"private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}",
"static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}",
"public IntegerKey(final int number) {\n super(Integer.class);\n this.number = number;\n }",
"public HashMap(){\n\t\tthis.numOfBins=10;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}",
"public static HashMap<String, Integer> convertArrayListToHashMap(\n ArrayList<String> arr)\n {\n HashMap<String, Integer> hm = new HashMap<String, Integer>();\n\n for (int i = 0; i < arr.size(); i++)\n hm.put(arr.get(i), i);\n\n return hm;\n\n }",
"public static TreeMap<Integer, ArrayList<String>> countOccur(Map<String,Integer> map){\n\t\tTreeMap<Integer,ArrayList<String>> num_map = new TreeMap<Integer,ArrayList<String>>();\n\t\tfor(String key : map.keySet()) {\n\t\t\tInteger i = map.get(key);\n\t\t\tif(!num_map.containsKey(i)) {\n\t\t\t\tnum_map.put(i, new ArrayList<String>());\n\t\t\t\tnum_map.get(i).add(key);\n\t\t\t} else {\n\t\t\t\tnum_map.get(i).add(key);\n\t\t\t}\n\t\t}\n\t\treturn num_map;\n\t}",
"private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }",
"public static HashMap<Integer, Item> storeItems(){\n\t\tItem prod1 = new Item(\"Candy\",40);\n\t\tItem prod2 = new Item(\"Bread\",30);\n\t\tItem prod3 = new Item(\"Butter\",50);\n\t\tItem prod4 = new Item(\"Milk\",43);\n\t\tItem prod5 = new Item(\"Toast\",60);\n\t\tItem prod6 = new Item(\"Curd\",20);\n\t\tItem prod7 = new Item(\"Cream\",80);\n\t\tItem prod8 = new Item(\"Pastry\",45);\n\t\tItem prod9 = new Item(\"Cake\",300);\n\t\tItem prod10 = new Item(\"Panner\",200);\n\t\tItem prod11 = new Item(\"Egg\",8);\n\t\tproducts.put(1,prod1);\n\t\tproducts.put(2,prod2);\n\t\tproducts.put(3,prod3);\n\t\tproducts.put(4,prod4);\n\t\tproducts.put(5,prod5);\n\t\tproducts.put(6,prod6);\n\t\tproducts.put(7,prod7);\n\t\tproducts.put(8,prod8);\n\t\tproducts.put(9,prod9);\n\t\tproducts.put(10,prod10);\n\t\tproducts.put(11,prod11);\n\t\treturn products;\n\t}",
"public static HashMap makeHandRankMap() {\n HashMap cardMap = new HashMap();\n cardMap.put(0, \"High Card\");\n cardMap.put(1, \"One Pair\");\n cardMap.put(2, \"Two Pair\");\n cardMap.put(3, \"Three of a Kind\");\n cardMap.put(4, \"Straight\");\n cardMap.put(5, \"Flush\");\n cardMap.put(6, \"Full House\");\n cardMap.put(7, \"Four of a Kind\");\n cardMap.put(8, \"Straight Flush\");\n cardMap.put(9, \"Royal Flush\");\n\n return cardMap;\n\n\n }",
"public static HashMap<Character, Integer> getCharToPrimeMap()\n {\n if (sCharToPrimeMap.isEmpty())\n {\n for (int i = 0; i < 26; i++)\n {\n sCharToPrimeMap.put((char) ('a' + i), (int) PrimeNumber.getPrime(i));\n }\n }\n return sCharToPrimeMap;\n }",
"public Q706DesignHashMap() {\n keys = new ArrayList<>();\n values = new ArrayList<>();\n\n }",
"private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}",
"public static void main(String[] args) {\n\t\t\n\t\tMap<Integer,Employee> map = new HashMap<Integer, Employee>();\n\t\tMap<String, Employee> hashMap = new HashMap();\n\t\tMap<Employee, Integer> hashMap1 = new HashMap();\n\t\tfor (int i =1; i<=10; i++){\n\t\t\t\n\t\t\tmap.put(i, new Employee(i+3, \"Manish\"+(i+3)));\n\t\t}\n\t\tSystem.out.println(map);\n\t\t\n\t\tEmployee emp1 = new Employee(4, \"Manish3\");\n\t\t//Use of Contains\n\t\tSystem.out.println(map.containsValue(emp1)); \n\t\t\n\t\t//Key Set\n\t\tSystem.out.println(map.keySet());\n\t\t\n\t\t//retrieve entry set\n\t\tSystem.out.println(map.entrySet());\n\t\t\n\t\t//map.forEach(action);; TO DO- need to understand this method\n\t\t\n\n\t\t//Returns in sorted order when Key is natural (permitives or String or Enum)\n\t\thashMap.put(\"A\", new Employee(1, \"Manish\"));\n\t\thashMap.put(\"C\", new Employee(3, \"Gaurav\"));\n\t\thashMap.put(\"B\", new Employee(2, \"Vinay\"));\n\t\tSystem.out.println(hashMap);\n\t\t\n\t\t//maintains insertion order when key is Object type(dont have any natural order)\n\t\thashMap1.put(new Employee(1, \"Manish\"),1);\n\t\thashMap1.put(new Employee(3, \"Gaurav\"),3);\n\t\thashMap1.put(new Employee(2, \"Vinay\"),2);\n\t\tSystem.out.println(hashMap1);\n\t\tHashMap<Long, String> masterRoomPoolMapping = new HashMap<Long, String>();\n\t\tmasterRoomPoolMapping.put(new Long(123), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(124), \"Manish\");\n\t\tmasterRoomPoolMapping.put(new Long(125), \"Manish\");\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSet<Long> keySet = masterRoomPoolMapping.keySet();\n\t\tSet<Long> newKeySet = new HashSet<Long>();\n\t\tfor(Long key : keySet){\n\t\t\tnewKeySet.add(new Long(key));\n\t\t}\n\t\tSystem.out.println(\"newKeySet***************************************************\");\n\t\tif(newKeySet.contains(new Long(123)))\n\t\t\tnewKeySet.remove(new Long(123));\n\t\tfor(Long key : newKeySet){\n\t\t\tSystem.out.println(key);\n\t\t}\n\t\tSystem.out.println(\"keySet1***************************************************\");\n\t\tSet<Long> keySet1 = masterRoomPoolMapping.keySet();\n\t\tfor(Long key : keySet1){\n\t\t\tSystem.out.println(masterRoomPoolMapping.get(key));\n\t\t}\n\t\tSystem.out.println(\"***************************************************\");\n\t\tSystem.out.println(masterRoomPoolMapping);\n\t}",
"public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }",
"public Hashtable<String,Stock> createMap(){\n\tHashtable table = new Hashtable<String, Stock>();\n\treturn table;\n}",
"public HashEntry(Object k, int v){\n\t\tkey = k;\n\t\tvalue = v;\n\t}",
"public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}",
"public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}",
"@Override\n\tpublic Map<String, Integer> parseWordCountMap(String text, List<String> delimeter) {\n\t\treturn new HashMap<>();\n\t}",
"Map<String, String> mo14888a();",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"public static void main(String[] args) {\n\t\tMap<String, List<String>> map = new HashMap<>();\n\t\tList<String> list = new ArrayList<>();\n\t\tmap.put(\"key1\", list);\n\t\tmap.get(\"key1\").add(\"value1\");\n\t\tmap.get(\"key1\").add(\"value2\");\n\t\t\n\n\t\t//(map.get(\"key1\").get(0)).isEqualTo(\"value1\");\n\t\t//(map.get(\"key1\").get(1)).isEqualTo(\"value2\");\n\t\t\n\t\tMap<String, String> map1 = Stream.of(new String[][] {\n\t\t\t { \"Hello\", \"World\" }, \n\t\t\t { \"John\", \"Doe\" }, \n\t\t\t}).collect(Collectors.toMap(data -> data[0], data -> data[1])); \n\t\t//Notice here the data type of key and value of the Map is same.\n\t\t//In order to make it more generic letís take the array of Objects and perform the same operation:\n\t\tMap<String, Integer> map2 = Stream.of(new Object[][] { \n\t\t { \"data1\", 1 }, \n\t\t { \"data2\", 2 }, \n\t\t}).collect(Collectors.toMap(data -> (String) data[0], data -> (Integer) data[1]));\n\t\t//Here, we create a map of the key as String and value as an Integer.\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t Map<String,Integer> hashmap= new HashMap<String,Integer>();\r\n\t hashmap.put(\"Hiamsnhu\",12);\r\n\t hashmap.put(\"Khaneja\", 15);\r\n\t int size=hashmap.size();\r\n\t int hash=hashmap.hashCode();\r\n\t System.out.println(size);\r\n\r\n\t}",
"public GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>> mapBitextToInt(HashMap<Pair, Integer>sd_count){\n\t\tHashMap<Pair, Integer> index = new HashMap<Pair, Integer>();\n\t\tHashMap<Integer, Pair> biword = new HashMap<Integer, Pair>();\n\t\tint i = 0;\n\t\tfor (Pair pair : sd_count.keySet()){\n\t\t\tindex.put(pair, i);\n\t\t\tbiword.put(i, pair);\n\t\t\ti++;\n\t\t}\n\t\treturn new GenericPair<HashMap<Pair, Integer>, HashMap<Integer, Pair>>(index, biword);\n\t}",
"@Override\n protected void map(Object key, Text value, Context context) throws IOException, InterruptedException {\n \n String[] inputArray = value.toString().split(\"::\");\n inputKey.set(Integer.parseInt(inputArray[1]));\n intValue.set(Integer.parseInt(inputArray[2]));\n SortedMapWritable inputValue = new SortedMapWritable();\n inputValue.put(intValue, count);\n context.write(inputKey, inputValue);\n }",
"private static void addEntriesToMap(\n\t\tMap<Character,Integer> map,String toSort, String poolOfOccurances\n\t\t){\n\n\t\t//Loop the toStort\n\t\tfor(int i=0;i<toSort.length();i++){\n\t\t\tmap.put(toSort.charAt(i),new Integer(getCharacterFrequence(toSort.charAt(i),poolOfOccurances)));\n\t\t}\n\n\t}",
"public static final HashMap dict (Object ... pairs) {\r\n HashMap map = new HashMap();\r\n for (int i=0; i<pairs.length; i=i+2) {\r\n map.put(pairs[i], pairs[i+1]);\r\n }\r\n return map;\r\n }",
"private static Map<String, String> createContigEntry(String id, long length, String assembly,\n String species) {\n Map<String, String> toReturn = new LinkedHashMap<>();\n toReturn.put(\"ID\", id);\n toReturn.put(\"length\", String.valueOf(length));\n toReturn.put(\"assembly\", assembly);\n toReturn.put(\"species\", species);\n\n return toReturn;\n }",
"public CountingMap( Map<K, Integer> map ) {\n this.map = map;\n }",
"@Override\n\tprotected void map(Text key, Text value,\n\t\t\torg.apache.hadoop.mapreduce.Mapper.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tString[] values=value.toString().split(\" \");\n\t\tIntWritable mapkey=new IntWritable();\n\t\tText mapvalue=new Text();\n\t\tStringBuilder sb=new StringBuilder();\n\t\tfor(int i=0;i<values.length;i++)\n\t\t{\n\t\t\tmapkey.set(i);\n\t\t\tsb.append(key.toString());\n\t\t\tsb.append(\",\");\n\t\t\tsb.append(values[i]);\n\t\t\tmapvalue.set(sb.toString());\n\t\t//\tsb=null;\n\t\t\tsb=new StringBuilder();\n\t\t\tcontext.write(mapkey, mapvalue);\n\t\t}\n\t}",
"public HashMap(int bins){\n\t\tthis.numOfBins=bins;\n\t\tthis.size=0;\n\t\tinitializeMap();\n\t}",
"protected static Map<String, Object> createAttributesMap(final List<String> keys, final List<Object> values) {\n final Map<String, Object> attributes = new HashMap<>();\n final int len = keys.size();\n if (len != values.size()) {\n throw new TestException(\"Length of keys list != length of values list\");\n }\n for (int i = 0; i < len; i++) {\n final Object value = values.get(i);\n attributes.put(keys.get(i), value.getClass() == String.class ? Arrays.asList(value) : value);\n }\n return attributes;\n }",
"public AbstractIntHashMap() {\n this(DEFAULT_CAPACITY, DEFAULT_LOADFACTOR);\n }",
"private Map<Character, Long> map(final String text) {\n Map<Character, Long> result = new HashMap<>();\n for (char c : text\n .replaceAll(validCharsRegex, \"\")\n .toLowerCase()\n .toCharArray()) {\n result.put(c, result.getOrDefault(c, 0L) + 1);\n }\n return result;\n }",
"public static <K, V> Map<K, V> createMap(K key1, V value1, K key2, V value2, K key3, V value3) {\n\t\tMap<K, V> map = new HashMap<K, V>();\n\t\tmap.put(key1, value1);\n\t\tmap.put(key2, value2);\n\t\tmap.put(key3, value3);\n\t\treturn map;\n\t}",
"public abstract java.util.Map<java.lang.String, java.lang.Integer> systemicEventIncidenceCountMap();",
"private static HashMap<String,String> buildColumnMapCar() {\r\n HashMap<String,String> map = new HashMap<String,String>();\r\n map.put(KEY_POINTS, KEY_POINTS);\r\n\r\n map.put(BaseColumns._ID, \"rowid AS \" +\r\n BaseColumns._ID);\r\n\r\n return map;\r\n }",
"public static void main (String[] args){\n CustomHashMap<String,String> map = new CustomHashMap<String,String>();\n for(int i = 0; i < 100; i++){\n map.put(i+\"\",i+\"\");\n }\n for(int i = 0; i < 100; i++){\n System.out.println(\"map取值: \"+ i + \" = \"+map.get(i+\"\"));\n }\n }",
"private static void initializeMap() {\n\t\tmap = new HashMap<String, MimeTransferEncoding>();\n\t\tfor (MimeTransferEncoding mte : MimeTransferEncoding.values()) {\n\t\t\tmap.put(mte.string, mte);\n\t\t}\n\t}",
"@Nullable\n private Map<String, Number> readableMapToNumberMap(ReadableMap readableMap) {\n Map<String, Number> map = new HashMap<>();\n\n if (readableMap == null) {\n return null;\n }\n\n ReadableMapKeySetIterator iterator = readableMap.keySetIterator();\n if (!iterator.hasNextKey()) {\n return null;\n }\n\n while (iterator.hasNextKey()) {\n String key = iterator.nextKey();\n ReadableType readableType = readableMap.getType(key);\n\n switch (readableType) {\n case Number:\n // Can be int or double.\n map.put(key, readableMap.getDouble(key));\n break;\n default:\n // Do nothing and fail silently\n }\n }\n\n return map;\n }",
"void setHashMap();",
"public static void addToMap()\n {\n Map<String, Integer> map = new HashMap<>();\n\n BiConsumer<String, Integer> mapAdderEveryTime = (s, i) -> map.put(s, i);\n\n mapAdderEveryTime.accept(\"key1\", 4);\n mapAdderEveryTime.accept(\"key2\", 4);\n\n BiConsumer<String, Integer> mapAdderIfPresent = (s, i) -> {\n map.computeIfPresent(s, (key, value) -> (value % 4 == 0) ? 0 : value +1);\n };\n\n mapAdderIfPresent.accept(\"key1\", 1);\n\n System.out.println(map);\n }",
"void setInt(String key, int val);",
"@Override\n public void record2Map(final Map<String, Integer> map) {\n }",
"private HashMap<String, Integer> convertSpinnersToHashMap() throws InstructionsRequiredException {\n HashMap<String, Integer> instructionQty = new HashMap<>();\n int forwardCount = convertSpinnerValueToInt(spinners[0].getSelectedItem());\n int leftCount = convertSpinnerValueToInt(spinners[1].getSelectedItem());\n int rightCount = convertSpinnerValueToInt(spinners[2].getSelectedItem());\n int noiseCount = convertSpinnerValueToInt(spinners[3].getSelectedItem());\n int repeatCount = convertSpinnerValueToInt(spinners[4].getSelectedItem());\n int ifCount = convertSpinnerValueToInt(spinners[5].getSelectedItem());\n int ifElseCount = convertSpinnerValueToInt(spinners[6].getSelectedItem());\n\n if(forwardCount == 0 && leftCount == 0 && rightCount == 0 && noiseCount == 0){\n throw new InstructionsRequiredException(\"a task requires at least one forward, left, \" +\n \"right or noise instruction\");\n }\n instructionQty.put(Forward.TAG, forwardCount);\n instructionQty.put(TurnLeft.TAG, leftCount);\n instructionQty.put(TurnRight.TAG, rightCount);\n instructionQty.put(Noise.TAG, noiseCount);\n instructionQty.put(Repeat.TAG, repeatCount);\n instructionQty.put(If.TAG, ifCount);\n instructionQty.put(IfElse.TAG, ifElseCount);\n return instructionQty;\n }",
"public Map<String, Property> keyValueMap(){\n int paddingCount = 1;\n Map<String, Property> result = new HashMap<String, Property>();\n String lastKey = null;\n for (Property parameter : this.getProperties()) {\n String newKey = new String(parameter.getKey());\n if (lastKey != null && lastKey.equalsIgnoreCase(newKey)){\n newKey = newKey + \"_\" + paddingCount++;\n }\n result.put(newKey, new Property(parameter));\n lastKey = newKey;\n }\n return result;\n }",
"public static void main(String[] args) {\n\n\t LinkedHashMap<Integer, String> hm = new LinkedHashMap<Integer, String>(); \n\t \n // Inserting the Elements \n hm.put(3, \"Geeks\"); \n hm.put(2, \"For\"); \n hm.put(1, \"Geeks\"); \n \n for (Map.Entry<Integer, String> mapElement : hm.entrySet()) { \n \n Integer key = mapElement.getKey(); \n \n // Finding the value \n String value = mapElement.getValue(); \n \n // print the key : value pair \n System.out.println(key + \" : \" + value); \n\t}\n\n}",
"public Map<String, Integer> putIntoDictinary(String body) {\n String[] words = body.split(\"[(0-9)@#£$%\\\\-\\\\d\\\\#\\\\t\\\\s\\n\\\\,\\\\;\\\\:\\\\<\\\\>\\\\(\\\\)\\\\[\\\\]\\\\!\\\\?\\\"\\\\'\\\\{\\\\}\\\\_\\\\+\\\\=\\\\/\\\\*]+\");\n Map<String, Integer> res = new HashMap<>();\n for(String word : words) {\n if(word.equals(\"\") || word.length() == 1)\n continue;\n word = word.toLowerCase();\n if(res.get(word) == null) {\n res.put(word, 1);\n } else {\n res.put(word, res.get(word) + 1);\n }\n }\n return res;\n }",
"public static HashMap getListas(int cantidad){\n HashMap map = new HashMap();\n for (int i = 0; i < cantidad; i++){\n String name = \"L\" + String.valueOf(i);\n map.put(name, new ArrayList<String>());\n }\n return map;\n }",
"private static HashMap<String, String> initMapping()\n {\n HashMap<String, String> typeMapping = new HashMap<String, String>();\n\n typeMapping.put(\"boolean\", \"boolean\");\n typeMapping.put(\"float\", \"float\");\n typeMapping.put(\"double\", \"double\");\n typeMapping.put(\"byte\", \"byte\");\n typeMapping.put(\"unsignedByte\", \"short\");\n typeMapping.put(\"short\", \"short\");\n typeMapping.put(\"unsignedShort\", \"int\");\n typeMapping.put(\"int\", \"int\");\n typeMapping.put(\"integer\", \"java.math.BigDecimal\");\n typeMapping.put(\"positiveInteger\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedInt\", \"java.math.BigInteger\");\n typeMapping.put(\"long\", \"java.math.BigInteger\");\n typeMapping.put(\"unsignedLong\", \"java.math.BigDecimal\");\n typeMapping.put(\"decimal\", \"java.math.BigDecimal\");\n typeMapping.put(\"string\", \"String\");\n typeMapping.put(\"hexBinary\", \"byte[]\");\n typeMapping.put(\"base64Binary\", \"byte[]\");\n typeMapping.put(\"dateTime\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"time\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"date\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gMonthDay\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYear\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"gYearMonth\", \"javax.xml.datatype.XMLGregorianCalendar\");\n typeMapping.put(\"duration\", \"javax.xml.datatype.Duration\");\n typeMapping.put(\"NOTATION\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"QName\", \"javax.xml.namespace.QName\");\n typeMapping.put(\"anyURI\", \"String\");\n typeMapping.put(\"Name\", \"String\");\n typeMapping.put(\"NCName\", \"String\");\n typeMapping.put(\"negativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"NMTOKEN\", \"String\");\n typeMapping.put(\"nonNegativeInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"nonPositiveInteger\", \"java.math.BigDecimal\");\n typeMapping.put(\"normalizedString\", \"String\");\n typeMapping.put(\"token\", \"String\");\n typeMapping.put(\"any\", \"Object\");\n\n return typeMapping;\n }",
"public IntObjectHashMap() {\n resetToDefault();\n }",
"private HashMap<Integer, Category> createHashMapFromResultSet(ResultSet rs) throws SQLException{\n HashMap<Integer, Category> tempHashMap = new HashMap<>();\n //\"category_id\", \"category_name\"\n while(rs.next()){\n int tempCategoryID = rs.getInt(\"category_id\");\n String tempCategoryName = rs.getString(\"category_name\");\n tempHashMap.put(tempCategoryID, new Category(tempCategoryID, tempCategoryName));\n }\n return tempHashMap;\n }",
"public static Map<Character,Integer> countFreq(String string){\n\n\n\n Map<Character,Integer> results = new HashMap<Character,Integer>();\n for (int i = 0; i < string.length(); i++) {\n Character temp = string.charAt(i);\n Integer count;\n// System.out.println(temp);\n if (results.containsKey(temp)){\n count=results.get(temp);\n count++;\n results.replace(temp,count);\n }\n else\n results.put(temp,1);\n\n }\n\n return results;\n }",
"Map<String, String> asMap();",
"public static void main(String[] args) {\n\n\t\tint[] a = {1,2,3,8,8,9,6,4};\n\t String s = \"hello2java\"; \n\t\tHashMap<Integer,Integer> countMap1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Character,Integer> countMap2 = new HashMap<Character,Integer>();\n \n\t\tchar[] ch = s.toCharArray();\n\t\t\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tif(countMap1.containsKey(a[i])){\n\t\t\t\t\tcountMap1.put(a[i], countMap1.get(a[i])+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcountMap1.put(a[i],1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t//}\n\t\tSystem.out.println(countMap1);\n\t\t\n\t\tfor(int i=0;i<ch.length;i++){\n\t\t\tif(countMap2.containsKey(ch[i])){\n\t\t\t\tcountMap2.put(ch[i], countMap2.get(ch[i])+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap2.put(ch[i],1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(countMap2);\n\t\t\n\t\tSet<Character> ket = countMap2.keySet();\n for(Character c:ket){\n \tif(countMap2.get(c)>1){\n \t\tSystem.out.println(c+\"-->\"+countMap2.get(c));\n \t}\n }\n\t}",
"public Map<Character, Integer> buildDictionary(char c, Map<Character, Integer> dictionary){\n \n \n if(dictionary.containsKey(c)) {\n //String charString = Character.toString(c);\n //Integer val = dictionary.get(theCharacter);\n //System.out.println(dictionary.get(theCharacter));\n dictionary.put(c, dictionary.get(c) + 1);\n }\n else{\n Integer i = 1;\n dictionary.put(c, i);\n }\n return dictionary;\n }"
]
| [
"0.63421553",
"0.63050014",
"0.6302579",
"0.62385386",
"0.6217946",
"0.6049259",
"0.6039015",
"0.5983156",
"0.59687215",
"0.59533584",
"0.5943251",
"0.5940284",
"0.59341425",
"0.5901945",
"0.58370805",
"0.5814252",
"0.58026993",
"0.5781351",
"0.5725807",
"0.57252556",
"0.57200944",
"0.5694302",
"0.5683041",
"0.56824964",
"0.56776375",
"0.56681424",
"0.56657606",
"0.56612444",
"0.56522673",
"0.5647001",
"0.56379974",
"0.56362236",
"0.5629149",
"0.562434",
"0.5601943",
"0.55756444",
"0.5567625",
"0.55109966",
"0.550987",
"0.55086035",
"0.5488463",
"0.5487643",
"0.54858947",
"0.5484082",
"0.54818285",
"0.5472315",
"0.54673284",
"0.54507583",
"0.54337114",
"0.54233325",
"0.5420406",
"0.54147184",
"0.5413618",
"0.54111797",
"0.5405116",
"0.5405044",
"0.5403622",
"0.54024667",
"0.54021156",
"0.5387688",
"0.5385069",
"0.53767776",
"0.5373196",
"0.5366272",
"0.53538936",
"0.5350546",
"0.53465176",
"0.5345889",
"0.5342373",
"0.5329765",
"0.5325241",
"0.5320703",
"0.53203124",
"0.5319493",
"0.5309653",
"0.5309604",
"0.5305324",
"0.53011185",
"0.52987856",
"0.52985513",
"0.52937853",
"0.52891463",
"0.5288787",
"0.52838945",
"0.52838326",
"0.52798384",
"0.52721816",
"0.5262069",
"0.5258861",
"0.5257259",
"0.5251315",
"0.5249228",
"0.5241319",
"0.5239072",
"0.5238601",
"0.5231955",
"0.5231937",
"0.5228111",
"0.522337",
"0.5222342",
"0.5214599"
]
| 0.0 | -1 |
create map from user input | private static void createMap(Map<Character, Integer> map) {
Scanner scanner = new Scanner(System.in); // create scanner
System.out.println("Enter a string:"); // prompt for user input
String input = scanner.nextLine();
char[] chars = input.replace(" ", "").toCharArray();
for (Character chr : chars) {
if (map.containsKey(chr)) {
int count = map.get(chr); // get current count
map.put(chr, count + 1); // increment count
} else
map.put(chr, 1); // add new char with a count of 1 to map
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n Map<Character, Integer> myMap = new HashMap<>();\n\n createMap(myMap); // create map based on user input\n displayMap(myMap); // display map content\n }",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint n = Integer.parseInt(scanner.nextLine());\n\t\tHashMap<String, String> map = new HashMap<String, String>();\n\t\t\n\t}",
"MAP createMAP();",
"public static void main(String[] args) {\n\t\tMap<String, Integer> myMap = new HashMap<>();\n\n\t\tcreateMap(myMap); // cria mapa com base na entrada do usuário\n\t\tdisplayMap(myMap); // exibe o conteúdo do mapa\n\t}",
"@SuppressWarnings(\"unchecked\")\n private static <T> Map<String, T> mapOf(Object... inputs) {\n Map<String, T> map = new HashMap<>();\n for (int i = 0; i < inputs.length; i += 2) {\n String key = (String) inputs[i];\n T value = (T) inputs[i + 1];\n map.put(key, value);\n }\n return map;\n }",
"public void buildMap(){\n this.map = new HashMap<String, String>();\n map.put(\"user\", \"user\");\n map.put(\"pw\", \"pass\");\n map.put(\"quit\", \"quit\");\n map.put(\"features\", \"feat\");\n map.put(\"cd\", \"cwd\");\n map.put(\"dir\", \"list\");\n map.put(\"get\", \"retr\");\n }",
"private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }",
"public static void createMap() throws IOException {\n\n int no_of_continents;\n HashMap<String, List<String>> neighborsList = new HashMap<>();\n\n System.out.println(\"Enter the number of Continents\");\n if (sc.hasNextInt()) {\n no_of_continents = sc.nextInt();\n\n for (int i = 0; i < no_of_continents; i++) {\n\n System.out.println(\"Enter continent name\");\n String continent = sc.next();\n\n System.out.println(\"Enter no of countries in continent\");\n\n int no_of_countries = 0;\n if (sc.hasNextInt())\n no_of_countries = sc.nextInt();\n\n continents.put(continent, no_of_countries);\n }\n } else {\n System.out.println(\"Invalid input! Enter again :\");\n sc.next();\n }\n\n System.out.println(\"Enter no of countries\");\n int no_of_countries = sc.nextInt();\n List<String> neighbours = new ArrayList<>();\n\n for (int i = 0; i < no_of_countries; i++) {\n\n System.out.println(\"Enter country name\");\n String country = sc.next();\n\n System.out.println(\"Enter x and y co-ordinate\");\n int x = sc.nextInt();\n int y = sc.nextInt();\n\n System.out.println(\"Enter continent it belongs to\");\n String continent = sc.next();\n\n System.out.println(\"Enter no of adjacent countries\");\n int no_adj_c = sc.nextInt();\n while (no_adj_c != 0) {\n System.out.println(\"Enter adjacent country\");\n neighbours.add(sc.next());\n no_adj_c--;\n }\n\n board.createTile(country, x, y, continent);\n neighborsList.put(country, neighbours);\n }\n\n for (Map.Entry entry : neighborsList.entrySet()) {\n board.setNeighbourTile((List<String>) entry.getValue(), (String) entry.getKey());\n }\n\n System.out.println(\"Risk Map Loaded!\");\n System.out.println(\"Storing to file\");\n storeMap();\n\n }",
"Map(String input) {\n row = 0;\n col = 0;\n\n String line;\n Scanner fin = null;\n try\n {\n fin = new Scanner(new File(input));\n }\n catch (FileNotFoundException x)\n {\n System.out.println(\"Error: \" + x);\n System.exit(0);\n }\n // Take first line and get mapLength and mapHeight. Initialize map array\n line = fin.nextLine();\n String[] temp = line.split(\" \");\n maxR = Integer.parseInt(temp[0].toString());\n maxC = Integer.parseInt(temp[1].toString());\n map = new String[maxR][maxC];\n\n for(int j = 0; j < maxR; j++) {\n line = fin.nextLine();\n for(int i = 0; i < maxC; i++){\n map[j][i] = (line.charAt(i)) + \"\";\n }\n }\n }",
"public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }",
"public static void createMap()\n\t\t\t{\n\t\t\tmap = new Vector<Location>(4);\n\t\n\t\t\tLocation location1 = new Location(\"the southwest room.\",\"You see doors to the north and east.\");\n\t\t\tLocation location2 = new Location(\"the southeast room.\",\"You see doors to the north and west.\");\n\t\t\tLocation location3 = new Location(\"the northwest room.\",\"You see doors to the south and east.\");\n\t\t\tLocation location4 = new Location(\"the northeast room.\",\"You see doors to the south and west.\");\n\n\t\t\tmap.addElement(location1);\n\t\t\tmap.addElement(location2);\n\t\t\tmap.addElement(location3);\n\t\t\tmap.addElement(location4);\n\t\t\t\n\t\t\t// This section defines the exits found in each location and the \n\t\t\t// locations to which they lead.\n\t\t\tlocation1.addExit(new Exit(Exit.north, location3));\n\t\t\tlocation1.addExit(new Exit(Exit.east, location2));\n\t\t\tlocation2.addExit(new Exit(Exit.north, location4));\n\t\t\tlocation2.addExit(new Exit(Exit.west, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.south, location1));\n\t\t\tlocation3.addExit(new Exit(Exit.east, location4));\n\t\t\tlocation4.addExit(new Exit(Exit.west, location3));\n\t\t\tlocation4.addExit(new Exit(Exit.south, location2));\n\t\t\t\n\t\t\tcurrentLocation = location1;\t\t\t\t\n\t\t\t}",
"public abstract void createMap();",
"public void createMap() {\n\t\tArrayList<String>boardMap = new ArrayList<String>(); //boardmap on tiedostosta ladattu maailman malli\n\t\t\n\t\t//2. try catch blocki, ei jaksa laittaa metodeja heittämään poikkeuksia\n\t\ttry {\n\t\t\tboardMap = loadMap(); //ladataan data boardMap muuttujaan tiedostosta\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\t\n\t\t// 3. j=rivit, i=merkit yksittäisellä rivillä\n\t\tfor(int j=0; j<boardMap.size();j++){ \t\t//..rivien lkm (boardMap.size) = alkioiden lkm. \n\t\t\tfor(int i=0; i<boardMap.get(j).length(); i++){\t\t//..merkkien lkm rivillä (alkion Stringin pituus .length)\n\t\t\t\tCharacter hexType = boardMap.get(j).charAt(i);\t//tuodaan tietyltä riviltä, yksittäinen MERKKI hexType -muuttujaan\n\t\t\t\tworld.add(new Hex(i, j, hexType.toString()));\t//Luodaan uusi HEXa maailmaan, Character -merkki muutetaan Stringiksi että Hex konstructori hyväksyy sen.\n\t\t\t}\n\t\t}\n\t\tconvertEmptyHex();\n\t}",
"public static void main(String[] args) {\n System.out.println(\"HW1\");\n Map<String, Integer> map = new HashMap<>();\n map.put(\"Ivan\",19);\n map.put(\"Dm\",20);\n map.put(\"Petr\",19);\n\n\n }",
"public static void main(String[] args) {\n // Factory method makes the appropriate type of Map subclass.\n SimpleAbstractMap<String, Integer> map = makeMap(args[0]);\n\n // Add some elements to the Map.\n map.put(\"I\", 1);\n map.put(\"am\", 2); \n map.put(\"Ironman\", 7);\n\n // Print out the key/values pairs in the Map.\n for (Map.Entry<String, Integer> s : map.entrySet())\n System.out.println\n (\"key = \"\n + s.getKey()\n + \" value = \"\n + s.getValue());\n }",
"void chooseMap(String username);",
"public static Map readMap(MapName s)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n System.out.println(s.toString());\n Scanner mapReader = new Scanner(run.getClass().getResourceAsStream(\"/\"+s.toString()+\".jwmap\"));\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }",
"public static void main(String[] args) {\n Scanner read = new Scanner(System.in);\n int n = read.nextInt();\n int d = read.nextInt();\n int[] arr = new int[n];\n for(int i=0;i<n;i++)\n arr[i]=read.nextInt();\n \n int[] a = new int[n];\n int temp=0;\n for(int i=0;i<n;i++){\n temp = i-d >= 0 ? i-d : n + (i-d);\n a[temp] = arr[i];\n }\n for(int i=0;i<n;i++)\n System.out.print(a[i]+\" \");\n \n read.close();\n HashMap<String,Integer> map = new HashMap<String,Integer>();\n \n }",
"public static void main(String[] args) {\n\r\n\t\tScanner nomeAluno = new Scanner(System.in);\r\n\t\tHashMap<Integer, String> chamada = new HashMap<Integer, String>();\r\n\t\t\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\tSystem.out.print(\"Digite o nome: \");\r\n\t\t\tString nome = nomeAluno.nextLine();\r\n\t\t\tchamada.put(i, nome);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Integer i: chamada.keySet()) {\r\n\t\t\tSystem.out.println(\"Número: \"+i+\" Nome: \"+ chamada.get(i));\r\n\t\t}\r\n\t}",
"private void populateMaps() {\n\t\t//populate the conversion map.\n\t\tconvertMap.put(SPACE,(byte)0);\n\t\tconvertMap.put(VERTICAL,(byte)1);\n\t\tconvertMap.put(HORIZONTAL,(byte)2);\n\n\t\t//build the hashed numbers based on the training input. 1-9\n\t\tString trainingBulk[] = new String[]{train1,train2,train3,\"\"};\n\t\tbyte[][] trainer = Transform(trainingBulk);\n\t\tfor(int i=0; i < 9 ;++i) {\n\t\t\tint val = hashDigit(trainer, i);\n\t\t\tnumbers.put(val,i+1);\n\t\t}\n\t\t//train Zero\n\t\ttrainingBulk = new String[]{trainz1,trainz2,trainz3,\"\"};\n\t\tint zeroVal = hashDigit(Transform(trainingBulk), 0);\n\t\tnumbers.put(zeroVal,0);\n\n\n\t}",
"public void makeMap(){\r\n\t\tint m =1;\r\n\t\t//EnvironObj temp = new EnvironObj(null, 0, 0);\r\n\t\tfor(int i=0; i<map.size(); i++){\r\n\t\t\tfor(int j =0; j<map.get(i).size(); j++){\r\n\t\t\t\tString o = map.get(i).get(j);\r\n\t\t\t\t//System.out.println(\"grabbing o from map, o = \" + o);\r\n\t\t\t\tif(o.equals(\"t\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"treee.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\t//System.out.println(\"objectList: \" + objectList);\r\n\t\t\t\t}else if(o.equals(\"p\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"path.png\", j+m, i*20, true);\r\n\t\t\t\t\t//dont need to add to obj list bc its always in back\r\n\t\t\t\t\twalkables.add(temp);\r\n\r\n\t\t\t\t}else if(o.equals(\"h\")){\r\n\t\t\t\t\ttemp = new EnvironObj(\"house.png\", j+m, i*20);\r\n\t\t\t\t\tobjectList.add(temp);\r\n\t\t\t\t}else if(o.equals(\"g\")){\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t}\r\n\t\t\t\telse if(!o.equals(\"g\")){\r\n\t\t\t\t\tString fn = o +\".txt\";\r\n\t\t\t\t\tSystem.out.println(\"filename for NPC: \" + fn);\r\n\t\t\t\t\tnp = new NPC(o, fn, j+m, i*20);\r\n\t\t\t\t\tm+=10;\r\n\t\t\t\t\tcharacters.add(np);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tm=0;\r\n\t\t}\r\n\t}",
"void Create(){\n map = new TreeMap<>();\r\n\r\n // Now we split the words up using punction and spaces\r\n String wordArray[] = wordSource.split(\"[{ \\n\\r.,]}}?\");\r\n\r\n // Now we loop through the array\r\n for (String wordArray1 : wordArray) {\r\n String key = wordArray1.toLowerCase();\r\n // If this word is not present in the map then add it\r\n // and set the word count to 1\r\n if (key.length() > 0){\r\n if (!map.containsKey(map)){\r\n map.put(key, 1);\r\n }\r\n else {\r\n int wordCount = map.get(key);\r\n wordCount++;\r\n map.put(key, wordCount);\r\n }\r\n }\r\n } // end of for loop\r\n \r\n // Get all entries into a set\r\n // I think that before this we just have key-value pairs\r\n entrySet = map.entrySet();\r\n \r\n }",
"private void buildMap(int count, char type, String typeName) {\r\n\t\tfor (int i = 1; i <= count; i++) {\r\n\t\t\toriginalMaps.add(new MapType(\"map_\" + type + i, typeName, \"colony/map_\" + type + i));\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\n Map<String,String> nameAndStatePair = new HashMap<>();\n\n Map<Integer,String> groupNumLeaderNamePair = new HashMap<>();\n\n Map<String,Double> groceryNameAndPricePair = new HashMap<>();\n\n Map<String,Boolean> voterAndEligibilityPair = new HashMap<>();\n\n Map<String,Integer> gameNameAndScoreMap = new HashMap<>();\n\n Map<String,Character> QuestionNumAndCorrectAnswerPair = new HashMap<>();\n\n }",
"public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }",
"private void createMaps() {\r\n\t\tint SIZE = 100;\r\n\t\tint x = 0, y = -1;\r\n\t\tfor (int i = 0; i < SIZE; i++) {\r\n\t\t\tif (i % 10 == 0) {\r\n\t\t\t\tx = 0;\r\n\t\t\t\ty = y + 1;\r\n\t\t\t}\r\n\t\t\tshipStateMap.put(new Point(x, y), 0);\r\n\t\t\tshipTypeMap.put(new Point(x, y), 0);\r\n\t\t\tx++;\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n HashMap<Integer, Character> hashMap = new HashMap<Integer, Character>();\n hashMap.put(0,'F');hashMap.put(1,'G');hashMap.put(2,'R');\n hashMap.put(3,'S');hashMap.put(4,'T');hashMap.put(5,'L');\n hashMap.put(6,'M');hashMap.put(7,'N');hashMap.put(8,'O');\n hashMap.put(9,'P');hashMap.put(10,'Q');hashMap.put(11,'W');\n hashMap.put(12,'X');hashMap.put(13,'Y');hashMap.put(14,'Z');\n hashMap.put(15,'U');hashMap.put(16,'A');hashMap.put(17,'G');\n hashMap.put(18,'H');hashMap.put(19,'I');hashMap.put(20,'J');\n hashMap.put(21,'K');hashMap.put(22,'B');hashMap.put(23,'C');\n hashMap.put(24,'D');hashMap.put(25,'E');hashMap.put(26,'l');\n hashMap.put(27,'m');hashMap.put(28,'n');hashMap.put(29,'o');\n hashMap.put(30,'p');hashMap.put(31,'i');hashMap.put(32,'j');\n hashMap.put(33,'k');hashMap.put(34,'f');hashMap.put(35,'g');\n hashMap.put(36,'h');hashMap.put(37,'a');hashMap.put(38,'b');\n hashMap.put(39,'c');hashMap.put(40,'d');hashMap.put(41,'e');\n hashMap.put(42,'q');hashMap.put(43,'r');hashMap.put(44,'w');\n hashMap.put(45,'x');hashMap.put(46,'y');hashMap.put(47,'z');\n hashMap.put(48,'s');hashMap.put(49,'t');hashMap.put(50,'u');\n hashMap.put(51,'v');\n while(in.hasNext()){\n String str = in.next();\n\n String[] arr = str.split(\"[#]+\");\n\n StringBuffer ss = new StringBuffer();\n\n for (int i = 0; i < arr.length; i++) {\n\n //System.out.println(arr[i]);\n\n StringBuffer sb = new StringBuffer();\n\n for (int j = 0; j < arr[i].length(); j++) {\n\n int a = arr[i].charAt(j)=='-'?0:1;\n sb.append(a);\n }\n\n long b = Long.valueOf(sb.toString(),2);\n\n if (b>51||b<0){\n ss.replace(0,ss.length(),\"\");\n ss.append(\"ERROR\");\n break;\n }else {\n ss.append(hashMap.get((int)b));\n }\n }\n System.out.println(ss);\n\n }\n }",
"Map<String, String> mo14888a();",
"public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }",
"private void mapValues() {\n\t\tmap.put(1, \"I\");\r\n\t\tmap.put(5, \"V\");\r\n\t\tmap.put(10, \"X\");\r\n\t\tmap.put(50, \"L\");\r\n\t\tmap.put(100, \"C\");\r\n\t\tmap.put(500, \"D\");\r\n\t\tmap.put(1000, \"M\");\r\n\t}",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tN = sc.nextInt();\n\t\tM = sc.nextInt();\n\t\tfor (int i = 0; i <N ; ++i) {\n\t\t\tString onerow = sc.next();\n\t\t for (int j = 0; j < M; ++j) {\n\t\t Map[i][j] = onerow.charAt(j);\n\t\t }\n\t\t}\n\t\t\n\t\tfor (int i = 0; i <N ; ++i) {\n\t\t for (int j = 0; j < M; ++j) {\n\t\t System.out.print(Map[i][j]);\n\t\t }\n\t\t System.out.println(\"\");\n\t\t}\n\n\t\taddEdge(0, 0);\n\t\t\n//\t\tSystem.out.println(\"#\" + addEdge(0, 0));\n\t\t\n\t}",
"public static void main(String[] arg) {\n\t\tSystem.out.println(\"\\n\\tBegin Map demo program\\n\\n\");\n\n\t\tMap<Integer, Employee> staff = new HashMap<Integer, Employee>();\n\n\t\tstaff.put(1, new Employee(1, \"Noan Mollai\", 45000));\n\t\tstaff.put(5, new Employee(5, \"Eti Mollai\", 89000));\n\t\tstaff.put(2, new Employee(2, \"Aron Thanasi\", 120000));\n\t\tstaff.put(4, new Employee(4, \"Emily Thanasi\", 135000));\n\t\tstaff.put(3, new Employee(3, \"Klentin Mollai\", 199000));\n\n\t\tSet<Integer> keySet = staff.keySet();\n\t\tEmployee emp = new Employee();\n\t\tfor (Integer key : keySet) {\n\t\t\temp = staff.get(key);\n\t\t\tSystem.out.println(emp.toString());\n\t\t}\n\n\t\tScanner in = new Scanner(System.in);\n\t\tSystem.out.print(\"\\nEnter a key to search for the employee:\");\n\t\tInteger input = in.nextInt();\n\t\temp = staff.get(input);\n\n\t\tif (emp == null)\n\t\t\tSystem.out.println(\" Key not found\");\n\n\t\telse\n\t\t\tSystem.out.println(emp.toString());\n\n\t\tSystem.out.print(\"\\nEnter a salary to search for the employee's salary : \\n\");\n\t\tinput = in.nextInt();\n\n\t\tfor (Integer key : keySet) {\n\t\t\temp = staff.get(key);\n\n\t\t\tif (emp.getEmployeeSalary() > (double) input) {\n\n\t\t\t\tSystem.out.println(emp.toString());\n\t\t\t}\n\t\t}\n\n\t\tin.close();\n\t\tSystem.out.println(\"\\n\\tEnd Map demo program\\n\");\n\n\t}",
"public static void main (String[] args) throws Exception {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st;\n StringBuilder sb = new StringBuilder();\n\n int n=Integer.parseInt(br.readLine());\n st=new StringTokenizer(br.readLine());\n int x0=Integer.parseInt(st.nextToken()),\n y0=Integer.parseInt(st.nextToken());\n ArrayList<Map.Entry<Integer,Character>> ulist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> dlist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> llist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> rlist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> ullist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> urlist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> drlist=new ArrayList<>();\n ArrayList<Map.Entry<Integer,Character>> dllist=new ArrayList<>();\n Comparator asct=new Comparator<Map.Entry<Integer, Character>>() {\n @Override\n public int compare(Map.Entry<Integer, Character> e1, Map.Entry<Integer, Character> e2) {\n return e1.getKey() - e2.getKey();\n }\n };\n Comparator dsct=new Comparator<Map.Entry<Integer, Character>>() {\n @Override\n public int compare(Map.Entry<Integer, Character> e1, Map.Entry<Integer, Character> e2) {\n return e2.getKey() - e1.getKey();\n }\n };\n for (int i=0;i<n;i++){\n st=new StringTokenizer(br.readLine());\n char c=st.nextToken().charAt(0);\n int xi=Integer.parseInt(st.nextToken());\n int yi=Integer.parseInt(st.nextToken());\n if (xi==x0){\n if (yi>y0) ulist.add(new AbstractMap.SimpleEntry<>(yi,c));\n else dlist.add(new AbstractMap.SimpleEntry<>(yi,c));\n } else if (yi==y0){\n if (xi>x0) rlist.add(new AbstractMap.SimpleEntry<>(xi,c));\n else llist.add(new AbstractMap.SimpleEntry<>(xi,c));\n } else if (Math.abs(xi-x0)==Math.abs(yi-y0)){\n if (xi<x0){\n if (yi<y0) dllist.add(new AbstractMap.SimpleEntry<>(xi,c));\n else ullist.add(new AbstractMap.SimpleEntry<>(xi,c));\n } else {\n if (yi<y0) drlist.add(new AbstractMap.SimpleEntry<>(xi,c));\n else urlist.add(new AbstractMap.SimpleEntry<>(xi,c));\n }\n }\n }\n Collections.sort(ulist,asct);\n Collections.sort(dlist,dsct);\n Collections.sort(rlist,asct);\n Collections.sort(llist,dsct);\n Collections.sort(dllist,dsct);\n Collections.sort(ullist,dsct);\n Collections.sort(urlist,asct);\n Collections.sort(drlist,asct);\n //boolean uf,df,lf,rf,ulf,urf,drf,dlf;\n //uf=df=lf=rf=ulf=urf=drf=dlf=false;\n boolean check=false;\n for (int i=0;i<ulist.size();i++){\n char c=ulist.get(i).getValue();\n if (c=='B') break;\n else check=true;\n }\n for (int i=0;i<dlist.size();i++){\n char c=dlist.get(i).getValue();\n if (c=='B') break;\n else check=true;\n }\n for (int i=0;i<llist.size();i++){\n char c=llist.get(i).getValue();\n if (c=='B') break;\n else check=true;\n }\n for (int i=0;i<rlist.size();i++){\n char c=rlist.get(i).getValue();\n if (c=='B') break;\n else check=true;\n }\n for (int i=0;i<dllist.size();i++){\n char c=dllist.get(i).getValue();\n if (c=='R') break;\n else check=true;\n }\n for (int i=0;i<ullist.size();i++){\n char c=ullist.get(i).getValue();\n if (c=='R') break;\n else check=true;\n }\n for (int i=0;i<drlist.size();i++){\n char c=drlist.get(i).getValue();\n if (c=='R') break;\n else check=true;\n }\n for (int i=0;i<urlist.size();i++){\n char c=urlist.get(i).getValue();\n if (c=='R') break;\n else check=true;\n }\n if (check) System.out.println(\"YES\");\n else System.out.println(\"NO\");\n }",
"public int askMap();",
"public MapCalculator(ZanMinimap minimap) {\n \t\tmap = minimap.map;\n \t}",
"public static void main(String[] args) {\n Map<Integer, String> lhm = new LinkedHashMap<Integer, String>();\n lhm.put(0, \"Berhampur\");\n lhm.put(1, \"Cuttack\");\n lhm.put(2, \"Bangalore\");\n System.out.println(lhm); // {0=Berhampur, 1=Cuttack, 2=Bangalore}\n }",
"InfiniteMap<K,V> build(MapTypes type);",
"private HashMap<String, String> returnCorrectMap(String...parameters) {\n\n\t\tHashMap<String, String> map = null;\n\n\t\ttry {\n\n\t\t\tmap = generateHashMapFromStringList(parameters);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn map;\n\t}",
"TOutput MapFrom(TInput input);",
"private void getMapping() {\n double [][] chars = new double[CHAR_SET_SIZE][1];\n for (int i = 0; i < chars.length; i++) {\n chars[i][0] = i;\n }\n Matrix b = new Matrix(key).times(new Matrix(chars));\n map = b.getArray();\n }",
"public static void addEmployee(Map<Integer, Employee> em, Map<Employee, String> pm, Scanner in) {\n\t\tSystem.out.println(\"Please enter the first name of the employee\");\n\t\tin.nextLine();\n\t\tString first = in.nextLine();\n\t\tSystem.out.println(\"Please enter the last name of the employee\");\n\t\tString last = in.nextLine();\n\t\tboolean checked = false;\n\t\tint ID = -1;\n\t\twhile (!checked) {\n\t\t\tSystem.out.println(\"Please enter the ID number of the employee\");\n\t\t\ttry {\n\t\t\t\tID = in.nextInt();\n\t\t\t\tif (em.containsKey(ID)) {\n\t\t\t\t\tSystem.out.println(\"An employee with that ID number already exists\\n\");\n\t\t\t\t} else\n\t\t\t\t\tchecked = true;\n\t\t\t} catch (InputMismatchException ex) {\n\t\t\t\tSystem.out.println(\"-INVALID ENTRY-\\n\");\n\t\t\t\tin.nextLine();\n\t\t\t}\n\t\t}\n\t\tEmployee newGuy = new Employee(first, last, ID);\n\t\tem.put(ID, newGuy);\n\n\t\tchecked = false;\n\t\tint choice = 0;\n\t\twhile (!checked) {\n\t\t\tSystem.out.println(\"Please enter the performance of the employee\\n\");\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Press 1 for Excellent\\nPress 2 for Good\\nPress 3 for Satisfactory\\nPress 4 for Improvement\\n\");\n\t\t\ttry {\n\t\t\t\tchoice = in.nextInt();\n\t\t\t\tchecked = true;\n\t\t\t} catch (InputMismatchException ab) {\n\t\t\t\tSystem.out.println(\"-Invalid Selection-\\n\");\n\t\t\t}\n\t\t}\n\t\tswitch (choice) {\n\t\tcase 1:\n\t\t\tpm.put(newGuy, \"Excellent\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpm.put(newGuy, \"Good\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpm.put(newGuy, \"Satisfactory\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpm.put(newGuy, \"Improvement\");\n\t\t\tbreak;\n\t\t}\n\t\tin.nextLine();\n\t}",
"abstract Map<String, Integer> mapOfNamesToSalary();",
"public static void main(String[] args) throws IOException {\n\t\tsb = new StringBuilder();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\tN = Integer.parseInt(st.nextToken());\n\t\tM = Integer.parseInt(st.nextToken());\n\n\t\tmapRow = new char[N + 1][M + 1];\n\t\tmapCol = new char[N + 1][M + 1];\n\t\tcount = 0;\n\t\t\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tchar[] c = br.readLine().toCharArray();\n\t\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t\tmapRow[i][j] = c[j - 1];\n\t\t\t\tmapCol[i][j] = c[j - 1];\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (int i = 0; i <= N; i++) mapRow[i][0] = '#';\n\t\tfor (int i = 0; i <= M; i++) mapRow[0][i] = '#';\n\t\tfor (int i = 0; i <= N; i++) mapCol[i][0] = '#';\n\t\tfor (int i = 0; i <= M; i++) mapCol[0][i] = '#';\n\n\t\tfor (int i = 1; i <= N; i++) {\n\t\t\tfor (int j = 1; j <= M; j++) {\n\t\t\t\t//Row검색에서 선택됬다면 Col검색할 필요 없음.\n\t\t\t\tif(!searchRow(i, j)) searchCol(i, j);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(count);\n\t\tSystem.out.println(sb.toString());\n\t}",
"private static void createTypeMap() {\n\n }",
"public static void main(String[] args) {\n\t\tString2Int.put(\"Location1\", new Integer(0));\n\t\tString2Int.put(\"Location2\", new Integer(1));\n\t\tString2Int.put(\"Location3\", new Integer(2));\n\t\tString2Int.put(\"Location4\", new Integer(3));\n\t\t\n\t\t\n\t\t// populate it\n\t\tInt2String.put(new Integer(0), \"Location1\");\n\t\tInt2String.put(new Integer(1), \"Location2\");\n\t\tInt2String.put(new Integer(2), \"Location3\");\n\t\tInt2String.put(new Integer(3), \"Location4\");\n\t\t\n\t\t\n\t\t//HashMap<String,List<Integer>> NHMap = new HashMap<String,List<Integer>>();\n\t\tArrayList<Integer[]> NHMap = new ArrayList<Integer[]>();\n\t\tInteger[] NHMapedge1 ={String2Int.get(\"Location1\"),100,30};\n\t\tInteger[] NHMapedge2 ={String2Int.get(\"Location2\"),20,40};\n\t\tInteger[] NHMapedge3 ={String2Int.get(\"Location4\"),30,15};\n\t\tInteger[] NHMapedge4 ={String2Int.get(\"Location3\"),140,60};\n\t\t//edges.add(edge);\n\t\tNHMap.add(NHMapedge1);\n\t\tNHMap.add(NHMapedge2);\n\t\tNHMap.add(NHMapedge3);\n\t\tNHMap.add(NHMapedge4);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//HashMap<String,List<Integer>> EHMap = new HashMap<String,List<Integer>>();\n\t\tArrayList<Integer[]> EHMap = new ArrayList<Integer[]>();\n\t\tInteger[] EHMapedge1 ={String2Int.get(\"Location1\"),String2Int.get(\"Location2\"),10,30};\n\t\tInteger[] EHMapedge2 ={String2Int.get(\"Location2\"),String2Int.get(\"Location3\"),20,40};\n\t\tInteger[] EHMapedge3 ={String2Int.get(\"Location4\"),String2Int.get(\"Location4\"),30,50};\n\t\tInteger[] EHMapedge4 ={String2Int.get(\"Location3\"),String2Int.get(\"Location2\"),40,60};\n\t\t//edges.add(edge);\n\t\tEHMap.add(EHMapedge1);\n\t\tEHMap.add(EHMapedge2);\n\t\tEHMap.add(EHMapedge3);\n\t\tEHMap.add(EHMapedge4);\n\t\t\n\t\tArrayList<Integer[]> edges = new ArrayList<Integer[]>();\n\t\tInteger[] edge ={String2Int.get(\"Location1\"),String2Int.get(\"Location2\"),10};\n\t\tInteger[] edge1 ={String2Int.get(\"Location2\"),String2Int.get(\"Location3\"),20};\n\t\tInteger[] edge2 ={String2Int.get(\"Location1\"),String2Int.get(\"Location3\"),30};\n\t\tInteger[] edge4 ={String2Int.get(\"Location3\"),String2Int.get(\"Location4\"),40};\n\t\tInteger[] edge5 ={String2Int.get(\"Location4\"),String2Int.get(\"Location3\"),40};\n\t\t\n\t\t\n\t\tedges.add(edge);\n\t\tedges.add(edge1);\n\t\tedges.add(edge2);\n\t\tedges.add(edge4);\n\t\tedges.add(edge5);\n\t\t\n\t\t\n \n\t //int[][] adj_matrix = MapArrayList(edges1);\n int[][] adj_matrix = MapArrayList(edges);\n\t\tfor(int i=0;i<5;i++){\n\t\t\t//System.out.println(\"\");\n\t\t\tfor(int j=0;j<5;j++){\n\t\t\t\t\n\t\t\t\t//System.out.print(adj_matrix[i][j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//dijkstra(edges1);\n\t\t//System.out.print(edges2);\n\t\t//System.out.println(\"Ehtesham\");\n\t\tArrayList<ArrayList<Integer>> finalpaths = dijkstra(adj_matrix);\n\t\t for (ArrayList<Integer> item : finalpaths) { \n\t\t\t System.out.println(\"\");\n\t\t\t \tfor(Integer node: item)\n\t\t\t \t{\t\n\t\t\t \t\tSystem.out.print(Int2String.get(node)+\"->\");\n\t\t\t \t}\n\t\t\n\t\t }\n\t\t int cost = 210;\n\t\t int time = 190;\n\t\t //ArrayList<ArrayList<Integer>> finalp1aths1 = Pathinbound(finalp1aths1);\n\t\t ArrayList<ArrayList<Integer>> finalp1aths1 = Pathinbound(NHMap,EHMap,finalpaths,cost,time);\n\t\t System.out.println(\"\");\n\t\t System.out.println(\"-----------------------------Final answer-------------------------------\");\n\t\t for (ArrayList<Integer> item : finalp1aths1) { \n\t\t\t\tSystem.out.println(item);\n\t\t\t\t\n\t\t }\n\t\t\t\t \n\t}",
"public static void main(String[] args) {\n HashMap<Character,Integer> hMapOutPut = new HashMap<>();\n //HashMap map = new HashMap();\n String sInput = \"india\";\n char[] strInputArray = sInput.toCharArray();\n for(char fLoop: strInputArray) {\n System.out.println(fLoop);\n if(hMapOutPut.containsKey(fLoop)) {\n int temp=hMapOutPut.get(fLoop)+1;\n hMapOutPut.put(fLoop,temp );\n }else {\n hMapOutPut.put(fLoop, 1);\n }\n }\nSystem.out.println(hMapOutPut);\n }",
"public void populateMap(int playerNumber){\n\t\tint factor = 1;\n\t\t\n\t\t\n\t}",
"ParamMap createParamMap();",
"public void createIDMap()\n {\n IDMap = new HashMap<>();\n idFile.open(\"idpassword.txt\");\n String line = idFile.getNextLine();\n\n\n\n while(line!=null) {\n String[] fields = line.split(\",\");\n IDMap.put(fields[0], fields[1]);\n\n line = idFile.getNextLine();\n\n }\n\n }",
"HashMap <String, Command> getMap();",
"public static void main(String[] args) {\n\t\t\n\t\tHashMap <Character, Integer> lhmap = new LinkedHashMap<Character, Integer>();\n\t\t\n\t\t\tString nom = \"Javier del Moral Asensio\";\n\t\t\tchar[] myName= nom.toLowerCase().toCharArray();\n\t\t\n\t\t//for loop to check characters one by one and sum it if are repeated\n\t\t\t\t\n\t\t\tfor(int c=0; c < nom.length(); c++) {\n\t\t\t\n\t\t\t\tint value=1;\n\t\t\n\t\t//if the char is new store it\n\t\t\t\t\n\t\t\t\tif(lhmap.containsKey(myName[c]) == false) {\n\t\t\t\t\tlhmap.put(myName[c], value);\n\t\t\t\t\t\n\t\t//if is not +1 to the original char\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\tvalue = lhmap.get(myName[c]);\n\t\t\t\t\tlhmap.put(myName[c], value+1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\tSystem.out.println(lhmap);\t\t\n\n\t}",
"public abstract mapnik.Map createMap(Object recycleTag);",
"public static void main(String[] args){\n\t\t/* \n\t\t * Retrieve the variables for width and height of the dungeon\n\t\t */\n\t\tint width;\n\t\tint height;\n\t\ttry{\n\t\t\twidth = Integer.parseInt(args[0]);\n\t\t\theight = Integer.parseInt(args[1]);\n\t\t} catch(NumberFormatException e) { \n\t\t\tSystem.out.println(\"Invalid width and/or height\");\n\t\t\treturn;\n\t\t}\n\t\t\t\n\t\tchar[][] map = genMap(width, height, 3, 10);\n\t\t\n\t\tfor(int i=0; i<height; i++){\n String line = \"\";\n for(int j=0; j<width; j++){\n line += map[i][j];\n }\n System.out.println(line);\n }\n\t}",
"private void buildCharMap() {\n\t\tcharMap = new HashMap<Character , Integer>();\n\t\tcharMap.put('a', 0);\n\t\tcharMap.put('b', 1);\n\t\tcharMap.put('c', 2);\n\t\tcharMap.put('d', 3);\n\t\tcharMap.put('e', 4);\n\t\tcharMap.put('f', 5);\n\t\tcharMap.put('g', 6);\n\t\tcharMap.put('h', 7);\n\t\tcharMap.put('i', 8);\n\t\tcharMap.put('j', 9);\n\t\tcharMap.put('k', 10);\n\t\tcharMap.put('l', 11);\n\t\tcharMap.put('m', 12);\n\t\tcharMap.put('n', 13);\n\t\tcharMap.put('o', 14);\n\t\tcharMap.put('p', 15);\n\t\tcharMap.put('q', 16);\n\t\tcharMap.put('r', 17);\n\t\tcharMap.put('s', 18);\n\t\tcharMap.put('t', 19);\n\t\tcharMap.put('u', 20);\n\t\tcharMap.put('v', 21);\n\t\tcharMap.put('w', 22);\n\t\tcharMap.put('x', 23);\n\t\tcharMap.put('y', 24);\n\t\tcharMap.put('z', 25);\t\n\t}",
"public void readMapFile(Scanner input) {\n this.height = input.nextInt();\n this.width = input.nextInt();\n if((this.height >= 20 && this.height <= 50) && (this.width >= 20 && this.width <= 50)) \n {\t \n\t while(input.hasNext())\n\t {\n\t this.map += input.next();\n\t }\n\t input.close();\n }\n else\n {\n \tSystem.err.println(\"Map you have chosen is corrupted, please report this map to your neareast administrator\");\n \tSystem.exit(1);\n }\n \t\n }",
"public static void main(String[] args) {\n if (args.length == 0) {\n System.err.println(\"Missing command line arguments\");\n System.exit(1);\n }\n\n // Map\n // 8 x 8 by default\n ArrayList<String> map = new ArrayList<>();\n String upperBound = \"| _ _ _ _ _ _ _ _ |\";\n String lowerBound = \"| _ _ _ _ _ _ _ _ |\";\n\n map.add(upperBound);\n map.add(\"|<. . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(\"| . . . . . . . . |\");\n map.add(lowerBound);\n\n for (String w: map) {\n System.out.println(w);\n }\n }",
"ParamMapEntry createParamMapEntry();",
"private static Map generateCharacterMappings() {\n Log.debug(\"Generating default character mappings\");\n Map map = new HashMap();\n Iterator iter = keycodes.keySet().iterator();\n while (iter.hasNext()) {\n Object key = iter.next();\n map.put(keycodes.get(key), key);\n }\n return map;\n }",
"private void createMapOfFirstType() {\n\n this.typeOfMap=1;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true, 0, 0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false, 0, 1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = null;\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.RED, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.GREY, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, true,2,3);\n\n }",
"private void mapSetUp() {\n\t\tfor (int i = 0; i < allChar.length; i++) {\n\t\t\tmap.put(allChar[i], shuffledChar[i]);\n\t\t}\n\t}",
"private static HashMap<String, String> buildHashMap() {\n HashMap<String, String> capitals;\n Scanner fileReader;\n String states;\n \n capitals = new HashMap<>();\n \n // Load the file\n try {\n fileReader = new Scanner(\n new BufferedReader(\n new FileReader(FILEPATH)\n )\n );\n } catch(FileNotFoundException ex) {\n System.out.println(FILEPATH + \" not found\");\n System.exit(-1);\n return null;\n }\n \n // Unmarchal the data\n System.out.println(\"=====\\nHERE ARE THE STATES:\");\n states = \"\";\n while (fileReader.hasNextLine()) {\n String currentLine, state, capital;\n String[] data;\n \n currentLine = fileReader.nextLine();\n data = currentLine.split(\"::\");\n if (data.length != 2) {\n System.out.println(\"Invalid file format\");\n System.exit(-1);\n return null;\n }\n \n state = data[0];\n capital = data[1];\n capitals.put(state, capital);\n states += state + \" \";\n }\n System.out.println(states);\n \n return capitals;\n }",
"public static void main(String[] args) {\n\t\tString[] arr= new String[]{\"insert\", \n\t\t\t\t \"insert\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"insert\", \n\t\t\t\t \"addToValue\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"addToKey\", \n\t\t\t\t \"get\"};\n\t\tint[][] arr1=new int[][] {{-5,-2}, \n\t\t\t {2,4}, \n\t\t\t {-1}, \n\t\t\t {-3}, \n\t\t\t {1}, \n\t\t\t {3,-2}, \n\t\t\t {-4}, \n\t\t\t {-2}, \n\t\t\t {2}, \n\t\t\t {-8}}; \n\t\tHashMapNew vik= new HashMapNew();\n\t\tSystem.out.println(\"The answer is: \" + vik.createHashMap(arr, arr1));\n\t\t\n\t}",
"private void processInputs( Map inputs ) {\n\n\t\tINPUTS = new CommandInputParameter[ inputs.size() ];\n\n\t\tint counter = 0;\n\n\t\tfor( Object attribute : inputs.keySet() ){\n\n\t\t\tINPUTS[ counter ] = new CommandInputParameter();\n\n\t\t\tif ( attribute.equals(\"id\") ) {\n\t\t\t\tINPUTS[counter].setid( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t\tif ( attribute.equals(\"type\") ) {\n\t\t\t\tINPUTS[counter].settype( (String) inputs.get( attribute ) );\n\t\t\t}\n\n\t\t}\n\t}",
"public static void main(String args[]) {\n \t if(args.length==0 || args.length>1) {System.out.println(\"Zero or more than input\");\n \t System.exit(0);\n \t }\n Hashtable<String, String> map = new Hashtable<String, String>();\n \n \t \n map.put(\"new york\",\"USA\"); \n map.put(\"Argentina\", \"South America\"); \n map.put(\"Tokyo\", \"Japan\");\n map.put(\"Zurich\", \"Switzerland\");\n map.put(\"Karachi\", \"Pakistan\");\n map.put(\"Colombo\", \"Si Lanka\");\n map.put(\"Johannesburg\", \"South Africa\");\n map.put(\"Cairo\", \"Egypt\");\n map.put(\"Melbourne\", \"Australia\");\n map.put(\"Dubai\", \"UAE\");\n System.out.println(\"City = \"+args[0]+\" Country= \"+(map.get(args[0])==null?\"Not found!!\":map.get(args[0])));\n \n \n }",
"public Object map(String key, Object input);",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader bf=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(bf.readLine());\n\t\tint r=Integer.parseInt(st.nextToken());\n\t\tint c=Integer.parseInt(st.nextToken());\n\t\t\n\t\tmap=new char[r+2][c+2];\n\t\tfor(int i=0;i<r+2;i++) {\n\t\t\tfor(int j=0;j<c+2;j++) {\n\t\t\t\tmap[i][j]='.';\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<1+r;i++) {\n\t\t\tString str=bf.readLine();\n\t\t\tfor(int j=1;j<1+c;j++) {\n\t\t\t\tmap[i][j]=str.charAt(j-1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<r+1;i++) {\n\t\t\tfor(int j=1;j<c+1;j++) {\n\t\t\t\tif(map[i][j]=='X')\n\t\t\t\t\tafter(i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelete();\n\t\t\n\t\tfor(int i=minR;i<=maxR;i++) {\n\t\t\tfor(int j=minC;j<=maxC;j++) {\n\t\t\t\tSystem.out.print(map[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"@Override\n public Map makeMap() {\n Map<Integer,String> testMap = new HashingMap<>();\n return testMap;\n }",
"ProcessOperation<Map<String, Object>> map();",
"private void toMap(String cycle) {\n for (int i = 0; i < cycle.length() - 1; i++) {\n Integer input = _alphabet.toInt(cycle.charAt(i));\n Integer output = _alphabet.toInt(cycle.charAt(i + 1));\n _map.put(input, output);\n }\n Integer i = _alphabet.toInt(cycle.charAt(cycle.length() - 1));\n Integer o = _alphabet.toInt(cycle.charAt(0));\n _map.put(i, o);\n }",
"public static void main(String[] args) {\n\t\tMap map = new Map();\n\t\tHashMap<Integer,Integer> hashmap = new HashMap<>();\n\t\tmap.addValue(11);\n\t\tmap.addValue(12);\n\t\tmap.addValue(13);\n\t\tmap.updateValue(2, 100);\n\t\tmap.removeData(1);\n\t\thashmap = map.getAllData();\n\t\t\n\t\tSystem.out.println(hashmap);\n\t}",
"public static void main(String[] args) {\n Day6 d6 = new Day6();\n \n for(int i = 0; i < 8; i++){\n Map<Character, Integer> dictionary = new HashMap<>();\n d6.dictionaries.add(dictionary);\n }\n \n Scanner sc = new Scanner(System.in);\n System.out.println(\"What is your input?\");\n \n d6.parseInput(sc);\n \n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < 8; i++){\n sb.append(d6.getMaxChar(d6.dictionaries.get(i)));\n }\n System.out.println(\"The word for p1 is \" + sb);\n \n StringBuilder sb2 = new StringBuilder();\n for(int i = 0; i < 8; i++){\n sb2.append(d6.getMinChar(d6.dictionaries.get(i)));\n }\n System.out.println(\"The word for p2 is \" + sb2);\n }",
"public static void main(String[] args) {\n\t\tString a= \"ghij\";\n\t\tString b = \"abcd\";\n\t\tboolean flag =false;\n\t\tHashMap h = new HashMap();\n\t\tfor(int i=0;i<a.length();i++){\n\t\t\tif(!h.containsKey(b.charAt(i))){\n\t\t\t\th.put(b.charAt(i),a.charAt(i));\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tflag = true;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tif(flag==true)\n\t\t\tSystem.out.println(\"Cannot map\");\n\t\t\n\t\telse\n\t\t\tSystem.out.println(\"Can map\");\n\n\t}",
"private void createHisMap(Customer customer)\n {\n hisMap= new HashMap<>();\n idFile.open(\"history.txt\");\n String line=idFile.getNextLine();\n String name = customer.getUsername();\n specificLine=-1;\n int i=0;\n while (line!=null)\n {\n int j=0;\n String[] fields = line.split(\",\");\n if(fields[0].equals(name))\n {\n specificLine=i;\n }\n\n String[] fields2 = fields[1].split(\"%\");\n\n\n while (j<fields2.length)\n {\n if(hisMap.get(fields[0])==null)\n {\n hisMap.put(fields[0],new ArrayList<>());\n hisMap.get(fields[0]).add(fields2[j]);\n\n }\n else\n {\n hisMap.get(fields[0]).add(fields2[j]);\n }\n j++;\n }\n\n line=idFile.getNextLine();\n i++;\n }\n if(specificLine== -1)\n specificLine=i;\n }",
"protected void createMaps() {\n\t\tBlueSchellingCell bCell = new BlueSchellingCell();\n\t\tOrangeSchellingCell oCell = new OrangeSchellingCell();\n\t\tEmptyCell eCell = new EmptyCell();\n\t\tTreeCell tCell = new TreeCell();\n\t\tBurningTreeCell bTCell = new BurningTreeCell();\n\t\tEmptyLandCell eLCell = new EmptyLandCell();\n\n\t\tLiveCell lCell = new LiveCell();\n\t\tDeadCell dCell = new DeadCell();\n\t\tGreenRPSCell gcell = new GreenRPSCell();\n\t\tRedRPSCell rcell = new RedRPSCell();\n\t\tBlueRPSCell blcell = new BlueRPSCell();\n\t\tWhiteRPSCell wcell = new WhiteRPSCell();\n\n\t\tFishCell fCell = new FishCell();\n\t\tSharkCell sCell = new SharkCell();\n\n\t\tAntGroupCell aCell = new AntGroupCell();\n\n\t\tsegregation.put('b', bCell);\n\t\tsegregation.put('o', oCell);\n\t\tsegregation.put('e', eCell);\n\n\t\tgameOfLife.put('l', lCell);\n\t\tgameOfLife.put('d', dCell);\n\n\t\trps.put('g', gcell);\n\t\trps.put('r', rcell);\n\t\trps.put('b', blcell);\n\t\trps.put('w', wcell);\n\n\t\tspreadingWildfire.put('t', tCell);\n\t\tspreadingWildfire.put('b', bTCell);\n\t\tspreadingWildfire.put('e', eLCell);\n\n\t\twaTor.put('f', fCell);\n\t\twaTor.put('s', sCell);\n\t\twaTor.put('e', eCell);\n\n\t\tforagingAnts.put('a', aCell);\n\t\tforagingAnts.put('e', eCell);\n\t\tinitExportMap();\n\n\t\tinitCountMap();\n\t}",
"public static void main(String[] args)\n\t{\n\t\tMapTester myContacts = new MapTester();\n\t\t\n\t\t// add some entries\n\t\tmyContacts.enterNumber(\"Richard Stallman\", \"1234567890\");\n\t\tmyContacts.enterNumber(\"Donald Ervin Knuth\", \"1123581321\");\n\t\t\n\t\t// lookup for the numbers\n\t\tSystem.out.println(myContacts.lookupNumber(\"Richard Stallman\"));\n\t\tSystem.out.println(myContacts.lookupNumber(\"Donald Ervin Knuth\"));\n\t\t\n\t\tif(myContacts.checkForKey(\"Richard Stallman\")){\n\t\t\tSystem.out.println(\"Yep, he's in your phonebook!\");\n\t\t} else{\n\t\t\tSystem.out.println(\"Nope, he's not in your phonebook!\");\n\t\t}\n\t}",
"public static void main(String[] args) {\n Map<User,String> userMap = new TreeMap<User,String>();\n populateUserMap(userMap);\n System.out.println(userMap.toString());\n diplayMap(userMap);\n }",
"public static void main(String args[]) throws IOException\n{\n if(args.length == 0)\n {\n System.out.println(\"Parámetros: mapa [camino]\");\n System.exit(0);\n }\n\n String mapa = args[0],\n camino = args.length==2 ? args[1] : null;\n\n Mapa m = new Mapa(mapa, camino);\n System.out.println(m);\n m.mostrar();\n}",
"private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}",
"private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tchar[][] map = new char[n][n];\n\t\tfor(int i = 0; i < n; i++)\n\t\t{\n\t\t\tString line = sc.next();\n\t\t\tfor(int j = 0; j < n; j++)\n\t\t\t{\n\t\t\t\tmap[i][j] = line.charAt(j);\n\t\t\t}\n\t\t}\n\t\tint x = sc.nextInt(), y = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\tboolean[][] flag = new boolean[n][n];\n\t\tdfs(map, flag, x, y, n);\n\t\tSystem.out.println(value);\n\t\t\n\t}",
"void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}",
"private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}",
"public static void main(String[] args) {\n\t\tHashMap<String, Integer> map1 = new HashMap<String, Integer> ();\n\t\t\n //2. Creating HashMap with some initial capacity\n\t\tHashMap<String,Integer> map2 = new HashMap<String,Integer> (30);\n\t\t\n\t\t//3. Creating HashMap with some initial capacity and some load factor\n\t\tHashMap<String, Integer> map3 = new HashMap<String, Integer> (30, .60f);\n\t\t\n\t\t//4. Creating HashMap by copying another HashMap\n\t\tHashMap<String, Integer> map4= new HashMap<String, Integer> (map1);\n\t\t\n\t}",
"public static void main(String[] args) {\n\tMap<Integer,String> cars = new HashMap<Integer,String>();\n\t\n\tcars.put(1, \"BMW\");\n\tcars.put(3, \"Audi\");\n\tcars.put(6, \"Toyota\");\n\tcars.put(9, \"Hyundai\");\n\t\n\tString myCar = cars.get(6);\n\tSystem.out.println(\"My car is : \"+myCar);\n\t\n\tcars.put(10, \"Hyundai\");\n\tString myCar2 = cars.get(3);\n\tSystem.out.println(\"My second car is : \"+myCar2);\n\t}",
"public static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t\thash_map();\n\t\t//textread();\n\t\t\n\t\t/*\n\n\t\tFileReader fromfile = new FileReader(\"E:\\\\OnlineJob\\\\PWD.txt\");\n\t\tBufferedReader bufferReader = new BufferedReader(fromfile);\n\t\t\n\t\tString textFromfile =null;\n\t\twhile ((textFromfile = bufferReader.readLine())!= null) {\n\t\t\tSystem.out.println(textFromfile);\n\t\t}\n\t\tfromfile.close();\n\t\tbufferReader.close();\n\t}\n\t\n\tpublic static void textread() {\n\t\t\n\t\tScanner userinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Learning Java from?\");\n\t\tString variable = userinput.nextLine();\n\t\tSystem.out.println(variable);\n\t\tuserinput.close();\n\t\t} */\n\tpublic static void hash_map() {\n\t\tHashMap<Integer, String> testmp = new HashMap<Integer, String>(); \n\t\ttestmp.put(1, \"Param\");\n\t\ttestmp.put(2, \"Selvi\");\n\t\ttestmp.put(3,\"\" );\n\t\ttestmp.put(4, \"Ragha\");\n\t\t//testmp.put(4, 100);\n\t\t//testmp.put(4,250);\n\t\tSystem.out.println(\"Elements of Map:\");\n\t\ttestmp.remove(6);\n\t\tSystem.out.println(testmp.containsKey(6));\n\t\tSystem.out.println(testmp);\n\t\tSystem.out.println(testmp.keySet());\n\t\tSystem.out.println(testmp.values());\n\t\tSystem.out.println(testmp.isEmpty());\n\t\t\n\t}\n\n\t\n}",
"public static HashMap<String, String> createVariableMap(String vvlist[]) {\n \t\tif (vvlist.length%2 != 0)\n \t\t\treturn null;\n \t\t\n \t\tHashMap<String, String> variableMap = new HashMap<String, String>();\n \t\tString variable;\n \t\tString value;\n \t\tfor (int i = 0; i < vvlist.length; i += 2) {\n \t\t\tvariable = (String)vvlist[i];\n \t\t\tvalue = vvlist[i + 1];\n \t\t\t\n \t\t\tvariableMap.put(variable, value);\n \t\t}\n \t\t\n \t\treturn variableMap;\n \t}",
"public void createMap(boolean randomNumbers, boolean randomHexes, boolean randomPorts) {\n\t\t\n\t\tif (randomNumbers)\n\t\t\tplaceRandomNumbers();\n\t\telse\n\t\t\tplaceDefaultnumbers();\n\t\t\n\t\tif (randomHexes) {\n\t\t\t\n\t\t\thexGrid.setRandomTypes();\n\t\t\trobber = hexGrid.getDesertLocation();\n\t\t}\n\t\t\t\n\t\telse {\n\t\t\n\t\t\thexGrid.setDefaultTypes();\n//\t\t\trobber = new HexLocation(0, -2);\n\t\t}\n\t\tif (randomPorts)\n\t\t\tcreateRandomPorts();\n\t\telse\n\t\t\tcreateDefaultPorts();\n\t}",
"private VariableMap getParamMappingAsVariableMap() {\n paramValueEncodings.put(fileNameToIndex.keySet().toString(), \" FileNames\");\n paramValueEncodings.put(functionNameToIndex.keySet().toString(), \" FunctionNames\");\n paramValueEncodings.put(typeToIndex.keySet().toString(), \" Types\");\n\n VariableMap preInversedMap = new VariableMap(paramValueEncodings);\n ImmutableMap<String, String> inversedMap = preInversedMap.getNewNameToOriginalNameMap();\n return new VariableMap(inversedMap);\n }",
"private static Map<String, String> getArgMap(String[] args) {\n \t\r\n Map<String,String> argMap = new HashMap<String,String>();\r\n for (int i = 0; i < args.length; i++) {\r\n \tlogger.info(\"arg[\"+i+\"]=\"+args[i]);\r\n String[] argArray = args[i].split(\"=\"); //$NON-NLS-1$\r\n\r\n if (argArray.length == 2) {\r\n argMap.put(argArray[0], argArray[1]);\r\n }\r\n }\r\n return argMap;\r\n }",
"public static void main(String[] args) {\n Map<String,Integer>people= new HashMap<String, Integer>();\n people.put(\"JOHN DOE\",26);\n people.put(\"CHRISTIAN CALLY\",28);\n people.put(\"ALISHA ALI\",23);\n\n for(Map.Entry<String, Integer>entry: people.entrySet()){\n System.out.println(\"NAME: \" + entry.getKey() + \" AGE: \" + entry.getValue());\n\n }\n }",
"public static void main(String [] args){\n Map m = new HashMap();\n m.put(\"Tim\", 5);\n m.put(\"Joe\", \"x\");\n m.put(\"11\", 999);\n System.out.println(m);\n System.out.println(m.get(\"Tim\"));\n }",
"public ProductionPowerInput(Map<ResourceType, Integer> input) {\n Map<Resource, Integer> tmpInput = new HashMap<>();\n input.forEach( (k,v) -> tmpInput.put(ResourceType.getResourceClass(k), v));\n productionPowerInput = tmpInput;\n }",
"private DependencyManager(Map<TypedKey<?>, Object> inputs)\n\t{\n\t\tmap.putAll(inputs);\n\t}",
"private void createMapOfSecondType(){\n\n this.typeOfMap=2;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.BLUE, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, false,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.RED, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = null;\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n\n }",
"private static void fillupmap(Map<String, Object> m) {\n\t\tRectangle r =new Rectangle(\"A\",2,3);\r\n\t\tm.put(r.getRname(), r);\r\n\t\tr =new Rectangle(\"B\",4,1);\r\n\t\tm.put(r.getRname(), r);\r\n\t\tCircle c =new Circle(\"C\",3);\r\n\t\tm.put(c.getCname(),c);\r\n\t\tc =new Circle(\"D\",4);\r\n\t\tm.put(c.getCname(),c);\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tMap<String, Object> m =new HashMap();\r\n\t\tfillupmap(m);\r\n\t\tString z =\"X\";\r\n\t\tObject value = m.get(z);\r\n\t\tif( value != null)\r\n\t\t{\r\n\t\t\tif(value instanceof Circle)\r\n\t\t\t{\r\n\t\t\t\tCircle temp = (Circle) value;\r\n\t\t\t\tSystem.out.println(temp.perimeter());\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\telse if(value instanceof Rectangle)\r\n\t\t\t{\r\n\t\t\t\tRectangle temp = (Rectangle) value;\r\n\t\t\t\tSystem.out.println(temp.area());\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"key not found\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"private void createMapOfThirdType(){\n\n this.typeOfMap=3;\n matrixOfSquares[0][0] = createSquare( ColorOfFigure_Square.RED, true,0,0);\n matrixOfSquares[0][1] = createSquare( ColorOfFigure_Square.BLUE, true,0,1);\n matrixOfSquares[0][2] = createSquare(true, ColorOfFigure_Square.BLUE, true,0,2);\n matrixOfSquares[0][3] = createSquare( ColorOfFigure_Square.GREEN, true,0,3);\n matrixOfSquares[1][0] = createSquare(true, ColorOfFigure_Square.RED, true,1,0);\n matrixOfSquares[1][1] = createSquare( ColorOfFigure_Square.PURPLE, true,1,1);\n matrixOfSquares[1][2] = createSquare( ColorOfFigure_Square.YELLOW, true,1,2);\n matrixOfSquares[1][3] = createSquare( ColorOfFigure_Square.YELLOW, true,1,3);\n matrixOfSquares[2][0] = createSquare( ColorOfFigure_Square.GREY, true,2,0);\n matrixOfSquares[2][1] = createSquare( ColorOfFigure_Square.GREY, true,2,1);\n matrixOfSquares[2][2] = createSquare( ColorOfFigure_Square.YELLOW, true,2,2);\n matrixOfSquares[2][3] = createSquare(true, ColorOfFigure_Square.YELLOW, false,2,3);\n\n }",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint[] x = new int[n];\n\t\tint[] y = new int[n];\n\t\tPoint[] point1 = new Point[n];\n\t\tArrayList<Point> point2 = new ArrayList<>();\n\t\tfor(int i = 0 ; i < n ; i++)\n\t\t{\n\t\t\tx[i] = in.nextInt();\n\t\t\ty[i] = in.nextInt();\n\t\t\tpoint1[i] = new Point( x[i] , y[i] );\n\t\t\tpoint2.add( new Point( x[i] , y[i] ));\n\t\t}\n\t\tHashMap<Point,Integer> map = new HashMap<>();\n\t\tHashSet<Point> set = new HashSet<>();\n\t\tset.addAll(point2);\n\t\t\n\t\t\n\t}",
"public abstract MapItem createMapItem(Object[] parameters) throws Exception;",
"public void generateRandomMap() {\n\n\t}"
]
| [
"0.71507883",
"0.6558304",
"0.6418451",
"0.63594806",
"0.635093",
"0.6296817",
"0.6270702",
"0.62454516",
"0.6238263",
"0.6233353",
"0.62238204",
"0.61098766",
"0.6105244",
"0.5986947",
"0.59865445",
"0.59734935",
"0.5916038",
"0.5911574",
"0.5898275",
"0.5891525",
"0.5853123",
"0.5831238",
"0.5829068",
"0.5800646",
"0.5785213",
"0.5769597",
"0.57453054",
"0.57433194",
"0.57240826",
"0.57224286",
"0.5706419",
"0.5703609",
"0.5681162",
"0.5674025",
"0.5659259",
"0.5637025",
"0.5632826",
"0.5630159",
"0.5622803",
"0.5622386",
"0.5602498",
"0.5600278",
"0.5597817",
"0.5587628",
"0.55669266",
"0.5554281",
"0.5544822",
"0.5513924",
"0.55123705",
"0.5491148",
"0.54893583",
"0.54672045",
"0.54507166",
"0.5447331",
"0.54397833",
"0.5430008",
"0.5425402",
"0.53940505",
"0.5391811",
"0.53867847",
"0.5384863",
"0.53838766",
"0.5378811",
"0.53722054",
"0.5370507",
"0.53614056",
"0.5354821",
"0.53473794",
"0.5340752",
"0.5334418",
"0.53313833",
"0.5329332",
"0.53255516",
"0.5323111",
"0.53229827",
"0.53212523",
"0.5314425",
"0.5305683",
"0.5302394",
"0.5293617",
"0.5286793",
"0.5285377",
"0.5276198",
"0.5270625",
"0.5267369",
"0.5263352",
"0.5258491",
"0.5257293",
"0.52539486",
"0.5250931",
"0.5244745",
"0.5239044",
"0.52375203",
"0.52372646",
"0.52359366",
"0.523516",
"0.52263397",
"0.5225087",
"0.522364",
"0.52081335"
]
| 0.66742617 | 1 |
liste pour contenir les client | public MorpionServerImpl() throws RemoteException {
morpionClients = new HashMap<String, MorpionClientInterface>();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}",
"public List<Clients> getallClients();",
"public List<Client> getAllClient();",
"public void printClientList(){\n for(String client : clientList){\n System.out.println(client);\n }\n System.out.println();\n }",
"public List<T> showAllClients();",
"public ClientList getClients() {\r\n return this.clients;\r\n }",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}",
"public List BestClient();",
"public List<ClientThread> getClients(){\n return clients;\n }",
"protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }",
"public ArrayList<DataCliente> listarClientes();",
"public ArrayList<ClientHandler> getClientList()\n {\n return clientList;\n }",
"@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}",
"Set<Client> getAllClients();",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"public List<Compte> getComptesClient(int numeroClient);",
"List<User> getAllClients();",
"public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"public static ArrayList<Cliente> getClientes()\n {\n return SimulaDB.getInstance().getClientes();\n }",
"public static void clientListUpdater() {\r\n\t\tclientList.clear();\r\n\t\tclientList.addAll(serverConnector.getAllClients());\r\n\t}",
"@Override\n public List<ConsumerMember> listClients() {\n return this.soapClient.listClients(this.getTargetUrl());\n }",
"public List<Client> getAllClient() {\n \tTypedQuery<Client> query = em.createQuery(\n \"SELECT g FROM Client g ORDER BY g.id\", Client.class);\n \treturn query.getResultList();\n }",
"public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}",
"public static ArrayList<Client> getClients() {\n return clients;\n }",
"public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }",
"public List<Cliente> consultarClientes();",
"public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }",
"public ArrayList<Client> getClientList() {\n return this.clientList;\n }",
"@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}",
"public ArrayList<Client> getClients(String nameClient){\n ArrayList<Client> listClients = new ArrayList<Client>();\n \n \n this.serversList.forEach((server) -> {\n server.getClients().stream().filter((client) -> (client.getName().toLowerCase().contains(nameClient.toLowerCase()))).forEachOrdered((client) -> {\n client.setNameServer(server.getNameServer());\n listClients.add(client);\n });\n });\n \n return listClients;\n }",
"public List<UserModel> getListOfClient() {\n\t\treturn userDao.getListOfClients();\n\t}",
"@Override\r\n\tpublic List<Client> selectclient() {\n\t\tList<Client> list=this.getSqlSessionTemplate().selectList(changToNameSpace(\"selectclient\"));\r\n\t\treturn list;\r\n\t}",
"public List<Client> listerTousClients() throws DaoException {\n\t\ttry {\n\t\t\treturn daoClient.findAll();\n\t\t} catch (Exception e) {\n\t\t\tthrow new DaoException(\"ConseillerService.listerTousClients\" + e);\n\t\t}\n\t}",
"public static void initializeClientList() {\r\n\t\tClient newClient1 = new Client(1, \"Bob Jones\", \"Brokerage\");\r\n\t\tclientList.add(newClient1);\r\n\t\t\r\n\t\tClient newClient2 = new Client(2, \"Sarah Davis\", \"Retirement\");\r\n\t\tclientList.add(newClient2);\r\n\t\t\r\n\t\tClient newClient3 = new Client(3, \"Amy Friendly\", \"Brokerage\");\r\n\t\tclientList.add(newClient3);\r\n\t\t\r\n\t\tClient newClient4 = new Client(4, \"Johnny Smith\", \"Brokerage\");\r\n\t\tclientList.add(newClient4);\r\n\t\t\r\n\t\tClient newClient5 = new Client(5, \"Carol Spears\", \"Retirement\");\r\n\t\tclientList.add(newClient5);\r\n\t}",
"public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }",
"public ClientInformation(){\n clientList = new ArrayList<>();\n\n }",
"public Iterator getClients() {\n rrwl_serverclientlist.readLock().lock();\n try {\n return clientList.iterator();\n } finally {\n rrwl_serverclientlist.readLock().unlock();\n }\n }",
"public List<Integer> getAllIDClient(){\n\t\tPreparedStatement ps = null;\n\t\tResultSet resultatRequete =null;\n\t\t\n\t\ttry {\n\t\t\tString requeteSqlGetAll=\"SELECT id_client FROM clients\";\n\t\t\tps = this.connection.prepareStatement(requeteSqlGetAll);\n\t\t\t\n\t\t\tresultatRequete = ps.executeQuery();\n\n\t\t\tClient client = null;\n\t\t\t\n\t\t\tList<Integer> listeIDClient = new ArrayList <>();\n\n\t\t\twhile (resultatRequete.next()) {\n\t\t\t\tint idClient = resultatRequete.getInt(1);\n\t\t\t\t\n\t\t\t\tlisteIDClient.add(idClient);\n\t\t\t\t\n\t\t\t}//end while\n\t\t\treturn listeIDClient;\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(resultatRequete!= null) resultatRequete.close();\n\t\t\t\tif(ps!= null) ps.close();\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\t\t\t\tList listClient = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\tClient client = new Client();\r\n\t\t\t\tclient.setFirstName(\"Eduardo\");\r\n\t\t\t\tclient.setSecondName(\"Mendoza\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tClient newClient = new Client();\r\n\t\t\t\tnewClient.setFirstName(\"Carlos\");\r\n\t\t\t\tnewClient.setSecondName(\"Fuentealba\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tlistClient.add(newClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tclient = new Client();\r\n\t\t\t\tclient.setFirstName(\"Pablo\");\r\n\t\t\t\tclient.setSecondName(\"Mondaca\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"listClient:\"+listClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Mostar los elementos de la lista\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIterator it = listClient.listIterator();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Detectar que tipo de objeto tiene la lista\r\n\t\t\t\t/*Object obj = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tobj = (Object) it.next();\r\n\t\t\t\t\tSystem.out.println(\"obj:\"+obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tClient nclient = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tnclient = (Client) it.next();\r\n\t\t\t\t\tSystem.out.println(\"nclient:\"+nclient);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"firstName:\"+nclient.getFirstName());\r\n\t\t\t\t\tSystem.out.println(\"secondName:\"+nclient.getSecondName());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t}",
"@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}",
"@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }",
"public void getClients(AsyncCallback<List<Client>> cb);",
"public List<Cliente> getClientes() {\n List<Cliente> cli = new ArrayList<>();\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"src/Archivo/archivo.txt\"));\n String record;\n\n while ((record = br.readLine()) != null) {\n\n StringTokenizer st = new StringTokenizer(record, \",\");\n \n String id = st.nextToken();\n String nombreCliente = st.nextToken();\n String nombreEmpresa = st.nextToken();\n String ciudad = st.nextToken();\n String deuda = st.nextToken();\n String precioVentaSaco = st.nextToken();\n\n Cliente cliente = new Cliente(\n Integer.parseInt(id),\n nombreCliente,\n nombreEmpresa,\n ciudad,\n Float.parseFloat(deuda),\n Float.parseFloat(precioVentaSaco)\n );\n\n cli.add(cliente);\n }\n\n br.close();\n } catch (Exception e) {\n System.err.println(e);\n }\n\n return cli;\n }",
"public List<Cliente> getClientes() {\n\t\ttry {\n\t\t\t\n\t\t\tList<Cliente> clientes = (List<Cliente>) db.findAll();\n\t\t\t\t\t\n\t\t\treturn clientes;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn new ArrayList<Cliente>();\n\n\t\t}\n\t}",
"public List<String> allClients() throws IOException {\n String httpResponse = httpGet(baseUrl.resolve(\"/automation/v2/clients\"));\n return mapper.readValue(httpResponse, new TypeReference<List<String>>() {\n });\n }",
"public synchronized void sendUserList()\n {\n String userString = \"USERLIST#\" + getUsersToString();\n for (ClientHandler ch : clientList)\n {\n ch.sendUserList(userString);\n }\n }",
"public void UserClientAcceptor(ArrayList<User> cleints) {\r\n \tuserClient = (ArrayList<User>)cleints.clone();\r\n \t//System.out.println(userClient);\r\n\t\tList.addAll(cleints);\r\n\t\t}",
"public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }",
"public static ArrayList<MqttClient> getAllClients() {\n return clients;\n }",
"public TelaListaCliente(ListadePessoas list) {\n initComponents();\n cli = new ArrayList<>();\n \n for(Cliente c: list.getClientes()){\n cli.add(c);\n }\n \n DefaultTableModel dtm = (DefaultTableModel) jclient.getModel();\n for(Cliente c: cli){ \n Object[] dados = {c.getNome(),c.getCpf(),c.getEndereco(),c.getTelefone()};\n dtm.addRow(dados);\n }\n }",
"public List<Client> findAllClient() throws SQLException {\n\t\treturn iDaoClient.findAllClient();\n\t}",
"public void list(String user) {\n\t\tfor (HandleClient c : clients) {\n\t\t\tif (c.getUserName().equals(user)) {\n\t\t\t\tfor (int a = 0; a < clients.size(); a++) {\n\t\t\t\t\tc.sendList(clients.get(a).name, a);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic List<Client> consulterClients(String mc) {\n\t\treturn dao.consulterClients(mc);\r\n\t}",
"@Override\n public KimbleClient[] clientStartInfo() {\n return clients;\n }",
"private void printAllClients() {\n Set<Client> clients = ctrl.getAllClients();\n clients.stream().forEach(System.out::println);\n }",
"public ArrayList<ServerClient> displayAll() throws SQLException\n\t{\n\t\tString SQL_P = \"SELECT * FROM Clients\";\n\t\tResultSet rs;\n\n\t\tArrayList<ServerClient> array = new ArrayList<>();\n\t\tStatement stmt = con.createStatement();\n\t\ttry\n\t\t{\n\t\t\trs = stmt.executeQuery(SQL_P);\n\t\t\twhile (rs.next())\n\t\t\t{\n\n\t\t\t}\n\t\t\treturn array;\n\t\t} finally\n\t\t{\n\t\t\tif (stmt != null)\n\t\t\t{\n\t\t\t\tstmt.close();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic Collection<Client> getAllClients() {\n\t\treturn null;\n\t}",
"public void printClientList() {\n uiService.underDevelopment();\n }",
"List<GroupUser> getConnectedClients();",
"@Override\n\tpublic List<Cliente> readAll() {\n\t\treturn clientedao.readAll();\n\t}",
"public List<Client> findAll() throws DataAccessLayerException {\n try {\n Subject.doAs(LoginController.getLoginContext().getSubject(), new MyPrivilegedAction(\"CLIENT\", Permission.READ));\n return super.findAll(Client.class);\n } catch (AccessControlException e) {\n e.printStackTrace();\n }\n return new ArrayList<>();\n }",
"@Override\n\tpublic List<Socket> GetConnectedClients() {\n\t\t\n\t\tArrayList<Socket> list = new ArrayList<Socket>();\n\t\t\n\t\tif(clients == null)return list;\n\t\t\n\t\tfor(Socket s : clients)\n\t\t{\n\t\t\tlist.add(s);\n\t\t}\n\t\t\n\t\treturn list;\n\t}",
"public int clientsCount(){\n return clientsList.size();\n }",
"public ArrayList<Project> getClients() {\n try {\n ArrayList<Project> clients = new ArrayList<Project>();\n String selectClients = \"SELECT NAME, CLIENT_ID FROM CLIENTS\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(selectClients);\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String client = rs.getString(\"NAME\");\n String clientId = rs.getString(\"CLIENT_ID\");\n Project p = new Project(client, clientId);\n clients.add(p);\n }\n rs.close();\n ps.close();\n return clients;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return null;\n }\n }",
"public List<Cliente> getClienteList () {\n\t\t\n\t\tCriteria crit = HibernateUtil.getSession().createCriteria(Cliente.class);\n\t\tList<Cliente> clienteList = crit.list();\n\t\t\n\t\treturn clienteList;\n\t}",
"@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }",
"@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"@Override\n\tpublic List<Client> getAll() {\n\t\treturn dao.getAll(Client.class);\n\t}",
"public List<String> getListOfClientNames() throws Exception {\n if (isNotAt()) {\n goTo();\n }\n return getTableDataByColumn(clientsTable, 0);\n }",
"private void cclient() throws Exception {\n\n\t\tws.xml c = this.ls.cclient();\n\t\tfor (String[] row : c.t) {\n\t\t\tString pat1 = row[0];\n\t\t\tcomboBox.addItem(pat1);\n\t\t}\n\t}",
"private void getClientList(ActionEvent e){\r\n new ClientList().Display();\r\n }",
"public int getClients()\r\n\t{\r\n\t\treturn numberOfClients;\r\n\t}",
"public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }",
"public Client[] getClients() {\r\n // Get all the contents from the table clients with columns as keys mapped\r\n // to an ArrayList of\r\n // ordered row values\r\n HashMap<String, ArrayList<String>> clientInfo = getAllTableContents(\"clients\");\r\n // Parse the clients into an ArrayList of Client objects\r\n ArrayList<Client> clients = parseClients(clientInfo);\r\n // Cast to an array of Client and return\r\n Client[] temp = new Client[clients.size()];\r\n return clients.toArray(temp);\r\n }",
"public RepositorioClientesArray() {\n\t\tclientes = new Cliente[TAMANHO_CACHE];\n\t\tindice = 0;\n\t}",
"public ArrayList<Cliente> getClientes() throws SQLException, Exception {\n\t\tArrayList<Cliente> clientes = new ArrayList<Cliente>();\n\n\t\tString sql = String.format(\"SELECT * FROM %1$s.CLIENTE\", USUARIO);\n\n\t\tPreparedStatement prepStmt = conn.prepareStatement(sql);\n\t\trecursos.add(prepStmt);\n\t\tResultSet rs = prepStmt.executeQuery();\n\n\t\twhile (rs.next()) {\n\t\t\tclientes.add(convertResultSetToCliente(rs));\n\t\t}\n\t\treturn clientes;\n\t}",
"public List<Client> getClientsByConseillerId(long idConseiller) throws SQLException {\r\n\t\tPreparedStatement st = null;\r\n\t\tResultSet rs =null;\r\n\t\tClient client = new Client();\r\n\t\tList<Client> clients = new ArrayList<Client>();\r\n\t\tConnection connection = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tconnection = getConnection();\r\n\t\t\tString selectSQL = \"select surname, name, email , adress from client where idConseiller = ?\";\r\n\t\t\tst = connection.prepareStatement(selectSQL);\r\n\t\t\tst.setLong(1, idConseiller);\r\n\t\t\t\r\n\t\t\trs = st.executeQuery();\r\n\t\t\t\r\n\t\t\t\r\n\t\twhile (rs.next()) {\r\n\t\t\t\r\n\t\t\tclient = new Client();\r\n\t\t\tclient.setSurname(rs.getString(\"surname\"));\r\n\t\t\tclient.setName(rs.getString(\"name\"));\r\n\t\t\tclient.setEmail(rs.getString(\"email\"));\r\n\t\t\tclient.setAdress(rs.getString(\"adress\"));\r\n\t\t\t\r\n\t\t\tclients.add(client);\r\n\t\t }\r\n\t\t\treturn clients;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif (st != null)\r\n\t\t\t\t\tst.close();\r\n\t\t\t\tif (connection != null)\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=0; i<clients.size();i++) {\r\n\t\t\t\tSystem.out.println(\"la donnée associée à l'indice \"+ i + \" est \" + clients.get(i));\r\n\t\t\t}\r\n\t\t\treturn clients;\t\t\r\n\t\t\r\n\t}",
"public Clientes() {\n\t\tclientes = new Cliente[MAX_CLIENTES];\n\t}",
"@Override\n\tpublic int getNbClients() {\n\t\t// TODO Auto-generated method stub\n\t\tint nbClients=0;\n\t\tfor (ArrayList<TC> quantite : salle.values()) {\t\t//On parcours l'ensemble de la liste pour connaître à chaque tour de\n\t\t\tnbClients += quantite.size();\t\t\t\t\t//boucle le nombre de personne prioritaire.\n\t\t}\n\t\treturn nbClients;\n\t\t\n\t\t// on cherche a donner le nombre de clients dans la salle à l'instant T, pour ce faire on fait la somme de la taille de chaque file d'attente \n// int res=0;\n// for(int i=0;i<maxPrio;i++) {\n// res += salle.get(i).size(); // on fait un get sur la salle d'indice i (correspondant a 1 niveau de priorité) ce qui rend l'ArrayList puis on prend la size de ce get. \n// }\n\t}",
"@Override\r\n\tpublic String[] getClientNames() {\r\n\t\treturn initData.clientNames;\r\n\t}",
"private void LoadClients(boolean Traitement) {\n\n\t\ttry {\n\t\t\tpanelBouton.getBtnCarteClient().setVisible(false);\n\t\t\tint i = 0;\n\t\t\tGetClientTableModel().clear();\n\t\t\tif (Traitement) {\n\t\t\t\tthis.nom = panelRecherche.getEtNom().getText();\n\t\t\t\tthis.prenom = panelRecherche.getEtPrenom().getText();\n\t\t\t\tliste = gestion.getClients(nom, prenom);\n\t\t\t} else {\n\t\t\t\tString numclient = panelRecherche.getEtNumclient().getText().toString();\n\t\t\t\tif (numclient.isEmpty()) {\n\t\t\t\t\ti = 0;\n\t\t\t\t} else {\n\t\t\t\t\tString patternId = \"^[0-9]+$\";\n\t\t\t\t\tboolean checkId = Pattern.matches(patternId, numclient);\n\t\t\t\t\tif (checkId) {\n\t\t\t\t\t\ti = Integer.parseInt(numclient);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Ce champ peut contenir uniquement des valeurs numériques\");\n\t\t\t\t\t\tRunnable clearText = new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tpanelRecherche.getEtNumclient().setText(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tSwingUtilities.invokeLater(clearText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tliste = gestion.getClient(i);\n\t\t\t}\n\t\t\tif (liste == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Client client : liste) {\n\t\t\t\tGetClientTableModel().addRow(client);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\tArrayList<Commande> cdes = null;\n\t\ttry {\n\t\t\tcdes = gestion.getCdes(resultat);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"@GetMapping(\"/clients/{idClient}/comptes\")\n public Iterable<Long> getComptesClient(@PathVariable(\"idClient\") Client c) {\n Iterable<Long> comptes = serviceCollaborateur.getListeIdComptes(c.getId());\n return comptes;\n }",
"public List<Cliente> mostrarClientesPos()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tif(p.tienePost())\n\t\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\tCollections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"private static void getClients() throws IOException {\r\n\t\tbidders=new ArrayList<Socket>();\r\n\t\tserverSocket=new ServerSocket(portno);\r\n\t\twhile ((bidders.size()<numBidders)&&(auctioneer==null)) {\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\t//if (this client is a bidder)\r\n\t\t\t\tbidders.add(temp);\r\n\t\t\t//if (this client is the auctioneer)\r\n\t\t\t\tauctioneer=temp;\r\n\t\t}\r\n\t}",
"@Override\n\tpublic List<Clientes> findAllClientes() throws Exception {\n\t\treturn clienteLogic.findAll();\n\t}",
"private void getClientList(String loginUserId) {\n if (!TextUtils.isEmpty(loginUserId) && NetworkUtil.isOnline(this)){\n initGetInvoiceAPIResources(loginUserId);\n\n }else {\n // Snack Bar to show success message that record is wrong\n Snackbar.make(mainLayout, \"Please Check Internet Connection\", Snackbar.LENGTH_LONG).show();\n }\n }",
"public String[] getClientNames() {\n return clientNames;\n }",
"public List<HotspotClient> getHotspotClientsList() {\n List<HotspotClient> clients = new ArrayList<HotspotClient>();\n synchronized (mHotspotClients) {\n for (HotspotClient client : mHotspotClients.values()) {\n clients.add(new HotspotClient(client));\n }\n }\n return clients;\n }",
"java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();",
"public Set<String> getGameListClients() {\n return this.gameListClients;\n }",
"public ArrayList<Cliente> obtClientes(){\n return (ArrayList<Cliente>) clienteRepositori.findAll();\n }",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"public ListaCliente() {\n initComponents();\n carregarTabela();\n }",
"@Override\n\tpublic List<Cliente> getAll() {\n\t\treturn null;\n\t}",
"public Map<String, Cliente> getClientes() {\n\t\treturn clientes;\n\t}",
"@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}",
"public List<Clientes> read(){\n Connection con = ConectionFactory.getConnection();\n PreparedStatement pst = null;\n ResultSet rs = null;\n \n List<Clientes> cliente = new ArrayList<>();\n \n try {\n pst = con.prepareStatement(\"SELECT * from clientes ORDER BY fantasia\");\n rs = pst.executeQuery();\n \n while (rs.next()) { \n Clientes clientes = new Clientes();\n clientes.setCodigo(rs.getInt(\"codigo\"));\n clientes.setFantasia(rs.getString(\"fantasia\"));\n clientes.setCep(rs.getString(\"cep\"));\n clientes.setUf(rs.getString(\"uf\"));\n clientes.setLogradouro(rs.getString(\"logradouro\"));\n clientes.setNr(rs.getString(\"nr\"));\n clientes.setCidade(rs.getString(\"cidade\"));\n clientes.setBairro(rs.getString(\"bairro\"));\n clientes.setContato(rs.getString(\"contato\"));\n clientes.setEmail(rs.getString(\"email\"));\n clientes.setFixo(rs.getString(\"fixo\"));\n clientes.setCelular(rs.getString(\"celular\"));\n clientes.setObs(rs.getString(\"obs\"));\n cliente.add(clientes); \n }\n } catch (SQLException ex) {\n \n }finally{\n ConectionFactory.closeConnection(con, pst, rs);\n }\n return cliente;\n}"
]
| [
"0.8210986",
"0.8105118",
"0.81048244",
"0.7971518",
"0.7826216",
"0.75661224",
"0.7558716",
"0.754759",
"0.7546266",
"0.7505712",
"0.7498583",
"0.7466111",
"0.74247146",
"0.74171543",
"0.73976225",
"0.73886305",
"0.7360326",
"0.73402435",
"0.7339157",
"0.73252577",
"0.73070526",
"0.72996736",
"0.729098",
"0.7285507",
"0.72737014",
"0.7267717",
"0.72645545",
"0.72368157",
"0.7234013",
"0.723083",
"0.7224546",
"0.7222948",
"0.7218545",
"0.71839374",
"0.71749896",
"0.7173696",
"0.71615756",
"0.7116304",
"0.7082185",
"0.7078498",
"0.70695865",
"0.7054818",
"0.705431",
"0.7021969",
"0.7011502",
"0.69890964",
"0.6978854",
"0.6976031",
"0.69752926",
"0.69705445",
"0.69628304",
"0.6944584",
"0.6940224",
"0.6933359",
"0.69251746",
"0.6908986",
"0.6904723",
"0.6895403",
"0.6888057",
"0.68873835",
"0.68847066",
"0.68705124",
"0.6856337",
"0.6855458",
"0.6846052",
"0.6814654",
"0.6795594",
"0.6792075",
"0.6789459",
"0.67655253",
"0.672458",
"0.6710722",
"0.66976434",
"0.66932136",
"0.6664969",
"0.666453",
"0.6659226",
"0.66589665",
"0.6645162",
"0.6640066",
"0.6633578",
"0.66200346",
"0.6618033",
"0.6616426",
"0.66089594",
"0.6606672",
"0.65995824",
"0.65991604",
"0.65767616",
"0.6572554",
"0.657052",
"0.656412",
"0.6556066",
"0.65559036",
"0.65440774",
"0.65328914",
"0.65320414",
"0.65288556",
"0.6528238",
"0.6518496",
"0.65089715"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public String echo() throws RemoteException {
return "Hola";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
on supprime un client de la liste morpionClients | @Override
public synchronized void leaveMorpion(String id) throws RemoteException {
this.morpionClients.remove(id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void listaClient() {\n\t\t\r\n\t\tthis.listaClient.add(cliente);\r\n\t}",
"public void AfficherListClient() throws Exception{\n laListeClient = Client_Db_Connect.tousLesClients();\n laListeClient.forEach((c) -> {\n modelClient.addRow(new Object[]{ c.getIdent(),\n c.getRaison(),\n c.getTypeSo(),\n c.getDomaine(),\n c.getAdresse(),\n c.getTel(),\n c.getCa(),\n c.getComment(),\n c.getNbrEmp(),\n c.getDateContrat(),\n c.getAdresseMail()});\n });\n }",
"@Override\n\t\tpublic List<Client> listeClient() {\n\t\t\treturn null;\n\t\t}",
"public static void inregistrareClient(Medic m, Client c){\r\n List<Client> clienti = m.getClienti();\r\n clienti.add(c);\r\n m.setClienti(clienti);\r\n audit(\"Inregitrare client\");\r\n }",
"private void LoadClients(boolean Traitement) {\n\n\t\ttry {\n\t\t\tpanelBouton.getBtnCarteClient().setVisible(false);\n\t\t\tint i = 0;\n\t\t\tGetClientTableModel().clear();\n\t\t\tif (Traitement) {\n\t\t\t\tthis.nom = panelRecherche.getEtNom().getText();\n\t\t\t\tthis.prenom = panelRecherche.getEtPrenom().getText();\n\t\t\t\tliste = gestion.getClients(nom, prenom);\n\t\t\t} else {\n\t\t\t\tString numclient = panelRecherche.getEtNumclient().getText().toString();\n\t\t\t\tif (numclient.isEmpty()) {\n\t\t\t\t\ti = 0;\n\t\t\t\t} else {\n\t\t\t\t\tString patternId = \"^[0-9]+$\";\n\t\t\t\t\tboolean checkId = Pattern.matches(patternId, numclient);\n\t\t\t\t\tif (checkId) {\n\t\t\t\t\t\ti = Integer.parseInt(numclient);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Ce champ peut contenir uniquement des valeurs numériques\");\n\t\t\t\t\t\tRunnable clearText = new Runnable() {\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tpanelRecherche.getEtNumclient().setText(\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tSwingUtilities.invokeLater(clearText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tliste = gestion.getClient(i);\n\t\t\t}\n\t\t\tif (liste == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tfor (Client client : liste) {\n\t\t\t\tGetClientTableModel().addRow(client);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\n\t\t}\n\n\t\tArrayList<Commande> cdes = null;\n\t\ttry {\n\t\t\tcdes = gestion.getCdes(resultat);\n\t\t} catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t}",
"private void setClientsIntoComboBox() {\n if (mainModel.getClientList() != null) {\n try {\n mainModel.loadClients();\n cboClients.getItems().clear();\n cboClients.getItems().addAll(mainModel.getClientList());\n } catch (ModelException ex) {\n alertManager.showAlert(\"Could not get the clients.\", \"An error occured: \" + ex.getMessage());\n }\n }\n }",
"public void UserClientAcceptor(ArrayList<User> cleints) {\r\n \tuserClient = (ArrayList<User>)cleints.clone();\r\n \t//System.out.println(userClient);\r\n\t\tList.addAll(cleints);\r\n\t\t}",
"public List<Client> displayClient ()\r\n {\r\n List<Client> clientListe = new ArrayList<Client>();\r\n String sqlrequest = \"SELECT idCLient,nom,prenom,email,nbrSignalisation FROM pi_dev.client ;\";\r\n try {\r\n PreparedStatement ps = MySQLConnection.getInstance().prepareStatement(sqlrequest);\r\n ResultSet resultat = ps.executeQuery(sqlrequest);\r\n while (resultat.next()){\r\n Client client = new Client();\r\n \r\n \r\n client.setEmail(resultat.getString(\"email\"));\r\n client.setIdClient(resultat.getInt(\"idClient\"));\r\n client.setNom(resultat.getString(\"nom\"));\r\n client.setPrenom(resultat.getString(\"prenom\"));\r\n client.setNbrSignalisation(resultat.getInt(\"nbrSignalisation\"));\r\n \r\n clientListe.add(client);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(ClientDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return clientListe;\r\n }",
"public static void clientListUpdater() {\r\n\t\tclientList.clear();\r\n\t\tclientList.addAll(serverConnector.getAllClients());\r\n\t}",
"public void carregarCliente() {\n\t\tgetConnection();\n\t\ttry {\n\t\t\tString sql = \"SELECT CLIENTE FROM CLIENTE ORDER BY CLIENTE\";\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(sql);\n\t\t\twhile(rs.next()) {\n\t\t\t\tcbCliente.addItem(rs.getString(\"CLIENTE\"));\n\t\t\t}\n\t\t}catch(SQLException e) {\n\t\t\tSystem.out.println(\"ERRO\" + e.toString());\n\t\t}\n\t}",
"public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }",
"public ClientInformation(){\n clientList = new ArrayList<>();\n\n }",
"public void ajouterClientListe(String nom){\n if (!couleurs.containsKey(nom)){\n Color couleur = new Color(chercherCouleur(nom));\n couleurs.put(nom, couleur);\n }\n }",
"public List<Compte> getComptesClient(int numeroClient);",
"public void supprimerClient(String nom, String prenom) {\n\t\tIterator<Client> it = clients.iterator();\n\t\tboolean existant = true;\n\t\twhile (it.hasNext()) {\n\t\t\tClient client = it.next();\n\t\t\tif (nom == client.getNom() && prenom == client.getPrenom()) {\n\t\t\t\tit.remove();\n\t\t\t\tSystem.out.println(\"Le client \" + client.getNom() + \" \" + client.getPrenom() + \" a bien ´┐Żt´┐Ż supprim´┐Ż dans la base de donn´┐Żes\");\n\t\t\t\texistant = false;\n\t\t\t\tSystem.out.println(clients.size());\n\t\t\t}\n\t\t}\n\t\tif (existant == true) {\n\t\t\tSystem.out.println(\"Action impossible, ce client n'existe pas\");\n\t\t}\n\t}",
"@Override\n\tpublic void cargarClienteSinCobrador() {\n\t\tpopup.showPopup();\n\t\tif(UIHomeSesion.usuario!=null){\n\t\tlista = new ArrayList<ClienteProxy>();\n\t\tFACTORY.initialize(EVENTBUS);\n\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\n\t\tRequest<List<ClienteProxy>> request = context.listarClienteSinCobrador(UIHomeSesion.usuario.getIdUsuario()).with(\"beanUsuario\");\n\t\trequest.fire(new Receiver<List<ClienteProxy>>() {\n\t\t\t@Override\n\t\t\tpublic void onSuccess(List<ClienteProxy> response) {\n\t\t\t\tlista.addAll(response);\t\t\t\t\n\t\t\t\tgrid.setData(lista);\t\t\t\t\n\t\t\t\tgrid.getSelectionModel().clear();\n\t\t\t\tpopup.hidePopup();\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n public void onFailure(ServerFailure error) {\n popup.hidePopup();\n //Window.alert(error.getMessage());\n Notification not=new Notification(Notification.WARNING,error.getMessage());\n not.showPopup();\n }\n\t\t\t\n\t\t});\n\t\t}\n\t}",
"@Override\n\tpublic void entrer(TC client) {\n\t\tint prio = client.getPrio();\n\t\tif (!estPleine()) {\n\t\t\tif(prio>maxPrio) {\t\t\t\t\t\t//Si la priorité donnée est sup\n\t\t\t\tsalle.get(maxPrio).add(client);\t\t//.get récupération clé .add rajout\n\t\t\t}\n\t\t\telse if (prio<0) {\t\t\t\t\t\t//Si priorité inf à 0\n\t\t\t\tsalle.get(0).add(client);\t\t\n\t\t\t}\n\t\t\telse {salle.get(client.getPrio()).add(client);\n\t\t\t// {salle.get(prio).entrer(client);}\n\t\t\t}\n\t\t}\n\t}",
"public InterfaceSalon(String liste, Client client) {\n initComponents();\n this.c=client;\n this.lobbyListJSON=new JSONArray();\n parser = new JSONParser();\n \n setLobbyList(liste);\n }",
"public ClientList getClients() {\r\n return this.clients;\r\n }",
"public Interfaz_RegistroClientes() {\n initComponents();\n limpiar();\n }",
"private void removeClient () {\n AutomatedClient c = clients.pollFirstEntry().getValue();\n Nnow--;\n\n c.signalToLeave();\n System.out.println(\"O cliente \" + c.getUsername() + \" foi sinalizado para sair\");\n }",
"public List<Clients> getallClients();",
"@Override\n\tpublic void addClient(Client c, String msg) throws RemoteException {\n\t\tif(!users.contains(c)){\n\t\t\tusers.add(c);\n\t\t\tfor(int i=0;i<users.size();i++) {\t \n\t //sendMessage((Client)users.get(i),msg);\n\t\t\t\tSystem.out.println(users.get(i).getName());\n\t }\n\t //users.add(c);\n\t }\n\t}",
"private void getClientList(ActionEvent e){\r\n new ClientList().Display();\r\n }",
"public void videListeClient(){\n couleurs.clear();\n }",
"public synchronized void setClients(ClientList clients) {\r\n this.clients.clear();\r\n \r\n if (clients != null) {\r\n this.clients.addAll(clients);\r\n }\r\n }",
"public interface InterfaceServeurClient extends Remote {\n\n\tpublic void setServeur(InterfaceServeurClient serveur) throws RemoteException;\n\tpublic void setListeClient(ArrayList<InterfaceServeurClient> client) throws RemoteException;\n\tpublic Partie getPartie() throws RemoteException;\n\tpublic void ajouterClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic boolean retirerClient(InterfaceServeurClient client) throws RemoteException;\n\tpublic InterfaceServeurClient getServeur() throws RemoteException;\n\tpublic String getNamespace() throws RemoteException;\n\tpublic String getNomJoueur() throws RemoteException;\n\tpublic int getIdObjetPartie() throws RemoteException;\n\tpublic void setIdObjetPartie(int idObjetPartie) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastie() throws RemoteException;\n\tpublic void setListeDynastie(ArrayList<Dynastie> liste) throws RemoteException;\n\tpublic ArrayList<Dynastie> getListeDynastieDispo() throws RemoteException;\n\tpublic void setJoueur(Joueur j) throws RemoteException;\n\n\tpublic boolean deconnecter() throws RemoteException;\n\n\tpublic void notifierChangement(ArrayList<Object> args) throws RemoteException;\n\tpublic void addListener(ChangeListener listener) throws RemoteException;\n\tpublic void removeListener(ChangeListener listener) throws RemoteException;\n\tpublic void clearListeners() throws RemoteException;\n\tpublic Joueur getJoueur() throws RemoteException;\n\tpublic void setPartieCourante(Partie partie) throws RemoteException;\n\tpublic ArrayList<InterfaceServeurClient> getClients() throws RemoteException;\n\tpublic boolean send(Action action, int idClient) throws RemoteException;\n\tpublic void passerTour() throws RemoteException;\n\n\tpublic void switchJoueurEstPret(InterfaceServeurClient client) throws RemoteException;\n\tpublic void switchJoueurPret() throws RemoteException;\n\tpublic boolean setDynastieOfClient(InterfaceServeurClient client, Dynastie dynastie) throws RemoteException;\n\tpublic void setDynastie(Dynastie d) throws RemoteException;\n\tpublic void libererDynastie(Dynastie d) throws RemoteException;\n\tpublic int getUniqueId() throws RemoteException;\n\n\tpublic void envoyerNouveauConflit(Conflits conflit, int idClient) throws RemoteException;\n\tpublic void envoyerRenforts(ArrayList<TuileCivilisation> renforts, Joueur joueur) throws RemoteException;\n\tpublic boolean piocherCartesManquantes(Joueur j) throws RemoteException;\n\tpublic void finirPartie() throws RemoteException;\n\tpublic void envoyerPointsAttribues(Joueur joueur) throws RemoteException;\n\tpublic ArrayList<Joueur> recupererListeJoueurPartie() throws RemoteException;\n\tpublic void chargerPartie() throws RemoteException;\n}",
"public ClienteConsultas() {\n listadeClientes = new ArrayList<>();\n clienteSeleccionado = new ArrayList<>();\n }",
"@Override\n\tpublic void removeClient(Client c, String msg) throws RemoteException {\n\t\t if(users.contains(c))\n\t\t {\n\t\t for(int i=0;i<users.size();i++)\n\t\t {\n\t\t //sendMessage((IChatClient)clients.elementAt(i),msg);\n\t\t ( (Client) users.get(i)).afficherMessage(msg);\n\t\t }\n\t\t users.remove(c);\n\t\t }\n\t}",
"public static void main(String[] args) {\n\t\t\t\tList listClient = new ArrayList();\r\n\t\t\t\t\r\n\t\t\t\tClient client = new Client();\r\n\t\t\t\tclient.setFirstName(\"Eduardo\");\r\n\t\t\t\tclient.setSecondName(\"Mendoza\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\tClient newClient = new Client();\r\n\t\t\t\tnewClient.setFirstName(\"Carlos\");\r\n\t\t\t\tnewClient.setSecondName(\"Fuentealba\");\r\n\t\t\t\t\t\t\r\n\t\t\t\tlistClient.add(newClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tclient = new Client();\r\n\t\t\t\tclient.setFirstName(\"Pablo\");\r\n\t\t\t\tclient.setSecondName(\"Mondaca\");\r\n\t\t\t\t\r\n\t\t\t\tlistClient.add(client);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\t\tSystem.out.println(\"listClient:\"+listClient);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Mostar los elementos de la lista\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tIterator it = listClient.listIterator();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Detectar que tipo de objeto tiene la lista\r\n\t\t\t\t/*Object obj = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tobj = (Object) it.next();\r\n\t\t\t\t\tSystem.out.println(\"obj:\"+obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}*/\r\n\t\t\t\t\r\n\t\t\t\tClient nclient = null;\r\n\t\t\t\t\r\n\t\t\t\twhile (it.hasNext()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Casting JAVA\r\n\t\t\t\t\tnclient = (Client) it.next();\r\n\t\t\t\t\tSystem.out.println(\"nclient:\"+nclient);\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(\"firstName:\"+nclient.getFirstName());\r\n\t\t\t\t\tSystem.out.println(\"secondName:\"+nclient.getSecondName());\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\r\n\t}",
"public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}",
"public void majAffichageConnectes() {\n effacerConnectes(); // on efface ce qui est deja ecrit dans la zone reservees a la liste des\n // connectes\n\n choixMessage.removeAllItems(); // Suppression de tous les items de la comboBox\n choixMessage.addItem(\"Tout le monde\");\n choixMessage.setSelectedIndex(0); // Par defaut => envoi a tout le monde\n\n // Parcours de la liste des personnes connectees\n for (Map.Entry<String, Color> entry : couleurs.entrySet()) {\n String nom = entry.getKey(); // recuperation du nom\n Color rgb = new Color(chercherCouleur(nom)); // recuperation de la couleur correspondante\n\n // Mise a jour de la combobox\n if(!fenetre.getClient().getNom().equals(nom)){\n choixMessage.addItem(nom);\n }\n\n // Mise a jour de l'affichage dans le panneau \"Connectes\"\n StyledDocument doc = connectes.getStyledDocument();\n StyleContext style = StyleContext.getDefaultStyleContext();\n // Modification de la couleur\n AttributeSet aset = style.addAttribute(style.getEmptySet(), StyleConstants.Foreground, rgb);\n // Mettre en gras\n aset = style.addAttributes(aset, style.addAttribute(style.getEmptySet(), StyleConstants.Bold, true));\n\n // ajout de la personne dans la liste avec la couleur correspondante\n try {\n doc.insertString(doc.getLength(), nom+\"\\n\", aset);\n } catch (BadLocationException e) {\n e.printStackTrace();\n }\n }\n\n System.out.println(\"maj de l'affichage de la liste des connectes\");\n }",
"public Client lireClient(String nom, String prenom) {\n\t\tboolean dejaaffiche = false;\n\t\tfor (Client client : this.clients) {\n\n\t\t\tif (nom.equalsIgnoreCase(client.getNom()) && prenom.equalsIgnoreCase(client.getPrenom())) {\n\t\t\t\tSystem.out.println(\"Donnees du client \" + nom + \" \" + prenom + \" : Solde de Compte Courant = \" + client.getCompteCourant().getSolde() + \", solde de Compte Epargne = \" + client.getCompteEpargne().getSolde());\n\t\t\t\treturn client;\n\n\t\t\t}\n\n\t\t}\n\t\tif (dejaaffiche == false) {\n\t\t\tSystem.out.println(\"Le client n'existe pas\");\n\n\t\t}\n\t\treturn null;\n\t}",
"public ListaCliente() {\n\t\tClienteRepositorio repositorio = FabricaPersistencia.fabricarCliente();\n\t\tList<Cliente> clientes = null;\n\t\ttry {\n\t\t\tclientes = repositorio.getClientes();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tclientes = new ArrayList<Cliente>();\n\t\t}\n\t\tObject[][] grid = new Object[clientes.size()][3];\n\t\tfor (int ct = 0; ct < clientes.size(); ct++) {\n\t\t\tgrid[ct] = new Object[] {clientes.get(ct).getNome(),\n\t\t\t\t\tclientes.get(ct).getEmail()};\n\t\t}\n\t\tJTable table= new JTable(grid, new String[] {\"NOME\", \"EMAIL\"});\n\t\tJScrollPane scroll = new JScrollPane(table);\n\t\tgetContentPane().add(scroll, BorderLayout.CENTER);\n\t\tsetTitle(\"Clientes Cadastrados\");\n\t\tsetSize(600,400);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t\tsetLocationRelativeTo(null);\n\t}",
"public TelaListaCliente(ListadePessoas list) {\n initComponents();\n cli = new ArrayList<>();\n \n for(Cliente c: list.getClientes()){\n cli.add(c);\n }\n \n DefaultTableModel dtm = (DefaultTableModel) jclient.getModel();\n for(Cliente c: cli){ \n Object[] dados = {c.getNome(),c.getCpf(),c.getEndereco(),c.getTelefone()};\n dtm.addRow(dados);\n }\n }",
"@Override\n\tpublic void asignarClienteAcobrador() {\n\t\tSet<ClienteProxy> lista=grid.getMultiSelectionModel().getSelectedSet();\t\t\n\t\tif(!lista.isEmpty()){\n\t\t\tFACTORY.initialize(EVENTBUS);\n\t\t\tContextGestionCobranza context = FACTORY.contextGestionCobranza();\t\t\t\n\t\t\tRequest<Boolean> request=context.asignarClientesAlCobrador(lista, beanGestorCobranza.getIdUsuarioOwner(), beanGestorCobranza.getIdUsuarioCobrador() , beanGestorCobranza.getIdGestorCobranza());\n\t\t\trequest.fire(new Receiver<Boolean>(){\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean response) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tgoToBack();\n\t\t\t\t}});\n\t\t}else{\n\t\t\tNotification not=new Notification(Notification.ALERT,constants.seleccioneCliente());\n\t\t\tnot.showPopup();\n\t\t}\n\t}",
"static void removeClient(String username) {\n\t\tif (ConnectedClients.containsKey(username)) {\n\t\t\tConnectedClients.remove(username);\n\t\t\tActiveClients.remove(username);\n\t\t\tSystem.out.println(\"Active clients after removal\"+ActiveClients);\n\t\t\tDML0=new DefaultListModel();\n\t\t\tCurrentClients.setModel(DML0);\n\t\t\tDML0.addAll(ActiveClients);\n\t\t\tCurrentClients.setModel(DML0);\n\t\t}\n\t}",
"public static void initializeClientList() {\r\n\t\tClient newClient1 = new Client(1, \"Bob Jones\", \"Brokerage\");\r\n\t\tclientList.add(newClient1);\r\n\t\t\r\n\t\tClient newClient2 = new Client(2, \"Sarah Davis\", \"Retirement\");\r\n\t\tclientList.add(newClient2);\r\n\t\t\r\n\t\tClient newClient3 = new Client(3, \"Amy Friendly\", \"Brokerage\");\r\n\t\tclientList.add(newClient3);\r\n\t\t\r\n\t\tClient newClient4 = new Client(4, \"Johnny Smith\", \"Brokerage\");\r\n\t\tclientList.add(newClient4);\r\n\t\t\r\n\t\tClient newClient5 = new Client(5, \"Carol Spears\", \"Retirement\");\r\n\t\tclientList.add(newClient5);\r\n\t}",
"@FXML\n private void handleNewClient() {\n \n boolean okClicked = mainApp.showNewClient();\n if (okClicked) {\n //refresh the list / select all in DB\n informationsClients.setItems(clientManager.getClientData());\n }\n }",
"@Override\n\tpublic String listarClientes() throws MalformedURLException, RemoteException, NotBoundException {\n\t\tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tString lista = datos.listaClientes();\n \treturn lista;\n \t\n\t}",
"@Override\r\n\tpublic List<Client> selectclient() {\n\t\tList<Client> list=this.getSqlSessionTemplate().selectList(changToNameSpace(\"selectclient\"));\r\n\t\treturn list;\r\n\t}",
"public ListaCliente() {\n initComponents();\n carregarTabela();\n }",
"public ClientGUI() {\n this.clienten = new ArrayList<>();\n initComponents();\n\n clientsTable.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n @Override\n public void valueChanged(ListSelectionEvent event) {\n if (clientsTable.getSelectedRow() != -1) {\n String BSN = clientsTable.getValueAt(clientsTable.getSelectedRow(), 2).toString();\n\n try {\n List<Client> result = clientManager.searchClient(BSN);\n\n if (result.isEmpty()) {\n return;\n }\n Client client = result.get(0);\n\n clientFirstNameTextField.setText(client.getFirstName());\n clientLastNameTextField.setText(client.getName());\n clientBSNTextField.setText(client.getBSN());\n clientAddressTextField.setText(client.getAddress());\n clientPostCodeTextField.setText(client.getPostcode());\n clientCityTextField.setText(client.getCity());\n clientTelTextField.setText(client.getTel());\n clientEmailTextField.setText(client.getEmail());\n clientIBANTextField.setText(client.getIBAN());\n int index;\n if (client.isIncasso()) {\n index = 0;\n } else {\n index = 1;\n }\n\n clientIncassoCombobox.setSelectedIndex(index);\n selectedClient = client;\n clientPanel.setVisible(true);\n jScrollPane2.setVisible(true);\n getInvoiceButton.setVisible(true);\n clientPolisLabel.setVisible(true);\n addInsuranceContractButton.setVisible(true);\n polisCheckBox.setVisible(true);\n\n if (clientManager.hasInsuranceContract(client)) {\n setCheckBox(true);\n } else {\n setCheckBox(false);\n }\n\n DefaultTableModel tableModel = (DefaultTableModel) treatmentsTable.getModel();\n try {\n invoices = clientManager.getInvoices(selectedClient);\n } catch (RemoteException e) {\n invoices = new ArrayList<>();\n }\n\n for (int i = tableModel.getRowCount() - 1; i >= 0; i--) {\n tableModel.removeRow(i);\n }\n\n for (int i = 0; i < invoices.size(); i++) {\n Invoice invoice = invoices.get(i);\n tableModel.addRow(new Object[]{invoice.getTreatmentCode(), DateFormatter.dateToString(invoice.getDate()), invoice.isPaid()});\n }\n\n } catch (RemoteException e) {\n JOptionPane.showMessageDialog(null, \"Geen verbinding met de server\", \"Server error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n\n }\n\n });\n\n this.setExtendedState(this.getExtendedState() | JFrame.MAXIMIZED_BOTH);\n\n this.clientManager = new ClientManager();\n this.invoiceManager = new InsuranceContractManager();\n }",
"@FXML\n\tpublic void handleDevientClient(){\n\t\tselProspect = prospectTable.getSelectionModel().getSelectedItem();\n\t\tif (selProspect != null) {\n\t\t\tdevientClient = 1;\n\t\t\tClientOverviewController.presser = true;\n\t\t\tMenuPrincipaleController.a = 1;\n\t\t\t\n\t\t\tClient tempClient = new Client();\n\t\t\tboolean okClicked = mainApp.showClientFormulaire(tempClient);\n\t\t\t\n\t if (okClicked) {\n\t \tProspectOverviewController.devientClient = 0;\n\t mainApp.getProspectData().remove(selProspect);\n\t File file2 = mainApp.getProspectFilePath();\n\t if (file2 != null) {\n\t mainApp.saveProspectDataToFile(file2);}\n\t mainApp.showMenuClient();\n\t mainApp.getClientData().add(tempClient);\n\t Client.clientCompteur ++;\n\t \n\t }\n\t\t} else {\n\t\t\t// Si aucune ligne sélectionné, message d'erreur.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"Pas de sélection\");\n alert.setHeaderText(\"Aucun prospect sélectionner\");\n alert.setContentText(\"Veuillez sélectionner un prospect.\");\n alert.showAndWait();\n }\n\t}",
"public void chargeListe(){\n jCbListeEtablissement.removeAllItems();\n String sReq = \"From Etablissement\";\n Query q = jfPrincipal.getSession().createQuery(sReq);\n Iterator eta = q.iterate();\n while(eta.hasNext())\n {\n Etablissement unEtablissement = (Etablissement) eta.next();\n jCbListeEtablissement.addItem(unEtablissement.getEtaNom());\n }\n bChargeListe = true;\n }",
"public void addClient() throws IOException {\n BufferedReader in;\n Socket clientSocket; //pour chaque nouveau client\n System.out.println(\"New Client connected.\");\n clientSocket = serverSocket.accept();\n out = new PrintWriter(clientSocket.getOutputStream());\n in = new BufferedReader(new InputStreamReader(clientSocket.getInputStream()));\n tabClientsout.addElement(out);\n Runnable r = new recevoir(out, in);\n // genere le Thread pour le nouveau client\n new Thread(r).start();\n }",
"@Override\n\tpublic ArrayList<ClienteBean> listarClientes() throws Exception {\n\t\treturn null;\n\t}",
"public ArrayList<Cliente> listarClientes(){\n ArrayList<Cliente> ls = new ArrayList<Cliente>();\n try{\n\t\tString seleccion = \"SELECT codigo, nit, email, pais, fecharegistro, razonsocial, idioma, categoria FROM clientes\";\n\t\tPreparedStatement ps = con.prepareStatement(seleccion);\n //para marca un punto de referencia en la transacción para hacer un ROLLBACK parcial.\n\t\tResultSet rs = ps.executeQuery();\n\t\tcon.commit();\n\t\twhile(rs.next()){\n Cliente cl = new Cliente();\n cl.setCodigo(rs.getInt(\"codigo\"));\n cl.setNit(rs.getString(\"nit\"));\n cl.setRazonSocial(rs.getString(\"razonsocial\"));\n cl.setCategoria(rs.getString(\"categoria\"));\n cl.setEmail(rs.getString(\"email\"));\n Calendar cal = new GregorianCalendar();\n cal.setTime(rs.getDate(\"fecharegistro\")); \n cl.setFechaRegistro(cal.getTime());\n cl.setIdioma(rs.getString(\"idioma\"));\n cl.setPais(rs.getString(\"pais\"));\n\t\t\tls.add(cl);\n\t\t}\n }catch(Exception e){\n System.out.println(e.getMessage());\n e.printStackTrace();\n } \n return ls;\n\t}",
"public ArrayList<Client> getClients(String nameClient){\n ArrayList<Client> listClients = new ArrayList<Client>();\n \n \n this.serversList.forEach((server) -> {\n server.getClients().stream().filter((client) -> (client.getName().toLowerCase().contains(nameClient.toLowerCase()))).forEachOrdered((client) -> {\n client.setNameServer(server.getNameServer());\n listClients.add(client);\n });\n });\n \n return listClients;\n }",
"public List<Cliente> consultarClientes();",
"public synchronized void echauffement(Client client) {\n\t\twhile(!pisteLibre && client.getGroupe() != this.prochainGroupeQuiJoue) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(this.pisteLibre) {\n\t\t\tthis.prochainGroupeQuiJoue = client.getGroupe();\n\t\t\tthis.pistesOccupee();\n\t\t}\n\t\tnotifyAll();\n\t}",
"@Override\r\n\tpublic void addclient(Client client) {\n\t\t\r\n\t}",
"public ArrayList<DataCliente> listarClientes();",
"public List BestClient();",
"public void cambiar(Cliente c) {\n\t\tfor (int i=0; i<noCliente; i++) {\n\t\t\tif (clientes[i].id == c.id) {\n\t\t\t\t//Cambiamos el elemento de la lista\n\t\t\t\tclientes[i] = c;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public String ajouterClient(){\n\t\tClient cAjout=cliService.ajouterClient(client);\r\n\t\t\r\n\t\tif(cAjout.getIdClient()!=0){\r\n\t\r\n\t\r\n\t\t\t\r\n\t\t\treturn \"accueilClient\";\r\n\t\t\t\r\n\t\t}else {\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\t\tnew FacesMessage(\"L'ajout a échoué\"));\r\n\t\t\treturn \"creationClient\";\r\n\t\t}\r\n\t}",
"public void reloadTableCliente() {\n\n this.removeAllData();// borramos toda la data \n for (int i = 0; i < (lista.size()); i++) { // este for va de la primera casilla hast ael largo del arreglo \n Cliente object = lista.get(i);\n this.AddtoTableCliente(object);\n }\n\n }",
"private void addClients() {\n while (true) {\n Client client = readClient();\n if (client == null || client.getId() < 0) {\n break;\n }\n try {\n ctrl.addClient(client);\n } catch (ValidatorException e) {\n e.printStackTrace();\n }\n }\n }",
"protected void listClients() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tsynchronized (processors) {\r\n\t\t\t\tint procCount = processors.count();\r\n\t\t\t\tif (procCount > 0) {\r\n\t\t\t\t\tSimulatorPDUProcessor proc;\r\n\t\t\t\t\tfor (int i = 0; i < procCount; i++) {\r\n\t\t\t\t\t\tproc = (SimulatorPDUProcessor) processors.get(i);\r\n\t\t\t\t\t\tSystem.out.print(proc.getSystemId());\r\n\t\t\t\t\t\tif (!proc.isActive()) {\r\n\t\t\t\t\t\t\tSystem.out.println(\" (inactive)\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No client connected.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"public List<Client> getAllClient();",
"public Client(String nom, String prenom, String adresse,CalculerTarif calculerTarif) {\n // Initialisation des données du client.\n this.nom = nom;\n this.prenom = prenom;\n this.adresse = adresse;\n this.calculerTarif = calculerTarif;\n this.listeVehicule = new ArrayList<Vehicule>();\n \n // On ajoute le client à la liste des clients du parking, car le client est forcément un client du parking.\n Parking.getInstance().addClient(this);\n }",
"public void printClientList(){\n for(String client : clientList){\n System.out.println(client);\n }\n System.out.println();\n }",
"private void fillClientsCbAndDispatcherCb() {\n List<Cliente> findClienteEntities = getUtils().getClienteController().findClienteEntities();\n ObservableList clientsList = FXCollections.observableArrayList();\n ObservableList dispatcherLst = FXCollections.observableArrayList();\n for (Cliente c : findClienteEntities) {\n if (c.getDespachante().equals(\"D\")) {\n dispatcherLst.add(c.getNombre());\n } else {\n clientsList.add(c.getNombre());\n }\n }\n getClientCb().setItems(clientsList);\n getDispatcherCb().setItems(dispatcherLst);\n }",
"private void editareClient() {\n\t\tDefaultTableModel model = Serializable.generator(\"person\", \"tmp/\");\n\t\tArrayList<String> items = new ArrayList<String>();\n\t\tint rowCount = model.getRowCount();\n\t\tSystem.out.println(\"Ajung pe aici si val. este \" + rowCount +\"\\n\");\n\t\tfor(int i=0;i<rowCount;i++) {\n\t\t\tmodel.getValueAt(i, 2);\n\t\t\titems.add(model.getValueAt(i, 1) + \". Nume client: \" + model.getValueAt(i, 2));\n\t\t}\n\t\t// Urmatoarele 3 linii de cod creeaza un array de string-uri\n\t\tString[] itemsArr = new String[items.size()];\n\t\titemsArr = items.toArray(itemsArr);\n JComboBox<String> combo = new JComboBox<String>(itemsArr);\n \n JTextField field1 = new JTextField(\"\");\n JTextField field2 = new JTextField(\"\");\n JTextField field3 = new JTextField(\"\");\n\n JPanel panel = new JPanel(new GridLayout(0, 1));\n panel.setPreferredSize(new Dimension(400, 200));\n panel.add(new JLabel(\"Alege client\"));\n panel.add(combo);\n panel.add(new JLabel(\"Nume:\"));\n panel.add(field1);\n panel.add(new JLabel(\"Email:\"));\n panel.add(field2);\n panel.add(new JLabel(\"Telefon:\"));\n panel.add(field3);\n int result = JOptionPane.showConfirmDialog(null, panel, \"Editeaza un client\",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n if (result == JOptionPane.OK_OPTION) {\n \tArrayList<String> data = new ArrayList<String>();\n \tString buffer = combo.getSelectedItem().toString();\n \tString temp[] = buffer.split(\"\\\\.\");\n \tif(!temp[0].isEmpty()) {\n \t\tdata.add(field1.getText());\n \tdata.add(field2.getText());\n \tdata.add(field3.getText());\n \tint id = Integer.parseInt(temp[0]);\n \t/* Serializarea reprezinta doar crearea unui nou obiect si salvarea acestuia\n \t * cu numele actualului fisier. In felul acesta se suprascriu si gata.*/\n \tPerson nouClient = new Person(data, id);\n System.out.println(\"Clientul a fost editat. \\n\");\n \t}\n } else {\n System.out.println(\"Cancelled\");\n }\n\t}",
"private JComboBox<Cliente> crearComboClientes() {\n\n JComboBox<Cliente> combo = new JComboBox<>(new Vector<>(almacen.getClientes()));\n combo.setMaximumSize(new Dimension(500, 40));\n\n combo.setRenderer(new DefaultListCellRenderer() {\n @Override\n public Component getListCellRendererComponent(JList<? extends Object> list, Object value, int index, boolean isSelected, boolean cellHasFocus) {\n\n Component resultado = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);\n\n Cliente cliente = (Cliente) value;\n this.setText(cliente != null ? cliente.getNombre() : \"No existen clientes\");\n\n return resultado;\n }\n });\n\n return combo;\n }",
"Set<Client> getAllClients();",
"public void selecionarCliente() {\n int cod = tabCliente.getSelectionModel().getSelectedItem().getCodigo();\n cli = cli.buscar(cod);\n\n cxCPF.setText(cli.getCpf());\n cxNome.setText(cli.getNome());\n cxRua.setText(cli.getRua());\n cxNumero.setText(Integer.toString(cli.getNumero()));\n cxBairro.setText(cli.getBairro());\n cxComplemento.setText(cli.getComplemento());\n cxTelefone1.setText(cli.getTelefone1());\n cxTelefone2.setText(cli.getTelefone2());\n cxEmail.setText(cli.getEmail());\n btnSalvar.setText(\"Novo\");\n bloquear(false);\n }",
"public void afficherReclamationAdmin(ObservableList<Reclamation> oblist1){\n try {\n PreparedStatement pt1 = c.prepareStatement(\"SELECT id_r, message, etat, date_rec, reponse, prenom, nom FROM reclamation, user where idch=id_u and etat != 'Archivée'\");\n ResultSet rs = pt1.executeQuery();\n while (rs.next()) {\n String fetch = rs.getString(\"prenom\")+\" \"+rs.getString(\"nom\");\n System.out.println(rs.getString(\"reponse\"));\n oblist1.add(new Reclamation(rs.getInt(\"id_r\"), rs.getString(\"message\"), rs.getString(\"etat\"), rs.getString(\"date_rec\"), rs.getString(\"reponse\"), fetch));\n }\n } catch (SQLException ex) {\n Logger.getLogger(ReclamationCRUD.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public ArrayList<Cliente> getClientes() {\r\n return clientes;\r\n }",
"@Override\n\tpublic void onClientConnection(ClientThread client) {\n\t\t//tcp.client.sendMessage(\"vous êtes connecté en tant que \" + tcp.client.getClientName());\n\t\ttry{\n\t\t\tlockHistory.readLock().lock();\n\t\t\tfor(String oldMessage : history){\n\t\t\t\tclient.sendMessage(oldMessage);\n\t\t\t}\n\t\t} finally {\n\t\t\tlockHistory.readLock().unlock();\n\t\t}\n\n\t\ttry {\n\t\t\tlockClients.writeLock().lock();\n\t\t\tthis.clients.add(client);\n\n\t\t} finally {\n\t\t\tlockClients.writeLock().unlock();\n\t\t}\n\n\t\ttry{\n\t\t\tlockClients.readLock().lock();\n\t\t\tLocalDateTime now = LocalDateTime.now();\n\t\t\tString toSend = \"[\"+dtf.format(now)+\"] \"+client.getClientName()+\" has joined the chat\";\n\t\t\tfor (ClientThread c : clients) {\n\t\t\t\tc.sendMessage(toSend);\n\t\t\t}\n\t\t\taddToHistory(toSend);\n\t\t} finally {\n\t\t\tlockClients.readLock().unlock();\n\t\t}\n\t}",
"private static ArrayList<Compra> listComprasDoCliente(int idCliente) throws Exception {//Inicio mostraCompras\r\n ArrayList<Compra> lista = arqCompra.toList();\r\n lista.removeIf(c -> c.idCliente != idCliente);\r\n return lista;\r\n }",
"public AskGodsFromListGUIClientState(Client client) {\n super(client);\n playersCount = client.getGame().getPlayersCount();\n }",
"@Override\n\tpublic List<String> listarFicherosCliente(int idSesionCliente) throws RemoteException, MalformedURLException, NotBoundException {\t\t\n \tdatos = (ServicioDatosInterface) Naming.lookup(\"rmi://\"+ direccion + \":\" + puerto + \"/almacen\");\n \tInterfaz.imprime(\"La lista de ficheros de la sesion: \" + idSesionCliente + \" ha sido enviada\");\n return datos.listarFicherosCliente(idSesionCliente);\n \n\t}",
"void realizarSolicitud(Cliente cliente);",
"public List<Cliente> mostrarClientes()\n\t{\n\t\tCliente p;\n\t\tif (! clientes.isEmpty())\n\t\t{\n\t\t\t\n\t\t\tSet<String> ll = clientes.keySet();\n\t\t\tList<String> li = new ArrayList<String>(ll);\n\t\t\tCollections.sort(li);\n\t\t\tListIterator<String> it = li.listIterator();\n\t\t\tList<Cliente> cc = new ArrayList<Cliente>();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tp = clientes.get(it.next());\n\t\t\t\tcc.add(p);\n\t\t\t\t\n\t\t\t}\n\t\t\t//Collections.sort(cc, new CompararCedulasClientes());\n\t\t\treturn cc;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic void goToUiSelectClient(String modo) {\n\t\tif (modo.equalsIgnoreCase(constants.modoNuevo())) {\n\t\t\tuiHomeCobrador.getHeader().getLblTitulo().setText(constants.clientes());\n\t\t\tuiHomeCobrador.getHeader().setVisibleBtnMenu(false);\n\t\t\tuiHomeCobrador.getContainer().showWidget(3);\t\t\t\n\t\t\tuiHomeCobrador.getUiClienteSelected().cargarClienteSinCobrador();\n\t\t\tuiHomeCobrador.getUiClienteSelected().setBeanGestorCobranza(beanGestorCobranza);\n\t\t\tuiHomeCobrador.getUiClienteSelected().grid.getMultiSelectionModel().clear();\n\t\t}\n\t}",
"private void select(ActionEvent e){\r\n // Mark this client as an existing client since they are in the list\r\n existingClient = true;\r\n // To bring data to Management Screen we will modify the text fields\r\n NAME_FIELD.setText(client.getName());\r\n ADDRESS_1_FIELD.setText(client.getAddress1());\r\n ADDRESS_2_FIELD.setText(client.getAddress2());\r\n CITY_FIELD.setText(client.getCity());\r\n ZIP_FIELD.setText(client.getZip());\r\n COUNTRY_FIELD.setText(client.getCountry());\r\n PHONE_FIELD.setText(client.getPhone());\r\n // client.setAddressID();\r\n client.setClientID(Client.getClientID(client.getName(), client.getAddressID()));\r\n // Pass client information to Client Management Screen\r\n currClient = client;\r\n back(e);\r\n }",
"private void cclient() throws Exception {\n\n\t\tws.xml c = this.ls.cclient();\n\t\tfor (String[] row : c.t) {\n\t\t\tString pat1 = row[0];\n\t\t\tcomboBox.addItem(pat1);\n\t\t}\n\t}",
"public ArrayList<Client> clientList() {\n\t\tint counter = 1; // 일딴 보류\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tString query = \"select * from client\";\n\t\tArrayList<Client> client = new ArrayList<Client>();\n\t\tClient object = null;\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tobject = new Client();\n\t\t\t\tString cId = rs.getString(\"cId\");\n\t\t\t\tString cPhone = rs.getString(\"cPhone\");\n\t\t\t\tString cName = rs.getString(\"cName\");\n\t\t\t\tint point = rs.getInt(\"cPoint\");\n\t\t\t\tint totalPoint = rs.getInt(\"totalPoint\");\n\n\t\t\t\tobject.setcId(cId);\n\t\t\t\tobject.setcPhone(cPhone);\n\t\t\t\tobject.setcName(cName);\n\t\t\t\tobject.setcPoint(point);\n\t\t\t\tobject.setTotalPoint(totalPoint);\n\n\t\t\t\tclient.add(object);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfinally {\n\t\t\ttry {\n\t\t\t\tif (conn != null) {\n\t\t\t\t\tconn.close();\n\t\t\t\t}\n\t\t\t\tif (pstmt != null) {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t}\n\t\t\t\tif (rs != null) {\n\t\t\t\t\trs.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn client;\n\t}",
"@Override\r\n\tpublic void aggiornaUI() {\r\n\t\tString valore = input_ricerca_cliente.getText();\r\n\t\tthis.clienti.setAll(AppFacadeController.getInstance().getGestisciClientiController().cercaCliente(valore));\r\n\t}",
"List<User> getAllClients();",
"private void showMenuListClient(){\n File fClient = new File(\"Meilleurs_Client.csv\");\n if(!fClient.exists()){\n jMenuItem_ShowClient.setEnabled(false);\n }\n }",
"public void add(){\n list.add(smart);\n list.add(mega);\n list.add(smartMini);\n list.add(absolute);\n\n clientsList.add(client1);\n clientsList.add(client2);\n clientsList.add(client3);\n clientsList.add(client4);\n clientsList.add(client5);\n }",
"@Override\r\n public List<Cliente> listarClientes() throws Exception {\r\n Query consulta = entity.createNamedQuery(Cliente.CONSULTA_TODOS_CLIENTES);\r\n List<Cliente> listaClientes = consulta.getResultList();//retorna una lista\r\n return listaClientes;\r\n }",
"public void addClient(ServerClient client) {\n rrwl_serverclientlist.writeLock().lock();\n try {\n clientList.add(client);\n } finally {\n rrwl_serverclientlist.writeLock().unlock();\n }\n }",
"public List<PedidoIndividual> obtenerCuentaCliente(Long idCliente,String claveMesa) throws QRocksException;",
"public void addClient(ClientBean client){\r\n\t\tlog.info(\"Endpoint call: operation.addClient\" );\r\n\t\t// 3 Creiamo un'istanza di ClientDao e su questa chiamiamo il servizio creato al passo 2\r\n\t}",
"@Override\r\n\tpublic void updateclient(Client client) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic List<Client> consulterClients(String mc) {\n\t\treturn dao.consulterClients(mc);\r\n\t}",
"@Override\n\tpublic void sendMessageSeul(Client cm, String Nomclient, String msg) throws RemoteException {\n\t\tif(!users.contains(cm)) {\n\t\t\tusers.add(cm); \n\t\t\t} \t\t\t\n\t\t//envoyes les message vers un utilisateur\n\t\ttry {\n\t\t\tfor (Client c : users) {\n\t\t\n\t\t\t // 回调远程客户端方法\n\t\t\t String user=cm.getName(); \n\t\t if(user==null || user==\"\") {\n\t\t \t user = \"anonymous\";\n\t\t }\t \n\t\t if (c.getName().equals(Nomclient)) {\n\t\t \t c.afficherMessage(user + \" : \" + msg);\n\t\t }\t\t \n\t\t //c.showDialog(msg); he colll\n\t\t\t}\n\t\t} catch (RemoteException ex) {\n\t\t\tusers.remove(cm);\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"public synchronized void sendUserList()\n {\n String userString = \"USERLIST#\" + getUsersToString();\n for (ClientHandler ch : clientList)\n {\n ch.sendUserList(userString);\n }\n }",
"public void novo() {\n cliente = new Cliente();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tserveurConnect.add(client.getNomClient() + \" / \" + client.getClientSocket().getRemoteSocketAddress()\n\t\t\t\t\t\t+ \" déconnecté\");\n\n\t\t\t\tCompte c = new Compte(client.getNomClient(), client.getPassClient());\n\t\t\t\tComptes.remove(c);\n\n\t\t\t\tclients.remove(clientThreads.indexOf(client));\n\t\t\t\tSystem.out.println(\"erreur\" + clientThreads.indexOf(client));\n\t\t\t\tclientThreads.remove(clientThreads.indexOf(client));\n\t\t\t}",
"public List<T> showAllClients();",
"@Override\n public void onResponse(JSONArray response) {\n lista = ModeloClientes.sacarListaClientes(response);\n adapter= new AdapterClientes(getContext(),lista);\n listView.setAdapter(adapter);\n contenedorClientesI.setRefreshing(false);\n }",
"public void update(DroitsMembre client) {\n\n\t}",
"public void cadastrar(Cliente cliente){\n\t\tSystem.out.println(cliente.toString());\r\n\t\tint tamanho = this.clientes.length;\r\n\t\tthis.clientes = Arrays.copyOf(this.clientes, this.clientes.length + 1);\r\n\t\tthis.clientes[tamanho - 1] = cliente;\r\n\t}",
"public void RemovePlayerFromList(ClientThread client){\n this.client_List.remove(client);\n if (this.GetPlayerCount() <= 0){\n \tserv.DeleteLobby(this.name);\n }\n }",
"@Override\n public String toString() {\n return \"Client{\" +\n \"nom='\" + nom + '\\'' +\n \", prenom='\" + prenom + '\\'' +\n \", adresse='\" + adresse + '\\'' +\n \", methode tarif=\" + calculerTarif.toString() +\n \", pointsDeFidelite=\" + pointsDeFidelite +\n \", listeVehicule=\" + listeVehicule +\n + '}';\n }",
"@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}",
"private void jBtn_SupprimerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtn_SupprimerActionPerformed\n // Si onglet Client\n if(numOnglet() == 0){\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Clients.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Client \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeClient.get(rowIndex).Suppression();\n try {\n tableClient();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n // Onglet Prospect\n else{\n // On stock l index quand une ligne de la table est selectionnnee\n int rowIndex = jTable_Prospects.getSelectedRow();\n // Si pas de ligne selectionnee\n if(rowIndex == -1){\n showMessageDialog(null, \"Veuillez sélectionner la ligne du Prospect \"\n + \"à supprimer\");\n }\n else{\n // On appelle la methode d instance associee au Client selectionne\n laListeProspeect.get(rowIndex).Suppression();\n try {\n tableProspect();\n } catch (Exception ex) {\n Logger.getLogger(JFrame_Accueil.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n hideButton();\n }"
]
| [
"0.78748906",
"0.7313043",
"0.7302204",
"0.7153981",
"0.69477427",
"0.68830776",
"0.6834504",
"0.67750543",
"0.6712481",
"0.6695018",
"0.6690775",
"0.6680899",
"0.66785675",
"0.66772455",
"0.6665369",
"0.6651634",
"0.659249",
"0.65372545",
"0.6501261",
"0.6484057",
"0.64757717",
"0.64713866",
"0.64671254",
"0.64578116",
"0.645477",
"0.6436467",
"0.64053696",
"0.6388072",
"0.6369972",
"0.6367809",
"0.63672596",
"0.63465315",
"0.63158417",
"0.6312324",
"0.6310858",
"0.6307056",
"0.62860054",
"0.627327",
"0.62615824",
"0.62543815",
"0.62481916",
"0.62409216",
"0.6239731",
"0.6237825",
"0.6230283",
"0.62280613",
"0.6226708",
"0.6226659",
"0.6221688",
"0.62209475",
"0.6220707",
"0.62052816",
"0.61884874",
"0.61862487",
"0.61776596",
"0.61522627",
"0.6150085",
"0.6136105",
"0.6134464",
"0.61320084",
"0.6128894",
"0.6120184",
"0.6111171",
"0.6096824",
"0.60886985",
"0.6086553",
"0.60784715",
"0.60780966",
"0.6072879",
"0.6072724",
"0.6066063",
"0.6052286",
"0.6050747",
"0.6047386",
"0.60403633",
"0.603645",
"0.60339695",
"0.60336876",
"0.6033235",
"0.6028413",
"0.60067683",
"0.60052466",
"0.60038555",
"0.60031235",
"0.5998215",
"0.5996787",
"0.59781635",
"0.5973175",
"0.59730923",
"0.59660053",
"0.59561783",
"0.59533507",
"0.59506327",
"0.5949837",
"0.59297514",
"0.5917995",
"0.5917301",
"0.5901963",
"0.5898091",
"0.5897954",
"0.58929956"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public int compare(NjRepayOfflineLine o1, NjRepayOfflineLine o2) {
return (int) (o1.getPlanRepayDay().getTime() - o2.getPlanRepayDay().getTime());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
]
| 0.0 | -1 |
Invoked when a sale has been paid | void newSale(double totalWithTaxes); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void completeSale() {\n\n }",
"void purchaseMade();",
"@Override\n public void newSale(double payment) {\n calculateTotalRevenue(payment);\n showTotalRevenue();\n }",
"public void bookSale(Sale sale)\n {\n //books the sale\n }",
"public void onPayClick(){\n this.user.updateCreditDec(priceToBePaid);\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(null);\n alert.setContentText(\"Payment successful! You payed \" + cost.getText());\n alert.showAndWait();\n }",
"public void updateAccountingSystem(Sale sale)\n {\n \n }",
"public double completeSale(double payment){\n \tsaleInfo.setAmountPaid(payment);\n \tnotifyObservers();\n \tdouble change = saleInfo.getChange();\n Map<ItemDTO, Integer> items = saleInfo.getItems();\n for (Map.Entry<ItemDTO, Integer> entry : items.entrySet()){\n //Doesn't handle case where cashier tries to remove more items than are in stock\n inventory.removeFromStock(entry.getKey().getItemIdentifier(), entry.getValue());\n }\n System.out.println(Printer.printReceipt(saleInfo));\n return change;\n }",
"public void makePayment() {\r\n System.out.println(\"pay\");\r\n setPayed(true);\r\n }",
"private void pay() {\r\n System.out.println(\"Customer sent payment\");\r\n }",
"public void startSale()\n\t{\n\t\tpurchase.reset();\n\t}",
"@Override\r\n\tpublic void paidBehavior() {\n\t\tSystem.out.println(\"You paid using your Vias card\");\r\n\t\t\r\n\t}",
"@Override\r\n public void notifyEndOfSale(RevenueDTO revenue) {\r\n\r\n }",
"@Override\n public void pay(Payment payment) {\n payment.setPayed(true);\n notifyWhenPaid(payment);\n }",
"@Override\r\n public void pay() {\n }",
"public void setPaid() {\n isPaid = true;\n }",
"public void act()\n {\n if(onSales == true)\n {\n calculateSale();\n }\n }",
"public void calculatePayment() {}",
"public void autoPay() {}",
"@Test\n public void testPayCompletedSale() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // pay for sale so it is in state PAID/COMPLETED\n assertEquals(0, shop.receiveCashPayment(saleId, toBePaid), 0.001);\n totalBalance += toBePaid;\n\n // try to pay for sale second time returns -1\n assertEquals(-1, shop.receiveCashPayment(saleId, toBePaid), 0.001);\n\n // verify sale remains in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did not update a second time\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }",
"public static void amountPaid(){\n NewProject.tot_paid = Double.parseDouble(getInput(\"Please enter NEW amount paid to date: \"));\r\n\r\n UpdateData.updatePayment();\r\n updateMenu();\t//Return back to previous menu.\r\n\r\n }",
"@Override\n\tpublic void msgPaymentAccepted(Lord l,double amount) {\n\t\t\n\t}",
"void pay(Payment payment) {\n\n\t}",
"@Override\n\tpublic void payRent(RentDue d) {\n\t\t\n\t}",
"public void endSale() {\r\n receipt.outputReceiptItems();\r\n System.out.println(\"\");\r\n System.out.println(\"Thanks for shopping at Java*Mart\");\r\n System.out.println(\"\");\r\n System.out.println(\"[CashRegister] endSale\");\r\n }",
"public void startNewSale() {\n sale = new Sale(cashRegister);\n }",
"public void startSale() {\n sale = new Sale();\n }",
"@Override\r\n\tpublic boolean isPaid() {\n\t\treturn false;\r\n\t}",
"@Override\n public void calculatePayment()\n {\n this.paymentAmount = annualSalary / SALARY_PERIOD;\n }",
"private void addPaymentStartEvent() {\n /*09th July 2019, Resolved Pyze library issue*/\n HashMap<String, Object> customAttributes = new HashMap<String, Object>();\n customAttributes.put(\"packageID\", String.valueOf(PackageID));\n customAttributes.put(\"userID\", String.valueOf(UserID));\n customAttributes.put(\"paymentType\", getIntent().getStringExtra(\"PaymentType\"));\n PyzeEvents.PyzeCommercePayment.postPaymentStarted(customAttributes);\n }",
"@Override\n\tvoid timerPosting(Object obj) {\n\n\t\tEventList eventList = (EventList) obj;\n\t\tif (eventList.getLastOffsetRead() >= 0) {\n\t\t\tArrayList<AbstractEvent> events = eventList.getEvents();\n\t\t\tfor (AbstractEvent event : events) {\n\t\t\t\tProductPurchased pp = (ProductPurchased) event;\n\t\t\t\tString buyerId = pp.getBuyerId();\n\t\t\t\t//What was the Buyer's previous status?\n\t\t\t\tDouble prevTotal = purchases.get(buyerId);\n\t\t\t\tString prevStatus;\n\t\t\t\tif (prevTotal == null) {\n\t\t\t\t\tprevTotal = 0.0;\n\t\t\t\t\tprevStatus = \"None\";\n\t\t\t\t} else {\n\t\t\t\t\tprevStatus = getStatus(prevTotal);\n\t\t\t\t}\n\t\t\t\tint quantity = Integer.parseInt(pp.getQuantity());\n\t\t\t\tdouble price = Double.parseDouble(pp.getPrice());\n\t\t\t\tdouble total = prevTotal + (quantity * price);\n\t\t\t\tpurchases.put(buyerId, total);\n\t\t\t\t//What is the Buyer's new status\n\t\t\t\tString status = getStatus(total);\n\t\t\t\t//If status has changed, post the new status\n\t\t\t\tif (!status.equals(prevStatus)) {\n\t\t\t\t\teventStore.tell(new Put(new BuyerStatusChanged(buyerId, status)), getSelf());\n\t\t\t\t}\n\t\t\t}\n\t\t\tnextOffset = eventList.getLastOffsetRead() + 1;\n\t\t}\n\t}",
"public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }",
"public void startSale(){\n sale = new Sale();\n for(SaleObserver obs: saleObservers)\n sale.addSaleObserver(obs);\n }",
"public void saleAct() {\t\r\n\t\t\r\n\t\tif(createWine() != null) {\r\n\t\t\t\r\n\t\t\ttext_amount =String.valueOf( cus.saleTransaction(createWine()));\r\n\t\t\twine_name.setText(name.getText());\r\n\t\t\tamount.setText(\" £ \" + text_amount + \" \" );\r\n\t\t\tbalance.setText(\" £ \" + isCredit((double)cus.getAccount() / 100.00) + \" \");\r\n\t\t\t\r\n\t\t\t//reset all textfield\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tname.setText(null);\r\n\t\t\tquantity.setText(null);\r\n\t\t\tprice.setText(null);\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tonPay();\r\n\t\t\t}",
"double getPaid();",
"@Override\r\n\tpublic void makePayment(int price) {\n\t\tSystem.out.println(\"Payment Of Rs. \"+price+\" Through COD Successfull. Thank You!\");\r\n\t}",
"void pay(Order order);",
"public String completeSale(){\n updateEISAndEAS();\n return sale.printReceipt(paymentDTO);\n }",
"public void recordPurchase(double amount)\n {\n balance = balance - amount;\n // your code here\n \n }",
"public Payment endSale(){\n Payment payment = this.sale.getAmountToPay();\n this.accounting.registerSale(payment);\n return payment;\n }",
"public double pay(double amountPayed){\n \n try{\n double change = this.sale.pay(amountPayed);\n this.accounting.updateFinance( this.sale.getAmountToPay() );\n \n this.inventory.updateInventory( this.sale.getListOfProducts() );\n \n Printer printer = new Printer();\n printer.printReceipt( this.sale.creatSaleDTO() );\n \n return change;\n }catch (Exception a){\n System.out.print(a);\n return 0;\n }\n }",
"@Override\n\tpublic void pay() {\n\t\tcreditCard.makePayment();\n\n\t}",
"@Override\npublic void investment() {\n\t\n}",
"private void payButtonClicked() {\n if (checkBoxAgreedTAC.isChecked()) {\n boolean validCard = validateCard();\n if (validCard) {\n Double payAmount = Double.parseDouble(textViewPrepaidPrice.getText().toString());\n MainActivity.bus.post(new PrepayPaymentAttemptEvent(payAmount, Long.parseLong(litersToBuy.getText().toString())));\n if (PrepayCalculatorFragment.this.payDialog != null) {\n PrepayCalculatorFragment.this.payDialog.dismiss();\n }\n }\n } else {\n Toast.makeText(getActivity(), getResources().getString(R.string.TACMustAgreedMessage), Toast.LENGTH_SHORT).show();\n }\n\n }",
"public void onBuyPressed() {\n PayPalPayment payment = new PayPalPayment(new BigDecimal(String.valueOf(totalAmount)), \"USD\", \"Total Price\",\n PayPalPayment.PAYMENT_INTENT_SALE);\n\n Intent intent = new Intent(this, PaymentActivity.class);\n\n // send the same configuration for restart resiliency\n intent.putExtra(PayPalService.EXTRA_PAYPAL_CONFIGURATION, config);\n\n intent.putExtra(PaymentActivity.EXTRA_PAYMENT, payment);\n\n startActivityForResult(intent, 0);\n }",
"public void sale(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SALE\";\n\t\tAMOUNT = params.get(\"amount\");\n\t\tAPI = \"bp10emu\";\n\t\tif (params.containsKey(\"transactionID\")) {\n\t\t\tRRNO = params.get(\"transactionID\");\n\t\t}\n\t}",
"public void accountSale(long storeID, final SaleTO sale) throws ProductOutOfStockException, NotInDatabaseException, UpdateException;",
"@Override\n public double pay() {\n double payment = super.pay() + (this.commision_rate * this.total_sales);\n this.total_sales = 0;\n return payment;\n }",
"public void setSale(int sale) {\n\t\tthis.sale = sale;\r\n\t}",
"@Override\r\n public double purchaseFee(){\r\n return fee;\r\n }",
"@Override\n\tpublic String addPayment(PaymentRequest paymentRequest) {\n\t\treturn \"Courier Booked successfully\";\n\t}",
"public void payedConfirmation(){\n\t\tassert reserved: \"a seat also needs to be reserved when bought\";\n\t\tassert customerId != -1: \"this seat needs to have a valid user id\";\n\t\tpayed = true;\n\t}",
"void paymentOrder(long orderId);",
"public void calculatePayment() {\n\t\tdouble pay = this.annualSalary / NUM_PAY_PERIODS;\n\t\tsuper.setPayment(pay);\n\t}",
"public interface MakePaymentListener {\n public void goToPayment(String mode, HashMap<String, Object> data) throws JSONException;\n }",
"boolean markPaid(long billId);",
"@Override\n\tpublic String pay(double amount) {\n\t\treturn \"Paid : $\" + amount + \" using PayPal.\" + \"Email: \" + this.emailId + \"password : \" + this.password;\n\t}",
"public void startNewPurchase() throws VerificationFailedException {\n\t}",
"public void startNewPurchase() throws VerificationFailedException {\n\t}",
"public double getPaid() {\n return paid_;\n }",
"protected void handlePurchaseFinished(AmazonPurchaseType purchase)\n {\n }",
"public void setSaleAmount(double amount) {\n saleAmount = amount;\n }",
"public void endSale(String paymentType, BigDecimal amountTendered) throws InvalidPaymentException, PurchaseLimitExceeded{\r\n\t\tpayment = PaymentFactory.fetchPaymentType(paymentType);\r\n\t\tpayment.setPaymentType(paymentType);\r\n\t\tpayment.makePayment(this, amountTendered);\r\n\t\tpublishPropertyEventAfterSale();\r\n\t\tIProductCatalogService productCatalogService = new ProductCatalogService();\r\n\t\tproductCatalogService.updateProductQuantCountByMinusOne(product);\r\n\t\tITransactionsService transactionsService = new TransactionsService();\r\n\t\ttransactionsService.save(this);\r\n\t}",
"@Override\n\tpublic void processPayment() {\n\t\t\n\t\tsetIsSuccessful();\n\t}",
"double purchasePrice();",
"double getPaidAmount();",
"public void makeAnotherPayment() {\n btnMakeAnotherPayment().click();\n }",
"public void setWasPurchased(int wasPurchased) {\n this.wasPurchased = wasPurchased;\n }",
"public double pay(double amountPaid,String currency){\n \n saleDTO = sale.createSaleDTO();\n paymentDTO = new PaymentDTO(amountPaid,currency);\n double change = Math.round((paymentDTO.getAmountPaid() - saleDTO.getTotalPrice()) * 100.0) / 100.0;\n\n cashRegister.updateAmountInRegister(amountPaid - change);\n return change;\n\n }",
"@Override\n public double calculatePay ()\n {\n double commissionPay = this.sales * this.rate / 100;\n return commissionPay;\n }",
"public void setCustomerPurchase(double purchase) { this.customerPurchase = purchase; }",
"public void makePayment()\n\t{\n\t\tif(this.inProgress())\n\t\t{\n\t\t\tthis.total += this.getPaymentDue();\n\t\t\tthis.currentTicket.setPaymentTime(this.clock.getTime());\n\t\t}\t\t\n\t}",
"@Override\n public void endPaymentBundle() {\n System.out.println(\"endPaymentBundle() was called\");\n }",
"@Override\n protected void tradeOutcome(long period, int proposerID, double[] tradeProposal, boolean tradeCompleted){\n // This method provides information about the outcome of the trade, so I will leave this open to you,\n // to do whatever you want to do with the info.\n\n // period: step of the simulation in which the trade occured\n // proposerID: id of the territory that created the trade proposal (it can be yourself)\n // tradeProposal: the actual trade proposal that was either sent or received by your lord.\n // The information in the tradeProposal array is organized in the exact same way as in your own tradeProposal\n // so you can store and use that information as you wish\n // tradeCompleted: an indicator if the transaction was completed (true) or not (false)\n }",
"@Override\n public void sell() {\n }",
"public double getPaid() {\n return paid_;\n }",
"@Override\n public void onSureClick(Double value, Double change) {\n checkPresenterImpl.addMemberPayment(value, null);\n }",
"public void addSaleObserver(SaleObserver obs){\n saleObservers.add(obs);\n }",
"@Override\r\n\tpublic void payCheck() {\n\t\t\r\n\t}",
"void PurshaseToDonate(Integer Id_Member, Integer Id_Product, Integer Quantity);",
"Order setInvoicePaidStatus(Order order, User user);",
"void recordSale(Customer customer, Movie movie, SaleDetails saleDetails) {\n System.out.println(\"Connecting to Sales server\");\n AcmeSalesServer salesServer = AcmeSalesServer.connect();\n System.out.println(\"Adding sale to server\");\n salesServer.addSale(customer, movie, saleDetails);\n System.out.println(\"Sale added\");\n }",
"@Override\n\tpublic void payCrew() {\n\t\tSystem.out.println(\"Crew paid!, You can start sailing now!\");\n\t\tgame.loading();\n\t}",
"public void setPaidStatus(int paidStatus) {\n this.paidStatus = paidStatus;\n }",
"@Override\n public void onNewPrice(double price) {\n\n }",
"public void payCharge()\r\n\t{\r\n\t\tSystem.out.print(\"This method is used for pay charge\");\t\r\n\t}",
"public void saveJpmProductSaleNew(JpmProductSaleNew jpmProductSaleNew);",
"@Override\r\n\tpublic void updatePurchase(Purchase Purchase) throws Exception {\n\t\t\r\n\t}",
"public void onAddPaymentClickListner(){\n AddPayment = (Button)findViewById(R.id.btnAdd);\n\n AddPayment.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n addPayment(StudentIDPos, ClassIDPos);\n }\n });\n\n }",
"public void performPayment() {\n payment.executePayment(amount);\n }",
"@Override\r\n\tpublic void pay(long dateTime, float charge) {\n\t\t\r\n\t}",
"@Override\n\tprotected void onCancelRequestPurchase() {\n\t\tmTxtStatus.setText(\"requestPurchase onCancel\");\n\t}",
"public CashPayment(double amountPaid, Sale sale) {\r\n\t\tamountToPay = sale.getTotalPriceIncludingVAT();\r\n\t\tthis.amountPaid = amountPaid;\r\n\t\tthis.sale = sale;\r\n\t\t\r\n\t}",
"public final void endSaleAndOutputReceipt() {\n receipt.outputReceipt();\n }",
"public static void logPurchaseCompleted(Double grandTotal, Double total, Double shipping, Double tax) {\n logPurchaseCompleted(null, grandTotal, total, shipping, tax, null, null, null, null);\n }",
"public void startPayment() {\n double ruppes = Double.parseDouble(price);\n final Activity activity = this;\n final Checkout co = new Checkout();\n try {\n JSONObject options = new JSONObject();\n options.put(\"name\", getResources().getString(R.string.application_name));\n options.put(\"description\", \"\");\n //You can omit the image option to fetch the image from dashboard\n options.put(\"image\", getResources().getDrawable(R.mipmap.ic_app_logo));\n options.put(\"currency\", \"INR\");\n options.put(\"amount\", ruppes * 100);\n JSONObject preFill = new JSONObject();\n preFill.put(\"email\", \"[email protected]\");\n preFill.put(\"contact\", \"8758689113\");\n options.put(\"prefill\", preFill);\n co.open(activity, options);\n } catch (Exception e) {\n Toast.makeText(activity, \"Error in payment: \" + e.getMessage(), Toast.LENGTH_SHORT)\n .show();\n e.printStackTrace();\n }\n }",
"@Test\n\tpublic void payedInvoiceShouldBePayed() {\n\t\tInvoice tested = new Invoice(12L, 3400);\n\t\t\n\t\t// when\n\t\ttested.pay();\n\t\t\n\t\t// then\n\t\t// ...it should not be payed\n\t\tassertThat(tested, payed());\n\t\t\n\t}",
"@Override\n\t\t\tpublic void mainBuyPro() {\n\t\t\t\tif (iap_is_ok && mHelper != null) {\n\t\t\t\t\t\n\t\t\t\t\t String payload = \"\";\n\t\t\t\t\t mHelper.launchPurchaseFlow(MainActivity.this, Paid_Id_VF, RC_REQUEST, mPurchaseFinishedListener);\n\t\t\t\t}else{\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onSureClick(Double value, Double change) {\n checkPresenterImpl.addMemberPayment(value, pwd);\n }",
"@Test\n public void testPayTransactionSuccessfully() throws Exception {\n\n // login with sufficient rights\n shop.login(admin.getUsername(), admin.getPassword());\n\n // verify receive correct change when paying for sale\n double change = 3;\n assertEquals(change, shop.receiveCashPayment(saleId, toBePaid+change), 0.001);\n totalBalance += toBePaid;\n\n // verify sale is in state PAID/COMPLETED\n assertTrue(isTransactionInAccountBook(saleId));\n\n // verify system's balance did update correctly\n assertEquals(totalBalance, shop.computeBalance(), 0.001);\n }"
]
| [
"0.7135014",
"0.70712656",
"0.68420315",
"0.67116857",
"0.6559208",
"0.65413123",
"0.645202",
"0.6434786",
"0.6421389",
"0.63806593",
"0.6380035",
"0.6323928",
"0.6291667",
"0.6289196",
"0.6288248",
"0.62731844",
"0.6208413",
"0.61759275",
"0.6151501",
"0.6150414",
"0.61404055",
"0.61213666",
"0.6097728",
"0.6040552",
"0.60256326",
"0.6020406",
"0.6011278",
"0.60086983",
"0.60013664",
"0.5995357",
"0.59669906",
"0.59540075",
"0.5926878",
"0.5923152",
"0.59159076",
"0.590763",
"0.59021515",
"0.58923733",
"0.58657265",
"0.5864794",
"0.58269083",
"0.5810984",
"0.5806825",
"0.57970774",
"0.57956165",
"0.5792079",
"0.5754881",
"0.5721326",
"0.5720837",
"0.5711991",
"0.57108104",
"0.57015324",
"0.5698403",
"0.56828856",
"0.56503266",
"0.5647006",
"0.5642682",
"0.5640467",
"0.5640467",
"0.5639463",
"0.5639283",
"0.5639006",
"0.562854",
"0.56182075",
"0.5611886",
"0.56053555",
"0.5602361",
"0.56002825",
"0.55975693",
"0.55917877",
"0.5591761",
"0.55889386",
"0.55749667",
"0.5572996",
"0.55715966",
"0.5570764",
"0.5559214",
"0.5557105",
"0.55554307",
"0.55377334",
"0.55305094",
"0.55231816",
"0.5520655",
"0.55204237",
"0.55159223",
"0.5509417",
"0.5499049",
"0.54938525",
"0.5488126",
"0.548281",
"0.54824114",
"0.54755336",
"0.5462283",
"0.5456386",
"0.5454843",
"0.5451178",
"0.5449282",
"0.54452485",
"0.544025",
"0.5431786"
]
| 0.62312853 | 16 |
Information about a field or field set. | @Beta
public interface FieldInfo {
/** Returns the name of this field or field set. */
String name();
Field.Type type();
/** Returns whether this field or field set is attribute(s), i.e. does indexing: attribute. */
boolean isAttribute();
/** Returns whether this field is index(es), i.e. does indexing: index. */
boolean isIndex();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Set<FieldInfo> getFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_atts);\n }",
"public boolean hasInfo() {\n return fieldSetFlags()[6];\n }",
"java.lang.String getFields();",
"public HashMap<String, String> getFields() {\r\n \t\treturn fields;\r\n \t}",
"public InformationField getInfo() {\n\treturn informationField;\n }",
"Fields fields();",
"private String[] getDefinedFields(ObjectSet<?> pObjectSet) {\r\n\t\tString[] returnedValue = null;\r\n\t\tList<String> fieldsList = new ArrayList<String>();\r\n\t\t\r\n\t\tif (pObjectSet != null) {\r\n\t\t\tif (pObjectSet.getDataMappings().size() > 0) {\r\n\t\t\t\tfor(DataMapping mapping : pObjectSet.getDataMappings()) {\r\n\t\t\t\t\tif (!mapping.virtual && !mapping.IsCollection) {\r\n\t\t\t\t\t\tif (mapping.DataBaseDataType != Entity.DATATYPE_ENTITY) {\r\n\t\t\t\t\t\t\tfieldsList.add(mapping.DataBaseFieldName);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (fieldsList.size() > 0) {\r\n\t\t\treturnedValue = fieldsList.toArray(new String[fieldsList.size()]);\r\n\t\t}\r\n\t\t\r\n\t\treturn returnedValue;\r\n\t}",
"public String getFields() {\n return fields;\n }",
"public InformationField getInformationField() {\n\treturn informationField;\n }",
"String getField();",
"java.lang.String getField1016();",
"public String get_fieldset() {\n\t\treturn fieldset;\n\t}",
"abstract public FieldNames getFieldNames();",
"java.lang.String getField1337();",
"public Set<FieldInfo> getKeyFieldInfos() {\n return new LinkedHashSet<FieldInfo>(_keys);\n }",
"public Map<String, Object> getFields() {\n\t\treturn fields;\n\t}",
"java.lang.String getField1336();",
"java.lang.String getField1673();",
"java.lang.String getField1573();",
"java.lang.String getField1334();",
"java.lang.String getField1335();",
"@Override\n\tpublic FieldDetail getFieldDetail() {\n\t\treturn field;\n\t}",
"java.lang.String getField1773();",
"java.lang.String getField1752();",
"public Map<String, String> getFields() {\n return fields;\n }",
"private void addFeatureFieldGetSet(FeatureImpl fi) {\n this.fi = fi;\n featureFieldName = getFeatureFieldName(fi);\n rangeJavaDescriptor = fi.getRangeAsJavaDescriptor();\n \n addFeatureField(); // add declares for fields\n addFeatureGetSet();\n TypeImpl range = (TypeImpl) fi.getRange();\n if (range.isArray()) {\n rangeArrayElementJavaDescriptor = fi.getRangeArrayElementAsJavaDescriptor();\n addArrayFeatureGetSet();\n }\n }",
"public abstract Set<ResolvedFieldDeclaration> getDeclaredFields();",
"java.lang.String getField1875();",
"java.lang.String getField1406();",
"java.lang.String getField1273();",
"java.lang.String getField1784();",
"java.lang.String getField1473();",
"java.lang.String getField1843();",
"java.lang.String getField1352();",
"java.lang.String getField1713();",
"java.lang.String getField1643();",
"java.lang.String getField1727();",
"java.lang.String getField1728();",
"java.lang.String getField1584();",
"java.lang.String getField1543();",
"java.lang.String getField1339();",
"java.lang.String getField1025();",
"java.lang.String getField1794();",
"java.lang.String getField1715();",
"java.lang.String getField1769();",
"java.lang.String getField1373();",
"java.lang.String getField1716();",
"java.lang.String getField1743();",
"java.lang.String getField1152();",
"java.lang.String getField1484();",
"java.lang.String getField1552();",
"java.lang.String getField1776();",
"java.lang.String getField1587();",
"java.lang.String getField1787();",
"java.lang.String getField1669();",
"java.lang.String getField1173();",
"java.lang.String getField1764();",
"java.lang.String getField1517();",
"java.lang.String getField1738();",
"java.lang.String getField1711();",
"java.lang.String getField1740();",
"DataCollectionInfo getInfo();",
"java.lang.String getField1746();",
"java.lang.String getField1401();",
"java.lang.String getField1774();",
"java.lang.String getField1702();",
"java.lang.String getField1217();",
"java.lang.String getField1731();",
"java.lang.String getField1687();",
"java.lang.String getField1733();",
"public Set<String> getFieldNames ()\n\t{\n\t\treturn m_Fields.keySet();\n\t}",
"java.lang.String getField1737();",
"java.lang.String getField1269();",
"java.lang.String getField1317();",
"public int numberOfFields() { return fld_count; }",
"java.lang.String getField1527();",
"java.lang.String getField1472();",
"java.lang.String getField1741();",
"java.lang.String getField1452();",
"java.lang.String getField1384();",
"java.lang.String getField1073();",
"java.lang.String getField1766();",
"java.lang.String getField1767();",
"java.lang.String getField1402();",
"java.lang.String getField1785();",
"java.lang.String getField1338();",
"java.lang.String getField1056();",
"java.lang.String getField1569();",
"java.lang.String getField1117();",
"java.lang.String getField1751();",
"java.lang.String getField1576();",
"java.lang.String getField1783();",
"java.lang.String getField1707();",
"java.lang.String getField1528();",
"java.lang.String getField1284();",
"public int getFieldCount() {\n return entityMetaData.getFields().size();\n }",
"java.lang.String getField1048();",
"java.lang.String getField1015();",
"java.lang.String getField1701();",
"java.lang.String getField1583();"
]
| [
"0.7079818",
"0.64488417",
"0.6361534",
"0.62971926",
"0.61893684",
"0.6148697",
"0.614478",
"0.60409904",
"0.60064614",
"0.59898466",
"0.59474623",
"0.5933067",
"0.59235185",
"0.59110135",
"0.5904416",
"0.5890655",
"0.5888066",
"0.5878751",
"0.5875129",
"0.58683157",
"0.5866435",
"0.5864837",
"0.58635825",
"0.58610475",
"0.58602214",
"0.5851027",
"0.58506006",
"0.5846231",
"0.58426774",
"0.5842149",
"0.5841876",
"0.5834281",
"0.5833262",
"0.5833096",
"0.5832096",
"0.58298737",
"0.5825553",
"0.58243686",
"0.58185875",
"0.5818574",
"0.58132666",
"0.5807098",
"0.5806665",
"0.58064216",
"0.5804082",
"0.580184",
"0.579741",
"0.5796861",
"0.57965946",
"0.5794963",
"0.57942116",
"0.5791114",
"0.57901835",
"0.57900965",
"0.5783338",
"0.57791656",
"0.5775366",
"0.57752144",
"0.577331",
"0.5772349",
"0.57722145",
"0.5768019",
"0.57677746",
"0.57670903",
"0.5766416",
"0.5765543",
"0.5765334",
"0.5762629",
"0.5762622",
"0.57612133",
"0.57611036",
"0.57600397",
"0.5759864",
"0.57588875",
"0.5756832",
"0.57564014",
"0.57547915",
"0.5754784",
"0.5754055",
"0.5753084",
"0.57524186",
"0.57508945",
"0.5750691",
"0.57506824",
"0.57499665",
"0.5749507",
"0.57492065",
"0.5749095",
"0.5748483",
"0.5746315",
"0.57461745",
"0.5745244",
"0.5744268",
"0.57441527",
"0.57434905",
"0.57416135",
"0.57414746",
"0.57410467",
"0.5738678",
"0.57379305"
]
| 0.69943815 | 1 |
Returns the name of this field or field set. | String name(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getName(){\n return field.getName();\n }",
"public String getFieldName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = entry.getNameAndTypeEntry().getNameEntry().getValue();\n if (name.length() == 0)\n return null;\n return name;\n }",
"@Override\n public String name() {\n return fieldName;\n }",
"public String getFieldName() {\n return TF_Field_Name;\n }",
"String getFieldName();",
"public java.lang.String getFieldName() {\n return fieldName;\n }",
"public String getFieldName();",
"public final String getName() {\n String ret = null;\n for (String s : getNameFields()) {\n if (ret == null) {\n ret = get(s);\n } else {\n ret = ret + \",\" + get(s);\n }\n }\n return ret;\n }",
"@Override\n\tpublic String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}",
"public String getFieldName()\n\t{\n\t\treturn fieldName;\n\t}",
"public String getFieldName() {\n return m_fieldName;\n }",
"public String getName() {\n return (String) mProperties.get(FIELD_NAME);\n }",
"public String getFieldName() {\n return fieldName;\n }",
"public String getFieldName() {\n return fieldName;\n }",
"public String getFieldName() {\n return fieldName;\n }",
"public String getCurrentFieldName () {\n String currentField = getCurrentElement(ElementKind.FIELD);\n if (currentField == null) return \"\";\n else return currentField;\n //return getSelectedIdentifier ();\n }",
"public String getFieldName()\n {\n return m_strFieldName;\n }",
"protected String get_object_name() {\n\t\treturn this.fieldname;\n\t}",
"public String getFieldName() {\n return fieldName;\n }",
"public String getFieldName() {\r\n return this.strFieldName;\r\n }",
"public String getFieldname(){\n\t\treturn sFeldname;\n\t}",
"public String getFieldName() {\n return this.fieldName;\n }",
"public String getNameField() {\n if (nameField == null || Constants.EMPTY_STRING.equals(nameField)) {\n final JSONArray dataFields = rawData.optJSONArray(Constants.FIELDS_FIELD);\n if (dataFields != null) {\n for (int i = 0; i < dataFields.length(); i++) {\n final JSONObject field = dataFields.optJSONObject(i);\n if (field != null) {\n boolean nameFieldPresent = field.optBoolean(Constants.NAMEFIELD_FIELD);\n if (nameFieldPresent) {\n nameField = field.optString(Constants.NAME_FIELD);\n }\n }\n }\n }\n }\n return nameField;\n }",
"public java.lang.String getFieldFormName() {\n return fieldFormName;\n }",
"public String getPropertyName(){\n return SimpleTableField.mapPropName(this.columnName);\n }",
"public String getNameForm()\n {\n return schema.getNameForm();\n }",
"public String getName() {\n\t\treturn this.toString();\n\t}",
"PropertyName getName();",
"public String getName() {\n if (clazz != null) {\n if (clazz.isArray()) {\n return arrayName(clazz);\n }\n return clazz.getName();\n }\n if (elementType != null) {\n return elementType.getName();\n }\n return name;\n }",
"public String getName() {\r\n return this.name();\r\n }",
"public java.lang.String getName();",
"public String getName(){\n\n //returns the value of the name field\n return this.name;\n }",
"public Set<String> getName() {\r\n return this.name;\r\n }",
"public static String setName()\n {\n read_if_needed_();\n \n return _set_name;\n }",
"public String get_fieldname() throws Exception {\n\t\treturn this.fieldname;\n\t}",
"public String getter() {\n\t\treturn name;\n\t}",
"public String getFieldDeclarerName() {\n int index = getFieldIndex();\n if (index == 0)\n return null;\n\n ComplexEntry entry = (ComplexEntry) getPool().getEntry(index);\n String name = getProject().getNameCache().getExternalForm(entry.\n getClassEntry().getNameEntry().getValue(), false);\n if (name.length() == 0)\n return null;\n return name;\n }",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"public String getName() { \n\t\treturn getNameElement().getValue();\n\t}",
"@Override\n\t\tfinal public String getName() {\n\t\t\treturn this.Name;\n\t\t}",
"public String getName() {\n/* */ return this.field_176894_i;\n/* */ }",
"public String getName() {\r\n\t\treturn name.get();\r\n\t}",
"@Override\n public String getName() {\n return this.name();\n }",
"public Object getName() {\n\t\treturn this.name;\n\t}",
"public Object getName() {\n\t\treturn this.name;\n\t}",
"public String getName() {\n return (String) getValue(NAME);\n }",
"public String toString()\n\t{\n\t\treturn fieldname;\n\t}",
"public String getName() {\r\n assert name != null;\r\n return name;\r\n }"
]
| [
"0.76812613",
"0.7416612",
"0.73597413",
"0.7343566",
"0.7321095",
"0.727158",
"0.7215345",
"0.71725094",
"0.71553683",
"0.7099737",
"0.7079519",
"0.70585847",
"0.7056569",
"0.7056569",
"0.7056569",
"0.703954",
"0.7036142",
"0.7004507",
"0.6989074",
"0.6942088",
"0.6930864",
"0.6919085",
"0.689924",
"0.6895266",
"0.68629736",
"0.6835989",
"0.6728476",
"0.6620669",
"0.6600686",
"0.6583905",
"0.65654707",
"0.65295553",
"0.6504781",
"0.6494882",
"0.64890623",
"0.6488131",
"0.6483996",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.64828604",
"0.6479372",
"0.6479372",
"0.6479372",
"0.6475923",
"0.6473955",
"0.64711004",
"0.6463485",
"0.6460805",
"0.6460805",
"0.644575",
"0.6421094",
"0.6417321"
]
| 0.0 | -1 |
Returns whether this field or field set is attribute(s), i.e. does indexing: attribute. | boolean isAttribute(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isAttribute() {\n\t\treturn false;\n\t}",
"@Override\n public boolean isAttribute()\n {\n return attribute;\n }",
"boolean hasAttributes();",
"boolean hasAttributes();",
"boolean isAttribute(Object object);",
"public boolean isSetAttrs() {\n return this.attrs != null;\n }",
"protected boolean hasAttribute(String name) {\n\tfor (int i = 0; i < this.attributeFields.size(); i++) {\n\t AttributeField af = \n\t\t(AttributeField) this.attributeFields.elementAt(i);\n\t if (af.getAttribute().getName().equals(name))\n\t\treturn true;\n\t}\n\treturn false;\n }",
"public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }",
"boolean hasAttribute(String name);",
"public boolean containAttribute(String name);",
"public boolean hasAttributes() {\n return attributesBuilder_ != null || attributes_ != null;\n }",
"@java.lang.Override\n public boolean hasAttributes() {\n return attributes_ != null;\n }",
"public AttributeDefinition isAttribute(Integer id){\n \treturn(attrByID.get(id));\n }",
"public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }",
"public boolean isIndexed()\n {\n //only when criterion is indexed but not required it will be considered as indexed\n return (_attrDef.isIndexed() && !_attrDef.isMandatory());\n }",
"@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean attributeExists(String aname) {\n for (String s : attributes) {\n if (aname.equals(s))\n return true;\n }\n return false;\n }",
"boolean isUniqueAttribute();",
"public boolean isTaxonomyAttribute(String name) {\n\t\tif (taxoMap != null) {\n\t\t\treturn taxoMap.containsKey(name);\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\t\tpublic boolean hasAttributes()\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean isAttributeWritesCached();",
"public AttributeDefinition isAttribute(String name){\n \tAttributeDefinition rc = null;\n\t\tDotName dn;\n\t\ttry {\n\t\t\tdn = new DotName(name + \".\" + MetaDMSAG.__AttributeDefinition.name);\n\t\t\tArrayList<DmsDefinition> defs = clashMAP.get(dn);\n\t\t\tif (defs == null)\n\t\t\t\treturn(rc);\n\t\t\tif (defs.size() == 1)\n\t\t\t\trc = (AttributeDefinition) (defs.get(0));\n\t\t\telse{\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor(DmsDefinition def : defs){\n\t\t\t\t\tsb.append(def.getDotName().getNameString() + \" \");\n\t\t\t\t}\n\t\t\t\tthrow(new IllegalStateException(\"Looking for attribute: \" + name + \" resulted in multiple definitions: \" + sb.toString() + \"\\n\\n\" + DebugInfo.getCurrentStack()));\n\t\t\t}\n\t\t} catch (DmcValueException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn(rc);\n }",
"public boolean isSpecified(int index)\n {\n return ((Attribute) attributesList.get(index)).specified;\n }",
"public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }",
"public boolean hasAA() {\n return fieldSetFlags()[17];\n }",
"public boolean isAttributeDefined(String attrName) {\n Assert.notNull(attrName, \"attrName\");\n return (attrNST.getRowCount(\"name EQ '\" + attrName.toLowerCase() + \"'\") > 0);\n }",
"private boolean isAttributeDefined(String attrName)\n {\n return getAttributes().get(attrName) != null;\n }",
"public boolean hasDynamicAttributes();",
"public boolean containsAttribute(String key) {\n return attributes.containsKey(key);\n }",
"boolean hasSetAttribute();",
"private boolean _isSingleIndexedCriterion()\n {\n QueryDescriptor qd = getQueryDescriptor();\n List<Criterion> criterionList = qd.getConjunctionCriterion().getCriterionList();\n int indexedFieldCount = 0;\n for(Criterion criterion: criterionList)\n {\n AttributeCriterion attrCtr = (AttributeCriterion)criterion;\n AttributeDescriptor attrDesc = attrCtr.getAttribute();\n if(attrDesc.isIndexed())\n {\n indexedFieldCount++;\n if(indexedFieldCount > 1)\n return false;\n }\n }\n return (indexedFieldCount == 1);\n }",
"boolean hasStoreAttribute();",
"public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }",
"public boolean getSourceAttributeType(int i){\n \treturn source.getAttr(i).isNumber();\n }",
"private boolean show(AttributeModel am) {\n\t\t// never show invisible or LOB attributes\n\t\tif (!am.isVisible() || AttributeType.LOB.equals(am.getAttributeType())) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// show multiple value attributes only if they would normally show up in a table\n\t\tif (AttributeType.DETAIL.equals(am.getAttributeType())\n\t\t || AttributeType.ELEMENT_COLLECTION.equals(am.getAttributeType())) {\n\t\t\treturn am.isVisibleInTable();\n\t\t}\n\t\treturn true;\n\t}",
"public Boolean getBooleanAttribute();",
"public boolean isDnAttributes()\n {\n return dnAttributes;\n }",
"private boolean checkAttributes(ExportPkg ep, ImportPkg ip) {\n /* Mandatory attributes */\n if (!ip.checkMandatory(ep.mandatory)) {\n return false;\n }\n /* Predefined attributes */\n if (!ip.okPackageVersion(ep.version) ||\n (ip.bundleSymbolicName != null &&\n !ip.bundleSymbolicName.equals(ep.bpkgs.bundle.symbolicName)) ||\n !ip.bundleRange.withinRange(ep.bpkgs.bundle.version)) {\n return false;\n }\n /* Other attributes */\n for (Iterator i = ip.attributes.entrySet().iterator(); i.hasNext(); ) {\n Map.Entry e = (Map.Entry)i.next();\n String a = (String)ep.attributes.get(e.getKey());\n if (a == null || !a.equals(e.getValue())) {\n return false;\n }\n }\n return true;\n }",
"public boolean isSetBrandattr() {\n return __isset_bit_vector.get(__BRANDATTR_ISSET_ID);\n }",
"public boolean isRequired()\n {\n if(_attrDef.isIndexed() && _isSingleIndexedCriterion())\n {\n return true;\n }\n \n return _attrDef.isMandatory();\n }",
"boolean isNilAttributeTypeDisplayName();",
"public Object[] getAttributes() {\n\t\treturn new Object[] {true}; //true for re-init... \n\t}",
"public boolean isSetAntEfficiency() {\n return ((this.antEfficiency != null) && (!this.antEfficiency.isEmpty()));\n }",
"@Kroll.getProperty @Kroll.method\n\tpublic boolean getSpecified() {\n\t\tif (attr.getOwnerElement() == null) {\n\t\t\treturn true;\n\t\t}\n\t\treturn attr.getSpecified();\n\t}",
"@Override\n\tpublic boolean hasValue(Attribute attribute) {\n\t\treturn false;\n\t}",
"public boolean hasAttribute(String attributeName)\n\t{\n\t\treturn attributes.containsKey(attributeName);\n\t}",
"private boolean attributeAnalyzerLR(List<Token> lineLexTokens) {\r\n\t\tToken attrTkn = lineLexTokens.get(0);\r\n\t\t// attributes declaration must have NUM_PARAM_ATTR parameters\r\n\t\tif (lineLexTokens.size() != NUM_PARAMS_ATTR) {\r\n\t\t\tlog.error(\"Attribute declaration '\" + attrTkn.value + \r\n\t\t\t\t\t\"' must contain \" + NUM_PARAMS_ATTR + \" parameters.\", \r\n\t\t\t\t\tnew ParserException());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// attributes name can only contain characters, numbers, \r\n\t\t// and underline. And cannot start with numbers.\r\n\t\tif (!attrTkn.value.matches(\"[^0-9][a-zA-Z_0-9]+\")) {\r\n\t\t\tlog.error(\"Attribute declaration '\" + attrTkn.value + \r\n\t\t\t\t\t\"' must only contain characters, numbers and underline.\"\r\n\t\t\t\t\t+ \" And must not start with numbers.\", \r\n\t\t\t\t\tnew ParserException());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tToken typeTkn = lineLexTokens.get(1);\r\n\t\tToken delimTkn = lineLexTokens.get(2);\r\n\t\tString lineLex = attrTkn.lexSymbol + typeTkn.lexSymbol + delimTkn.lexSymbol;\r\n\t\tString regex = \"\"; // regular expression\r\n\r\n\t\t// Check the syntax of this attribute declaration \r\n\t\tKeywords attrKeyword = Keywords.lookup(attrTkn.value);\r\n\t\t\r\n\t\tswitch (attrKeyword) {\r\n\t\t\tcase _ID: \r\n\t\t\t\t// regular expression of ID attribute \r\n\t\t\t\t// \"\\\\$attr\\\\$type\\\\$delim\"\r\n\t\t\t\tregex = \"\\\\\"+Symbols.AttributeSymbol + \r\n\t\t\t\t \"\\\\\"+Symbols.TypeSymbol +\r\n\t\t\t\t\t \"\\\\\"+Symbols.DelimiterSymbol;\r\n\t\t\t\t// ID attribute must be of a basic type\r\n\t\t\t\tif (!lineLex.matches(regex)) {\r\n\t\t\t\t\tlog.error(\"Attribute '\" + attrTkn.value + \"' must be \"\r\n\t\t\t\t\t\t\t+ \"of a basic type.\", new ParserException());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase _COORDINATES:\r\n\t\t\t\t// regular expression of Coordinate attribute\r\n\t\t\t\t// \"\\\\$attr\\\\$array\\\\$delim\"\r\n\t\t\t\tregex = \"\\\\\"+Symbols.AttributeSymbol + \r\n\t\t\t\t \"\\\\\"+Symbols.ArrayTypeSymbol +\r\n\t\t\t\t\t \"\\\\\"+Symbols.DelimiterSymbol;\r\n\t\t\t\t// Coordinate attribute must be an Array type\r\n\t\t\t\tif (!lineLex.matches(regex)) {\r\n\t\t\t\t\tlog.error(\"Attribute '\" + attrTkn.value + \"' must be of an '\" \r\n\t\t\t\t\t\t\t+ Keywords.ARRAY + \"' type.\", new ParserException());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t};\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\t// default format for attributes\r\n\t\t\t\t// \"\\\\$attr(\\\\$type|\\\\$array|\\\\$dtype)\\\\$delim\"\r\n\t\t\t\tregex = \"\\\\\"+Symbols.AttributeSymbol + \r\n\t\t\t\t\t \"(\\\\\"+Symbols.TypeSymbol + \"|\" + \r\n\t\t\t\t \"\\\\\"+Symbols.ArrayTypeSymbol + \"|\" + \r\n\t\t\t\t \"\\\\\"+Symbols.DateTypeSymbol +\")\" +\r\n\t\t\t\t\t \"\\\\\"+Symbols.DelimiterSymbol;\r\n\t\t\t\tif (!lineLex.matches(regex)) {\r\n\t\t\t\t\tlog.error(\"Attribute declaration '\" + attrTkn.value + \r\n\t\t\t\t\t\t\t\"' is in a wrong format.\", new ParserException());\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t} \r\n\t\t}\r\n\t\t\r\n\t\t/* Analyze attribute's type */\r\n\t\t\r\n\t\t// If this attribute is an ARRAY type, then analyze array syntax\r\n\t\tif (typeTkn.lexSymbol.equals(Symbols.ArrayTypeSymbol)) {\r\n\t\t\tif (!arrayAnalyzerLR(typeTkn.value)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// If this attribute is an DATETIME type, then analyze DateTime syntax\r\n\t\tif (typeTkn.lexSymbol.equals(Symbols.DateTypeSymbol)) {\r\n\t\t\tif (!dateTypeAnalyzerLR(typeTkn.value)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// no syntax error in this attribute declaration\r\n\t\treturn true;\r\n\t}",
"public boolean isMaybePresentAccessor() {\n checkNotUnknown();\n if (isPolymorphic())\n return (flags & PRESENT_ACCESSOR) != 0;\n else\n return getters != null || setters != null;\n }",
"public boolean isSetWidth()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(WIDTH$20) != null;\n }\n }",
"boolean isAccessed (ClassMember attr) {\r\n if (accessed_attributes == null) {\r\n accessed_attributes = new java.util.Vector ();\r\n } else if (accessed_attributes.contains (attr)) {\r\n return true;\r\n } \r\n\r\n accessed_attributes.addElement (attr);\r\n return false;\r\n }",
"public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case ATTRS:\n return isSetAttrs();\n }\n throw new IllegalStateException();\n }",
"@objid (\"6ec0a3d5-adef-46d3-a735-497ced096ab7\")\n public static SmAttribute getIsDimensionAtt() {\n return IsDimensionAtt;\n }",
"public AttrCheck getAttrchk()\n {\n return this.attrchk;\n }",
"public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mPart = firstQ.getQueryTriple()._2();\n\t attr.addAll(mPart.getMeasuringAttributes());\n\t \n\t\treturn attr;\n\t}",
"public boolean hasAlias() {\n return fieldSetFlags()[4];\n }",
"public boolean hasAktif() {\n return fieldSetFlags()[6];\n }",
"public boolean hasAttribute(final String attributeName) {\n return attributes_.containsKey(attributeName);\n }",
"public short getAttributeType() {\n return attributeType;\n }",
"public boolean isModified(AttributeDefinition attribute)\n throws UnknownAttributeException\n {\n if(builtinAttributes.containsKey(attribute.getName()))\n {\n return false;\n }\n else\n {\n throw new UnknownAttributeException(\"not a builtin attribute\");\n }\n }",
"public final HashSet<Attribute> attributeSet() {\n final HashSet<Attribute> set = new HashSet<Attribute>();\n\n for (int i = 0; i < m_body.size(); i++) {\n final Condition c = m_body.get(i);\n set.add(c.getAttr());\n }\n\n return set;\n }",
"public boolean definesTargetAttribute(int idx);",
"public boolean isMinor() {\n try {\n if (getAttributes() != null && getAttributes().size() > 0) {\n Attribute dob = getAttribute(ATTRIBUTE_DOB);\n Attribute age = getAttribute(ATTRIBUTE_AGE);\n\n // Check by DOB\n if (dob != null && !StringUtility.isEmpty(dob.getValue())) {\n if (DateUtility.getDiffYears(\n DateUtility.getDate(dob.getValue()),\n DateUtility.getCurrentDate()) < 18)\n return true;\n }\n\n // Check by age\n if (age != null && !StringUtility.isEmpty(age.getValue())) {\n if (Integer.parseInt(age.getValue()) < 18)\n return true;\n }\n }\n } catch (Exception ex) {\n }\n return false;\n }",
"public static boolean SchemaAttributeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"SchemaAttributeTest\")) return false;\n if (!nextTokenIs(b, K_SCHEMA_ATTRIBUTE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, SCHEMA_ATTRIBUTE_TEST, null);\n r = consumeTokens(b, 2, K_SCHEMA_ATTRIBUTE, L_PAR);\n p = r; // pin = 2\n r = r && report_error_(b, AttributeDeclaration(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Attrib getAttrib() {\r\n return attrib;\r\n }",
"private boolean isReference()\n {\n return countAttributes(REFERENCE_ATTRS) > 0;\n }",
"private static boolean isAttributeAvailable(Element element, String attrName) {\n \t\tModelQuery modelQuery = ModelQueryUtil.getModelQuery(element\n \t\t\t\t.getOwnerDocument());\n \t\tif (modelQuery != null) {\n \t\t\tCMElementDeclaration decl = modelQuery\n \t\t\t\t\t.getCMElementDeclaration(element);\n \t\t\tif (decl != null) {\n \t\t\t\tCMNamedNodeMap map = decl.getAttributes();\n \t\t\t\tif ((CMAttributeDeclaration) map.getNamedItem(attrName) != null) {\n \t\t\t\t\treturn true;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\treturn false;\n \t}",
"public boolean isDefined(AttributeDefinition attribute) \n throws UnknownAttributeException\n {\n if(builtinAttributes.containsKey(attribute.getName()))\n {\n if(attribute.getName().equals(\"parent\"))\n {\n return parent != null;\n }\n else\n {\n return true;\n }\n }\n else\n {\n throw new UnknownAttributeException(\"not a builtin attribute: '\"+\n attribute.getName()+\"'\");\n }\n }",
"public Enumeration getAttributes()\n {\n ensureLoaded();\n return m_tblAttribute.elements();\n }",
"public java.util.Collection getAttributes();",
"public boolean hasAnswers() {\n return fieldSetFlags()[20];\n }",
"Attributes getAttributes();",
"public boolean isSetEffdatedOnly()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(EFFDATEDONLY$20) != null;\r\n }\r\n }",
"public boolean isSetAnio() {\r\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ANIO_ISSET_ID);\r\n }",
"public boolean isUnset() {\n boolean isUnset = false;\n for (ASTNode child : this.getNode().getChildren(TokenSet.create(AsciiDocTokenTypes.ATTRIBUTE_UNSET))) {\n ASTNode treePrev = child.getTreePrev();\n if (treePrev != null && treePrev.getElementType() == AsciiDocTokenTypes.ATTRIBUTE_NAME_START) {\n isUnset = true;\n break;\n }\n ASTNode treeNext = child.getTreeNext();\n if (treeNext != null && treeNext.getElementType() == AsciiDocTokenTypes.ATTRIBUTE_NAME_END) {\n isUnset = true;\n break;\n }\n }\n return isUnset;\n }",
"@Override\n public synchronized Set<AttributeType> getAttributes() {\n return attributes = nonNullSet(attributes, AttributeType.class);\n }",
"public boolean hasKullaniciAdi() {\n return fieldSetFlags()[1];\n }",
"IAttributes getAttributes();",
"public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }",
"public static boolean AttributeTest(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"AttributeTest\")) return false;\n if (!nextTokenIs(b, K_ATTRIBUTE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, ATTRIBUTE_TEST, null);\n r = consumeTokens(b, 2, K_ATTRIBUTE, L_PAR);\n p = r; // pin = 2\n r = r && report_error_(b, AttributeTest_2(b, l + 1));\n r = p && consumeToken(b, R_PAR) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public boolean hasName() {\n return fieldSetFlags()[1];\n }",
"public boolean isSetBase()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(BASE$18) != null;\r\n }\r\n }",
"private boolean hasAttributeKey(String xryLine) {\n int attributeKeyIndex = xryLine.indexOf(KEY_VALUE_DELIMITER);\n //No key structure found.\n if (attributeKeyIndex == -1) {\n return false;\n }\n\n String normalizedDataKey = xryLine.substring(0,\n attributeKeyIndex).trim().toLowerCase();\n return normalizedDataKey.equals(ATTRIBUTE_KEY);\n }",
"public PersonAttributeType getAttributeType() {\n return attributeType;\n }",
"final DynamoDBAttributeType attributeType() {\n return this.attributeType;\n }",
"public boolean hasAttribute(final String attributeLocator, final String textPattern);",
"public Boolean getIsmap() {\n return (Boolean) attributes.get(\"ismap\");\n }",
"public String attribute() {\n return this.attribute;\n }",
"public String getAttr() {\n return attr;\n }",
"public final boolean isDeepAttributeReference ()\r\n {\r\n return _value.hasXmlTreePath();\r\n }",
"public Attribute[] getAttributes()\n {\n return _attrs;\n }",
"boolean containsAttributes(java.lang.String key);",
"protected abstract boolean populateAttributes();",
"public boolean hasIntrospectionType() {\n return fieldSetFlags()[17];\n }",
"public Attributes getAttributes() { return this.attributes; }",
"public Set<String> getAttributes() {\r\n return attributeMap.keySet();\r\n }",
"public String getAttributes() {\n\t\treturn getProperty(\"attributes\");\n\t}",
"public boolean writeAttributeFile();",
"public boolean isSetIsComparation()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ISCOMPARATION$2) != null;\n }\n }",
"public boolean isProperty();",
"public String getattribut() \n\t{\n\t\treturn attribut;\n\t}"
]
| [
"0.74385816",
"0.74135554",
"0.7163578",
"0.7163578",
"0.714304",
"0.6917586",
"0.6892651",
"0.6876824",
"0.67319506",
"0.6691353",
"0.66420823",
"0.6503704",
"0.64903355",
"0.6376298",
"0.63755226",
"0.6356126",
"0.63428766",
"0.6335149",
"0.6301553",
"0.62667626",
"0.62483895",
"0.62257916",
"0.61483043",
"0.6127527",
"0.61249185",
"0.61036694",
"0.60725373",
"0.6063601",
"0.6035129",
"0.6024382",
"0.601863",
"0.60143673",
"0.59918207",
"0.59876245",
"0.59854734",
"0.593926",
"0.58812565",
"0.58755755",
"0.5873714",
"0.5864542",
"0.58528215",
"0.57754844",
"0.5770415",
"0.5747009",
"0.57398826",
"0.5737698",
"0.5726424",
"0.57249683",
"0.5723059",
"0.5709696",
"0.56940377",
"0.5684418",
"0.5647587",
"0.56426674",
"0.5627082",
"0.5626541",
"0.56261706",
"0.56161505",
"0.5615523",
"0.56030476",
"0.5598498",
"0.55802345",
"0.5575141",
"0.55686915",
"0.55621946",
"0.5550539",
"0.5541837",
"0.5537479",
"0.55287474",
"0.5527123",
"0.5526852",
"0.5524611",
"0.5523275",
"0.5522363",
"0.55048364",
"0.55047363",
"0.55046517",
"0.55040777",
"0.548719",
"0.5484618",
"0.54737705",
"0.5470941",
"0.54703504",
"0.5465608",
"0.546341",
"0.5463105",
"0.5462417",
"0.54551595",
"0.54469043",
"0.54429066",
"0.54427505",
"0.54372233",
"0.5432657",
"0.54320765",
"0.5423395",
"0.5411877",
"0.5403793",
"0.54025644",
"0.5402011",
"0.5398574"
]
| 0.8056561 | 0 |
Returns whether this field is index(es), i.e. does indexing: index. | boolean isIndex(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isIndexed()\n {\n //only when criterion is indexed but not required it will be considered as indexed\n return (_attrDef.isIndexed() && !_attrDef.isMandatory());\n }",
"boolean isIndexed();",
"boolean isIndexed();",
"boolean getIsIndexOnKeys();",
"public boolean isIndex() { return this.isIndex; }",
"public boolean isIndex() {\n return index;\n }",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"boolean hasIndex();",
"public boolean isSetIndex_name() {\n return this.index_name != null;\n }",
"public boolean isInternalIndex() {\n return (this == itemIndex || this == withdrawnIndex || this == privateIndex);\n }",
"public boolean shouldIndex(IDocument document);",
"boolean getIsIndexOnValues();",
"@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }",
"@Override\n public boolean getIsIndexOnKeys() {\n return isIndexOnKeys_;\n }",
"public boolean isIndexedVariable() {\n return indexed;\n }",
"public boolean isSetIndexName() {\n return this.indexName != null;\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean indexAllowed() {\r\n return true;\r\n }",
"public boolean isIndexesCached() {\n return _indexesCached;\n }",
"public boolean isIndexable(String content) { return true; }",
"private boolean _isSingleIndexedCriterion()\n {\n QueryDescriptor qd = getQueryDescriptor();\n List<Criterion> criterionList = qd.getConjunctionCriterion().getCriterionList();\n int indexedFieldCount = 0;\n for(Criterion criterion: criterionList)\n {\n AttributeCriterion attrCtr = (AttributeCriterion)criterion;\n AttributeDescriptor attrDesc = attrCtr.getAttribute();\n if(attrDesc.isIndexed())\n {\n indexedFieldCount++;\n if(indexedFieldCount > 1)\n return false;\n }\n }\n return (indexedFieldCount == 1);\n }",
"public boolean isAuthorityIndex() {\n return \"metadataAuthority\".equals(displayType);\n }",
"public static boolean hasIndex(Geography<?> geog)\n\t{\n\t\treturn indices.containsKey(geog);\n\t}",
"public boolean isItemIndex() {\n return !isMetadataIndex();\n }",
"@IndexingType\n public int getIndexingType() {\n return mBundle.getInt(INDEXING_TYPE_FIELD, INDEXING_TYPE_NONE);\n }",
"public boolean hasAlternateIndexes()\n {\n return (this.getAlternateIndexCount() > 0);\n }",
"@IndexingType\n public int getIndexingType() {\n return mBundle.getInt(INDEXING_TYPE_FIELD);\n }",
"public boolean isExists() {\n return getIndexOperations().exists();\n }",
"public boolean hasIndexFile() {\r\n\t\t\treturn getIndexFile() != null;\r\n\t\t}",
"public boolean qualifyIndexName() {\n \t\treturn true;\n \t}",
"public boolean getCreateQueryIndexes() {\n\n\t\tString createQueryIndexes = getSource().getAttribute(CREATE_QUERY_INDEXES);\n\t\treturn StringUtils.hasText(createQueryIndexes) ? Boolean.parseBoolean(createQueryIndexes) : false;\n\t}",
"@Override\n public boolean getIsIndexOnValues() {\n return isIndexOnValues_;\n }",
"boolean indexExists(String name) throws ElasticException;",
"@Override\n public boolean getIsIndexOnValues() {\n return isIndexOnValues_;\n }",
"boolean isNewIndex();",
"public boolean getIndexesCached() {\n return _indexesCached;\n }",
"boolean createIndex(String indexName);",
"public boolean shouldIndexNestedProperties() {\n return mBundle.getBoolean(INDEX_NESTED_PROPERTIES_FIELD);\n }",
"public boolean isSetIndex_params() {\n return this.index_params != null;\n }",
"public boolean hasIndices() {\n return mFactoryIndices != null;\n }",
"public boolean hasIndices() {\n if (indices != null) {\n return indices.length > 0;\n }\n return false;\n }",
"public boolean isSetIndex_id() {\n return __isset_bit_vector.get(__INDEX_ID_ISSET_ID);\n }",
"public boolean isSetConstituentIndex() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CONSTITUENTINDEX_ISSET_ID);\n }",
"public boolean containsIndex(final String name) {\n boolean found = false;\n \n for (PgIndex index : indexes) {\n if (index.getName().equals(name)) {\n found = true;\n \n break;\n }\n }\n \n return found;\n }",
"@Override\n\tpublic boolean isUsableIndex(int idx) {\n\t\tif ( idx < 0 )\n\t\t\treturn false;\n\t\tif ( idx >= numDataCols )\n\t\t\treturn false;\n\t\treturn Boolean.TRUE.equals(standardized[idx]);\n\t}",
"public static void setIndexing(boolean b) {\n\t\tINDEXING_MODE=b;\n\t}",
"public boolean getIndexOK() {\n return indexOK;\n }",
"@Override\n public boolean isUsableIndex(int idx) {\n if ( idx < 0 )\n return false;\n if ( idx >= numDataCols )\n return false;\n return Boolean.TRUE.equals(standardized[idx]);\n }",
"public boolean hasArrayIndex() {\n return hasArrayIndex;\n }",
"List<IndexFieldStatus> getIndexFieldStatus();",
"public boolean hasKeyIndex() {\n return hasKeyIndex;\n }",
"public boolean isSetStartIndex()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(STARTINDEX$10) != null;\n }\n }",
"public boolean createIndex() {\n RestClient client = esrResource.getClient();\n\n try {\n Response r = client.performRequest(\"HEAD\", \"/\" + index);\n\n if (r.getStatusLine().getStatusCode() != 200) {\n client.performRequest(\"PUT\", \"/\" + index);\n\n return true;\n }\n } catch (IOException ioe) {\n getMonitor().error(\"Unable to create index\", ioe);\n }\n\n return false;\n }",
"private boolean doesIndexExist(final String index) {\n final IndexMetaData indexMetaData = client.admin().cluster()\n .state(Requests.clusterStateRequest()).actionGet().getState().getMetaData().index(index);\n return indexMetaData != null;\n }",
"public boolean getNoIndex() {\n return noIndex;\n }",
"public static boolean getIndexAllOption() {\r\n\t\treturn ProjectUIPlugin.getIndexAllOption();\r\n\t}",
"private boolean hasIndexLink()\r\n \t{\r\n \t\treturn xPathQuery(XPath.INDEX_LINK.query).size() > 0;\r\n \t}",
"public boolean isSetTokenIndex() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOKENINDEX_ISSET_ID);\n }",
"public void setIndexedVariable() {\n indexed = true;\n }",
"StorableIndexInfo getIndexInfo();",
"private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }",
"public static boolean existsIndex(String appid) {\n\t\tif (StringUtils.isBlank(appid)) {\n\t\t\treturn false;\n\t\t}\n\t\t// don't assume false, might be distructive!\n\t\tboolean exists;\n\t\ttry {\n\t\t\tString indexName = appid.trim();\n\t\t\texists = getRESTClient().indices().exists(b -> b.index(indexName)).value();\n\t\t} catch (Exception e) {\n\t\t\tlogger.warn(null, e);\n\t\t\texists = false;\n\t\t}\n\t\treturn exists;\n\t}",
"public String getIndexType()\n {\n if (this.indexType == null) {\n try {\n this.getMySQLTableStatus();\n } catch (DBException dbe) {\n // continue below\n }\n // \"this.indexType\" should be set (but possibly \"?\" if error)\n if (this.indexType == null) {\n // still null? set to \"?\"\n this._setIndexType(\"?\");\n }\n }\n return this.indexType;\n }",
"public boolean isReadable(){\n\n\t\ttry {\n\t\t\tIndexReader reader = IndexReader.open(getIndexDir(), true);\n\t\t\treader.close();\n\n\t\t} catch (IOException readingException) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"void setIndexed(boolean indexed);",
"IndexType type();",
"public boolean isSearchable() {\n return (rawData != null && !rawData.optBoolean(Constants.HIDDEN_FIELD)\n && rawData.optBoolean(Constants.SEARCHABLE_FIELD));\n }",
"private boolean isElementIndex(final long index) {\r\n\t\treturn index >= 0 && index < size;\r\n\t}",
"public boolean getIndexAttachmentsLocally() {\n\t\treturn indexAttachmentsLocally.isChecked();\n\t}",
"public boolean hasDocumentType() {\n return fieldSetFlags()[11];\n }",
"private static boolean isIndexedComposite(TypeInformation<?> inputType) {\n if (inputType instanceof DataTypeQueryable) {\n final DataType dataType = ((DataTypeQueryable) inputType).getDataType();\n final LogicalType type = dataType.getLogicalType();\n return isCompositeType(type); // every composite in Table API is indexed\n }\n // type originated from other API\n return inputType instanceof TupleTypeInfoBase;\n }",
"public String getIndexName() {\n return indexName;\n }",
"public boolean isSetStartIndex() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTINDEX_ISSET_ID);\n }",
"public boolean isSetStartIndex() {\n return EncodingUtils.testBit(__isset_bitfield, __STARTINDEX_ISSET_ID);\n }",
"public IndexesImpl indexes() {\n return this.indexes;\n }",
"@Nullable\n public abstract Index getIndex();",
"public boolean hasMonsterIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Override\n\tpublic boolean isIdSet() {\n\t\treturn ofertaOpexId!=null;\n\t}",
"boolean hasItemIndex();",
"boolean hasItemIndex();",
"boolean hasItemIndex();",
"public boolean hasMonsterIndex() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean hasMonsterIndex();",
"boolean hasMonsterIndex();",
"public boolean hasMonsterIndex() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean hasMonsterIndex() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean isIndexSelected(int idx) {\n return getElement().isIndexSelected(idx);\n }"
]
| [
"0.7834624",
"0.7767989",
"0.7767989",
"0.7531244",
"0.7460993",
"0.7262016",
"0.71136254",
"0.71136254",
"0.71136254",
"0.71136254",
"0.71136254",
"0.71136254",
"0.7074584",
"0.7010117",
"0.7007163",
"0.69493806",
"0.6918026",
"0.69141614",
"0.68922484",
"0.688796",
"0.6850855",
"0.6850016",
"0.6850016",
"0.6850016",
"0.6850016",
"0.6796301",
"0.6796081",
"0.6796081",
"0.6796081",
"0.6796081",
"0.67780375",
"0.6658541",
"0.6608139",
"0.6556167",
"0.65382653",
"0.6453602",
"0.6336949",
"0.63273686",
"0.632027",
"0.6298177",
"0.6290858",
"0.623142",
"0.6230691",
"0.62267506",
"0.61801356",
"0.6139817",
"0.6131623",
"0.61135095",
"0.60711515",
"0.6068076",
"0.6053354",
"0.60461897",
"0.6031384",
"0.6015878",
"0.60125244",
"0.5929502",
"0.59108526",
"0.58516496",
"0.5842869",
"0.5829808",
"0.5758242",
"0.5753824",
"0.5690611",
"0.5669683",
"0.56592953",
"0.56520677",
"0.56018525",
"0.55960894",
"0.55905116",
"0.5583249",
"0.553943",
"0.5503546",
"0.54875517",
"0.5481945",
"0.5461996",
"0.5437505",
"0.54319674",
"0.5430885",
"0.5420758",
"0.540947",
"0.53970194",
"0.5378493",
"0.5374858",
"0.5374157",
"0.53102946",
"0.5310268",
"0.5310268",
"0.52805775",
"0.5269241",
"0.52524704",
"0.52443856",
"0.5241447",
"0.5241447",
"0.5241447",
"0.52388865",
"0.5237418",
"0.5237418",
"0.52301633",
"0.52248096",
"0.5211483"
]
| 0.7764412 | 3 |
priority queue implemented by minheap under the hood | public static UniformCostSearchNode search(UniformCostSearchNode root){
PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();
// hash set for fast verification of closed nodes
HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();
closed.add(root);
frontier.add(root);
while(frontier.size() != 0){
UniformCostSearchNode current = frontier.remove();
if(current.isGoalState()){
System.out.println("UCS Nodes explored: " + closed.size());
return current;
}
for(UniformCostSearchNode neighbor : current.getNeighbors()){
if(!closed.contains(neighbor)) {
if (!frontier.contains(neighbor)) {
frontier.add(neighbor);
}
}
}
}
System.out.println("UCS Search failed, nodes explored: " + closed.size());
// search failed
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq);*/\r\npq.offer(\"A\");\r\npq.offer(\"C\");\r\npq.offer(\"B\");\r\npq.offer(\"Z\");\r\nfor(int i=0;i<pq.size();i++)\r\nSystem.out.println(pq.peek());\r\n\t}",
"void enqueue(int x, int p){\n for(int i=0;i<size;i++){\n if(values[i]==(-1)){\n values[i] = x;\n priorities[i] = p;\n break;\n }\n }\n }",
"public WBLeftistHeapPriorityQueueFIFO() {\n\t\theap = new WBLeftistHeap<>();\n\t}",
"public interface PriorityQueue<T> {\n\t/**\n\t * Returns true if priority queue has no elements\n\t *\n\t * @return true if the priority queue has no elements\n\t */\n\tpublic boolean isEmpty();\n\n\n\t/**\n\t * Returns the number of elements in this priority queue.\n\t *\n\t * @return the number of elements in this priority queue.\n\t */\n\tpublic int size();\n\n\n\t/**\n\t * Returns the minimum element in the priority queue\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T findMin();\n\n\n\t/**\n\t * Inserts a new element into the priority queue.\n\t * Duplicate values ARE allowed.\n\t *\n\t * @param x element to be inserted into the priority queue.\n\t */\n\tpublic void insert(T x);\n\n\n\t/**\n\t * Removes and returns the minimum element from the priority queue.\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T deleteMin();\n\n\n\t/**\n\t * Erases all elements from the priority queue.\n\t */\n\tpublic void makeEmpty();\n\n}",
"public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}",
"public static void main(String[] args) {\n\t\tPriorityQueue<Integer> pqueue = new PriorityQueue<>(Comparator.reverseOrder()); //ordered as per max heap\r\n\t\tpqueue.add(3);\r\n\t\tpqueue.add(1);\r\n\t\tpqueue.add(4);\r\n\t\tpqueue.add(2);\r\n\t\tSystem.out.println(pqueue); \r\n\r\n\t\tpqueue.poll(); //the element with the lowest priority, i.e., smallest element will be removed\r\n\t\tSystem.out.println(pqueue);\r\n\r\n\t\tSystem.out.println(pqueue.peek()); //the next element to be removed\r\n\t}",
"public static void main(String[] args) {\r\n\t\tPriorityQueue p1=new PriorityQueue();\r\n\t\t // System.out.println(\"p1.poll()=\"+p1.poll());\r\n // System.out.println(\"p1.remove()=\"+p1.remove());\r\n\t\tp1.add(12); \r\n\t\tp1.add(10);\r\n p1.add(20);\r\n // p1.add(2.3);\r\n p1.add(20);\r\n p1.add(100);\r\n p1.add(21);\r\n // p1.add(null);\r\n System.out.println(p1);\r\n System.out.println(\"p1.remove()=\"+p1.remove());\r\n System.out.println(\"p1.poll()=\"+p1.poll());\r\n System.out.println(p1);\r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(p1);\r\n\t}",
"public MinHeap(){\r\n nextAvail = 1;\r\n }",
"public interface PriorityQueue<E, P> {\n\t\n\t/** return the comparator used for ordering priorities */\n\tpublic Comparator<? super P> comparator();\n\t\n\t/** Return the number of elements in this. Runs in O(1) time. */\n\tpublic int size();\n\t\n\t/**\n\t * Remove and return the largest element of this, according to comparator()\n\t * Runs in O(log n) time.\n\t * \n\t * @throws NoSuchElementException if this is empty \n\t */\n\tpublic E poll() throws NoSuchElementException;\n\t\n\t/**\n\t * Return the largest element of this, according to comparator().\n\t * Runs in O(1) time.\n\t * \n\t * @throws NoSuchElementException if this is empty.\n\t */\n\tpublic E peek() throws NoSuchElementException;\n\t\n\t/**\n\t * Add the element e with priority p to this. Runs in O(log n + a) time,\n\t * where a is the time it takes to append an element to an ArrayList of size\n\t * n.\n\t * \n\t * @throws IllegalArgumentException if this already contains an element that\n\t * is equal to e (according to .equals())\n\t */\n\tpublic void add(E e, P p) throws IllegalArgumentException;\n\n\t/**\n\t * Change the priority associated with e to p.\n\t *\n\t * @throws NoSuchElementException if this does not contain e.\n\t */\n\tpublic void changePriority(E e, P p) throws NoSuchElementException;\n}",
"public static void main(String[] args)\n\t{\n\t\tdouble mine = (29 + 27 + 29 + /*24*/ 28 + 30 + 50 + 55 + 17 + 19 + 16 + 18 + 17 + 17 + 20 + 18 + 20 + 82 + 81 + 87 + 215);\n\t\t\n\t\tdouble pote = (30 + 30 + 30 + 30 + 30 + 60 + 30 + 30 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 100 + 100 + 100 + 250);\n\t\t\n\t\tdouble grade = (mine / pote) * 100;\n\t\tSystem.out.println(grade);\n\t\t\n\t\tPriorityQueue<String> pq = new PriorityQueue<String>();\n\t\tPriorityQueue<String> pq2 = new PriorityQueue<String>();\n\t\tPriorityQueue<Character> pq3 = new PriorityQueue<Character>();\n\t\t/*\n\t\tPriorityQueue pq4 = new PriorityQueue();\n\t\tpq4.enqueuePQ(2, \"F\");\n\t\tpq4.enqueuePQ(2, 32);\n\t\tSystem.out.println(pq4.toString());\n\t\t*/\n\t\t\n\t\t\n\t\tpq3.enqueuePQ(3, 'A');\n\t\tpq3.enqueuePQ(3, 'B');\n\t\tpq3.enqueuePQ(3, 'C');\n\t\tSystem.out.println(pq3.toString());\n\t\t\n\t\tSystem.out.println(pq3.dequeuePQ());\n\t\tSystem.out.println(pq3.peekPQ());\n\t\t\n\t\tpq2.enqueuePQ(2, \"two\");\n\t\tpq2.enqueuePQ(3, \"three\");\n\t\tpq2.enqueuePQ(1, \"one\");\n\t\t//pq2.enqueuePQ(-2, \"neg two\");\n\t\t//pq2.enqueuePQ(3, \"three 2\");\n\t\t//pq2.enqueuePQ(-2, \"neg two 2\");\n\t\t//pq2.enqueuePQ(1, \"one 2\");\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq2.dequeuePQ());\n\t\tSystem.out.println(pq2.peekPQ());\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.enqueuePQ(3, \"three\");\n\t\tSystem.out.println(pq.toString());\n\t\tpq.enqueuePQ(5, \"five\");\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.toString());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.peekPQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"PEEK EXCEPTION CAUGHT\");\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.dequeuePQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Dequeue EXCEPTION CAUGHT\");\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"DONE\");\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint [][] arr = new int[][] {\r\n\t\t\t{8,9,10,12},\r\n\t\t\t{2,5,9,12},\r\n\t\t\t{3,6,10,11},\r\n\t\t\t{1,4,7,8}\r\n\t\t};\t\t\r\n\t\t\r\n\t\tPriorityQueue<HeapNode> heap = new PriorityQueue<>();\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\theap.offer(new HeapNode(arr[i][0], i, 0));\r\n\t\t}\r\n\t\tint count=0;\r\n\t\twhile(count<16)\r\n\t\t{\r\n\t\t\tHeapNode min = heap.poll();\r\n\t\t\tSystem.out.println(min.value);\r\n\t\t\tcount++;\r\n\t\t\tint value=0;\r\n\t\t\tint nextIndex=min.index+1;\r\n\t\t\tif(nextIndex < arr[min.k].length)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tvalue=arr[min.k][nextIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvalue=Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\theap.offer(new HeapNode(value, min.k, nextIndex));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public MinPriorityQueue(int cap)\r\n {\r\n heap = (Item[]) new Comparable[cap+1]; // reservamos un espacio adicional\r\n // para el dummy en la posicion 0\r\n size = 0;\r\n }",
"public static void main(String[] arg) {\n\t\tMyPriorityQueue pq = new MyPriorityQueue();\n\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.enqueue(3, \"candy\");\t// low priority\n\t\tpq.enqueue(1, \"milk\");\t// high priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.enqueue(2, \"banana\");// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> milk come out first although it was not the first one enter the queue!\n\t\tpq.peek();\n\t\tpq.enqueue(3, \"gum\");\t// low priority\n\t\tpq.dequeue();\t\t\t// ----> cheese come out next\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// low priority\n\t\tpq.dequeue();\t\t\t// apple come out after ALL high priority items had dequeued.\n\t\tpq.dequeue();\t\t\t// ----> banana\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.peek();\n\t\tpq.enqueue(1, \"fish\");\t// high priority\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> fish\n\t\tpq.dequeue();\t\t\t// ----> apple\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.dequeue();\t\t\t// ----> candy\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// medium priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.peek();\n\t\n\t}",
"public static void main(String[] args) {\n\t\tMyPriorityQueue mpq = new MyPriorityQueue();\n\n//\t\tmpq.insert(10);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(5);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(15);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(2);\n//\n//\t\ttestQueue(mpq);\n//\t\t\n//\t\tSystem.out.println(mpq.deleteMin());\n//\n//\t\ttestQueue(mpq);\n\t\t\n\t\tfor(int i = 100; i > 0; i--) {\n\t\t\tmpq.insert(i);\n\t\t}\n\t\t\n\t\tint [] sortedArray = new int[100];\n\t\tint index = 0;\n\t\twhile(!mpq.isEmpty()) {\n\t\t\tsortedArray[index++] = mpq.deleteMin();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i <100; i++) {\n\t\t\tSystem.out.println(sortedArray[i] + \" \");\n\t\t}\n\t}",
"public MyQueue() {\n queue = new PriorityQueue<>();\n }",
"public Task poll() \n\t{\n\t\tif(this.isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Cannot remove from an empty list.\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint parent = 1;\n\t\tint child = 2;\n\t\tTask newTask = heap[1];\n\t\tTask temp = heap[size--];\n\t\t\n\t\twhile(child <= size)\n\t\t{\n\t\t\tif(child < size && heap[child].getPriority() > heap[child + 1].getPriority())\n\t\t\t{\n\t\t\t\tchild++;\n\t\t\t}\n\t\t\tif(temp.getPriority() <= heap[child].getPriority())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\theap[parent] = heap[child];\n\t\t\tparent = child;\n\t\t\tchild *= 2;\n\t\t\t\n\t\t}\n\t\t\n\t\theap[parent] = temp;\n\t\treturn newTask;\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tQueue<Item> pq = new PriorityQueue<Item>();\r\n\t\t\r\n\t\tpq.add(new Item(154,\"java\"));\r\n\t\tpq.add(new Item(45,\"c++\"));\r\n\t\tpq.add(new Item(4,\"c\"));\r\n\t\tpq.add(new Item(154,\"javascript\"));\r\n\t\tpq.add(new Item(160,\"html\"));\r\n\t\t\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t}",
"public NodeBase<V> dequeue() {\r\n \tif(!isEmpty()){\r\n \tNodeBase<V> min=queue[0];\r\n \tint j=0;\r\n for(int i=0;i<currentSize;i++){\r\n \t if(min.getPriority()>queue[i].getPriority()){\r\n \t\t min=queue[i];\r\n \t\t j=i;\r\n \t }\r\n }\r\n for(int x=j;x<currentSize-1;x++){\r\n \t queue[x]=queue[x+1];\r\n }\r\n \r\n currentSize--;\r\n \r\n return min;\r\n \t}\r\n \telse{\r\n \t\treturn null;\r\n \t}\r\n }",
"public node_data heapMinimum(){return _a[0];}",
"public HeapIntPriorityQueue() {\n elementData = new int[10];\n size = 0;\n }",
"public PriorityQueue()\n {\n // initialise instance variables\n heap = new PriorityCustomer[100];\n size = 0;\n }",
"private void minHeapify(Vertex[] queue, int index, int size) {\r\n\t\tint l = left(index);\r\n\t\tint r = right(index);\r\n\t\tint smallest;\r\n\t\tif (l < size && queue[l].dist < queue[index].dist)\r\n\t\t\tsmallest = l;\r\n\t\telse\r\n\t\t\tsmallest = index;\r\n\t\tif (r < size && queue[r].dist < queue[smallest].dist)\r\n\t\t\tsmallest = r;\r\n\t\tif (smallest != index) {\r\n\t\t\tVertex temp = queue[index];\r\n\t\t\tqueue[index] = queue[smallest];\r\n\t\t\tqueue[index].setHandle(index);\r\n\t\t\ttemp.setHandle(smallest);\r\n\t\t\tqueue[smallest] = temp;\r\n\t\t\tminHeapify(queue, smallest, size);\r\n\t\t}\r\n\t}",
"public PriorityQueue() {\n\t\theap = new ArrayList<Pair<Integer, Integer>>();\n\t\tlocation = new HashMap<Integer, Integer>();\n\t}",
"void Minheap()\n {\n for(int i= (size-2)/2;i>=0;i--)\n {\n minHeapify(i);\n }\n }",
"public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}",
"private void heapSort() {\n\n\t\tint queueSize = priorityQueue.size();\n\n\t\tfor (int j = 0; j < queueSize; j++) {\n\n\t\t\theapified[j] = binaryHeap.top(priorityQueue);\n\t\t\tbinaryHeap.outHeap(priorityQueue);\n\n\t\t}\n\n\t}",
"public interface IPriorityQueue {\n\n /**\n * Check whether the priority queue is empty\n * @return true if it is empty, otherwise false\n */\n Boolean isEmpty();\n\n /**\n * Add a priority and value into a list\n * @param priority priority to add to the priority queue\n * @param value value to add to the priority queue\n * @return a new priority queue with new priority and value\n */\n IPriorityQueue add(Integer priority, String value);\n\n /**\n * Gets the number of items in the priority queue.\n * @return The number of items in the priority queue.\n */\n Integer size();\n\n /**\n * returns the String at the front of the priority queue if the Queue is not empty.\n * @return The String at the front of the priority queue, if the Queue is not empty.\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n String peek() throws EmptyPriorityQueueException;\n\n /**\n * Removes and returns the String at the front of the priority queue if the priority queue is not empty.\n * @return A copy of the priority queue without the removed item..\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n IPriorityQueue pop() throws EmptyPriorityQueueException;\n\n}",
"public PuzzleBoard poll() {\r\n if (isEmpty()) throw new NoSuchElementException(\"Priority queue underflow\");\r\n swap(1, N);\r\n PuzzleBoard min = pq[N--];\r\n sink(1);\r\n pq[N+1] = null; // avoid loitering and help with garbage collection\r\n if ((N > 0) && (N == (pq.length - 1) / 4)) resize(pq.length / 2);\r\n assert isMinHeap();\r\n return min;\r\n }",
"private PQHeap makeQueue(){\n \tPQHeap queue = new PQHeap(frequency.length);\n \tfor (int i = 0; i < frequency.length; i++) {\n \t\tqueue.insert(new Element(frequency[i], new HuffmanTempTree(i)));\n \t}\n \treturn queue;\n \t}",
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"public int dequeue()\r\n\t{\r\n\t\tint dequeued = 0;\r\n\t\r\n\t\tif (empty())\r\n\t\t{\r\n\t\t\tdequeued = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdequeued = (int) pq[lowestCurrentPriority].getHead();\r\n\t\t\tcurrentSize--;\r\n\t\t\tif (currentSize > 0)\r\n\t\t\t{\r\n\t\t\t\twhile (pq[lowestCurrentPriority].isEmpty())\r\n\t\t\t\t\tlowestCurrentPriority++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dequeued;\r\n\t}",
"private void primsMST(List<Vertex> graph) {\n\n\t\tMyPriorityQueue priorityQueue = new MyPriorityQueue(10);\n\t\tfor (Vertex v : graph) {\n\t\t\tv.key = Integer.MAX_VALUE;\n\t\t\tpriorityQueue.add(v);\n\t\t}\n\n\t\tVertex peek = priorityQueue.peek();\n\t\tpeek.key = 0;\n\n\t\twhile (!priorityQueue.isEmpty()) {\n\t\t\t//Vertex minVertex = priorityQueue.poll();\n\t\t\tVertex minVertex = priorityQueue.poll();\n\t\t\t\n\t\t\tif (minVertex.incidentEdges != null && minVertex.incidentEdges.size() > 0) {\n\t\t\t\tfor (Edge edge : minVertex.incidentEdges) {\n\t\t\t\t\tif (/*priorityQueue.contains(edge.end) && */edge.weight < edge.end.key) {\n\t\t\t\t\t\t//priorityQueue.remove(edge.end);\n\t\t\t\t\t\tedge.end.key = edge.weight;\n\t\t\t\t\t\tedge.end.previous = minVertex;\n\t\t\t\t\t\tpriorityQueue.add(edge.end);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void deleteMin() {\r\n\t\tif (empty())\r\n\t\t\treturn;\r\n\t\telse {\r\n\t\t\tif (this.size > 0) {\r\n\t\t\t\tthis.size--;\r\n\t\t\t}\r\n\t\t\tif (this.size == 0) {\r\n\t\t\t\tthis.empty = true;\r\n\t\t\t}\r\n\r\n\t\t\tHeapNode hN = this.min;\r\n\t\t\tint rnkCount = 0;\r\n\t\t\tHeapNode hNIterator = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\trnkCount++;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t}\r\n\t\t\tthis.HeapTreesArray[rnkCount] = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\trnkCount--;\r\n\t\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\t\tif (hNIterator != null) {\r\n\t\t\t\tbH.empty = false;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\tbH.HeapTreesArray[rnkCount] = hNIterator;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t\tbH.HeapTreesArray[rnkCount].rightBrother = null;\r\n\t\t\t\tif (hNIterator != null) {\r\n\t\t\t\t\thNIterator.leftBrother = null;\r\n\t\t\t\t}\r\n\t\t\t\trnkCount = rnkCount - 1;\r\n\t\t\t}\r\n\t\t\tthis.min = null;\r\n\t\t\tfor (int i = 0; i < this.HeapTreesArray.length; i++) {\r\n\t\t\t\tif (this.min == null) {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tif (this.HeapTreesArray[i].value < this.min.value) {\r\n\t\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!bH.empty()) {\r\n\t\t\t\tfor (int i = 0; i < bH.HeapTreesArray.length; i++) {\r\n\t\t\t\t\tif (bH.min == null) {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tif (bH.HeapTreesArray[i].value < bH.min.value) {\r\n\t\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.meld(bH);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }",
"public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tPriorityBlockingQueue<Integer> obj = new PriorityBlockingQueue<Integer>();\n\t\t\n\t\t/*for(int i=9;i<=99;i=i+9)\n\t\t{\n\t\t\tobj.offer(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);*/\n\t\t\n//\t\tfor (int i = 7; i <=84; i=i+7) {\n//\t\t\tobj.offer(i);\n//\t\t}\n\t\t\n\t\tobj.offer(5);\n\t\tobj.offer(2);\n\t\tobj.offer(13);\n\t\tobj.offer(7);\n\t\tobj.offer(12);\n\t\tobj.offer(3);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(\"Now First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\n\t}",
"public PriorityQueue()\r\n\t{\r\n\t\tcurrentSize = 0;\r\n\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\tpq = new DLL[MAXIMUM_PRIORITY + 1];\r\n\t\tfor (int i = 0; i < pq.length; i++)\r\n\t\t{\r\n\t\t\tpq[i] = new DLL();\r\n\t\t}\r\n\t}",
"private void minHeapPercolateUp(int index) {\r\n while (index > 0) {\r\n int parent = (int) Math.floor((index - 1) / 2); // parent index\r\n int compareResult = data[index].compareTo(data[parent]); // integer value of the comparison of\r\n // process at `index` to process at\r\n // index `parent`\r\n if (compareResult >= 0) { // order of heap \"heapified\" for min heap\r\n break;\r\n } else {\r\n swap(index, parent);\r\n index = parent;\r\n }\r\n }\r\n }",
"public interface PriorityQueueADT <T extends Comparable<T>> {\r\n\r\n public void insert(T newData); //adds item to PQ\r\n\r\n public T removeBest(); //removes the highest priority item\r\n\r\n public T peekBest(); //highest priority element is return, but not removed\r\n\r\n public boolean isEmpty();// checks whether PQ is empty\r\n\r\n}",
"public ArrayHeapMinPQ() {\n heapArray = new ArrayList<>();\n itemMap = new HashMap<>();\n heapArray.add(null); //alway set index 0 null and heap starts from index 1.\n nextIndex = 1;\n }",
"public static Object PQdownheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5jo6sukhc9upf5qv4eukh8kop\"); // PQdownheap (int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"dd3235mkocimg2v70ln8ixz3k\"); // snode* x = pq[k];\nUNSUPPORTED(\"e0wd4mp2k58ml2bf01e6mtxfc\"); // int v = (x)->n_val;\nUNSUPPORTED(\"b9pl90rstqz0jhnw3ttda3kx5\"); // int lim = PQcnt/2;\nUNSUPPORTED(\"917ffzmzxsh6kw3txaqow8dv0\"); // snode* n;\nUNSUPPORTED(\"zrgst5t0lhf2kxrym9g7gvsn\"); // int j;\nUNSUPPORTED(\"7bbx1rekibyh3hyxh24lprwwk\"); // while (k <= lim) {\nUNSUPPORTED(\"disb3eax2r4wgge9im541y9hv\"); // j = k+k;\nUNSUPPORTED(\"e4w7jx4o3i4gav8ujef2bapbn\"); // n = pq[j];\nUNSUPPORTED(\"4yles8zr6ozg2g0df2jefc1l2\"); // if (j < PQcnt) {\nUNSUPPORTED(\"77cupwd0hd3zp8he6wd4tm6nx\"); // if ((n)->n_val < (pq[j+1])->n_val) {\nUNSUPPORTED(\"1jeqo15tfc6vbefwf85bniwfn\"); // j++;\nUNSUPPORTED(\"1sglut5nbxcoto9tvzxs3eixh\"); // n = pq[j];\nUNSUPPORTED(\"dquo3qofk56ds5xl95lhvcthf\"); // }\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\nUNSUPPORTED(\"3hshbuqs95898wh95e2fdh5uz\"); // if (v >= (n)->n_val) break;\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8lpwfkimmel90007dlp5eqpbh\"); // k = j;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"public PriorityQueue(int size){\n heap = new Element[size];\n }",
"public interface OrderedArrayPQ<Key extends Comparable<Key>> extends PriorityQueue<Key>{\n\n /**\n * Retorna a Priority Queue.\n *\n * @return a pq\n */\n Key[] getPq();\n\n default boolean less(final int i, final int j) {\n return getPq()[i].compareTo(getPq()[j]) < 0;\n }\n\n default void exch(final int i, final int j) {\n final Key t = getPq()[i];\n getPq()[i] = getPq()[j];\n getPq()[j] = t;\n }\n\n default void swim(int k) {\n while (k > 1 && less(k / 2, k)) {\n exch(k / 2, k);\n k = k / 2;\n }\n }\n\n default void sink(int k) {\n while (2 * k <= size()) {\n int j = 2 * k;\n if (j < size() && less(j, j + 1)) j++;\n if (!less(k, j)) break;\n exch(k, j);\n k = j;\n }\n }\n}",
"public static void main(String[] args){\n PriorityQueue <Integer> queue1 = new PriorityQueue();\n // add elements\n queue1.add(1000);\n queue1.add(1234);\n queue1.add(3453);\n \n // will throw error\n // queue1.add(null);\n\n // get top element\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n System.out.println(\"PriorityQuey element() \"+queue1.element());\n\n // return top element and remove it from the queue\n System.out.println(\"PriorityQuey poll() \"+queue1.poll());\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n\n // addAll\n PriorityQueue <Integer> queue2 = new PriorityQueue();\n queue2.addAll(queue1);\n\n // iterate the queue elements\n Iterator<Integer> itr2=queue1.iterator(); \n while(itr2.hasNext()){ \n System.out.println(\"PriorityQueue elements after addAll() \"+itr2.next()); \n }\n\n // iterate the queue elements\n Iterator<Integer> itr1=queue1.iterator(); \n while(itr1.hasNext()){ \n System.out.println(\"PriorityQueue elements \"+itr1.next()); \n } \n \n // contains()\n System.out.println(\"Contains() \"+queue1.contains(1234));\n \n // remove elements\n queue1.remove(3453);\n // clear()\n queue1.clear();\n // removeAll\n queue1.removeAll(queue1);\n }",
"@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }",
"public void setPriorityQueue() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (leafEntries[i].getFrequency() > 0)\n\t\t\t\tpq.add(new BinaryTree<HuffmanData>(leafEntries[i]));\n\t\t}\n\t}",
"public static void main(String[] args)\n {\n PriorityQueue<Integer> pQueue =\n new PriorityQueue<>(Collections.reverseOrder());\n\n // Adding items to the pQueue using add()\n pQueue.add(10);\n pQueue.add(30);\n pQueue.add(20);\n pQueue.add(400);\n\n // Printing the most priority element\n System.out.println(\"Head value using peek function:\" +\n pQueue.peek());\n\n // Printing all elements\n System.out.println(\"The queue elements:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing the top priority element (or head) and\n // printing the modified pQueue using poll()\n pQueue.poll();\n System.out.println(\"After removing an element \"\n + \"with poll function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing 30 using remove()\n pQueue.remove(30);\n System.out.println(\"after removing 30 with\"\n + \" remove function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Check if an element is present using contains()\n boolean b = pQueue.contains(20);\n System.out.println(\"Priority queue contains 20 \"\n + \"or not?: \" + b);\n\n // Getting objects from the queue using toArray()\n // in an array and print the array\n Object[] arr = pQueue.toArray();\n System.out.println(\"Value in array: \");\n for (Object o : arr) System.out.println(\"Value: \" + o.toString());\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>heap1=new PriorityQueue<Integer>();\n\t\tint num=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tfor(int i=0;i<num;i++)\n\t\t{\n\t\t\tint value=sc.nextInt();\n\t\t\theap.add(value);\n\t\t\theap1.add(value);\n\t\t\tif(heap.size()>k)\n\t\t\t{\n\t\t\t\theap.remove();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t\tfor(int i=0;i<k-1;i++)\n\t\t{\n\t\t\theap.remove();\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t}",
"public static void main(String[] args) {\n\t\tQueue<Integer> queue = new PriorityQueue<>();\n\n\t\tqueue.offer(2);\n\t\tqueue.offer(8);\n\t\tqueue.offer(3);\n\t\tqueue.offer(1);\n\t\tqueue.offer(10);\n\n\t\tSystem.out.println(\"Get head of the head and remove element: \" + queue.poll()); // 1\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\t\tSystem.out.println(\"peek(): \" + queue.peek()); // 2\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\n\t\t// This example throws ClassCastException\n//\t\tQueue<Product> products = new PriorityQueue<>();\n//\t\tproducts.offer(new Product(\"Shoes\"));\n\t\t// java.lang.ClassCastException: class com.roy._18collections.queue.Product\n\t\t// cannot be cast to class java.lang.Comparable\n\n\t\t// Using custom Comparator\n\t\tComparator<Product> productComparator = new Comparator<Product>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Product o1, Product o2) {\n\t\t\t\treturn o1.getName().compareTo(o2.getName());\n\t\t\t}\n\t\t};\n\t\tQueue<Product> products = new PriorityQueue<>(productComparator);\n\t\tproducts.offer(new Product(\"Shoes\"));\n\t\tproducts.offer(new Product(\"Jeans\"));\n\t\tproducts.offer(new Product(\"Shirts\"));\n\t\tproducts.offer(new Product(\"Hat\"));\n\t\tproducts.offer(new Product(\"T-Shirts\"));\n\n\t\tfor (Product p : products) {\n\t\t\tSystem.out.println(p.getName());\n\t\t}\n\n\t}",
"public void enqueue(Item item) throws NoSuchElementException {\r\n // Usar el metodo upHeap para corregir la condicion de\r\n // Min Heap\r\n\r\n\r\n if (size == 0){\r\n heap[1] = item;\r\n size = 1;\r\n return;\r\n }\r\n int cur = size + 1;\r\n int par = cur/2;\r\n\r\n heap[cur] = item;\r\n size++;\r\n\r\n if (heap[cur].compareTo(heap[par]) > 0){\r\n upHeap(cur);\r\n }\r\n\r\n\r\n }",
"public HeapPriorityQueue(int size)\n\t{\n\t\tstorage = new Comparable[size + 1];\n\t\tcurrentSize = 0;\n\t}",
"public MaxPriorityQueue() {\n heap = new MaxHeap<>();\n }",
"public int peek()\r\n\t{\r\n\t\treturn (int) pq[lowestCurrentPriority].getHead();\r\n\t}",
"private PriorityQueue<PCB> newRemainingQueue() {\n\n\t\t// Comparator for sorting low priorities first\n\t\tComparator<PCB> byLowestPriority =\n\t\t\t(p1, p2) -> new Integer(p1.getPriority()).compareTo(p2.getPriority());\n\n\t\treturn new PriorityQueue<>(byLowestPriority);\n\t}",
"IPriorityQueue pop() throws EmptyPriorityQueueException;",
"public static void main(String[] args) {\n\n\t\tPriorityQueue pq = new PriorityQueue(15, new MyComparator());\n\t\t\n\t\tpq.offer(\"A\");\n\t\tpq.offer(\"B\");\n\t\tpq.offer(\"Z\");\n\t\tpq.offer(\"L\");\n\t\t\n\t\tSystem.out.println(pq);\n\t}",
"PriorityQueue(boolean transferPriority) \n\t\t{\n\t\t\tthis.transferPriority = transferPriority;\n\t\t\twaitQueue = new java.util.PriorityQueue<KThread>(1, new comparePriority()); //Initialize the waitQueue to a java.util.PriorityQueue with a custom comparator defined below\n\t\t}",
"public static void main(String[] args) {\n\n //The PriorityQueue class provides the facility of using queue.\n // But it does not orders the elements in FIFO manner. It inherits AbstractQueue class.\n\n PriorityQueue<String> priorityQueue=new PriorityQueue<>();\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"vinet\");\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"rajan\");\n priorityQueue.add(\"karan\");\n priorityQueue.add(\"sajan\");\n priorityQueue.add(\"rajan\");\n\n System.out.println(priorityQueue.size());\n System.out.println(priorityQueue);\n System.out.println(\"head \"+priorityQueue.element());\n System.out.println(\"head \"+priorityQueue.peek());\n System.out.println(priorityQueue.remove(\"sajan\"));\n System.out.println(priorityQueue);\n priorityQueue.remove(\"rajan\");\n\n for(String str: priorityQueue){\n System.out.println(str);\n }\n priorityQueue.remove();\n System.out.println(priorityQueue);\n priorityQueue.poll();\n System.out.println(priorityQueue);\n priorityQueue.removeAll(priorityQueue);\n System.out.println(priorityQueue);\n }",
"@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();",
"public static void main(String[] args) {\n ArrayList<String> list=new ArrayList<>();\n list.add(\"1\");\n list.add(\"2\");\n list.add(\"3\");\n list.add(\"4\");\n list.add(\"5\");\n list.remove(\"2\");\n PriorityBlockingQueue priorityBlockingQueue=new PriorityBlockingQueue(100, new Comparator() {\n @Override\n public int compare(Object o1, Object o2) {\n return 0;\n }\n });\n }",
"@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();",
"@Test(timeout = SECOND)\n public void testRemoveMinAndPeekMinCombo() {\n IPriorityQueue<Integer> testQ = makeInstance();\n for (int i = 1000; i > 0; i--) {\n testQ.insert(i);\n }\n int qSize = 1000;\n for (int i = 1; i <= 1000; i++) {\n int min = testQ.peekMin();\n assertEquals(i, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(--qSize, testQ.size());\n }\n // duplication test\n testQ.insert(2);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(2);\n\n for (int i = 5; i > 1; i--) {\n int min = testQ.peekMin();\n assertEquals(1, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n for (int i = 1; i >= 0; i--) {\n int min = testQ.peekMin();\n assertEquals(2, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n }",
"public void enqueue(int item, int priority)\r\n\t{\r\n\t\tpq[priority].addToBeginning(item);\r\n\t\tif (priority < lowestCurrentPriority)\r\n\t\t{\r\n\t\t\tlowestCurrentPriority = priority;\r\n\t\t}\r\n\t\tcurrentSize++;\r\n\t}",
"public FileLine removeMin() throws PriorityQueueEmptyException {\n\t\t\n \tif (isEmpty()) {\n \t\tthrow new PriorityQueueEmptyException();\n \t}\n \tFileLine temp = queue[1];\n \t//Retain shape\n \tqueue[1] = queue[numLines];\n \tboolean done = false;\n \t\n \tint parent = 1;\n \t\n \twhile (!done) {\n \t\tint child1 = parent * 2;\n \tint child2 = (parent * 2) + 1;\n \t\n \t\tFileLine maxChild = null;\n \t//Find child with max priority\n \tif (child1 < queue.length && child2 < queue.length) {\n\t \t\t\n\t \t\tmaxChild = maxChild(queue[child1], queue[child2]);\n \t} \n \t//Both greater than the length, set max as parent\n \telse if (child1 >= queue.length && child2 >= queue.length) {\n \t\tmaxChild = queue[parent];\n \t}\n \telse if (child1 >= queue.length) {\n \t\tmaxChild = queue[child2];\n \t}\n \telse if (child2 >= queue.length) {\n \t\tmaxChild = queue[child1];\n \t}\n \t\n \t\t\n \t\tint parentComp = cmp.compare(queue[parent], maxChild);\n \t\t\n \t\t\t\n \t\t//Compare parent to child\n \t\tif (parentComp <= 0) {\n \t\t\tdone = true;\n \t\t} \n \t\t//Swap parent and child if child higher priority\n \t\telse {\n \t\t\tFileLine hold = queue[parent];\n \t\t\t\n \t\t\t//child1 was the max, swap parent with it\n \t\t\tif (cmp.compare(maxChild, queue[child1]) == 0) {\n \t\t\t\tqueue[parent] = queue[child1];\n \t\t\tqueue[child1] = hold;\n \t\t\tparent = child1;\n \t\t\t}\n \t\t\t//child 2 was the max, swap parent with it\n \t\t\telse {\n \t\t\t\tqueue[parent] = queue[child2];\n \t\t\t\tqueue[child2] = hold;\n \t\t\t\tparent = child2;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \t\n \tnumLines--;\n\t\treturn temp;\n }",
"private void minHeapify(int v, int heapSize){\n\t\tint smallest;\n\t\tint left = leftChild(v);\n\t\tint right = rightChild(v);\n\t\tif (left<heapSize && _a[left].getWeight()<_a[v].getWeight()){\n\t\t\tsmallest = left;\n\t\t}\n\t\telse{\n\t\t\tsmallest = v;\n\t\t}\n\t\tif (right<heapSize && _a[right].getWeight()<_a[smallest].getWeight()){\n\t\t\tsmallest = right;\n\t\t}\n\t\tif (smallest!=v){\n\t\t\texchange(v, smallest);\n\t\t\tminHeapify(smallest, heapSize);\n\t\t}\t\t\n\t}",
"public static void PrimsAlgorithm(WeightedGraph graph) {\n System.out.println(\"______________________________Prim's Algorithm(Priority Queue)_____________________________\\n\");\n ArrayList<Edge> mst = new ArrayList<>();\n // initialize an array that will keep track of which vertices have been visited\n boolean[] visited = new boolean[graph.getVertices()];\n // initialize a PriorityQueue \n PriorityQueue<Edge> priorityQueue = new PriorityQueue<>();\n // mark the initial vertex as visited\n visited[0] = true;\n\n // for every edge connected to the source, add it to the PriorityQueue \n for (int i = 0; i < graph.getAdjacencylist(0).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(0).get(i));\n }\n\n // keep adding edges until the PriorityQueue is empty\n while (!priorityQueue.isEmpty()) {\n Edge e = priorityQueue.remove();\n\n // if we have already visited the opposite vertex, go to the next edge\n if (visited[e.getDestination()]) {\n continue;\n }\n\n //mark the opposite vertex as visited\n visited[e.getDestination()] = true;\n //Add an edge to the minimum spanning tree\n mst.add(e);\n\n // for every edge connected to the opposite vertex, add it to the PriorityQueue\n for (int i = 0; i < graph.getAdjacencylist(e.getDestination()).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(e.getDestination()).get(i));\n }\n\n }\n\n // if we haven't visited all of the vertices, return \n for (int i = 1; i < graph.getVertices(); i++) {\n if (!visited[i]) {\n System.out.println(\"Error! the graph is not connected.\");\n return;\n }\n }\n\n }",
"@Test\n public void testInsert() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(5);\n assertEquals(1, instance.size());\n assertEquals(new Integer(5), instance.delMin());\n }",
"void minHeapify(int i) {\n\n\t\tint l = 2*i + 1;\n\t\tint r = 2*i + 2;\n\t\tint smallest = i;\n \n\t\tif(l < size && arr[l].element < arr[smallest].element)\n\t\t\tsmallest = l;\n\n\t\tif(r < size && arr[r].element < arr[smallest].element)\n\t\t\tsmallest = r;\n\n\t\tif(smallest != i) {\n\t\t\t// call method exchange to change \n\t\t\texchange(arr,i,smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"public static void main(String[] args) {\n Timer timer = new Timer();\r\n timer.start();\r\n \r\n /*Integer[] a = new Integer[1000000];\r\n Random rand = new Random();\r\n double d;\r\n int in;\r\n for(int x = 0; x < 1000000; x++){\r\n d = Math.random()*50;\r\n in = (int) d;\r\n a[x] = in;\r\n }*/\r\n \r\n Integer[] a = new Integer[5];\r\n a[0] = new Integer(2);\r\n a[1] = new Integer(1);\r\n a[2] = new Integer(4);\r\n a[3] = new Integer(3);\r\n\ta[4] = new Integer(8);\r\n priorityqSort(a);\r\n /*Queue<Integer> pq1 = new PriorityQueue<Integer>();\r\n for (Integer x: a){\r\n pq1.add(x);\r\n }\r\n System.out.println(\"pq1: \" + pq1);*/\r\n \r\n /*Queue<String> pq2 = new PriorityQueue<>();\r\n pq2.add(\"4\");\r\n pq2.add(\"9\");\r\n pq2.add(\"2\");\r\n pq2.add(\"1\");\r\n pq2.add(\"5\");\r\n pq2.add(\"0\");\r\n System.out.println(\"pq: \" + pq2);*/\r\n \r\n timer.end();\r\n System.out.println(timer);\r\n }",
"public static Object PQupheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5hhoge8azwixhuw1r6f1ae6d\"); // PQupheap(int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"7e1sq1127wt16hr7o0andcwob\"); // snode* x = pq[k];\nUNSUPPORTED(\"7bfu0p9xmzkty10xv4n4l5cqs\"); // int v = x->n_val;\nUNSUPPORTED(\"1j1bbq23z0qzohezignztjo66\"); // int next = k/2;\nUNSUPPORTED(\"ae5pat4mp4l6k25pvk8saz8c7\"); // snode* n;\nUNSUPPORTED(\"70492o1szwz9au93c3is2goa\"); // while ((n = pq[next])->n_val < v) {\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8fpdpgwovt0k58t5u167v63is\"); // k = next;\nUNSUPPORTED(\"eqtnhenyor3dwsa6on9crthdd\"); // next /= 2;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"@Test\n public void randomLockstep() {\n PriorityBlockingQueue pbq = new PriorityBlockingQueue();\n PriorityQueue pq = new PriorityQueue();\n List<Consumer<Queue>> frobbers = List.of(\n q -> q.add(42),\n q -> assertTrue(q.offer(86)),\n q -> q.poll(),\n q -> q.peek(),\n q -> {\n Iterator it = q.iterator();\n if (it.hasNext()) {\n it.next();\n it.remove();\n }});\n for (int i = 0; i < 100; i++) {\n Consumer<Queue> frobber = frobbers.get(rnd.nextInt(frobbers.size()));\n frobber.accept(pq);\n frobber.accept(pbq);\n assertInvariants(pbq);\n assertInvariants(pq);\n assertTrue(Arrays.equals(pq.toArray(), pbq.toArray()));\n }\n }",
"public void downHeap(int pos) throws NoSuchElementException\r\n {\r\n if (pos <= 0 || pos > size)\r\n throw new NoSuchElementException();\r\n\r\n int cur = pos;\r\n while (true) {\r\n int left = 2* cur; // [TODO] indice del hijo izquierdo\r\n int right = 2* cur + 1; // [TODO] indice del hijo derecho\r\n\r\n // [TODO] Si no tiene hijos (es una hoja), detenemos el loop\r\n\r\n if (left > size && right > size)\r\n break;\r\n\r\n int min_idx; // indice (left o right) del hijo mas prioritario\r\n\r\n // [TODO] Compara el hijo izquierdo versus el derecho y determina cual\r\n // es el mas prioritario. Graba su posicion en min_idx. Ojo: el hijo\r\n // derecho puede ser que NO exista, en cuyo caso el mas prioritario es\r\n // el izquierdo\r\n if (heap[right] == null){\r\n min_idx = left;\r\n }else\r\n if (heap[left].compareTo(heap[right]) > 0){\r\n min_idx = left;\r\n }else\r\n min_idx = right;\r\n\r\n\r\n // [TODO] Revisar si la propiedad de heap se cumple para los elementos\r\n // en los indices cur y min_idx. Si no nay violacion de la propiedad\r\n // de heap, terminamos el loop\r\n if (heap[cur].compareTo(heap[min_idx]) > 0)\r\n break;\r\n\r\n // [TODO] Intercambiamos los elementos en los indices cur y min_idx\r\n Item c = heap[cur];\r\n Item hijo = heap[min_idx];\r\n\r\n heap[min_idx] = c;\r\n heap[cur] = hijo;\r\n\r\n // [TODO] Navega hacia el hijo mas prioritario\r\n cur = min_idx;\r\n }\r\n }",
"public Heap(boolean isMin, Collection<ValueType> data) {\r\n // TODO\r\n }",
"public PriorityQueue(HeapType type) {\n this(-1, type);\n }",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"public static void main(String[] args) {\n\t\tPriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());\n\t\t//By default this gives us Min-Priority Queue\n\t\t\n\t\t//Task - 1 -> How to get Max-Priority Queue using this class.\n\t\t//Use Collections.reverseOrder() inside the round brackets to use Max-Priority Queue\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.add(3);\n\t\tpq.add(4);\n\t\tpq.add(1);\n\t\tpq.add(9);\n\t\tpq.add(7);\n\t\tpq.add(2);\n\t\tpq.add(6);\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.poll());\n\t\tSystem.out.println(pq.size());\n\t\tSystem.out.println(pq.peek());\n\t}",
"public ArrayHeapMinPQ() {\n aHeap.add(null);\n }",
"void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}",
"void minHeapify(int i)\n {\n int lt=MyHeap.left(i);\n int rt=MyHeap.right(i);\n int smallest=i;\n if(lt<size && arr[lt]<arr[i])\n smallest=lt;\n if(rt<size && arr[rt]<arr[smallest])\n smallest=rt;\n if(smallest!=i)\n {\n swap(i,smallest);\n minHeapify(smallest);\n }\n }",
"public WaitablePQueue(int Capacity, Comparator<? super E> comparator) {\n\t \tthis.pq = new PriorityQueue<>(Capacity, comparator);\n\t \tthis.sem = new Semaphore(0);\n\t}",
"public MinHeap() {\n\tdata = new ArrayList<Integer>();\n\t}",
"public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}",
"public static void main(String[] args) {\n\t\tint capacity = 15;\n\n\t\t// create object of PriorityBlockingQueue\n\t\t// using PriorityBlockingQueue(int initialCapacity) constructor\n\t\tPriorityBlockingQueue<Integer> pbq = new PriorityBlockingQueue<Integer>(capacity);\n\n\t\t// add numbers\n\t\tpbq.add(1);\n\t\tpbq.add(2);\n\t\tpbq.add(3);\n\n\t\t// print queue\n\t\tSystem.out.println(\"PriorityBlockingQueue:\" + pbq);\n\t}",
"public static void main(String[] args) {\n\t\tCreate_queue new_queue= new Create_queue();\n\t\tnew_queue.enqueu(12);\n\t\tnew_queue.enqueu(5);\n\t\tnew_queue.enqueu(36);\n\t\tnew_queue.enqueu(5);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(10);\n\t\tnew_queue.enqueu(8);\n\t\tnew_queue.enqueu(2);\n\t\tnew_queue.enqueu(14);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(32);\n\t\tnew_queue.enqueu(11);\n\t\tnew_queue.enqueu(21);\n\t\tnew_queue.enqueu(44);\n\t\tnew_queue.enqueu(46);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(50);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(100);\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue.peek());\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue.peek());\n\t\t\n\t\t\n\t}",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }",
"private void makePrioQ()\n\t{\n\t\tprioQ = new PrioQ();\n\t\t\n\t\tfor(int i = 0; i < canonLengths.length; i++)\n\t\t{\n\t\t\tif(canonLengths[i] == 0)\n\t\t\t\tcontinue;\n\t\t\tNode node = new Node(i, canonLengths[i]);\n\t\t\tprioQ.insert(node);\n\t\t}\n\t}",
"@Override\n public int compareTo(Heap<E> o) {\n if(this.peek().compareTo(o.peek()) < 0) return -1;\n if(this.peek().compareTo(o.peek()) > 0) return 1;\n else return 0;\n }",
"public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }",
"void MinInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] > arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }",
"@Test\n public void testDelMin() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(7);\n instance.insert(5);\n instance.insert(6);\n assertEquals(new Integer(5), instance.delMin());\n }",
"public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }",
"public PriorityQueue(int initialCapacity, HeapType type) {\n super(PriorityQueueElement.class, initialCapacity, type);\n elementsMap = new HashMap<V, PriorityQueueElement<P, V>>();\n }",
"String peek() throws EmptyPriorityQueueException;",
"public static void main(String args[])\r\n\t {\n\t\t PriorityQueue<String> pq = new PriorityQueue<String>();\r\n\r\n // Adding items to the pq using add()\r\n\t\t pq.add(\"Peach\");\r\n\t\t pq.add(\"Cyan\");\r\n\t\t pq.add(\"Crimson\");\r\n\t\t \r\n\t\t System.out.println(\"Priority Queue: \"+pq);\r\n\t }",
"public Item dequeue() throws NoSuchElementException {\r\n // Usar el metodo downHeap para corregir la condicion\r\n // de Min Heap\r\n\r\n\r\n Item ret = heap[1];\r\n\r\n heap[1] = heap[size];\r\n downHeap(1);\r\n\r\n heap[size] = null;\r\n size--;\r\n\r\n return ret;\r\n }",
"public static void sort(Comparable[] pq) {\n int n = pq.length;\n \n /*\n * Fill in this method! Use the code on p. 324 of the book as a model,\n * but change it so each node in the heap has 3 children instead of 2.\n */\n }",
"public Node binomialHeapExtractMin() {\n\t\tNode x = this.deleteMin();\n\t\t\n\t\t// make a new heap\n\t\t// reverse the child list of x and assign it to the head of new heap.\n\t\tBinomialHeap hPrime = new BinomialHeap();\n\t\thPrime.head = reverseLinkedList(x.leftChild);\n\t\t\n\t\t// perform union on the child tree list of x and the original heap\n\t\tBinomialHeap h = this.binomialHeapUnion(hPrime);\n\t\tthis.head = h.head;\n\t\t\n\t\t// return the minimum node\n\t\treturn x;\n\t}"
]
| [
"0.747135",
"0.7299061",
"0.71208715",
"0.69922626",
"0.69811624",
"0.6953288",
"0.6928032",
"0.68946046",
"0.68912876",
"0.6867241",
"0.68188465",
"0.6801633",
"0.6771279",
"0.67590094",
"0.67457527",
"0.67337245",
"0.67223",
"0.6713903",
"0.6694499",
"0.6628203",
"0.66197896",
"0.6603039",
"0.65782946",
"0.6518119",
"0.65139073",
"0.65130526",
"0.6509739",
"0.65069896",
"0.6492851",
"0.648617",
"0.6480392",
"0.6480271",
"0.64525",
"0.6449141",
"0.644461",
"0.64388645",
"0.6427647",
"0.6420558",
"0.63705325",
"0.63647956",
"0.63532996",
"0.63346297",
"0.6332944",
"0.6325611",
"0.6324386",
"0.6320019",
"0.63048345",
"0.6299467",
"0.628581",
"0.62841845",
"0.6271913",
"0.6269047",
"0.62644714",
"0.62622696",
"0.6259522",
"0.6259247",
"0.62486935",
"0.6246109",
"0.62382466",
"0.6230129",
"0.62103957",
"0.6208997",
"0.6200912",
"0.6191284",
"0.61901027",
"0.61791",
"0.6179093",
"0.6173134",
"0.61691135",
"0.61561495",
"0.615462",
"0.6152449",
"0.6147649",
"0.61299545",
"0.61252403",
"0.6120367",
"0.6115219",
"0.6107498",
"0.61028516",
"0.61020505",
"0.6100531",
"0.6099229",
"0.609874",
"0.60924506",
"0.60833126",
"0.60461146",
"0.6043404",
"0.6031048",
"0.60200286",
"0.6003513",
"0.5995073",
"0.5993021",
"0.59898",
"0.5988382",
"0.5981342",
"0.59640026",
"0.59636587",
"0.59619576",
"0.5958653",
"0.595848",
"0.5957915"
]
| 0.0 | -1 |
priority queue implemented by minheap under the hood | public static UniformCostSearchNode searchBnB(UniformCostSearchNode root){
PriorityQueue<UniformCostSearchNode> frontier = new PriorityQueue<UniformCostSearchNode>();
// hash set for fast verification of closed nodes
HashSet<UniformCostSearchNode> closed = new HashSet<UniformCostSearchNode>();
int upperBoundCost = Integer.MAX_VALUE;
frontier.add(root);
while(frontier.size() != 0){
UniformCostSearchNode current = frontier.remove();
if(current.isGoalState()){
System.out.println("UCS B&B Nodes explored: " + closed.size());
return current;
}
// implicitly pruning the frontier
if(current.getCost() >= upperBoundCost){
// skipping due to bounding
continue;
}
closed.add(current);
PriorityQueue<UniformCostSearchNode> toAdd = new PriorityQueue<UniformCostSearchNode>();
for(UniformCostSearchNode neighbor : current.getNeighbors()){
toAdd.add(neighbor);
}
while(toAdd.size() != 0) {
UniformCostSearchNode neighbor = toAdd.remove();
if (neighbor.getCost() < upperBoundCost) {
if (neighbor.isGoalState()) {
// bounding
upperBoundCost = neighbor.getCost();
}
frontier.add(neighbor);
}
}
}
System.out.println("UCS B&B Search failed, nodes explored: " + closed.size());
// search failed
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\nPriorityQueue pq= new PriorityQueue(15);//,new MyComparator123());\r\nSystem.out.println(pq.peek());\r\n//System.out.println(pq.element());\r\n/*for(int i=1;i<=10;i++)\r\npq.offer(i);\r\nSystem.out.println(pq);\r\nSystem.out.println(pq.poll());\r\n\r\nSystem.out.println(pq);*/\r\npq.offer(\"A\");\r\npq.offer(\"C\");\r\npq.offer(\"B\");\r\npq.offer(\"Z\");\r\nfor(int i=0;i<pq.size();i++)\r\nSystem.out.println(pq.peek());\r\n\t}",
"void enqueue(int x, int p){\n for(int i=0;i<size;i++){\n if(values[i]==(-1)){\n values[i] = x;\n priorities[i] = p;\n break;\n }\n }\n }",
"public WBLeftistHeapPriorityQueueFIFO() {\n\t\theap = new WBLeftistHeap<>();\n\t}",
"public interface PriorityQueue<T> {\n\t/**\n\t * Returns true if priority queue has no elements\n\t *\n\t * @return true if the priority queue has no elements\n\t */\n\tpublic boolean isEmpty();\n\n\n\t/**\n\t * Returns the number of elements in this priority queue.\n\t *\n\t * @return the number of elements in this priority queue.\n\t */\n\tpublic int size();\n\n\n\t/**\n\t * Returns the minimum element in the priority queue\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T findMin();\n\n\n\t/**\n\t * Inserts a new element into the priority queue.\n\t * Duplicate values ARE allowed.\n\t *\n\t * @param x element to be inserted into the priority queue.\n\t */\n\tpublic void insert(T x);\n\n\n\t/**\n\t * Removes and returns the minimum element from the priority queue.\n\t *\n\t * @return the minimum element or throw EmptyHeapException if empty\n\t */\n\tpublic T deleteMin();\n\n\n\t/**\n\t * Erases all elements from the priority queue.\n\t */\n\tpublic void makeEmpty();\n\n}",
"public interface PQueue<T> {\n\n void add(T item, int priority) throws InterruptedException;\n\n T removeMin();\n\n}",
"public static void main(String[] args) {\n\t\tPriorityQueue<Integer> pqueue = new PriorityQueue<>(Comparator.reverseOrder()); //ordered as per max heap\r\n\t\tpqueue.add(3);\r\n\t\tpqueue.add(1);\r\n\t\tpqueue.add(4);\r\n\t\tpqueue.add(2);\r\n\t\tSystem.out.println(pqueue); \r\n\r\n\t\tpqueue.poll(); //the element with the lowest priority, i.e., smallest element will be removed\r\n\t\tSystem.out.println(pqueue);\r\n\r\n\t\tSystem.out.println(pqueue.peek()); //the next element to be removed\r\n\t}",
"public static void main(String[] args) {\r\n\t\tPriorityQueue p1=new PriorityQueue();\r\n\t\t // System.out.println(\"p1.poll()=\"+p1.poll());\r\n // System.out.println(\"p1.remove()=\"+p1.remove());\r\n\t\tp1.add(12); \r\n\t\tp1.add(10);\r\n p1.add(20);\r\n // p1.add(2.3);\r\n p1.add(20);\r\n p1.add(100);\r\n p1.add(21);\r\n // p1.add(null);\r\n System.out.println(p1);\r\n System.out.println(\"p1.remove()=\"+p1.remove());\r\n System.out.println(\"p1.poll()=\"+p1.poll());\r\n System.out.println(p1);\r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(\"p1.peek()=\"+p1.peek()); \r\n System.out.println(p1);\r\n\t}",
"public interface PriorityQueue<E, P> {\n\t\n\t/** return the comparator used for ordering priorities */\n\tpublic Comparator<? super P> comparator();\n\t\n\t/** Return the number of elements in this. Runs in O(1) time. */\n\tpublic int size();\n\t\n\t/**\n\t * Remove and return the largest element of this, according to comparator()\n\t * Runs in O(log n) time.\n\t * \n\t * @throws NoSuchElementException if this is empty \n\t */\n\tpublic E poll() throws NoSuchElementException;\n\t\n\t/**\n\t * Return the largest element of this, according to comparator().\n\t * Runs in O(1) time.\n\t * \n\t * @throws NoSuchElementException if this is empty.\n\t */\n\tpublic E peek() throws NoSuchElementException;\n\t\n\t/**\n\t * Add the element e with priority p to this. Runs in O(log n + a) time,\n\t * where a is the time it takes to append an element to an ArrayList of size\n\t * n.\n\t * \n\t * @throws IllegalArgumentException if this already contains an element that\n\t * is equal to e (according to .equals())\n\t */\n\tpublic void add(E e, P p) throws IllegalArgumentException;\n\n\t/**\n\t * Change the priority associated with e to p.\n\t *\n\t * @throws NoSuchElementException if this does not contain e.\n\t */\n\tpublic void changePriority(E e, P p) throws NoSuchElementException;\n}",
"public MinHeap(){\r\n nextAvail = 1;\r\n }",
"public static void main(String[] args)\n\t{\n\t\tdouble mine = (29 + 27 + 29 + /*24*/ 28 + 30 + 50 + 55 + 17 + 19 + 16 + 18 + 17 + 17 + 20 + 18 + 20 + 82 + 81 + 87 + 215);\n\t\t\n\t\tdouble pote = (30 + 30 + 30 + 30 + 30 + 60 + 30 + 30 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 20 + 100 + 100 + 100 + 250);\n\t\t\n\t\tdouble grade = (mine / pote) * 100;\n\t\tSystem.out.println(grade);\n\t\t\n\t\tPriorityQueue<String> pq = new PriorityQueue<String>();\n\t\tPriorityQueue<String> pq2 = new PriorityQueue<String>();\n\t\tPriorityQueue<Character> pq3 = new PriorityQueue<Character>();\n\t\t/*\n\t\tPriorityQueue pq4 = new PriorityQueue();\n\t\tpq4.enqueuePQ(2, \"F\");\n\t\tpq4.enqueuePQ(2, 32);\n\t\tSystem.out.println(pq4.toString());\n\t\t*/\n\t\t\n\t\t\n\t\tpq3.enqueuePQ(3, 'A');\n\t\tpq3.enqueuePQ(3, 'B');\n\t\tpq3.enqueuePQ(3, 'C');\n\t\tSystem.out.println(pq3.toString());\n\t\t\n\t\tSystem.out.println(pq3.dequeuePQ());\n\t\tSystem.out.println(pq3.peekPQ());\n\t\t\n\t\tpq2.enqueuePQ(2, \"two\");\n\t\tpq2.enqueuePQ(3, \"three\");\n\t\tpq2.enqueuePQ(1, \"one\");\n\t\t//pq2.enqueuePQ(-2, \"neg two\");\n\t\t//pq2.enqueuePQ(3, \"three 2\");\n\t\t//pq2.enqueuePQ(-2, \"neg two 2\");\n\t\t//pq2.enqueuePQ(1, \"one 2\");\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq2.dequeuePQ());\n\t\tSystem.out.println(pq2.peekPQ());\n\t\tSystem.out.println(pq2.toString());\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.enqueuePQ(3, \"three\");\n\t\tSystem.out.println(pq.toString());\n\t\tpq.enqueuePQ(5, \"five\");\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.toString());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.dequeuePQ());\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.peekPQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"PEEK EXCEPTION CAUGHT\");\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n\t\t\tSystem.out.println(pq.dequeuePQ());\n\t\t}\n\t\tcatch (PQException ex)\n\t\t{\n\t\t\tSystem.out.println(\"Dequeue EXCEPTION CAUGHT\");\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(pq.isEmpty());\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"DONE\");\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n Queue<Integer> values=new PriorityQueue<>();\r\n values.add(87);\r\n\t values.add(97);\r\n\t values.add(34);\r\n\t values.add(92);\r\n\t System.out.println(values);\r\n\t}",
"public static void main(String[] args) {\n\r\n\t\tint [][] arr = new int[][] {\r\n\t\t\t{8,9,10,12},\r\n\t\t\t{2,5,9,12},\r\n\t\t\t{3,6,10,11},\r\n\t\t\t{1,4,7,8}\r\n\t\t};\t\t\r\n\t\t\r\n\t\tPriorityQueue<HeapNode> heap = new PriorityQueue<>();\r\n\t\tfor(int i=0;i<arr.length;i++)\r\n\t\t{\r\n\t\t\theap.offer(new HeapNode(arr[i][0], i, 0));\r\n\t\t}\r\n\t\tint count=0;\r\n\t\twhile(count<16)\r\n\t\t{\r\n\t\t\tHeapNode min = heap.poll();\r\n\t\t\tSystem.out.println(min.value);\r\n\t\t\tcount++;\r\n\t\t\tint value=0;\r\n\t\t\tint nextIndex=min.index+1;\r\n\t\t\tif(nextIndex < arr[min.k].length)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tvalue=arr[min.k][nextIndex];\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tvalue=Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t\theap.offer(new HeapNode(value, min.k, nextIndex));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public MinPriorityQueue(int cap)\r\n {\r\n heap = (Item[]) new Comparable[cap+1]; // reservamos un espacio adicional\r\n // para el dummy en la posicion 0\r\n size = 0;\r\n }",
"public static void main(String[] arg) {\n\t\tMyPriorityQueue pq = new MyPriorityQueue();\n\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.enqueue(3, \"candy\");\t// low priority\n\t\tpq.enqueue(1, \"milk\");\t// high priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.enqueue(2, \"banana\");// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> milk come out first although it was not the first one enter the queue!\n\t\tpq.peek();\n\t\tpq.enqueue(3, \"gum\");\t// low priority\n\t\tpq.dequeue();\t\t\t// ----> cheese come out next\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// low priority\n\t\tpq.dequeue();\t\t\t// apple come out after ALL high priority items had dequeued.\n\t\tpq.dequeue();\t\t\t// ----> banana\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.peek();\n\t\tpq.enqueue(1, \"fish\");\t// high priority\n\t\tpq.enqueue(2, \"apple\");\t// medium priority\n\t\tpq.peek();\n\t\tpq.dequeue();\t\t\t// ----> fish\n\t\tpq.dequeue();\t\t\t// ----> apple\n\t\tpq.dequeue();\t\t\t// ----> kiwi\n\t\tpq.dequeue();\t\t\t// ----> candy\n\t\tpq.peek();\n\t\tpq.enqueue(2, \"kiwi\");\t// medium priority\n\t\tpq.enqueue(1, \"cheese\");// high priority\n\t\tpq.peek();\n\t\n\t}",
"public static void main(String[] args) {\n\t\tMyPriorityQueue mpq = new MyPriorityQueue();\n\n//\t\tmpq.insert(10);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(5);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(15);\n//\n//\t\ttestQueue(mpq);\n//\n//\t\tmpq.insert(2);\n//\n//\t\ttestQueue(mpq);\n//\t\t\n//\t\tSystem.out.println(mpq.deleteMin());\n//\n//\t\ttestQueue(mpq);\n\t\t\n\t\tfor(int i = 100; i > 0; i--) {\n\t\t\tmpq.insert(i);\n\t\t}\n\t\t\n\t\tint [] sortedArray = new int[100];\n\t\tint index = 0;\n\t\twhile(!mpq.isEmpty()) {\n\t\t\tsortedArray[index++] = mpq.deleteMin();\n\t\t}\n\t\t\n\t\tfor(int i = 0; i <100; i++) {\n\t\t\tSystem.out.println(sortedArray[i] + \" \");\n\t\t}\n\t}",
"public MyQueue() {\n queue = new PriorityQueue<>();\n }",
"public Task poll() \n\t{\n\t\tif(this.isEmpty())\n\t\t{\n\t\t\tSystem.out.println(\"Cannot remove from an empty list.\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tint parent = 1;\n\t\tint child = 2;\n\t\tTask newTask = heap[1];\n\t\tTask temp = heap[size--];\n\t\t\n\t\twhile(child <= size)\n\t\t{\n\t\t\tif(child < size && heap[child].getPriority() > heap[child + 1].getPriority())\n\t\t\t{\n\t\t\t\tchild++;\n\t\t\t}\n\t\t\tif(temp.getPriority() <= heap[child].getPriority())\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\theap[parent] = heap[child];\n\t\t\tparent = child;\n\t\t\tchild *= 2;\n\t\t\t\n\t\t}\n\t\t\n\t\theap[parent] = temp;\n\t\treturn newTask;\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tQueue<Item> pq = new PriorityQueue<Item>();\r\n\t\t\r\n\t\tpq.add(new Item(154,\"java\"));\r\n\t\tpq.add(new Item(45,\"c++\"));\r\n\t\tpq.add(new Item(4,\"c\"));\r\n\t\tpq.add(new Item(154,\"javascript\"));\r\n\t\tpq.add(new Item(160,\"html\"));\r\n\t\t\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t\tpq.poll();\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(pq);\r\n\t\t\r\n\t}",
"public NodeBase<V> dequeue() {\r\n \tif(!isEmpty()){\r\n \tNodeBase<V> min=queue[0];\r\n \tint j=0;\r\n for(int i=0;i<currentSize;i++){\r\n \t if(min.getPriority()>queue[i].getPriority()){\r\n \t\t min=queue[i];\r\n \t\t j=i;\r\n \t }\r\n }\r\n for(int x=j;x<currentSize-1;x++){\r\n \t queue[x]=queue[x+1];\r\n }\r\n \r\n currentSize--;\r\n \r\n return min;\r\n \t}\r\n \telse{\r\n \t\treturn null;\r\n \t}\r\n }",
"public node_data heapMinimum(){return _a[0];}",
"public HeapIntPriorityQueue() {\n elementData = new int[10];\n size = 0;\n }",
"public PriorityQueue()\n {\n // initialise instance variables\n heap = new PriorityCustomer[100];\n size = 0;\n }",
"private void minHeapify(Vertex[] queue, int index, int size) {\r\n\t\tint l = left(index);\r\n\t\tint r = right(index);\r\n\t\tint smallest;\r\n\t\tif (l < size && queue[l].dist < queue[index].dist)\r\n\t\t\tsmallest = l;\r\n\t\telse\r\n\t\t\tsmallest = index;\r\n\t\tif (r < size && queue[r].dist < queue[smallest].dist)\r\n\t\t\tsmallest = r;\r\n\t\tif (smallest != index) {\r\n\t\t\tVertex temp = queue[index];\r\n\t\t\tqueue[index] = queue[smallest];\r\n\t\t\tqueue[index].setHandle(index);\r\n\t\t\ttemp.setHandle(smallest);\r\n\t\t\tqueue[smallest] = temp;\r\n\t\t\tminHeapify(queue, smallest, size);\r\n\t\t}\r\n\t}",
"public PriorityQueue() {\n\t\theap = new ArrayList<Pair<Integer, Integer>>();\n\t\tlocation = new HashMap<Integer, Integer>();\n\t}",
"public HeapPriorityQueue () \n\t{\n\t\tthis(DEFAULT_SIZE);\n\t}",
"void Minheap()\n {\n for(int i= (size-2)/2;i>=0;i--)\n {\n minHeapify(i);\n }\n }",
"private void heapSort() {\n\n\t\tint queueSize = priorityQueue.size();\n\n\t\tfor (int j = 0; j < queueSize; j++) {\n\n\t\t\theapified[j] = binaryHeap.top(priorityQueue);\n\t\t\tbinaryHeap.outHeap(priorityQueue);\n\n\t\t}\n\n\t}",
"public interface IPriorityQueue {\n\n /**\n * Check whether the priority queue is empty\n * @return true if it is empty, otherwise false\n */\n Boolean isEmpty();\n\n /**\n * Add a priority and value into a list\n * @param priority priority to add to the priority queue\n * @param value value to add to the priority queue\n * @return a new priority queue with new priority and value\n */\n IPriorityQueue add(Integer priority, String value);\n\n /**\n * Gets the number of items in the priority queue.\n * @return The number of items in the priority queue.\n */\n Integer size();\n\n /**\n * returns the String at the front of the priority queue if the Queue is not empty.\n * @return The String at the front of the priority queue, if the Queue is not empty.\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n String peek() throws EmptyPriorityQueueException;\n\n /**\n * Removes and returns the String at the front of the priority queue if the priority queue is not empty.\n * @return A copy of the priority queue without the removed item..\n * @throws EmptyPriorityQueueException EmptyPriorityQueueException if the priority queue is empty.\n */\n IPriorityQueue pop() throws EmptyPriorityQueueException;\n\n}",
"public PuzzleBoard poll() {\r\n if (isEmpty()) throw new NoSuchElementException(\"Priority queue underflow\");\r\n swap(1, N);\r\n PuzzleBoard min = pq[N--];\r\n sink(1);\r\n pq[N+1] = null; // avoid loitering and help with garbage collection\r\n if ((N > 0) && (N == (pq.length - 1) / 4)) resize(pq.length / 2);\r\n assert isMinHeap();\r\n return min;\r\n }",
"private PQHeap makeQueue(){\n \tPQHeap queue = new PQHeap(frequency.length);\n \tfor (int i = 0; i < frequency.length; i++) {\n \t\tqueue.insert(new Element(frequency[i], new HuffmanTempTree(i)));\n \t}\n \treturn queue;\n \t}",
"public int dequeue()\r\n\t{\r\n\t\tint dequeued = 0;\r\n\t\r\n\t\tif (empty())\r\n\t\t{\r\n\t\t\tdequeued = 0;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tdequeued = (int) pq[lowestCurrentPriority].getHead();\r\n\t\t\tcurrentSize--;\r\n\t\t\tif (currentSize > 0)\r\n\t\t\t{\r\n\t\t\t\twhile (pq[lowestCurrentPriority].isEmpty())\r\n\t\t\t\t\tlowestCurrentPriority++;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dequeued;\r\n\t}",
"public Node binomialHeapMinimum() {\n\t\tNode y = null;\n\t\tNode x = this.head;\n\t\tint min = Integer.MAX_VALUE;\n\t\twhile(x!=null) {\n\t\t\tif (x.key < min) {\n\t\t\t\tmin = x.key;\n\t\t\t\ty = x;\n\t\t\t}\n\t\t\tx = x.rightSibling;\n\t\t}\n\t\treturn y;\n\t}",
"private void primsMST(List<Vertex> graph) {\n\n\t\tMyPriorityQueue priorityQueue = new MyPriorityQueue(10);\n\t\tfor (Vertex v : graph) {\n\t\t\tv.key = Integer.MAX_VALUE;\n\t\t\tpriorityQueue.add(v);\n\t\t}\n\n\t\tVertex peek = priorityQueue.peek();\n\t\tpeek.key = 0;\n\n\t\twhile (!priorityQueue.isEmpty()) {\n\t\t\t//Vertex minVertex = priorityQueue.poll();\n\t\t\tVertex minVertex = priorityQueue.poll();\n\t\t\t\n\t\t\tif (minVertex.incidentEdges != null && minVertex.incidentEdges.size() > 0) {\n\t\t\t\tfor (Edge edge : minVertex.incidentEdges) {\n\t\t\t\t\tif (/*priorityQueue.contains(edge.end) && */edge.weight < edge.end.key) {\n\t\t\t\t\t\t//priorityQueue.remove(edge.end);\n\t\t\t\t\t\tedge.end.key = edge.weight;\n\t\t\t\t\t\tedge.end.previous = minVertex;\n\t\t\t\t\t\tpriorityQueue.add(edge.end);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void deleteMin() {\r\n\t\tif (empty())\r\n\t\t\treturn;\r\n\t\telse {\r\n\t\t\tif (this.size > 0) {\r\n\t\t\t\tthis.size--;\r\n\t\t\t}\r\n\t\t\tif (this.size == 0) {\r\n\t\t\t\tthis.empty = true;\r\n\t\t\t}\r\n\r\n\t\t\tHeapNode hN = this.min;\r\n\t\t\tint rnkCount = 0;\r\n\t\t\tHeapNode hNIterator = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\trnkCount++;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t}\r\n\t\t\tthis.HeapTreesArray[rnkCount] = null;\r\n\t\t\tif (hN != null) {\r\n\t\t\t\thNIterator = hN.theMostLeftChild;\r\n\t\t\t}\r\n\t\t\trnkCount--;\r\n\t\t\tBinomialHeap bH = new BinomialHeap();\r\n\t\t\tif (hNIterator != null) {\r\n\t\t\t\tbH.empty = false;\r\n\t\t\t}\r\n\t\t\twhile (hNIterator != null) {\r\n\t\t\t\tbH.HeapTreesArray[rnkCount] = hNIterator;\r\n\t\t\t\thNIterator = hNIterator.rightBrother;\r\n\t\t\t\tbH.HeapTreesArray[rnkCount].rightBrother = null;\r\n\t\t\t\tif (hNIterator != null) {\r\n\t\t\t\t\thNIterator.leftBrother = null;\r\n\t\t\t\t}\r\n\t\t\t\trnkCount = rnkCount - 1;\r\n\t\t\t}\r\n\t\t\tthis.min = null;\r\n\t\t\tfor (int i = 0; i < this.HeapTreesArray.length; i++) {\r\n\t\t\t\tif (this.min == null) {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (this.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\tif (this.HeapTreesArray[i].value < this.min.value) {\r\n\t\t\t\t\t\t\tthis.min = this.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!bH.empty()) {\r\n\t\t\t\tfor (int i = 0; i < bH.HeapTreesArray.length; i++) {\r\n\t\t\t\t\tif (bH.min == null) {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (bH.HeapTreesArray[i] != null) {\r\n\t\t\t\t\t\t\tif (bH.HeapTreesArray[i].value < bH.min.value) {\r\n\t\t\t\t\t\t\t\tbH.min = bH.HeapTreesArray[i];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tthis.meld(bH);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}",
"public PriorityQueue(int capacity) { \r\n this.capacity=capacity;\r\n this.currentSize=0;\r\n this.queue=new NodeBase[capacity];\r\n }",
"public static void main(String[] args)\n\t{\n\t\t// data added with the same priority value as already-preasent data, have less\n\t\t// priority than objects with the same priority value that were there before\n\t\t// being added.\n\t\tSystem.out.println(\"Data given all have equal priority so data\\nis ordered by the order it is provided in:\");\n\t\tPriorityQueue<String> q = new PriorityQueue<String>();\n\t\tq.add(\"highest\", 8);\n\t\tq.add(\"second highest\", 8);\n\t\tq.add(\"third highest\", 8);\n\t\tq.add(\"fourth highest\", 8);\n\t\tq.add(\"fifth highest\", 8);\n\t\tq.add(\"least\", 8);\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\t\tSystem.out.println(q.remove());\n\n\t\t// sorting data provided in ascending order\n\t\tSystem.out.println(\"-------------\\nData given in ascending priority order:\");\n\t\tPriorityQueue<String> r = new PriorityQueue<String>();\n\t\tr.add(\"one\", 1);\n\t\tr.add(\"two\", 2);\n\t\tr.add(\"three\", 3);\n\t\tr.add(\"four\", 4);\n\t\tr.add(\"five\", 5);\n\t\tr.add(\"six\", 6);\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\t\tSystem.out.println(r.remove());\n\n\t\t// sorting data provided in descending order\n\t\tSystem.out.println(\"-------------\\nData given in descending priority order:\");\n\t\tPriorityQueue<String> s = new PriorityQueue<String>();\n\t\ts.add(\"six\", 6);\n\t\ts.add(\"five\", 5);\n\t\ts.add(\"four\", 4);\n\t\ts.add(\"three\", 3);\n\t\ts.add(\"two\", 2);\n\t\ts.add(\"one\", 1);\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\t\tSystem.out.println(s.remove());\n\n\t\t// sorting data provided in a mixed order\n\t\tSystem.out.println(\"-------------\\nData given in a mixed priority order:\");\n\t\tPriorityQueue<String> t = new PriorityQueue<String>();\n\t\tt.add(\"four\", 4);\n\t\tt.add(\"six\", 6);\n\t\tt.add(\"two\", 2);\n\t\tt.add(\"three\", 3);\n\t\tt.add(\"one\", 1);\n\t\tt.add(\"five\", 5);\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\t\tSystem.out.println(t.remove());\n\n\t\t// sorting data provided in a mixed priority order including some repitition and\n\t\t// negative values\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nincluding repitition and negative priority:\");\n\t\tPriorityQueue<String> u = new PriorityQueue<String>();\n\t\tu.add(\"-two\", -2);\n\t\tu.add(\"two\", 2);\n\t\tu.add(\"zero\", 0);\n\t\tu.add(\"one\", 1);\n\t\tu.add(\"zero again\", 0);\n\t\tu.add(\"-one\", -1);\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\t\tSystem.out.println(u.remove());\n\n\t\t// sorting data provided in a mixed priority order and is of type Double this\n\t\t// time\n\t\tSystem.out.println(\n\t\t\t\t\"-------------\\nData given in a mixed priority order\\nbut using double as the objects this time:\");\n\t\tPriorityQueue<Double> v = new PriorityQueue<Double>();\n\t\tv.add(.002, 2);\n\t\tv.add(.006, 6);\n\t\tv.add(.005, 5);\n\t\tv.add(.001, 1);\n\t\tv.add(.004, 4);\n\t\tv.add(.003, 3);\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t\tSystem.out.println(v.remove());\n\t}",
"private void heapify() {\n\t\tint currIndex = 0;\n\t\twhile (currIndex < heapSize) {\n\t\t\tT val = lstEle.get(currIndex);\n\t\t\tint leftSubtreeIndex = getLeftSubtree(currIndex);\n\t\t\tint rightSubtreeIndex = getRightSubtree(currIndex);\n\t\t\tT leftChildVal = leftSubtreeIndex < heapSize ? lstEle.get(leftSubtreeIndex) : null;\n\t\t\tT rightChildVal = rightSubtreeIndex < heapSize ? lstEle.get(rightSubtreeIndex) : null;\n\t\t\t\n\t\t\tT minVal = null;\n\t\t\tint minValIndex = -1;\n\t\t\tif(leftChildVal != null && rightChildVal != null){\n\t\t\t\tint compVal = leftChildVal.compareTo(rightChildVal); \n\t\t\t\tif(compVal < 0){\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t}else {\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(leftChildVal != null && leftChildVal.compareTo(val) < 0){\n\t\t\t\t\tminValIndex = leftSubtreeIndex;\n\t\t\t\t\tminVal = leftChildVal;\n\t\t\t\t}else if (rightChildVal != null && rightChildVal.compareTo(val) < 0 ){\n\t\t\t\t\tminValIndex = rightSubtreeIndex;\n\t\t\t\t\tminVal = rightChildVal;\n\t\t\t\t}else{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"\\tMin Val : \" +minVal +\" --> \" +minValIndex);\n\t\t\t\n\t\t\tlstEle.set(currIndex, minVal);\n\t\t\tcurrIndex = minValIndex;\n\t\t\tlstEle.set(minValIndex, val);\n\t\t\t\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tPriorityBlockingQueue<Integer> obj = new PriorityBlockingQueue<Integer>();\n\t\t\n\t\t/*for(int i=9;i<=99;i=i+9)\n\t\t{\n\t\t\tobj.offer(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removing First Element :\"+ obj.poll());\n\t\t\n\t\tSystem.out.println(obj);*/\n\t\t\n//\t\tfor (int i = 7; i <=84; i=i+7) {\n//\t\t\tobj.offer(i);\n//\t\t}\n\t\t\n\t\tobj.offer(5);\n\t\tobj.offer(2);\n\t\tobj.offer(13);\n\t\tobj.offer(7);\n\t\tobj.offer(12);\n\t\tobj.offer(3);\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(\"Now First Element :\"+obj.peek());\n\t\t\n\t\tSystem.out.println(obj);\n\t\t\n\t\tSystem.out.println(\"Removed First Element :\"+obj.poll());\n\t\t\n\t\tSystem.out.println(obj);\n\n\t}",
"public PriorityQueue()\r\n\t{\r\n\t\tcurrentSize = 0;\r\n\t\tlowestCurrentPriority = Integer.MAX_VALUE;\r\n\t\tpq = new DLL[MAXIMUM_PRIORITY + 1];\r\n\t\tfor (int i = 0; i < pq.length; i++)\r\n\t\t{\r\n\t\t\tpq[i] = new DLL();\r\n\t\t}\r\n\t}",
"private void minHeapPercolateUp(int index) {\r\n while (index > 0) {\r\n int parent = (int) Math.floor((index - 1) / 2); // parent index\r\n int compareResult = data[index].compareTo(data[parent]); // integer value of the comparison of\r\n // process at `index` to process at\r\n // index `parent`\r\n if (compareResult >= 0) { // order of heap \"heapified\" for min heap\r\n break;\r\n } else {\r\n swap(index, parent);\r\n index = parent;\r\n }\r\n }\r\n }",
"public interface PriorityQueueADT <T extends Comparable<T>> {\r\n\r\n public void insert(T newData); //adds item to PQ\r\n\r\n public T removeBest(); //removes the highest priority item\r\n\r\n public T peekBest(); //highest priority element is return, but not removed\r\n\r\n public boolean isEmpty();// checks whether PQ is empty\r\n\r\n}",
"public ArrayHeapMinPQ() {\n heapArray = new ArrayList<>();\n itemMap = new HashMap<>();\n heapArray.add(null); //alway set index 0 null and heap starts from index 1.\n nextIndex = 1;\n }",
"public static Object PQdownheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5jo6sukhc9upf5qv4eukh8kop\"); // PQdownheap (int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"dd3235mkocimg2v70ln8ixz3k\"); // snode* x = pq[k];\nUNSUPPORTED(\"e0wd4mp2k58ml2bf01e6mtxfc\"); // int v = (x)->n_val;\nUNSUPPORTED(\"b9pl90rstqz0jhnw3ttda3kx5\"); // int lim = PQcnt/2;\nUNSUPPORTED(\"917ffzmzxsh6kw3txaqow8dv0\"); // snode* n;\nUNSUPPORTED(\"zrgst5t0lhf2kxrym9g7gvsn\"); // int j;\nUNSUPPORTED(\"7bbx1rekibyh3hyxh24lprwwk\"); // while (k <= lim) {\nUNSUPPORTED(\"disb3eax2r4wgge9im541y9hv\"); // j = k+k;\nUNSUPPORTED(\"e4w7jx4o3i4gav8ujef2bapbn\"); // n = pq[j];\nUNSUPPORTED(\"4yles8zr6ozg2g0df2jefc1l2\"); // if (j < PQcnt) {\nUNSUPPORTED(\"77cupwd0hd3zp8he6wd4tm6nx\"); // if ((n)->n_val < (pq[j+1])->n_val) {\nUNSUPPORTED(\"1jeqo15tfc6vbefwf85bniwfn\"); // j++;\nUNSUPPORTED(\"1sglut5nbxcoto9tvzxs3eixh\"); // n = pq[j];\nUNSUPPORTED(\"dquo3qofk56ds5xl95lhvcthf\"); // }\nUNSUPPORTED(\"dvgyxsnyeqqnyzq696k3vskib\"); // }\nUNSUPPORTED(\"3hshbuqs95898wh95e2fdh5uz\"); // if (v >= (n)->n_val) break;\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8lpwfkimmel90007dlp5eqpbh\"); // k = j;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"public PriorityQueue(int size){\n heap = new Element[size];\n }",
"public interface OrderedArrayPQ<Key extends Comparable<Key>> extends PriorityQueue<Key>{\n\n /**\n * Retorna a Priority Queue.\n *\n * @return a pq\n */\n Key[] getPq();\n\n default boolean less(final int i, final int j) {\n return getPq()[i].compareTo(getPq()[j]) < 0;\n }\n\n default void exch(final int i, final int j) {\n final Key t = getPq()[i];\n getPq()[i] = getPq()[j];\n getPq()[j] = t;\n }\n\n default void swim(int k) {\n while (k > 1 && less(k / 2, k)) {\n exch(k / 2, k);\n k = k / 2;\n }\n }\n\n default void sink(int k) {\n while (2 * k <= size()) {\n int j = 2 * k;\n if (j < size() && less(j, j + 1)) j++;\n if (!less(k, j)) break;\n exch(k, j);\n k = j;\n }\n }\n}",
"public static void main(String[] args){\n PriorityQueue <Integer> queue1 = new PriorityQueue();\n // add elements\n queue1.add(1000);\n queue1.add(1234);\n queue1.add(3453);\n \n // will throw error\n // queue1.add(null);\n\n // get top element\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n System.out.println(\"PriorityQuey element() \"+queue1.element());\n\n // return top element and remove it from the queue\n System.out.println(\"PriorityQuey poll() \"+queue1.poll());\n System.out.println(\"PriorityQuey peek() \"+queue1.peek());\n\n // addAll\n PriorityQueue <Integer> queue2 = new PriorityQueue();\n queue2.addAll(queue1);\n\n // iterate the queue elements\n Iterator<Integer> itr2=queue1.iterator(); \n while(itr2.hasNext()){ \n System.out.println(\"PriorityQueue elements after addAll() \"+itr2.next()); \n }\n\n // iterate the queue elements\n Iterator<Integer> itr1=queue1.iterator(); \n while(itr1.hasNext()){ \n System.out.println(\"PriorityQueue elements \"+itr1.next()); \n } \n \n // contains()\n System.out.println(\"Contains() \"+queue1.contains(1234));\n \n // remove elements\n queue1.remove(3453);\n // clear()\n queue1.clear();\n // removeAll\n queue1.removeAll(queue1);\n }",
"@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }",
"public void setPriorityQueue() {\n\t\tfor (int i = 0; i < 7; i++) {\n\t\t\tif (leafEntries[i].getFrequency() > 0)\n\t\t\t\tpq.add(new BinaryTree<HuffmanData>(leafEntries[i]));\n\t\t}\n\t}",
"public static void main(String[] args)\n {\n PriorityQueue<Integer> pQueue =\n new PriorityQueue<>(Collections.reverseOrder());\n\n // Adding items to the pQueue using add()\n pQueue.add(10);\n pQueue.add(30);\n pQueue.add(20);\n pQueue.add(400);\n\n // Printing the most priority element\n System.out.println(\"Head value using peek function:\" +\n pQueue.peek());\n\n // Printing all elements\n System.out.println(\"The queue elements:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing the top priority element (or head) and\n // printing the modified pQueue using poll()\n pQueue.poll();\n System.out.println(\"After removing an element \"\n + \"with poll function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Removing 30 using remove()\n pQueue.remove(30);\n System.out.println(\"after removing 30 with\"\n + \" remove function:\");\n for (Integer integer : pQueue) System.out.println(integer);\n\n // Check if an element is present using contains()\n boolean b = pQueue.contains(20);\n System.out.println(\"Priority queue contains 20 \"\n + \"or not?: \" + b);\n\n // Getting objects from the queue using toArray()\n // in an array and print the array\n Object[] arr = pQueue.toArray();\n System.out.println(\"Value in array: \");\n for (Object o : arr) System.out.println(\"Value: \" + o.toString());\n }",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tPriorityQueue<Integer>heap=new PriorityQueue<Integer>(new comparison());\n\t\tPriorityQueue<Integer>heap1=new PriorityQueue<Integer>();\n\t\tint num=sc.nextInt();\n\t\tint k=sc.nextInt();\n\t\tfor(int i=0;i<num;i++)\n\t\t{\n\t\t\tint value=sc.nextInt();\n\t\t\theap.add(value);\n\t\t\theap1.add(value);\n\t\t\tif(heap.size()>k)\n\t\t\t{\n\t\t\t\theap.remove();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t\tfor(int i=0;i<k-1;i++)\n\t\t{\n\t\t\theap.remove();\n\t\t}\n\t\tSystem.out.println(heap.peek());\n\t}",
"public static void main(String[] args) {\n\t\tQueue<Integer> queue = new PriorityQueue<>();\n\n\t\tqueue.offer(2);\n\t\tqueue.offer(8);\n\t\tqueue.offer(3);\n\t\tqueue.offer(1);\n\t\tqueue.offer(10);\n\n\t\tSystem.out.println(\"Get head of the head and remove element: \" + queue.poll()); // 1\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\t\tSystem.out.println(\"peek(): \" + queue.peek()); // 2\n\t\tSystem.out.println(\"Size of the queue after poll(): \" + queue.size()); // 4\n\n\t\t// This example throws ClassCastException\n//\t\tQueue<Product> products = new PriorityQueue<>();\n//\t\tproducts.offer(new Product(\"Shoes\"));\n\t\t// java.lang.ClassCastException: class com.roy._18collections.queue.Product\n\t\t// cannot be cast to class java.lang.Comparable\n\n\t\t// Using custom Comparator\n\t\tComparator<Product> productComparator = new Comparator<Product>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Product o1, Product o2) {\n\t\t\t\treturn o1.getName().compareTo(o2.getName());\n\t\t\t}\n\t\t};\n\t\tQueue<Product> products = new PriorityQueue<>(productComparator);\n\t\tproducts.offer(new Product(\"Shoes\"));\n\t\tproducts.offer(new Product(\"Jeans\"));\n\t\tproducts.offer(new Product(\"Shirts\"));\n\t\tproducts.offer(new Product(\"Hat\"));\n\t\tproducts.offer(new Product(\"T-Shirts\"));\n\n\t\tfor (Product p : products) {\n\t\t\tSystem.out.println(p.getName());\n\t\t}\n\n\t}",
"public void enqueue(Item item) throws NoSuchElementException {\r\n // Usar el metodo upHeap para corregir la condicion de\r\n // Min Heap\r\n\r\n\r\n if (size == 0){\r\n heap[1] = item;\r\n size = 1;\r\n return;\r\n }\r\n int cur = size + 1;\r\n int par = cur/2;\r\n\r\n heap[cur] = item;\r\n size++;\r\n\r\n if (heap[cur].compareTo(heap[par]) > 0){\r\n upHeap(cur);\r\n }\r\n\r\n\r\n }",
"public HeapPriorityQueue(int size)\n\t{\n\t\tstorage = new Comparable[size + 1];\n\t\tcurrentSize = 0;\n\t}",
"public MaxPriorityQueue() {\n heap = new MaxHeap<>();\n }",
"private PriorityQueue<PCB> newRemainingQueue() {\n\n\t\t// Comparator for sorting low priorities first\n\t\tComparator<PCB> byLowestPriority =\n\t\t\t(p1, p2) -> new Integer(p1.getPriority()).compareTo(p2.getPriority());\n\n\t\treturn new PriorityQueue<>(byLowestPriority);\n\t}",
"public int peek()\r\n\t{\r\n\t\treturn (int) pq[lowestCurrentPriority].getHead();\r\n\t}",
"IPriorityQueue pop() throws EmptyPriorityQueueException;",
"public static void main(String[] args) {\n\n\t\tPriorityQueue pq = new PriorityQueue(15, new MyComparator());\n\t\t\n\t\tpq.offer(\"A\");\n\t\tpq.offer(\"B\");\n\t\tpq.offer(\"Z\");\n\t\tpq.offer(\"L\");\n\t\t\n\t\tSystem.out.println(pq);\n\t}",
"PriorityQueue(boolean transferPriority) \n\t\t{\n\t\t\tthis.transferPriority = transferPriority;\n\t\t\twaitQueue = new java.util.PriorityQueue<KThread>(1, new comparePriority()); //Initialize the waitQueue to a java.util.PriorityQueue with a custom comparator defined below\n\t\t}",
"public static void main(String[] args) {\n\n //The PriorityQueue class provides the facility of using queue.\n // But it does not orders the elements in FIFO manner. It inherits AbstractQueue class.\n\n PriorityQueue<String> priorityQueue=new PriorityQueue<>();\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"vinet\");\n priorityQueue.add(\"amit\");\n priorityQueue.add(\"rajan\");\n priorityQueue.add(\"karan\");\n priorityQueue.add(\"sajan\");\n priorityQueue.add(\"rajan\");\n\n System.out.println(priorityQueue.size());\n System.out.println(priorityQueue);\n System.out.println(\"head \"+priorityQueue.element());\n System.out.println(\"head \"+priorityQueue.peek());\n System.out.println(priorityQueue.remove(\"sajan\"));\n System.out.println(priorityQueue);\n priorityQueue.remove(\"rajan\");\n\n for(String str: priorityQueue){\n System.out.println(str);\n }\n priorityQueue.remove();\n System.out.println(priorityQueue);\n priorityQueue.poll();\n System.out.println(priorityQueue);\n priorityQueue.removeAll(priorityQueue);\n System.out.println(priorityQueue);\n }",
"public static void main(String[] args) {\n ArrayList<String> list=new ArrayList<>();\n list.add(\"1\");\n list.add(\"2\");\n list.add(\"3\");\n list.add(\"4\");\n list.add(\"5\");\n list.remove(\"2\");\n PriorityBlockingQueue priorityBlockingQueue=new PriorityBlockingQueue(100, new Comparator() {\n @Override\n public int compare(Object o1, Object o2) {\n return 0;\n }\n });\n }",
"@DISPID(3)\r\n\t// = 0x3. The runtime will prefer the VTID if present\r\n\t@VTID(9)\r\n\tint queuePriority();",
"@DISPID(115)\r\n\t// = 0x73. The runtime will prefer the VTID if present\r\n\t@VTID(110)\r\n\tint queuePriority();",
"@Test(timeout = SECOND)\n public void testRemoveMinAndPeekMinCombo() {\n IPriorityQueue<Integer> testQ = makeInstance();\n for (int i = 1000; i > 0; i--) {\n testQ.insert(i);\n }\n int qSize = 1000;\n for (int i = 1; i <= 1000; i++) {\n int min = testQ.peekMin();\n assertEquals(i, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(--qSize, testQ.size());\n }\n // duplication test\n testQ.insert(2);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(1);\n testQ.insert(2);\n\n for (int i = 5; i > 1; i--) {\n int min = testQ.peekMin();\n assertEquals(1, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n for (int i = 1; i >= 0; i--) {\n int min = testQ.peekMin();\n assertEquals(2, min);\n assertEquals(min, testQ.removeMin());\n assertEquals(i, testQ.size());\n }\n }",
"public void enqueue(int item, int priority)\r\n\t{\r\n\t\tpq[priority].addToBeginning(item);\r\n\t\tif (priority < lowestCurrentPriority)\r\n\t\t{\r\n\t\t\tlowestCurrentPriority = priority;\r\n\t\t}\r\n\t\tcurrentSize++;\r\n\t}",
"public FileLine removeMin() throws PriorityQueueEmptyException {\n\t\t\n \tif (isEmpty()) {\n \t\tthrow new PriorityQueueEmptyException();\n \t}\n \tFileLine temp = queue[1];\n \t//Retain shape\n \tqueue[1] = queue[numLines];\n \tboolean done = false;\n \t\n \tint parent = 1;\n \t\n \twhile (!done) {\n \t\tint child1 = parent * 2;\n \tint child2 = (parent * 2) + 1;\n \t\n \t\tFileLine maxChild = null;\n \t//Find child with max priority\n \tif (child1 < queue.length && child2 < queue.length) {\n\t \t\t\n\t \t\tmaxChild = maxChild(queue[child1], queue[child2]);\n \t} \n \t//Both greater than the length, set max as parent\n \telse if (child1 >= queue.length && child2 >= queue.length) {\n \t\tmaxChild = queue[parent];\n \t}\n \telse if (child1 >= queue.length) {\n \t\tmaxChild = queue[child2];\n \t}\n \telse if (child2 >= queue.length) {\n \t\tmaxChild = queue[child1];\n \t}\n \t\n \t\t\n \t\tint parentComp = cmp.compare(queue[parent], maxChild);\n \t\t\n \t\t\t\n \t\t//Compare parent to child\n \t\tif (parentComp <= 0) {\n \t\t\tdone = true;\n \t\t} \n \t\t//Swap parent and child if child higher priority\n \t\telse {\n \t\t\tFileLine hold = queue[parent];\n \t\t\t\n \t\t\t//child1 was the max, swap parent with it\n \t\t\tif (cmp.compare(maxChild, queue[child1]) == 0) {\n \t\t\t\tqueue[parent] = queue[child1];\n \t\t\tqueue[child1] = hold;\n \t\t\tparent = child1;\n \t\t\t}\n \t\t\t//child 2 was the max, swap parent with it\n \t\t\telse {\n \t\t\t\tqueue[parent] = queue[child2];\n \t\t\t\tqueue[child2] = hold;\n \t\t\t\tparent = child2;\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n \t\n \tnumLines--;\n\t\treturn temp;\n }",
"private void minHeapify(int v, int heapSize){\n\t\tint smallest;\n\t\tint left = leftChild(v);\n\t\tint right = rightChild(v);\n\t\tif (left<heapSize && _a[left].getWeight()<_a[v].getWeight()){\n\t\t\tsmallest = left;\n\t\t}\n\t\telse{\n\t\t\tsmallest = v;\n\t\t}\n\t\tif (right<heapSize && _a[right].getWeight()<_a[smallest].getWeight()){\n\t\t\tsmallest = right;\n\t\t}\n\t\tif (smallest!=v){\n\t\t\texchange(v, smallest);\n\t\t\tminHeapify(smallest, heapSize);\n\t\t}\t\t\n\t}",
"public static void PrimsAlgorithm(WeightedGraph graph) {\n System.out.println(\"______________________________Prim's Algorithm(Priority Queue)_____________________________\\n\");\n ArrayList<Edge> mst = new ArrayList<>();\n // initialize an array that will keep track of which vertices have been visited\n boolean[] visited = new boolean[graph.getVertices()];\n // initialize a PriorityQueue \n PriorityQueue<Edge> priorityQueue = new PriorityQueue<>();\n // mark the initial vertex as visited\n visited[0] = true;\n\n // for every edge connected to the source, add it to the PriorityQueue \n for (int i = 0; i < graph.getAdjacencylist(0).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(0).get(i));\n }\n\n // keep adding edges until the PriorityQueue is empty\n while (!priorityQueue.isEmpty()) {\n Edge e = priorityQueue.remove();\n\n // if we have already visited the opposite vertex, go to the next edge\n if (visited[e.getDestination()]) {\n continue;\n }\n\n //mark the opposite vertex as visited\n visited[e.getDestination()] = true;\n //Add an edge to the minimum spanning tree\n mst.add(e);\n\n // for every edge connected to the opposite vertex, add it to the PriorityQueue\n for (int i = 0; i < graph.getAdjacencylist(e.getDestination()).size(); i++) {\n priorityQueue.add(graph.getAdjacencylist(e.getDestination()).get(i));\n }\n\n }\n\n // if we haven't visited all of the vertices, return \n for (int i = 1; i < graph.getVertices(); i++) {\n if (!visited[i]) {\n System.out.println(\"Error! the graph is not connected.\");\n return;\n }\n }\n\n }",
"@Test\n public void testInsert() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(5);\n assertEquals(1, instance.size());\n assertEquals(new Integer(5), instance.delMin());\n }",
"void minHeapify(int i) {\n\n\t\tint l = 2*i + 1;\n\t\tint r = 2*i + 2;\n\t\tint smallest = i;\n \n\t\tif(l < size && arr[l].element < arr[smallest].element)\n\t\t\tsmallest = l;\n\n\t\tif(r < size && arr[r].element < arr[smallest].element)\n\t\t\tsmallest = r;\n\n\t\tif(smallest != i) {\n\t\t\t// call method exchange to change \n\t\t\texchange(arr,i,smallest);\n\t\t\tminHeapify(smallest);\n\t\t}\n\t}",
"public static void main(String[] args) {\n Timer timer = new Timer();\r\n timer.start();\r\n \r\n /*Integer[] a = new Integer[1000000];\r\n Random rand = new Random();\r\n double d;\r\n int in;\r\n for(int x = 0; x < 1000000; x++){\r\n d = Math.random()*50;\r\n in = (int) d;\r\n a[x] = in;\r\n }*/\r\n \r\n Integer[] a = new Integer[5];\r\n a[0] = new Integer(2);\r\n a[1] = new Integer(1);\r\n a[2] = new Integer(4);\r\n a[3] = new Integer(3);\r\n\ta[4] = new Integer(8);\r\n priorityqSort(a);\r\n /*Queue<Integer> pq1 = new PriorityQueue<Integer>();\r\n for (Integer x: a){\r\n pq1.add(x);\r\n }\r\n System.out.println(\"pq1: \" + pq1);*/\r\n \r\n /*Queue<String> pq2 = new PriorityQueue<>();\r\n pq2.add(\"4\");\r\n pq2.add(\"9\");\r\n pq2.add(\"2\");\r\n pq2.add(\"1\");\r\n pq2.add(\"5\");\r\n pq2.add(\"0\");\r\n System.out.println(\"pq: \" + pq2);*/\r\n \r\n timer.end();\r\n System.out.println(timer);\r\n }",
"public static Object PQupheap(Object... arg) {\nUNSUPPORTED(\"c01vxogao855zs8fe94tpim9g\"); // void\nUNSUPPORTED(\"5hhoge8azwixhuw1r6f1ae6d\"); // PQupheap(int k)\nUNSUPPORTED(\"erg9i1970wdri39osu8hx2a6e\"); // {\nUNSUPPORTED(\"7e1sq1127wt16hr7o0andcwob\"); // snode* x = pq[k];\nUNSUPPORTED(\"7bfu0p9xmzkty10xv4n4l5cqs\"); // int v = x->n_val;\nUNSUPPORTED(\"1j1bbq23z0qzohezignztjo66\"); // int next = k/2;\nUNSUPPORTED(\"ae5pat4mp4l6k25pvk8saz8c7\"); // snode* n;\nUNSUPPORTED(\"70492o1szwz9au93c3is2goa\"); // while ((n = pq[next])->n_val < v) {\nUNSUPPORTED(\"4i53ezzk69bsmpugd2h8bo35\"); // pq[k] = n;\nUNSUPPORTED(\"iolnc8pg22pbme3zbdim1eqy\"); // (n)->n_idx = k;\nUNSUPPORTED(\"8fpdpgwovt0k58t5u167v63is\"); // k = next;\nUNSUPPORTED(\"eqtnhenyor3dwsa6on9crthdd\"); // next /= 2;\nUNSUPPORTED(\"7ijd6pszsxnoopppf6xwo8wdl\"); // }\nUNSUPPORTED(\"1lxwoekai0i8v3rg0vrg6ahmx\"); // pq[k] = x;\nUNSUPPORTED(\"7ss0wudteh17yswf0ihopig7z\"); // (x)->n_idx = k;\nUNSUPPORTED(\"c24nfmv9i7o5eoqaymbibp7m7\"); // }\n\nthrow new UnsupportedOperationException();\n}",
"@Test\n public void randomLockstep() {\n PriorityBlockingQueue pbq = new PriorityBlockingQueue();\n PriorityQueue pq = new PriorityQueue();\n List<Consumer<Queue>> frobbers = List.of(\n q -> q.add(42),\n q -> assertTrue(q.offer(86)),\n q -> q.poll(),\n q -> q.peek(),\n q -> {\n Iterator it = q.iterator();\n if (it.hasNext()) {\n it.next();\n it.remove();\n }});\n for (int i = 0; i < 100; i++) {\n Consumer<Queue> frobber = frobbers.get(rnd.nextInt(frobbers.size()));\n frobber.accept(pq);\n frobber.accept(pbq);\n assertInvariants(pbq);\n assertInvariants(pq);\n assertTrue(Arrays.equals(pq.toArray(), pbq.toArray()));\n }\n }",
"public void downHeap(int pos) throws NoSuchElementException\r\n {\r\n if (pos <= 0 || pos > size)\r\n throw new NoSuchElementException();\r\n\r\n int cur = pos;\r\n while (true) {\r\n int left = 2* cur; // [TODO] indice del hijo izquierdo\r\n int right = 2* cur + 1; // [TODO] indice del hijo derecho\r\n\r\n // [TODO] Si no tiene hijos (es una hoja), detenemos el loop\r\n\r\n if (left > size && right > size)\r\n break;\r\n\r\n int min_idx; // indice (left o right) del hijo mas prioritario\r\n\r\n // [TODO] Compara el hijo izquierdo versus el derecho y determina cual\r\n // es el mas prioritario. Graba su posicion en min_idx. Ojo: el hijo\r\n // derecho puede ser que NO exista, en cuyo caso el mas prioritario es\r\n // el izquierdo\r\n if (heap[right] == null){\r\n min_idx = left;\r\n }else\r\n if (heap[left].compareTo(heap[right]) > 0){\r\n min_idx = left;\r\n }else\r\n min_idx = right;\r\n\r\n\r\n // [TODO] Revisar si la propiedad de heap se cumple para los elementos\r\n // en los indices cur y min_idx. Si no nay violacion de la propiedad\r\n // de heap, terminamos el loop\r\n if (heap[cur].compareTo(heap[min_idx]) > 0)\r\n break;\r\n\r\n // [TODO] Intercambiamos los elementos en los indices cur y min_idx\r\n Item c = heap[cur];\r\n Item hijo = heap[min_idx];\r\n\r\n heap[min_idx] = c;\r\n heap[cur] = hijo;\r\n\r\n // [TODO] Navega hacia el hijo mas prioritario\r\n cur = min_idx;\r\n }\r\n }",
"public Heap(boolean isMin, Collection<ValueType> data) {\r\n // TODO\r\n }",
"public PriorityQueue(HeapType type) {\n this(-1, type);\n }",
"int minPriority(){\n if (priorities.length == 0)\n return -1;\n\n int index = 0;\n int min = priorities[index];\n\n for (int i = 1; i < priorities.length; i++){\n if ((priorities[i]!=(-1))&&(priorities[i]<min)){\n min = priorities[i];\n index = i;\n }\n }\n return values[index];\n }",
"public static void main(String[] args) {\n\t\tPriorityQueue<Integer> pq = new PriorityQueue<>(Collections.reverseOrder());\n\t\t//By default this gives us Min-Priority Queue\n\t\t\n\t\t//Task - 1 -> How to get Max-Priority Queue using this class.\n\t\t//Use Collections.reverseOrder() inside the round brackets to use Max-Priority Queue\n\t\tSystem.out.println(pq.isEmpty());\n\t\tpq.add(3);\n\t\tpq.add(4);\n\t\tpq.add(1);\n\t\tpq.add(9);\n\t\tpq.add(7);\n\t\tpq.add(2);\n\t\tpq.add(6);\n\t\tSystem.out.println(pq.isEmpty());\n\t\tSystem.out.println(pq.poll());\n\t\tSystem.out.println(pq.size());\n\t\tSystem.out.println(pq.peek());\n\t}",
"public ArrayHeapMinPQ() {\n aHeap.add(null);\n }",
"void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}",
"public WaitablePQueue(int Capacity, Comparator<? super E> comparator) {\n\t \tthis.pq = new PriorityQueue<>(Capacity, comparator);\n\t \tthis.sem = new Semaphore(0);\n\t}",
"void minHeapify(int i)\n {\n int lt=MyHeap.left(i);\n int rt=MyHeap.right(i);\n int smallest=i;\n if(lt<size && arr[lt]<arr[i])\n smallest=lt;\n if(rt<size && arr[rt]<arr[smallest])\n smallest=rt;\n if(smallest!=i)\n {\n swap(i,smallest);\n minHeapify(smallest);\n }\n }",
"public MinHeap() {\n\tdata = new ArrayList<Integer>();\n\t}",
"public node_data heapExtractMin(){\n\t\tdouble min = _positiveInfinity;\n\t\tnode_data v=null;\n\t\tif (!isEmpty()){\n\t\t\tv = _a[0];\n\t\t\tmin = v.getWeight();\n\t\t\t_a[0]=_a[_size-1];\n\t\t\t_size = _size-1;\n\t\t\tminHeapify(0, _size);\n\t\t}\n\t\treturn v;\n\t}",
"public static void main(String[] args) {\n\t\tint capacity = 15;\n\n\t\t// create object of PriorityBlockingQueue\n\t\t// using PriorityBlockingQueue(int initialCapacity) constructor\n\t\tPriorityBlockingQueue<Integer> pbq = new PriorityBlockingQueue<Integer>(capacity);\n\n\t\t// add numbers\n\t\tpbq.add(1);\n\t\tpbq.add(2);\n\t\tpbq.add(3);\n\n\t\t// print queue\n\t\tSystem.out.println(\"PriorityBlockingQueue:\" + pbq);\n\t}",
"public static void main(String[] args) {\n\t\tCreate_queue new_queue= new Create_queue();\n\t\tnew_queue.enqueu(12);\n\t\tnew_queue.enqueu(5);\n\t\tnew_queue.enqueu(36);\n\t\tnew_queue.enqueu(5);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(10);\n\t\tnew_queue.enqueu(8);\n\t\tnew_queue.enqueu(2);\n\t\tnew_queue.enqueu(14);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(32);\n\t\tnew_queue.enqueu(11);\n\t\tnew_queue.enqueu(21);\n\t\tnew_queue.enqueu(44);\n\t\tnew_queue.enqueu(46);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(50);\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue);\n\t\tnew_queue.enqueu(100);\n\t\tSystem.out.println(new_queue);\n\t\tSystem.out.println(new_queue.peek());\n\t\tnew_queue.dequeu();\n\t\tSystem.out.println(new_queue.peek());\n\t\t\n\t\t\n\t}",
"public void balanceHeaps(){\n \n //If max heap size is greater than min heap then pop the first element and put int min heap\n if(maxHeap.size() > minHeap.size())\n minHeap.add(maxHeap.pollFirst());\n\n }",
"private synchronized void refreshQueuePriority() {\n BlockingQueue<Message> newQueue;\n if(highPriorityMode) {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, HighPriorityModeComparator.COMPARATOR);\n } else {\n newQueue = new PriorityBlockingQueue<>(DEFAULT_CAPACITY_SIZE, NoPriorityModeComparator.COMPARATOR);\n }\n this.queue.drainTo(newQueue);\n this.queue = newQueue;\n latch.countDown();\n }",
"private void makePrioQ()\n\t{\n\t\tprioQ = new PrioQ();\n\t\t\n\t\tfor(int i = 0; i < canonLengths.length; i++)\n\t\t{\n\t\t\tif(canonLengths[i] == 0)\n\t\t\t\tcontinue;\n\t\t\tNode node = new Node(i, canonLengths[i]);\n\t\t\tprioQ.insert(node);\n\t\t}\n\t}",
"@Override\n public int compareTo(Heap<E> o) {\n if(this.peek().compareTo(o.peek()) < 0) return -1;\n if(this.peek().compareTo(o.peek()) > 0) return 1;\n else return 0;\n }",
"public T poll() {\n if (this.size > 0) {\n T min = (T) pq[0];\n pq[0] = pq[this.size - 1];\n size--;\n percolateDown(0);\n return min;\n } else {\n return null;\n }\n }",
"void MinInsert(int x)\n {\n if (size == capacity) {\n return;\n }\n size++;\n arr[size - 1] = x;\n for (int i = size - 1; i != 0 && arr[MyHeap.parent(i)] > arr[i]; )\n {\n swap(i,MyHeap.parent(i));\n i = MyHeap.parent(i);\n }\n }",
"public static void selfTest() {\n System.out.println(\"+++Beginning tests for priority scheduler+++\");\n int numTests = 5;\n int count = 0;\n\n boolean machine_start_status = Machine.interrupt().disabled();\n Machine.interrupt().disable();\n\n PriorityScheduler p = new PriorityScheduler();\n\n ThreadQueue t = p.newThreadQueue(true);\n ThreadQueue t1 = p.newThreadQueue(true);\n ThreadQueue t2 = p.newThreadQueue(true);\n ThreadQueue masterQueue = p.newThreadQueue(true);\n\n KThread tOwn = new KThread();\n KThread t1Own = new KThread();\n KThread t2Own = new KThread();\n\n t.acquire(tOwn);\n t1.acquire(t1Own);\n t2.acquire(t2Own);\n\n\n for (int i = 0; i < 3; i++) {\n for (int j = 1; j <= 3; j++) {\n KThread curr = new KThread();\n\n if (i == 0)\n t.waitForAccess(curr);\n else if (i == 1)\n t1.waitForAccess(curr);\n else\n t2.waitForAccess(curr);\n\n p.setPriority(curr, j);\n }\n }\n\n KThread temp = new KThread();\n t.waitForAccess(temp);\n p.getThreadState(temp).setPriority(4);\n\n temp = new KThread();\n t1.waitForAccess(temp);\n p.getThreadState(temp).setPriority(5);\n\n temp = new KThread();\n t2.waitForAccess(temp);\n p.getThreadState(temp).setPriority(7);\n\n temp = new KThread();\n\n masterQueue.waitForAccess(tOwn);\n masterQueue.waitForAccess(t1Own);\n masterQueue.waitForAccess(t2Own);\n\n masterQueue.acquire(temp);\n\n System.out.println(\"master queue: \"); masterQueue.print();\n// System.out.println(\"t queue: \"); t.print();\n// System.out.println(\"t1 queue: \"); t1.print();\n// System.out.println(\"t2 queue: \"); t2.print();\n//\n// System.out.println(\"tOwn effective priority = \" + p.getThreadState(tOwn).getEffectivePriority() + \" and priority = \" + p.getThreadState(tOwn).getPriority());\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority());\n\n System.out.println(\"After taking away max from master queue\");\n KThread temp1 = masterQueue.nextThread();\n masterQueue.print();\n System.out.println(\"temp's effective priority = \" + p.getThreadState(temp).getEffectivePriority() + \" and it's priority = \" + p.getThreadState(temp).getPriority());\n System.out.println(\"nextThread's effective priority = \" + p.getThreadState(temp1).getEffectivePriority());\n Machine.interrupt().restore(machine_start_status);\n// while(count < numTests) {\n// KThread toRun = new KThread(new PriSchedTest(count++));\n// System.out.println(toRun);\n// t.waitForAccess(toRun);\n// p.getThreadState(toRun).setPriority(numTests-count);\n// toRun.fork();\n// }\n// count = 0;\n// while(count++ < numTests) {\n// KThread next = t.nextThread();\n// Lib.assertTrue(p.getThreadState(next).getPriority() == numTests-count);\n// System.out.println(\"Priority is \" + p.getThreadState(next).getPriority());\n// }\n }",
"@Test\n public void testDelMin() {\n PriorityQueue<Integer> instance = new PriorityQueue<>();\n instance.insert(7);\n instance.insert(5);\n instance.insert(6);\n assertEquals(new Integer(5), instance.delMin());\n }",
"public ArrayPriorityQueue()\n { \n\tqueue = new ArrayList();\n }",
"public PriorityQueue(int initialCapacity, HeapType type) {\n super(PriorityQueueElement.class, initialCapacity, type);\n elementsMap = new HashMap<V, PriorityQueueElement<P, V>>();\n }",
"String peek() throws EmptyPriorityQueueException;",
"public static void main(String args[])\r\n\t {\n\t\t PriorityQueue<String> pq = new PriorityQueue<String>();\r\n\r\n // Adding items to the pq using add()\r\n\t\t pq.add(\"Peach\");\r\n\t\t pq.add(\"Cyan\");\r\n\t\t pq.add(\"Crimson\");\r\n\t\t \r\n\t\t System.out.println(\"Priority Queue: \"+pq);\r\n\t }",
"public static void sort(Comparable[] pq) {\n int n = pq.length;\n \n /*\n * Fill in this method! Use the code on p. 324 of the book as a model,\n * but change it so each node in the heap has 3 children instead of 2.\n */\n }",
"public Item dequeue() throws NoSuchElementException {\r\n // Usar el metodo downHeap para corregir la condicion\r\n // de Min Heap\r\n\r\n\r\n Item ret = heap[1];\r\n\r\n heap[1] = heap[size];\r\n downHeap(1);\r\n\r\n heap[size] = null;\r\n size--;\r\n\r\n return ret;\r\n }",
"public Node binomialHeapExtractMin() {\n\t\tNode x = this.deleteMin();\n\t\t\n\t\t// make a new heap\n\t\t// reverse the child list of x and assign it to the head of new heap.\n\t\tBinomialHeap hPrime = new BinomialHeap();\n\t\thPrime.head = reverseLinkedList(x.leftChild);\n\t\t\n\t\t// perform union on the child tree list of x and the original heap\n\t\tBinomialHeap h = this.binomialHeapUnion(hPrime);\n\t\tthis.head = h.head;\n\t\t\n\t\t// return the minimum node\n\t\treturn x;\n\t}"
]
| [
"0.74725634",
"0.7298183",
"0.7122129",
"0.6993857",
"0.69827896",
"0.69537544",
"0.6929447",
"0.6893875",
"0.6892684",
"0.6867427",
"0.681894",
"0.6800453",
"0.67705816",
"0.67594784",
"0.67466265",
"0.6734999",
"0.6723704",
"0.67148745",
"0.66940004",
"0.6626624",
"0.6619942",
"0.66031265",
"0.6576997",
"0.6518819",
"0.65134805",
"0.65133756",
"0.6510944",
"0.6508721",
"0.6493316",
"0.6486469",
"0.64798164",
"0.64789945",
"0.6452984",
"0.64484066",
"0.64454037",
"0.643982",
"0.64279515",
"0.6421261",
"0.6371136",
"0.6364616",
"0.6355379",
"0.6333966",
"0.6331619",
"0.63262886",
"0.6325695",
"0.6321445",
"0.6304517",
"0.6300394",
"0.6286647",
"0.6284707",
"0.6272799",
"0.62696475",
"0.6265226",
"0.6262738",
"0.62611866",
"0.6259089",
"0.6249723",
"0.62472093",
"0.6239633",
"0.62316644",
"0.62113816",
"0.6211214",
"0.6201479",
"0.61920595",
"0.6191123",
"0.61783135",
"0.61780065",
"0.61736155",
"0.6169967",
"0.6155814",
"0.6155685",
"0.61510676",
"0.61485285",
"0.61291826",
"0.6124543",
"0.61206824",
"0.61145175",
"0.61079",
"0.6102411",
"0.61014086",
"0.6101378",
"0.61005706",
"0.6098071",
"0.6090799",
"0.6085035",
"0.6045974",
"0.6043772",
"0.6032931",
"0.6020316",
"0.60033226",
"0.59956086",
"0.5992988",
"0.5991009",
"0.5988249",
"0.59822387",
"0.59658116",
"0.5964226",
"0.5963201",
"0.5958947",
"0.59579974",
"0.59570736"
]
| 0.0 | -1 |
method return paginated list by page/number or entity as result of filtering | @GetMapping
public Page<TeacherDTO> find(@RequestParam(required = false) Integer page, @RequestParam(required = false) Integer number,
@RequestParam(required = false) String firstName, @RequestParam(required = false) String lastName, Locale locale) {
return teacherService.getByFilter(new PageRequestParameters<>(new PaginationPage(page, number), new StudentTeacherFilter(firstName, lastName)), locale).map(this::convertToDto);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;",
"List<Product>findAllBy(Pageable pageable);",
"List<T> findPage(int pageNumber);",
"List<ProductView> getAllByPage(PageableAndSortable pageableAndSortable) throws ProductException;",
"List<E> page(Page page, Long...params);",
"Page<Accessprofile> listWithCriterasByPage(List<SearchCriteria> searchCriterias, Pageable pageable);",
"@Override\n public List<ModelPerson> selectpaging(Integer start, Integer end) {\n return null;\n }",
"@Override\r\n public Page<T> filter(U filter)\r\n {\r\n Class<T> T = returnedClass();\r\n CriteriaBuilder cb = getEm().getCriteriaBuilder();\r\n CriteriaQuery<T> criteriaQuery = cb.createQuery(T);\r\n CriteriaQuery<Long> criteriaQueryCount = cb.createQuery(Long.class);\r\n Root<T> entity = criteriaQuery.from(T);\r\n criteriaQueryCount.select(cb.count(entity));\r\n criteriaQuery.select(entity);\r\n \r\n // collect all filters relevant for affected entity\r\n List<Object> filters = new ArrayList<Object>();\r\n getPreFilters(filters, T, filter);\r\n \r\n filters.add(filter);\r\n List<Hint> hints = new ArrayList<Hint>();\r\n \r\n if (!filters.isEmpty()) {\r\n List<Predicate> filterPredicates = new ArrayList<Predicate>();\r\n for (Object queryCriteria : filters) {\r\n \r\n List<Predicate> orPredicates = new ArrayList<Predicate>();\r\n List<Predicate> andPredicates = new ArrayList<Predicate>();\r\n FilterContextImpl<T> filterContext = new FilterContextImpl<T>(entity, criteriaQuery, getEm(), queryCriteria);\r\n hints.addAll(filterContext.getHints());\r\n \r\n List<Field> fields = AbstractFilteringRepository.getInheritedPrivateFields(queryCriteria.getClass());\r\n for (Field field : fields) {\r\n // I want to skip static fields and fields which are cared of in different(specific way)\r\n if (!Modifier.isStatic(field.getModifiers()) && !ignoredFields.contains(field.getName())) {\r\n if (!field.isAccessible()) {\r\n field.setAccessible(true);\r\n }\r\n \r\n /**\r\n * Determine field path\r\n */\r\n // anottaion specified path has always highest priority, so is processed in the first place processing\r\n FieldPath fieldPathAnnotation = field.getAnnotation(FieldPath.class);\r\n Field f;\r\n if (fieldPathAnnotation != null && StringUtils.isNotBlank(fieldPathAnnotation.value())) {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(fieldPathAnnotation.value(), FieldPath.FIELD_PATH_SEPARATOR), true);\r\n } else {\r\n f = FieldUtils.getField(T, StringUtils.substringBefore(field.getName(), StructuredPathFactory.FILTER_PATH_SEPARATOR), true);\r\n }\r\n \r\n // tries to find CustmoProcessor annotation or some annotation metaannotated by custom processor\r\n CustomProcessor processor = field.getAnnotation(CustomProcessor.class);\r\n if (processor == null) {\r\n processor = getMetaAnnotation(CustomProcessor.class, field);\r\n }\r\n \r\n ProcessorContext<T> processorContext = filterContext.getProcessorContext(andPredicates, orPredicates, field);\r\n Object filterFieldValue = getFilterFieldValue(field, queryCriteria);\r\n if (processor == null && f != null) {\r\n processTypes(filterFieldValue, processorContext);\r\n // If field is not pressent in Entity, it needs special care\r\n } else {\r\n Class<CustomFieldProcessor<T, ?>> processorClass = null;\r\n if (processor != null) {\r\n processorClass = (Class<CustomFieldProcessor<T, ?>>) processor.value();\r\n processCustomFields(filterFieldValue, processorContext, processorClass);\r\n } else {\r\n if (!processCustomTypes(filterFieldValue, processorContext)) {\r\n if (shouldCheck(processorContext.getField())) {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" wasn't handled. \");\r\n throw new UnsupportedOperationException(\"Custom filter fields not supported in \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \", required field: \" + processorContext.getField().getName());\r\n } else {\r\n LOG.info(\"Field \\'\" + processorContext.getField().getName() + \"\\' from \"\r\n + processorContext.getField().getDeclaringClass().getSimpleName()\r\n + \" marked with @Unchecked annotation wasn't handled. \");\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!andPredicates.isEmpty() || !orPredicates.isEmpty()) {\r\n Predicate filterPredicate = null;\r\n if (!andPredicates.isEmpty()) {\r\n Predicate andPredicate = cb.and(andPredicates.toArray(new Predicate[1]));\r\n filterPredicate = andPredicate;\r\n }\r\n if (!orPredicates.isEmpty()) {\r\n Predicate orPredicate = cb.or(orPredicates.toArray(new Predicate[1]));\r\n if (filterPredicate != null) {\r\n filterPredicate = cb.and(filterPredicate, orPredicate);\r\n } else {\r\n filterPredicate = orPredicate;\r\n }\r\n }\r\n filterPredicates.add(filterPredicate);\r\n }\r\n }\r\n if (!filterPredicates.isEmpty()) {\r\n Predicate finalPredicate = cb.and(filterPredicates.toArray(new Predicate[1]));\r\n criteriaQuery.where(finalPredicate);\r\n criteriaQueryCount.where(finalPredicate);\r\n }\r\n }\r\n \r\n \r\n TypedQuery<T> query = getEm().createQuery(criteriaQuery);\r\n TypedQuery<Long> queryCount = getEm().createQuery(criteriaQueryCount);\r\n if (filter != null && filter.getPageSize() > 0) {\r\n query = query.setFirstResult(filter.getOffset());\r\n query = query.setMaxResults(filter.getPageSize());\r\n }\r\n // add hints\r\n if (!hints.isEmpty()) {\r\n for (Hint hint : hints) {\r\n query.setHint(hint.getName(), hint.getValue());\r\n queryCount.setHint(hint.getName(), hint.getValue());\r\n }\r\n }\r\n \r\n \r\n PageImpl<T> result = new PageImpl<T>(query.getResultList(), filter, queryCount.getSingleResult().intValue());\r\n return result;\r\n }",
"List<ShopItem> findAllByInTopPageTrue();",
"PageInfo list(Date beginDate, Date endDate, List<Integer> resources, int pageNo, int pageSize);",
"public List<Object> retrievePagingList(PageBean pageBean) ;",
"LiveData<PagedList<Response>> pagedList();",
"void findWithPagination(Pagination<Task, Project> pagination);",
"List<Product> getProductPage(int pageNumber, int pageSize);",
"Page<EtatOperation> findAll(Pageable pageable);",
"Page<Product> findAll(Pageable pageable);",
"List<Activity> findAllPageable(int page, int size);",
"public Page<T> list(DetachedCriteria criteria, Integer pageNumber, Integer pageSize);",
"void findWithPagination(Pagination<Activity, Assignment> pagination);",
"public List<DetallesFacturaContratoVenta> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 32: */ {\r\n/* 33: 51 */ List<DetallesFacturaContratoVenta> listaDetallesFacturaContratoVenta = new ArrayList();\r\n/* 34: */ \r\n/* 35: 53 */ CriteriaBuilder criteriaBuilder = this.em.getCriteriaBuilder();\r\n/* 36: 54 */ CriteriaQuery<DetallesFacturaContratoVenta> criteriaQuery = criteriaBuilder.createQuery(DetallesFacturaContratoVenta.class);\r\n/* 37: 55 */ Root<DetallesFacturaContratoVenta> from = criteriaQuery.from(DetallesFacturaContratoVenta.class);\r\n/* 38: */ \r\n/* 39: 57 */ Fetch<Object, Object> contratoVenta = from.fetch(\"contratoVenta\", JoinType.LEFT);\r\n/* 40: 58 */ Fetch<Object, Object> empresa = contratoVenta.fetch(\"empresa\", JoinType.LEFT);\r\n/* 41: 59 */ Fetch<Object, Object> cliente = empresa.fetch(\"cliente\", JoinType.LEFT);\r\n/* 42: 60 */ contratoVenta.fetch(\"agenteComercial\", JoinType.LEFT);\r\n/* 43: 61 */ contratoVenta.fetch(\"subempresa\", JoinType.LEFT);\r\n/* 44: 62 */ Fetch<Object, Object> direccionEmpresa = contratoVenta.fetch(\"direccionEmpresa\", JoinType.LEFT);\r\n/* 45: 63 */ direccionEmpresa.fetch(\"ubicacion\", JoinType.LEFT);\r\n/* 46: 64 */ contratoVenta.fetch(\"canal\", JoinType.LEFT);\r\n/* 47: 65 */ contratoVenta.fetch(\"zona\", JoinType.LEFT);\r\n/* 48: 66 */ contratoVenta.fetch(\"condicionPago\", JoinType.LEFT);\r\n/* 49: */ \r\n/* 50: 68 */ List<Expression<?>> empresiones = obtenerExpresiones(filters, criteriaBuilder, from);\r\n/* 51: 69 */ criteriaQuery.where((Predicate[])empresiones.toArray(new Predicate[empresiones.size()]));\r\n/* 52: */ \r\n/* 53: 71 */ agregarOrdenamiento(sortField, sortOrder, criteriaBuilder, criteriaQuery, from);\r\n/* 54: */ \r\n/* 55: 73 */ CriteriaQuery<DetallesFacturaContratoVenta> select = criteriaQuery.select(from);\r\n/* 56: */ \r\n/* 57: 75 */ TypedQuery<DetallesFacturaContratoVenta> typedQuery = this.em.createQuery(select);\r\n/* 58: 76 */ agregarPaginacion(startIndex, pageSize, typedQuery);\r\n/* 59: */ \r\n/* 60: 78 */ listaDetallesFacturaContratoVenta = typedQuery.getResultList();\r\n/* 61: 81 */ for (DetallesFacturaContratoVenta dfcv : listaDetallesFacturaContratoVenta)\r\n/* 62: */ {\r\n/* 63: 83 */ CriteriaQuery<DetalleContratoVenta> cqDetalle = criteriaBuilder.createQuery(DetalleContratoVenta.class);\r\n/* 64: 84 */ Root<DetalleContratoVenta> fromDetalle = cqDetalle.from(DetalleContratoVenta.class);\r\n/* 65: 85 */ fromDetalle.fetch(\"producto\", JoinType.LEFT);\r\n/* 66: */ \r\n/* 67: 87 */ cqDetalle.where(criteriaBuilder.equal(fromDetalle.join(\"contratoVenta\"), dfcv.getContratoVenta()));\r\n/* 68: 88 */ CriteriaQuery<DetalleContratoVenta> selectContratoVenta = cqDetalle.select(fromDetalle);\r\n/* 69: */ \r\n/* 70: 90 */ List<DetalleContratoVenta> listaDetalleContratoVenta = this.em.createQuery(selectContratoVenta).getResultList();\r\n/* 71: 91 */ dfcv.getContratoVenta().setListaDetalleContratoVenta(listaDetalleContratoVenta);\r\n/* 72: */ }\r\n/* 73: 94 */ return listaDetallesFacturaContratoVenta;\r\n/* 74: */ }",
"Page<T> findAll(Pageable pageable);",
"Page<Person> findAll(Pageable pageable);",
"Page<Accessprofile> listWithCriteraByPage(SearchCriteria searchCriteria, Pageable pageable);",
"List<ProductView> getAllByPage(int pageNumber, int itemsPerPage) throws ProductException;",
"public List<UserVO> pagingUser(Criteria cri);",
"List<ProductModel> getSearchedOrderedFiltered(int page, int size, String search, String orderBy, FilterModel filterModel, boolean isActive);",
"List<T> searchByExamplePages(T entity, String sortBy, Ord ord,\n\t\t\tInteger limit, Integer page);",
"Page<Accessprofile> listAllByPage(Pageable pageable);",
"Page<Livre> findAll(Pageable pageable);",
"Page<Student> findPaginated(int pageNo, int pageSize);",
"Page<PeopleDTO> findAll(Pageable pageable);",
"@Override\n public List<Produto> filtrarProdutos() {\n\n Query query = em.createQuery(\"SELECT p FROM Produto p ORDER BY p.id DESC\");\n\n// query.setFirstResult(pageRequest.getPageNumber() * pageRequest.getPageSize());\n// query.setMaxResults(pageRequest.getPageSize());\n return query.getResultList();\n }",
"PaginatedResponse<Office> findAllPaginated( int page, int pageSize );",
"public abstract <T> Page<T> list(Pageable pageable, Class<T> clazz);",
"@Override\n\tpublic List<Signuptable> findPage(String where, int startIndex, int pageSize) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Page<?> pagination(Integer pagenumber, Integer rows, String sortdireccion, String sortcolumn,\n\t\t\tObject filter) {\n\t\treturn null;\n\t}",
"Page<Person> listByCriteria(SearchCriteria searchCriteria, String sort, Integer pageIndex, Integer pageSize) throws ServiceException;",
"public List<Maquina> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35: 73 */ return this.maquinaDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }",
"Results setRowsPerPage(FilterSpecifier.ListBy listBy, int rowsPerPage) throws SearchServiceException;",
"Page<ExtendedTextHeader> findAll(Pageable pageable);",
"List selectByExampleWithPage(PaymentTradeExample example);",
"Page<Expert> findAll(Pageable pageable);",
"List<E> findAll(int page, int size);",
"Page<Catalog> findAll(Pageable pageable);",
"Page<T> search(Pageable pageable, QueryBuilder query);",
"public Page<CustomersListSearchConditionsDTO> findAll(Pageable pageable);",
"public Page<User> findAll(Pageable pageable);",
"Page<Fotografia> findAll(Pageable pageable);",
"public List<Goods> selectByDate(int page,int maxResults);",
"Page<ServiceUserDTO> findAll(Pageable pageable);",
"List<ProjectDTO> findLimitProjects(int pageNumber);",
"Page<ServiceUserDTO> search(String query, Pageable pageable);",
"Page<Student> findAll(Pageable pageable);",
"Page<Research> findAll(Pageable pageable);",
"Page<ParaUserDTO> findAll(Pageable pageable);",
"public List<Reporteador> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 52: */ {\r\n/* 53: 71 */ return this.reporteadorDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 54: */ }",
"Page<Product> findByNameContaining(@RequestParam(\"name\") String name, Pageable pageable);",
"Page<Employee> findAll(Pageable page);",
"@Override\n\tpublic List<T> getLimitedFilteredResult(Bson filter, int limit) {\n\t\tGson gson = new GsonBuilder().create();\n\t\tList<T> innerList = new ArrayList<>();\n\t\tcollection.find(filter).limit(limit).forEach((Block<Document>) document -> {\n\t\t\tinnerList.add(gson.fromJson(document.toJson(), entityClass));\n\t\t});\n\t\treturn innerList;\n\n\t}",
"@Override\n\tpublic List<Visit> load(int first, int pageSize, String sortField, SortOrder sortOrder, \n\t\t\tMap<String, Object> filters) {\n\n\t\t\n\t\treturn result;\n\t}",
"Page<ParaUserDTO> search(String query, Pageable pageable);",
"@Override\n\tpublic String findPage(Set<String> filterField) {\n\t\treturn null;\n\t}",
"Page<RequestOtherNiazsanjiDTO> findAll(Pageable pageable);",
"@PreAuthorize(\"@userAuthorize.canList(#searchCriterias)\")\n\t@RequestMapping(value = \"/listWithCriteriasByPage\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> listWithCriteriasByPage(@RequestBody List<SearchCriteria> searchCriterias, Pageable pageable) {\n\t\tPage<User> users = userService.listWithCriterasByPage(searchCriterias, pageable);\n\t\t// return.\n\t\treturn new ResponseEntity<Page<User>>(users, HttpStatus.OK);\n\t}",
"List<Artist> getPagedList(int page);",
"Page<Job> findAll(Pageable pageable);",
"Page<ExamPackage> searchList(int pageNo, int pageSize, Sort sort);",
"Page<CoveredActivityDTO> findAll(Pageable pageable);",
"public List<Section> findByFilter (Section section, Pagination pagination) throws DataAccessException;",
"Page<PolicyRecord> findAll(Pageable pageable);",
"Page<Contact> getContacts(int index, int size);",
"Page<SpecimenStatusDTO> findAll(Pageable pageable);",
"public Result findByPage(Page page,String hql, Object... params) ;",
"@GetMapping(\"all\")\n\tpublic ResponseEntity<Page<Person>> getAllPeople(@RequestParam(defaultValue = \"0\") int pageNum, @RequestParam(defaultValue = \"100\") int pageSize){\n\t\t//20 is the number of results which can also be an input if we decide to have the user be able to pick how many results appear\n\t\t//I just figured that 20 was probably a good number\n\t\tPageable page = PageRequest.of(pageNum, pageSize, Sort.by(\"firstName\"));\n\t\t\t\t\n\t\treturn new ResponseEntity<>(pRepo.findAll(page), HttpStatus.OK);\n\t}",
"@RequestMapping(value = \"/listWithCriteriaByPage\", method = RequestMethod.POST)\n\tpublic ResponseEntity<?> listWithCriteriaByPage(@RequestBody SearchCriteria searchCriteria, Pageable pageable) {\n\t\tPage<User> users = userService.listWithCriteraByPage(searchCriteria, pageable);\n\t\t// return.\n\t\treturn new ResponseEntity<Page<User>>(users, HttpStatus.OK);\n\t}",
"Page<EstimateProductDTO> findAll(Pageable pageable);",
"public List<CategoriaArticuloServicio> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 34: */ {\r\n/* 35:75 */ return this.categoriaArticuloServicioDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 36: */ }",
"Page<Visited> findAll(Pageable pageable);",
"public interface PaginatedResult<T> {\n\n\t/**\n\t * Get the contents as an array of component type\n\t */\n\tpublic T[] items();\n\n\t/**\n\t * Obtain params required to perform the given relative query\n\t */\n\tpublic abstract PaginatedResult<T> first() throws AblyException;\n\tpublic abstract PaginatedResult<T> current() throws AblyException;\n\tpublic abstract PaginatedResult<T> next() throws AblyException;\n\n\tpublic abstract boolean hasFirst();\n\tpublic abstract boolean hasCurrent();\n\tpublic abstract boolean hasNext();\n}",
"List<T> searchByExamplePages(T entity, String sortBy, Ord ord,\n\t\t\tInteger limit, Integer page, Map<String, Object> associations);",
"List selectByExampleWithPage(PaymentTradeExampleExtended exampleExtended);",
"Page<TypeBonDTO> findAll(Pageable pageable);",
"public abstract ArrayList<T> findAll(int limit, int offset);",
"Page<BaacDTO> findAll(Pageable pageable);",
"@Override\r\n\tpublic List<?> queryByPage(String hql, int offset, int pageSize) {\n\t\tTransaction tx = null;\r\n List<?> list = null;\r\n try{\r\n \tSession session = MyHibernateSessionFactory.getSessionFactory().getCurrentSession();\r\n tx = session.beginTransaction();\r\n Query query = session.createQuery(hql).setFirstResult(offset).setMaxResults(pageSize);\r\n list = query.list();\r\n tx.commit();\r\n return list;\r\n }catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}finally{\r\n\t\t\tif(tx!=null){\r\n\t\t\t\ttx=null;\r\n\t\t\t}\r\n\t\t\t//HibernateUtil.closeSession(session);\r\n\t\t}\r\n \r\n\t}",
"Page<CardDTO> findAll(Pageable pageable);",
"public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;",
"PaginatedSearchResponseModel findAllByPostedByParty(Party postedByParty, Pageable page);",
"Page<ItemPriceHistoryDTO> findAll(Pageable pageable);",
"public abstract Page<CustomerInfo> findAll(GlobalSearch globalSearch, Pageable pageable);",
"PaginatedSearchResponseModel findAllByPostedForParty(Party postedForParty, Pageable page);",
"public List<Timetable> pagging(int pageIndex, int pageSize) throws Exception;",
"@Query(\"SELECT x \"\n + \" FROM Invtipousuario x \"\n + \"WHERE\" \n + \" (:idtipousuario is null or :idtipousuario = x.idtipousuario ) \"\n + \" and (:rollusuario is null or x.rollusuario = :rollusuario ) \"\n + \" ORDER BY x.idtipousuario ASC \")\n Page<Invtipousuario> findByFilters(Pageable page ,@Param(\"idtipousuario\") String idtipousuario ,@Param(\"rollusuario\") String rollusuario);",
"protected List<Object> getPreFilters(List<Object> list, Class<T> entityClass, Pageable filter)\r\n {\r\n if (preFilterAccessor != null) {\r\n list.addAll(preFilterAccessor.getPreFilters(entityClass, filter));\r\n }\r\n return list;\r\n }",
"@Override\n\t@RequestMapping(value=\"/item/list\")\n\tpublic EasyUIDatagrid<TbItem> getItemsByPage(@RequestParam(value = \"page\", defaultValue=\"1\") Integer page,\n\t\t\t@RequestParam(value = \"rows\" ,defaultValue=\"30\") Integer rows) {\n\t\treturn service.getItemsByPage(page, rows);\n\t}",
"public Page<DTOPresupuesto> buscarPresupuestos(String filtro, Optional<Long> estado, Boolean modelo, Pageable pageable) {\n Page<Presupuesto> presupuestos = null;\n Empleado empleado = expertoUsuarios.getEmpleadoLogeado();\n\n if (estado.isPresent()){\n presupuestos = presupuestoRepository\n .findDistinctByEstadoPresupuestoIdAndClientePersonaNombreContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndClientePersonaApellidoContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrEstadoPresupuestoIdAndDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, estado.get(), filtro, empleado.getSucursal().getId(), modelo, pageable);\n\n } else {\n presupuestos = presupuestoRepository\n .findDistinctByClientePersonaNombreContainsAndSucursalIdAndModeloOrClientePersonaApellidoContainsAndSucursalIdAndModeloOrDetallePresupuestosMotorMarcaMotorContainsAndSucursalIdAndModeloOrDetallePresupuestosAplicacionNombreAplicacionContainsAndSucursalIdAndModeloOrderByIdDesc(\n filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, filtro, empleado.getSucursal().getId(), modelo, pageable);\n }\n\n return presupuestoConverter.convertirEntidadesAModelos(presupuestos);\n }",
"Page<SuppliesDTO> findAll(Pageable pageable);",
"Page<ConsultationInfoDTO> findAll(Pageable pageable);",
"Page<TITransferDetails> findAll(Pageable pageable);",
"Page<EventActivityDTO> findAll(Pageable pageable);",
"List<T> getAllByRange(int firstItemNumber,\n int itemsCount,\n String sortBy,\n String sortTo);"
]
| [
"0.71280843",
"0.70711976",
"0.699261",
"0.6905738",
"0.6837178",
"0.6824905",
"0.68131256",
"0.68122363",
"0.67074025",
"0.66833574",
"0.6683197",
"0.6673531",
"0.66525006",
"0.6636145",
"0.65953577",
"0.65860564",
"0.65736175",
"0.65734935",
"0.6569562",
"0.6538479",
"0.65259993",
"0.65232176",
"0.6499705",
"0.6497188",
"0.64930755",
"0.64851063",
"0.64750004",
"0.6473067",
"0.64550805",
"0.64490104",
"0.642237",
"0.6411903",
"0.6403463",
"0.63929075",
"0.63824123",
"0.63727367",
"0.6362227",
"0.6329816",
"0.6325204",
"0.63249236",
"0.63219917",
"0.6312044",
"0.63089174",
"0.63084304",
"0.6297758",
"0.6266714",
"0.6259834",
"0.62554085",
"0.62536824",
"0.6235658",
"0.62301874",
"0.6225333",
"0.6225313",
"0.62250906",
"0.6219846",
"0.62179357",
"0.62033266",
"0.61972654",
"0.61933064",
"0.6190943",
"0.619064",
"0.6182025",
"0.6178451",
"0.6167303",
"0.6158478",
"0.61581355",
"0.6154915",
"0.61480594",
"0.61478627",
"0.6145719",
"0.613641",
"0.6132441",
"0.61315846",
"0.61306876",
"0.61259896",
"0.6112749",
"0.6111897",
"0.6110998",
"0.6101744",
"0.6095586",
"0.6088702",
"0.6087337",
"0.6082959",
"0.60789466",
"0.6078655",
"0.6075996",
"0.6074913",
"0.60743433",
"0.6068937",
"0.60648197",
"0.60635215",
"0.6062506",
"0.6061352",
"0.60611796",
"0.60604084",
"0.6049755",
"0.6046061",
"0.604242",
"0.60344446",
"0.602495",
"0.60186344"
]
| 0.0 | -1 |
method return teacher by id | @GetMapping("/{id}")
public TeacherDTO getById(@PathVariable Long id, Locale locale) {
return convertToDto(teacherService.getById(id, locale));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"@Override\n\tpublic Teacher findOne(int id) {\n\t\treturn dao.findOne(id);\n\t}",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"public Teacher get(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n transaction.commit();\n return teacher;\n }",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public static Teachers getTeacherWithClassesAndSubjects(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next()) {\n\n int teacherId = set.getInt(\"teacher_id\");\n\n List<Classes> classes = ClassSubjectsTeachersDAO\n .getClassesWithTeacherId(connection, teacherId);\n List<Subjects> subjects = ClassSubjectsTeachersDAO\n .getSubjectsWithTeacherId(connection, teacherId);\n\n teacher = new Teachers(teacherId,\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"),\n subjects, classes);\n }\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"Teacher selectByPrimaryKey(Integer pkid);",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"public String getTeacherId() {\n return teacherId;\n }",
"String getItem(int id) {\n return answers.get(id).getTeacher();\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"@Override\n\tpublic Map<String, Object> findTeacherCourseById(int id) {\n\t\treturn cd.findTeaCourInfoById(id);\n\t}",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"public Student getTeacher() {\n // TODO implement here\n return teacher;\n }",
"TeacherRecord getTeacher(String recordId, String clientId) throws Exception;",
"public List<Teacher> getTeacherBySellWayId(int sellWayId) {\n\t\treturn simpleDao.getForList(\"ContractIPhone_NS.getTeacherBySellWayId\", sellWayId);\n\t}",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByTid(Integer value) {\n return fetchOne(Teacher.TEACHER.TID, value);\n }",
"public List<Teacher> find(String permission_id) {\n\t\t\tif(permission_id!=null){\n\t\t\t\tthis.session=getSession();\n\t\t\t\thql=\"from Teacher\";\n\t\t\t\treturn (List<Teacher>)teacherDao.findAll(hql, session);\n\t\t\t}else\n\t\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"@Override\r\n\t\tpublic TeacherDto getTeacherById(long teacherId) {\n\t\t\tTeacherDto obj = TeacherTransformer.getTeacherEntityToDto(teacherRepository.findById(teacherId).get());\r\n\t\t\treturn obj;\r\n\r\n\t\t}",
"@Override\n\tpublic List<User> showTeacher() {\n\t\treturn userDao.showTeacher();\n\t}",
"private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }",
"public Researcher getResearcherByID(int id);",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public String getTeacherName() {\n/* 31 */ return this.teacherName;\n/* */ }",
"@Override\n\tpublic List<Users> listTeacher() {\n\t\treturn genericDAO.listTeacher();\n\t}",
"@Override\r\n\tpublic Student findTea(Teacher teacher) {\n\t\treturn null;\r\n\t}",
"public Long getResearchteacherid() {\r\n\t\treturn researchteacherid;\r\n\t}",
"public com.heman.bysj.jooq.tables.pojos.Teacher fetchOneByUsername(String value) {\n return fetchOne(Teacher.TEACHER.USERNAME, value);\n }",
"public static Object getTeacherById(String readLine) {\n\t\treturn null;\n\t}",
"public String getTeacherName() {\n return teacherName;\n }",
"@Override\r\n\tpublic Teacher retrieveStudents(Teacher teacher) {\n\t\tStudent student1 = new Student(\"www\", \"ÄÐ\");\r\n\t\tStudent student2 = new Student(\"zzz\", \"Å®\");\r\n\t\tStudent student3 = new Student(\"qqq\", \"ÄÐ\");\r\n\t\tTeacher teacher1 = new Teacher(1, \"Íõ\", null);\r\n\t\tTeacher teacher2 = new Teacher(2, \"ÁÖ\", null);\r\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tif (teacher1.getId() == teacher.getId()) {\r\n\t\t\tteacher1.getStudents().add(student1);\r\n\t\t\tteacher1.getStudents().add(student2);\r\n\t\t\treturn teacher1;\r\n\t\t} else if (teacher2.getId() == teacher.getId()) {\r\n\t\t\tteacher2.getStudents().add(student3);\r\n\t\t\treturn teacher2;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"public List<Teacher> select(String where) throws SQLException {\n\t\tList<Teacher> list=null;\r\n\t\tConnection conn = DbConn.getDbConn();\r\n\t\tif(where ==null) where=\"1=1\";\r\n\t\tString conums=\" id ,no ,password ,name ,deptId ,sex ,phone \"\r\n\t\t\t\t+ \",email ,identityCard ,roleId ,photoUrl\"\r\n\t\t\t\t+ \" ,remark ,teacherstatus ,regTime ,loginTime ,loginIp \";\r\n\t\tString sql=String.format(\"SELECT \" +conums\t+ \" FROM teacher \"\r\n\t\t\t\t+ \" where %s\",where);\r\n\t\tif(conn!=null){\r\n\t\t\tPreparedStatement pstm = conn.prepareStatement(sql);\r\n\t\t\tResultSet rs=pstm.executeQuery();\r\n\t\t\tlist = new ArrayList<Teacher>();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tTeacher c = new Teacher();\r\n\t\t\t\tc.setId(rs.getInt(1));\r\n\t\t\t\t\r\n\t\t\t\tc.setNo(rs.getString(2));\r\n\t\t\t\t\r\n\t\t\t\tc.setName(rs.getString(3));\r\n\t\t\t\t\r\n\t\t\t\tList <Department> d=new DepartmentDao().select(\"id=\"+rs.getInt(4));\r\n\t\t\t\tif(d!=null && !d.isEmpty())\r\n\t\t\t\tc.setDepartment(d.get(0));\r\n\t\t\t\t\r\n\t\t\t\tc.setSex(rs.getString(5));\r\n\t\t\t\tc.setPhone(rs.getString(6));\r\n\t\t\t\tc.setEmail(rs.getString(7));\r\n\t\t\t\tc.setIdentityCard(rs.getString(8));\r\n\t\t\t\t//--------------------------------\r\n\t\t\t\t//c.setUserrole(userrole);\r\n\t\t\t\t//--------------------------------\r\n\t\t\t\t c.setUserrole(null);\r\n\t\t\t\t c.setPhotoUrl(rs.getString(10));\r\n\t\t\t\t c.setRemark(rs.getString(11));\r\n\t\t\t\t c.setTeacherstatus(rs.getString(12));\r\n\t\t\t\t c.setRegTime(rs.getDate(13));\r\n\t\t\t\t c.setLoginTime(rs.getDate(14));\r\n\t\t\t\t c.setLoginIp(rs.getString(15));\r\n\t\t\t\tList<Teacher> t=new TeacherDao().select(\"id=\"+rs.getInt(5));\r\n\t\t\t\t\r\n\t\t\t\tlist.add(c);\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tDbConn.closeConn(conn);\r\n\t\t}\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"@Override\n\tpublic Subject findByTeacherAndGrade(int teacherId,int gradeId) {\n\t\tSchoolYear year = schoolYearService.getCurrent();\n\t\tTerm term = termService.getCurrent();\n\t\tList<TeacherSubjectVo> teacherSubjectVos = teacherSubjectMapper.findByGradeAndTeacher(year.getYearId(), term.getTermId(), gradeId, teacherId);\n\t\tif (teacherSubjectVos!= null && teacherSubjectVos.size()>0) {\n\t\t\treturn dao.findOne(teacherSubjectVos.get(0).getSubjectId()); \n\t\t}\t\n\t\treturn null;\n\t}",
"public ArrayList<Teacher> getTeacherList()\r\n\t {\r\n\t\t return teacherList;\r\n\t }",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public List<Teacher> getAllTeachers() {\n List<Map<String, Object>> teachersIds = getJdbcTemplate().queryForList(sqlGetAllTeachersIds);\n if (teachersIds.size() == 0) {\n return null;\n }\n // find list of lessons by ID's\n List<Teacher> resultTeachers = new ArrayList<>();\n for (Map<String, Object> teacherId : teachersIds) {\n resultTeachers.add(getTeacherById((int) teacherId.get(\"id\")));\n }\n return resultTeachers;\n }",
"public String getTeacherRoleId() {\n return teacherRoleId;\n }",
"public static Ring getRingByTeacherId(int teacherId) {\n\r\n String sql = \"select r.* from ring r \\n\"\r\n + \"join Teacher t \\n\"\r\n + \"on t.ringId = r.ringId \\n\"\r\n + \"where t.teacherId = ?\";\r\n\r\n Connection conn = DB.connect();\r\n PreparedStatement st;\r\n ResultSet rs;\r\n Ring ring;\r\n try {\r\n st = conn.prepareStatement(sql);\r\n st.setInt(1, teacherId);\r\n rs = st.executeQuery();\r\n System.out.println(sql);\r\n if (rs.next()) {\r\n ring = new Ring();\r\n \r\n ring.setRingId(rs.getInt(\"ringId\"));\r\n ring.setSchoolId(rs.getInt(\"schoolId\"));\r\n //ring.setDate(rs.getDate(\"date\"));\r\n ring.setName(rs.getString(\"name\"));\r\n ring.setMaxStudentNumber(rs.getInt(\"maxStudentNumber\"));\r\n \r\n return ring;\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(User.class.getName()).log(Level.SEVERE, null, ex);\r\n \r\n }\r\n return null;\r\n }",
"public String getCourseTeacher() {\n return courseTeacher;\n }",
"@Override\n public Teacher getModel() {\n return teacher;\n }",
"@Override\n\tpublic ArrayList<Teacher> fetchDetails() throws myException {\n\t\tConnection con = GetConnection.getConnection();\n\t\tResultSet rs = null;\n\t\tString query = \"select * from teacher\";\n\t\tStatement st = null;\n\t\ttry {\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\tArrayList<Teacher> ls3 = new ArrayList<Teacher>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\t// Teacher teacher = new Teacher();\n\t\t\t\tString name = rs.getString(\"teacherName\");\n\t\t\t\tShort id = rs.getShort(\"teacherId\");\n\t\t\t\tShort yoe = rs.getShort(\"yOE\");\n\t\t\t\tSubject[] subject = null;// getSubjects(name);\n\t\t\t\tTeacher teacher = new Teacher(name, id, yoe, subject);\n\t\t\t\tls3.add(teacher);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\treturn ls3;\n\t}",
"public List<Teacher> getTeachers() {\n\t\tList<Teacher> teachers = this.hibernateTemplate.loadAll(Teacher.class);\n\t\treturn teachers;\n\t}",
"@Override\r\n\tpublic Teacher getModel() {\n\t\treturn teacher;\r\n\t}",
"@Override\n\tpublic Teacher findByName(String name) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql=\"from Teacher t where name=?\";\n\t\tQuery query=session.createQuery(hql);\n\t\tquery.setParameter(0, name);\n\t\tList<Teacher> tlist=query.list();\n\t\tTeacher teacher=tlist.get(0);\n\t\treturn teacher;\n\t}",
"@Override\n\tpublic List<Teacher> getAll() {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Teacher> findAllTeacher(){\n\t\tList<Teacher> teachers = new ArrayList<Teacher>();\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateSessionFactory.getSession();\n\t\t\tteachers = session.getNamedQuery(\"findAllTeacher\").list();\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t} finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn teachers;\n\t}",
"@Override\r\n\t\tpublic List<TeacherDto> getAllTeacher(long studentId) {\n\t\t\tList<TeacherDto> list = new ArrayList<>();\r\n\t\t\tteacherRepository.findByStudentid(studentId).forEach(e -> list.add(TeacherTransformer.getTeacherEntityToDto(e)));\r\n\t\t\treturn list;\r\n\t\t}",
"@Override\n\tpublic List<Teacher> findAll() {\n\t\treturn dao.findAll();\n\t}",
"@Override\n\tpublic Teacher findByPhone(String phone) {\n\t\treturn dao.findByPhone(phone);\n\t}",
"@Override\n\tpublic ResponseEntity<?> subjectTeacher(Integer tId, Integer sId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findBySubject_idAndGrade_LabelIsGreaterThan(sId, 4)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to subject teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"@Override\n\tpublic List<Teacher_Course> getTeacher_CourseByStudentId(int studentid) {\n\t\treturn teacher_coursedao.getTeacher_CourseByStudentId(studentid);\n\t}",
"@Override\r\n\tpublic Subjects getById( int id) {\n\t\treturn subectsDao.getById( id);\r\n\t}",
"List<TeacherRecord> getTeachers(String clientId) throws Exception;",
"List<Teacher> selectAll();",
"@Override\n\tpublic List<Teacher> findAll(int gender, int subjectId, int classId, int districtId) {\n\t\treturn dao.findAll(gender, subjectId, classId, districtId);\n\t}",
"@GetMapping(value = getTeachersByStudentIdMapping + \"{studentId}\")\r\n\tpublic ResponseEntity<List<Teacher>> getTeachersByStudentId(@PathVariable(\"studentId\") String studentId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getTeachersByStudentId(studentId));\r\n\t}",
"@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByTeacherId(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where teacherId=:teacherId and state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"teacherId\", teacherId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByTeacherId(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public student getstudent(Integer id);",
"public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }",
"public Wrapper isTeacher() {\n Wrapper<HashMap<String, Boolean>> wrapper = new Wrapper();\n HashMap<String, Boolean> out = new HashMap<>();\n try {\n out.put(\"teacher\", user.isTeacher());\n wrapper.setData(out);\n wrapper.setSucces(true);\n } catch (Exception e) {\n wrapper.setSucces(false);\n wrapper.setMsg(e.toString());\n }\n return wrapper;\n }",
"@Override\r\n\tpublic List<ReportAndSummary> findByTrainningTeacher(int id) {\n\t\tList<ReportAndSummary> result = reportAndSummaryDao.findByTrainningTeacher(id);\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic List<Object> getTeacherMembers(String orgId, String groupId) {\n\t\ttry {\n\t\t\treturn teacherDao.getTeacherMembers(orgId, groupId);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"getOrgTreeTeacherMembers Teacher error\");\n\t\t}\n\t\treturn null;\n\t}",
"@GetMapping(value = getDataForMapping + \"/{studentId}\")\r\n\tpublic ResponseEntity<List<Teacher>> getTeachersForMapping(@PathVariable(\"studentId\") String studentId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getTeachersForMapping(studentId));\r\n\t}",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByTid(Integer... values) {\n return fetch(Teacher.TEACHER.TID, values);\n }",
"public String getResearchteachername() {\r\n\t\treturn researchteachername;\r\n\t}",
"@GetMapping(value = getStudentsByTeacherIdMapping + \"{teacherId}\")\r\n\tpublic ResponseEntity<List<Student>> getStudentsByTeacherId(@PathVariable(\"teacherId\") String teacherId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getStudentsByTeacherId(teacherId));\r\n\t}",
"public ArrayList<Teacher> getTeachersInField(){\r\n\t\treturn CourseFieldController.getFieldTeachers(this);\r\n\t}",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public Boolean deleteTeacherById(int teacherId) {\n List<Lesson> lessonsAttachedToThisTeacher = lessonService.findAllLessonsByTeacher(teacherId).getBody();\n if (lessonsAttachedToThisTeacher != null) {\n for (Lesson lesson : lessonsAttachedToThisTeacher) {\n lessonService.removeLesson(lesson.getId());\n }\n }\n List<Map<String, Object>> eaattrList =\n learningCenterDataBaseUtil.getEntityAttrIdRelAttrNameByEntityName(\"Teacher\");\n // removing rows from value table\n for (Map<String, Object> eaAttr : eaattrList) {\n learningCenterDataBaseUtil.removeRowFromValue(\n teacherId,\n Integer.valueOf(eaAttr.get(\"entity_attribute_id\").toString())\n );\n }\n // removing row from object table\n learningCenterDataBaseUtil.removeRowFromObject(teacherId);\n return true;\n }",
"public String getTeachernames() {\r\n return teachernames;\r\n }",
"@Override\n\tpublic List<Teacher> findByCustomer(int customerId) {\n\t\treturn dao.findByCustomer(customerId);\n\t}",
"@Override\r\n\tpublic Trainee getTraineeById(int id) {\n\t\treturn dao.getTraineeById(id);\r\n\t}",
"@Override\n\tpublic ResponseEntity<?> lowerGradeTeacher(Integer tId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findByGrade_LabelIsLessThan(5)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to lower grade teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"public boolean containsPersonWithId(int id) {\n\t\tif(id == teacherId) {\n\t\t\treturn true;\n\t\t}\n\t\tfor(Team team : this.schoolClass.getTeams()) {\n\t\t\tif(team.containsStudentWithId(id)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public static Subject getRecord(int id) {\n Subject e = new Subject();\n try {\n Connection connection = MySQL.getConnection();\n Statement stmt = connection.createStatement();\n String sqlSelect = \"select * from subjects where subject_id=\" + id;\n ResultSet rs = stmt.executeQuery(sqlSelect);\n if (rs.next()) {\n e.setSubjectID(rs.getInt(1));\n e.setSubjectCode(rs.getString(2));\n e.setSubjectName(rs.getString(3));\n e.setFacultyID(rs.getInt(4));\n e.setLectID(rs.getInt(5));\n\n }\n } catch (SQLException ex) {\n ex.getMessage();\n }\n return e;\n }",
"@Override\r\n\tpublic User getDocterById(int id) {\n\t\treturn docterMapper.selById(id);\r\n\t}",
"public Teacher findTeacherByLsbh(String lsbh) {\n\t\tList<Teacher> list = new ArrayList<Teacher>();\n\t\tString sql = \"from Teacher where lsbh = ?\";\n\t\ttry {\n\t\t\tlist = this.getHibernateTemplate().find(sql, lsbh);\n\t\t} catch (DataAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(list.isEmpty())\n\t\t\treturn null;\n\t\telse \n\t\t\treturn list.get(0);\n\t}",
"@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}",
"public Tutor findTutor(final String name) {\n for (Tutor tutor : tutors) {\n if (name.equals(tutor.getName())) {\n return tutor;\n }\n }\n\n return null;\n }",
"@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByName(String... values) {\n return fetch(Teacher.TEACHER.NAME, values);\n }",
"public Pregunta getPregunta(int id);",
"public Employee getStudentOnId(int id);",
"@Override\n\tpublic List<Map<String,Object>> getTechsOfRlId(String org_id,Integer code) {\n\t\treturn teacherDao.getTechsOfRlId(org_id,code);\n\t}",
"public University getalluniversitybyId(int id) {\n\t\treturn universityrespo.getOne(id);\n\n}",
"@Override\n\tpublic Web_trainee findTraineeById(int id) {\n\t\treturn getByKey(id);\n\t}",
"public static Teacher addTeacher() {\n\n\n Teacher newTeacher = new Teacher();\n\n //create a Scanner object to let user make an input\n\n Scanner s = new Scanner(System.in);\n System.out.println(\"Enter the first name\");\n String firstname = s.nextLine();\n newTeacher.setFirstName(firstname);\n\n\n System.out.println(\"Enter the last name\");\n String lastName = s.nextLine();\n newTeacher.setLastName(lastName);\n\n\n System.out.println(\"Enter your email\");\n String yourEmail = s.nextLine();\n newTeacher.seteMail(yourEmail);\n\n\n System.out.println(\"Enter your ID number\");\n String yourID = s.nextLine();\n newTeacher.setNumberID(yourID);\n\n System.out.println(\"Enter the class that teacher teaches\");\n String teaches = s.nextLine();\n// newTeacher.setTeaches(teaches);\n\n\n return newTeacher;\n\n }",
"@Override\n\tpublic List<TeacherInfo> getTeacherInfoList() {\n\t\treturn userMapper.getTeacherInfoList();\n\t}",
"public Student findStudent(int id);",
"public String getTutorId() {\n return tutorId;\n }",
"@Override\r\n\tpublic Student getById(int id) {\n\t\treturn sdao.getStudentById(id);\r\n\t}",
"@Override\n\tpublic Student selectId(int id) {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id and a.id=\"+id;\n\t\tResultSet rs=mysql.query(sql);\n\t\tStudent stu=new Student();\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn stu;\n\t}",
"public void addteacher(Teacher Te){\n this.tlist.add(Te);\n }",
"@Override\r\n\tpublic TeacherDomain getModel() {\n\t\treturn teacherDomain;\r\n\t}"
]
| [
"0.8228738",
"0.8215154",
"0.8172435",
"0.8102885",
"0.7994623",
"0.7645469",
"0.7571009",
"0.7564184",
"0.75562775",
"0.75418466",
"0.7508473",
"0.75067604",
"0.75057375",
"0.7469534",
"0.7378125",
"0.7378125",
"0.73419464",
"0.72934186",
"0.72602713",
"0.7237645",
"0.7035992",
"0.6968733",
"0.68669087",
"0.6847055",
"0.6730817",
"0.6662835",
"0.66545403",
"0.6646698",
"0.6618772",
"0.65850246",
"0.65850246",
"0.65831786",
"0.6578165",
"0.657011",
"0.65480363",
"0.65404236",
"0.6519639",
"0.6516496",
"0.6487963",
"0.646205",
"0.64569616",
"0.64566183",
"0.6445957",
"0.6430207",
"0.64261454",
"0.64164174",
"0.6412081",
"0.64073837",
"0.6328567",
"0.6322777",
"0.63081545",
"0.62690735",
"0.6261621",
"0.6223948",
"0.6214483",
"0.61979353",
"0.61911154",
"0.61450386",
"0.6134887",
"0.6111233",
"0.6102897",
"0.61022586",
"0.6090767",
"0.60770875",
"0.6054371",
"0.60273606",
"0.60130495",
"0.59793115",
"0.59709424",
"0.5964144",
"0.5934554",
"0.592963",
"0.59258974",
"0.5885889",
"0.58831406",
"0.58620054",
"0.5849537",
"0.5831068",
"0.5819689",
"0.58174044",
"0.58126926",
"0.5811316",
"0.58011997",
"0.5778151",
"0.5774813",
"0.5766927",
"0.5766668",
"0.5756882",
"0.57440364",
"0.57303655",
"0.5725096",
"0.5718231",
"0.56968933",
"0.569622",
"0.5694505",
"0.569103",
"0.56906134",
"0.56869656",
"0.56784195",
"0.5674217"
]
| 0.6608641 | 29 |
method return all teachers by group id | @GetMapping("/getByGroupId/{id}")
public List<TeacherDTO> getTeachersOfGroupById(@PathVariable Long id, Locale locale) {
return teacherService.getTeachersOfGroupById(id, locale).stream()
.map(this::convertToDto)
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public List<Teacher> getAllTeachers() {\n List<Map<String, Object>> teachersIds = getJdbcTemplate().queryForList(sqlGetAllTeachersIds);\n if (teachersIds.size() == 0) {\n return null;\n }\n // find list of lessons by ID's\n List<Teacher> resultTeachers = new ArrayList<>();\n for (Map<String, Object> teacherId : teachersIds) {\n resultTeachers.add(getTeacherById((int) teacherId.get(\"id\")));\n }\n return resultTeachers;\n }",
"public List<Test> getTestByGroupId(int group_id) {\n\t\tList<Test> listTest=(List<Test>) testRepository.findAll();\n\t\tList<Test> listTestByGroupById=new ArrayList<Test>();\n\t\tSystem.out.println(group_id);\n\t\tfor(Test t:listTest)\n\t\t{\n\t\t\tif(t.getGroup_id().getGroup_id() == group_id) \n\t\t\t\tlistTestByGroupById.add(t);\n\t\t}\n\t\treturn listTestByGroupById;\n\t}",
"public List<TemplateExamQuestion> getQuestions(Group group);",
"public static Teachers getTeacherWithClassesAndSubjects(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next()) {\n\n int teacherId = set.getInt(\"teacher_id\");\n\n List<Classes> classes = ClassSubjectsTeachersDAO\n .getClassesWithTeacherId(connection, teacherId);\n List<Subjects> subjects = ClassSubjectsTeachersDAO\n .getSubjectsWithTeacherId(connection, teacherId);\n\n teacher = new Teachers(teacherId,\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"),\n subjects, classes);\n }\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"@Override\n\tpublic List<Object> getTeacherMembers(String orgId, String groupId) {\n\t\ttry {\n\t\t\treturn teacherDao.getTeacherMembers(orgId, groupId);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"getOrgTreeTeacherMembers Teacher error\");\n\t\t}\n\t\treturn null;\n\t}",
"List<Teacher> selectAll();",
"public List<ClassWithAllGroups> getAllClassesWithGroups(int teacher_id) {\n ArrayList<ClassWithAllGroups> classesGroups = new ArrayList<ClassWithAllGroups>();\n List<Classes> classes = db.getAllClassesOfTeacher(teacher_id);\n for (Classes s : classes) {\n ClassWithAllGroups classWithAllGroups = new ClassWithAllGroups();\n classWithAllGroups.setFields(s);\n classWithAllGroups\n .setGroups(db.getAllGroupsFromClass(s.get_id(), false)); //by default returns only open groups\n classesGroups.add(classWithAllGroups);\n }\n return classesGroups;\n }",
"TrackerUsersInGroups getTrackerUsersInGroups(final Integer id);",
"TrackerGroups getTrackerGroups(final Integer id);",
"public List<User> getStudents(Group currentGroup);",
"@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}",
"@Override\r\n\t\tpublic List<TeacherDto> getAllTeacher(long studentId) {\n\t\t\tList<TeacherDto> list = new ArrayList<>();\r\n\t\t\tteacherRepository.findByStudentid(studentId).forEach(e -> list.add(TeacherTransformer.getTeacherEntityToDto(e)));\r\n\t\t\treturn list;\r\n\t\t}",
"List<TeacherRecord> getTeachers(String clientId) throws Exception;",
"@Override\r\n\tpublic Teacher retrieveStudents(Teacher teacher) {\n\t\tStudent student1 = new Student(\"www\", \"ÄÐ\");\r\n\t\tStudent student2 = new Student(\"zzz\", \"Å®\");\r\n\t\tStudent student3 = new Student(\"qqq\", \"ÄÐ\");\r\n\t\tTeacher teacher1 = new Teacher(1, \"Íõ\", null);\r\n\t\tTeacher teacher2 = new Teacher(2, \"ÁÖ\", null);\r\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tif (teacher1.getId() == teacher.getId()) {\r\n\t\t\tteacher1.getStudents().add(student1);\r\n\t\t\tteacher1.getStudents().add(student2);\r\n\t\t\treturn teacher1;\r\n\t\t} else if (teacher2.getId() == teacher.getId()) {\r\n\t\t\tteacher2.getStudents().add(student3);\r\n\t\t\treturn teacher2;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"TrackerUsersInGroups loadTrackerUsersInGroups(final Integer id);",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"public List<Teacher> getTeachers() {\n\t\tList<Teacher> teachers = this.hibernateTemplate.loadAll(Teacher.class);\n\t\treturn teachers;\n\t}",
"public static List<Subject> getAllbyLectID(int id) {\n List<Subject> list = new ArrayList<>();\n try {\n Connection connection = MySQL.getConnection();\n Statement stmt = connection.createStatement();\n String sqlSelect = \"select * from subjects where lect_id=\" + id + \" group by subject_name\";\n ResultSet rs = stmt.executeQuery(sqlSelect);\n while (rs.next()) {\n Subject e = new Subject();\n e.setSubjectID(rs.getInt(1));\n e.setSubjectCode(rs.getString(2));\n e.setSubjectName(rs.getString(3));\n e.setFacultyID(rs.getInt(4));\n e.setLectID(rs.getInt(5));\n list.add(e);\n\n }\n } catch (SQLException ex) {\n ex.getMessage();\n }\n\n return list;\n }",
"@Override\n\tpublic List<Student> getStudentsByTeacher(String teacherName) {\n\t\tCollection<Student> allStudents = getAllEntities(); \n\t\t\n\t\t/** Here add students only bounded to this teacher */\n\t\tList<Student> studentsByTeacher = new ArrayList<>();\n\t\t\n\t\t/** Loop through all students in collection */\n\t\tfor(Student student : allStudents) { \n\t\t\tHibernate.initialize(student.getSubjects());\n\t\t\tfor(int i = 0; i < student.getTeachers().size(); i++) {\n\t\t\t\t/** Compare passed argument's teacher's name with teacher names bounded with students */\n\t\t\t\tif(teacherName.equals(student.getTeachers().get(i).getUsername())) {\n\t\t\t\t\tstudentsByTeacher.add(student);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn studentsByTeacher;\n\t}",
"@Override\n\tpublic List<Users> listTeacher() {\n\t\treturn genericDAO.listTeacher();\n\t}",
"public List<User> getStudents(Group currentGroup, String orderby);",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Teacher> findAllTeacher(){\n\t\tList<Teacher> teachers = new ArrayList<Teacher>();\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateSessionFactory.getSession();\n\t\t\tteachers = session.getNamedQuery(\"findAllTeacher\").list();\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t} finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn teachers;\n\t}",
"public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }",
"@Override\r\n\tpublic ArrayList<Person> getAllGroupMembers(int id) throws IllegalArgumentException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tGroup g = new Group();\r\n\t\tg.setId(id);\r\n\t\tArrayList<Person> members = this.personMapper.findAllGroupMembers(g);\r\n\t\tfor (Person p : members) {\r\n\t\t\tPerson person = personMapper.findById(p.getId());\r\n\t\t\tp.setName(person.getName());\r\n\t\t}\r\n\t\treturn members;\r\n\t}",
"public List<Group> getUserGroups(Long iduser);",
"List<UserGroup> selectByExample(UserGroupExample example);",
"public static ArrayList<Teacher> getAllDocenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_TEACHERS;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Teacher> lis = (ArrayList<Teacher>) rp1.parameters[0];\n\t\t\treturn lis;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new ArrayList<Teacher>();\n\t}",
"public Group getGroup(Long id);",
"@Override\n\tpublic List<Teacher> getAll() {\n\t\treturn null;\n\t}",
"List<SeGroup> selectByExample(SeGroupExample example);",
"@Override\n\tpublic List<Teacher> findAll() {\n\t\treturn dao.findAll();\n\t}",
"@Override\r\n\tpublic List<ReportAndSummary> findByTrainningTeacher(int id) {\n\t\tList<ReportAndSummary> result = reportAndSummaryDao.findByTrainningTeacher(id);\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic List<Teacher> findAll(int gender, int subjectId, int classId, int districtId) {\n\t\treturn dao.findAll(gender, subjectId, classId, districtId);\n\t}",
"@Override\n\tpublic ResponseEntity<?> subjectTeacher(Integer tId, Integer sId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findBySubject_idAndGrade_LabelIsGreaterThan(sId, 4)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to subject teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"TrackerGroups loadTrackerGroups(final Integer id);",
"Teacher selectByPrimaryKey(Integer pkid);",
"@Override\n\tpublic Iterator<Student> selectAll() {\n\t\tString sql=\"SELECT a.id,a.num,a.name,a.email,a.phone,a.degree,a.project,a.school,b.name,a.is_cap from tc_student as a,tc_school as b where a.school=b.id\";\n\t\tArrayList<Student> arr=new ArrayList<Student>();\n\t\tResultSet rs=mysql.query(sql);\n\t\ttry {\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tStudent stu=new Student();\n\t\t\t\tstu.setId(rs.getInt(1));\n\t\t\t\tstu.setNum(rs.getString(2));\n\t\t\t\tstu.setName(rs.getString(3));\n\t\t\t\tstu.setEmail(rs.getString(4));\n\t\t\t\tstu.setPhone(rs.getString(5));\n\t\t\t\tstu.setDegree(rs.getShort(6));\n\t\t\t\tstu.setProject(rs.getInt(7));\n\t\t\t\tstu.setSchool(rs.getInt(8));\n\t\t\t\tstu.setSchoolstring(rs.getString(9));\n\t\t\t\tstu.setIs_cap(rs.getInt(10));\n\t\t\t\tstu.setDegreestring(degreemap[stu.getDegree()]);\n\t\t\t\tarr.add(stu);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn arr.iterator();\n\t}",
"public List<Teacher> getTeacherBySellWayId(int sellWayId) {\n\t\treturn simpleDao.getForList(\"ContractIPhone_NS.getTeacherBySellWayId\", sellWayId);\n\t}",
"@Override\n\tpublic Map<String, Object> findTeacherCourseById(int id) {\n\t\treturn cd.findTeaCourInfoById(id);\n\t}",
"public List<Subject> getSubjectsBySpecializationId(String id);",
"@Override\n\tpublic List<HhGroupUser> getGroupUserList(Integer id) {\n\t\tString hql = \"from HhGroupUser h where h.groupId = \" + id;\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn query.list();\n\t}",
"@Override\n\tpublic ResponseEntity<?> lowerGradeTeacher(Integer tId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findByGrade_LabelIsLessThan(5)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to lower grade teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"List<User> findUsers(User.UserGroup group, Long id, String fname, String lname, String email) throws Exception;",
"<T> Collection<T> getXMLTempGroups(Object groupID) throws Exception;",
"@Override\n\tpublic Integer groupBy(Integer id) {\n\t\treturn chiTietDonHangRepository.groupBy(id);\n\t}",
"@Override\r\n\t//得到任一都是老师对应的课程种类Id\r\n\tpublic List<Integer> getAllcourseCategoryIDsFormTeacher(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select courseCategoryIds from Teacher where state=:state and id=:teacherId\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<String> lists = session.createQuery(hql).setInteger(\"state\", 0).setInteger(\"teacherId\",teacherId).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tList<Integer> list =new ArrayList<Integer>();\r\n\t\tlogger.debug(\"use the method named :getAllcourseCategoryIDsFormTeacher(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\tString[] target= lists.get(0).split(\",\");\r\n\t\t\tfor(int i=0;i<target.length;i++){\r\n\t\t\t\tlist.add(Integer.parseInt(target[i]));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"Collection getUniqueKeysInGroup(Object groupID) throws Exception;",
"public ArrayList<Teacher> getTeacherList()\r\n\t {\r\n\t\t return teacherList;\r\n\t }",
"List<Group> getGroups();",
"@Override\r\n\tpublic List<BingTu> selectTeaByRR_NameAndCount() {\n\t\treturn teachersDao.selectTeaByRR_NameAndCount();\r\n\t}",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"Group getGroupById(String id);",
"@Override\n\tpublic ArrayList<Teacher> fetchDetails() throws myException {\n\t\tConnection con = GetConnection.getConnection();\n\t\tResultSet rs = null;\n\t\tString query = \"select * from teacher\";\n\t\tStatement st = null;\n\t\ttry {\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\tArrayList<Teacher> ls3 = new ArrayList<Teacher>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\t// Teacher teacher = new Teacher();\n\t\t\t\tString name = rs.getString(\"teacherName\");\n\t\t\t\tShort id = rs.getShort(\"teacherId\");\n\t\t\t\tShort yoe = rs.getShort(\"yOE\");\n\t\t\t\tSubject[] subject = null;// getSubjects(name);\n\t\t\t\tTeacher teacher = new Teacher(name, id, yoe, subject);\n\t\t\t\tls3.add(teacher);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\treturn ls3;\n\t}",
"List<String> getGroups(String usid);",
"@GetMapping(value = getTeachersByStudentIdMapping + \"{studentId}\")\r\n\tpublic ResponseEntity<List<Teacher>> getTeachersByStudentId(@PathVariable(\"studentId\") String studentId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getTeachersByStudentId(studentId));\r\n\t}",
"@Override\n\tpublic List<User> showTeacher() {\n\t\treturn userDao.showTeacher();\n\t}",
"private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"public String getTeacherId() {\n return teacherId;\n }",
"List<WstatTeachingClasshourTeacher> selectByExample(WstatTeachingClasshourTeacherExample example);",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"Set<Group> getGroups();",
"public University getalluniversitybyId(int id) {\n\t\treturn universityrespo.getOne(id);\n\n}",
"public abstract Collection getGroups();",
"public Student[] listStudents(long id) {\n\t\treturn new Tutor().listMyStudents(id);\n\t}",
"public abstract Collection<Integer> getAllTurtlesByID();",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public List<Usergroup> getUsersInGroup(Long groupKey) throws DAOException;",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"@GetMapping(value = getAllTeacherStudentMapping)\r\n\tpublic ResponseEntity<List<TeacherStudent>> getAllTeacherStudents() {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.findAll());\r\n\t}",
"GroupUser getGroupUserById(String id);",
"@GetMapping(value = getDataForMapping + \"/{studentId}\")\r\n\tpublic ResponseEntity<List<Teacher>> getTeachersForMapping(@PathVariable(\"studentId\") String studentId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getTeachersForMapping(studentId));\r\n\t}",
"UserGroup findById(String groupId);",
"public List<Group> getGroups(Course course, long idInstitution);",
"@Override\n\tpublic HhGroup getTheUserGroup(Integer id) {\n\t\tString hql = (\" from HhGroup h where h.isDel = 0 and h.id = \" + id);\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(hql);\n\t\treturn (HhGroup)query.uniqueResult();\n\t}",
"UserGroup selectByPrimaryKey(Long id_user_group);",
"public List<Group> getCourseGroups(Course course);",
"public List<OrgTO> getAllTeachersAcsi(String jasperOrgId) throws Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<OrgTO> allTeachers = new ArrayList<OrgTO>();\r\n\t\tOrgTO teacher = null;\r\n\t\ttry {\r\n\t\t\tconn = driver.connect(DATA_SOURCE, null);\r\n\r\n\t\t\t/*String query = \"SELECT COUNT(STU.STUDENT_BIO_ID), \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.JASPER_USERID, \" + \r\n\t\t\t\t\t\t \"U.USER_NAME \" + \r\n\t\t\t\t\t\t \"FROM ORG_NODE_DIM ORG, ORG_USERS U, STUDENT_BIO_DIM STU \" + \r\n\t\t\t\t\t\t \"WHERE ORG.LEVEL3_JASPER_ORGID = ? \" + \r\n\t\t\t\t\t\t \"AND U.JASPER_ORGID = ORG.LEVEL4_JASPER_ORGID \" + \r\n\t\t\t\t\t\t \"AND STU.ORG_NODEID = ORG.ORG_NODEID \" + \r\n\t\t\t\t\t\t \"AND u.new_user = 'Y' \" + \r\n\t\t\t\t\t\t \"GROUP BY ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.JASPER_USERID, \" + \r\n\t\t\t\t\t\t \"U.USER_NAME \" + \r\n\t\t\t\t\t\t \"ORDER BY ORG.ORG_NODEID\";*/\r\n\t\t\t/** Changing query for Phase II */\r\n\t\t\tString query = /*\"SELECT COUNT(STU.STUDENT_BIO_ID), \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.USER_ID, \" + \r\n\t\t\t\t\t\t \"U.USERNAME, \" + \r\n\t\t\t\t\t\t \"U.ORG_ID \" + \r\n\t\t\t\t\t\t \"FROM ORG_NODE_DIM ORG, USERS U, STUDENT_BIO_DIM STU \" + \r\n\t\t\t\t\t\t \"WHERE ORG.LEVEL3_JASPER_ORGID = ? \" + \r\n\t\t\t\t\t\t \"AND U.ORG_ID = ORG.LEVEL4_JASPER_ORGID \" + \r\n\t\t\t\t\t\t \"AND STU.ORG_NODEID = ORG.ORG_NODEID \" + \r\n\t\t\t\t\t\t \"AND u.new_user = 'Y' and u.activation_status = 'AC' \" + \r\n\t\t\t\t\t\t \" and u.adminid = (select adminid from admin_dim where current_admin = 'Y') \" +\r\n\t\t\t\t\t\t \"GROUP BY ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.USER_ID, \" + \r\n\t\t\t\t\t\t \"U.USERNAME, U.ORG_ID \" + \r\n\t\t\t\t\t\t \"ORDER BY ORG.ORG_NODEID\";*/\r\n\t\t\tCustomStringUtil.appendString(\r\n\t\t\t\t\t\"SELECT COUNT(SBD.STUDENT_BIO_ID), \",\r\n \" OND.ORG_NODE_NAME, \",\r\n \" OND.ORG_NODEID, \",\r\n \" OND.ORG_NODEID, \",\r\n \" U.USERID, \",\r\n \" U.USERNAME, \",\r\n \" OND.ORG_NODEID, \",\r\n \" P.PRODUCT_CODE \",\r\n \" FROM USERS U, ORG_USERS OU, ORG_NODE_DIM OND, STUDENT_BIO_DIM SBD, \",\r\n \" ORG_PRODUCT_LINK OPL,PRODUCT P, CUST_PRODUCT_LINK CPL \",\r\n \" WHERE U.USERID = OU.USERID \",\r\n \" AND U.IS_NEW_USER = 'Y' \",\r\n \" AND U.ACTIVATION_STATUS = 'AC' \",\r\n \" AND OU.ORG_NODEID = OND.ORG_NODEID \",\r\n \" AND OND.PARENT_ORG_NODEID = ? \",\r\n \" AND SBD.ORG_NODEID = OND.ORG_NODEID \",\r\n \" AND OPL.ORG_NODEID = OU.ORG_NODEID \",\r\n \" AND OPL.CUST_PROD_ID = CPL.CUST_PROD_ID \",\r\n \" AND P.PRODUCTID = CPL.PRODUCTID \",\r\n \" GROUP BY OND.ORG_NODE_NAME, OND.ORG_NODEID, U.USERID, U.USERNAME, P.PRODUCT_CODE \",\r\n \" ORDER BY OND.ORG_NODEID\");\r\n\t\t\t\r\n\t\t\tpstmt = conn.prepareCall(query);\r\n\t\t\tpstmt.setString(1, jasperOrgId);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tteacher = new OrgTO();\r\n\t\t\t\tteacher.setStudentCount(rs.getString(1));\r\n\t\t\t\tString elementName = rs.getString(2);\r\n\t\t\t\tteacher.setElementName(elementName);\r\n\t\t\t\tteacher.setFullName(elementName);\r\n\t\t\t\tteacher.setJasperOrgId(rs.getString(3));\r\n\t\t\t\tteacher.setOrgNodeId(rs.getString(4));\r\n\t\t\t\tteacher.setUserId(rs.getString(5)); // this is jasper user id\r\n\t\t\t\tteacher.setUserName(rs.getString(6)); // userid \r\n\t\t\t\tteacher.setTenantId(rs.getString(7));\r\n\t\t\t\tteacher.setTestAdministration(rs.getString(8));\r\n\t\t\t\tallTeachers.add(teacher);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {rs.close();} catch (Exception e2) {}\r\n\t\t\ttry {pstmt.close();} catch (Exception e2) {}\r\n\t\t\ttry {conn.close();} catch (Exception e2) {}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + allTeachers.size() + \" Teachers\");\r\n\t\treturn getGradeForTeacherUsersAcsi(allTeachers);\r\n\t}",
"@Override\r\n\tpublic List<Integer> getAllTeacherId() {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"select id from Teacher where state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Integer> lists = session.createQuery(hql).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getAllTeacherId()\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public java.util.List<DataEntry> filterFindByGroupId(long groupId);",
"@GetMapping(value = getStudentsByTeacherIdMapping + \"{teacherId}\")\r\n\tpublic ResponseEntity<List<Student>> getStudentsByTeacherId(@PathVariable(\"teacherId\") String teacherId) {\r\n\t\treturn ResponseEntity.ok().body(teacherStudentService.getStudentsByTeacherId(teacherId));\r\n\t}",
"ZigBeeGroup getGroup(int groupId);",
"@Override\n\tpublic List<TeacherInfo> getTeacherInfoList() {\n\t\treturn userMapper.getTeacherInfoList();\n\t}",
"public java.util.List<Todo> filterFindByGroupId(long groupId);",
"@Override\n public Map<String, Object> queryTaskGroupById(User loginUser, Integer id) {\n Map<String, Object> result = new HashMap<>();\n if (isNotAdmin(loginUser, result)) {\n return result;\n }\n TaskGroup taskGroup = taskGroupMapper.selectById(id);\n result.put(Constants.DATA_LIST, taskGroup);\n putMsg(result, Status.SUCCESS);\n return result;\n }",
"public List<User> getStudentsNotRegistered(Group currentGroup);",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByGrade(Integer... values) {\n return fetch(Teacher.TEACHER.GRADE, values);\n }",
"public ArrayList<Teacher> getTeachersInField(){\r\n\t\treturn CourseFieldController.getFieldTeachers(this);\r\n\t}",
"IGroup getTeamGroup();",
"public static void main(String[] args) {\n ArrayList<Course> courses = new ArrayList<>();\n courses.add(new Course(\"Math\", \"12030\"));\n courses.add(new Course(\"English\", \"46537\"));\n courses.add(new Course(\"Programming\", \"64537\"));\n\n ArrayList<Teacher> teachers = new ArrayList<>();\n teachers.add(new Teacher(\"Albert\", \"Einstein\", \"[email protected]\", \"1\"));\n teachers.add(new Teacher(\"Nikola\", \"Tesla\", \"[email protected]\", \"2\"));\n teachers.add(new Teacher(\"Ada\", \"Lovelace\", \"[email protected]\", \"3\"));\n teachers.add(new Teacher(\"Charles\", \"Babbage\", \"[email protected]\", \"4\"));\n\n courses.get(0).getTaughtBy().add(teachers.get(1));\n courses.get(0).getTaughtBy().add(teachers.get(2));\n courses.get(1).getTaughtBy().add(teachers.get(0));\n courses.get(1).getTaughtBy().add(teachers.get(1));\n courses.get(2).getTaughtBy().add(teachers.get(2));\n\n\n\n ArrayList<Student> students = new ArrayList<>();\n students.add(new Student(\"Irina\", \"Smirnova\", \"[email protected]\", \"245\"));\n students.add(new Student(\"Andrey\", \"Smirnov\", \"[email protected]\", \"249\"));\n students.add(new Student(\"Galina\", \"Kutarina\", \"[email protected]\", \"246\"));\n\n courses.get(0).getTakenBy().add(students.get(1));\n courses.get(0).getTakenBy().add(students.get(2));\n courses.get(1).getTakenBy().add(students.get(1));\n courses.get(2).getTakenBy().add(students.get(0));\n\n\n listCourses(courses);\n // listTeachers(teachers);\n// listStudents(students);\n\n\n\n }",
"private void fillTeachers() {\n for(Teacher t : MainFrame.etablissement.getTeachers()) {\n principalTeacher.addItem(t);\n }\n }",
"public List<Survey> getSurveybyTid(int tid);",
"@Override\r\n\tpublic List<Courseschedule> getCourseschedulesByTeacherId(int teacherId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hql = \"from Courseschedule where teacherId=:teacherId and state=:state\";\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Courseschedule> lists = session.createQuery(hql).setInteger(\"teacherId\", teacherId).setInteger(\"state\", 0).list();\r\n\t\ttran.commit();\r\n\t\tsession.close();\r\n\t\tlogger.debug(\"use the method named :getCourseschedulesByTeacherId(int teacherId)\");\r\n\t\tif (lists.size() > 0) {\r\n\t\t\treturn lists;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public List<com.heman.bysj.jooq.tables.pojos.Teacher> fetchByTid(Integer... values) {\n return fetch(Teacher.TEACHER.TID, values);\n }",
"String getItem(int id) {\n return answers.get(id).getTeacher();\n }",
"@GetMapping(\"/skillgroups/{id}\")\n @Timed\n public ResponseEntity<Skillgroup> getSkillgroup(@PathVariable Long id) {\n log.debug(\"REST request to get Skillgroup : {}\", id);\n Optional<Skillgroup> skillgroup = skillgroupService.findOne(id);\n return ResponseUtil.wrapOrNotFound(skillgroup);\n }"
]
| [
"0.6555924",
"0.63912225",
"0.6337535",
"0.6322257",
"0.6321173",
"0.6288528",
"0.62658596",
"0.6056561",
"0.6041917",
"0.60362643",
"0.60024315",
"0.59549433",
"0.5930981",
"0.5858546",
"0.5840528",
"0.58387834",
"0.5830117",
"0.57780665",
"0.57718724",
"0.57607365",
"0.57568634",
"0.5752663",
"0.5734107",
"0.5704698",
"0.5688988",
"0.5685468",
"0.5676971",
"0.56675535",
"0.5648708",
"0.56444305",
"0.5641452",
"0.56323516",
"0.5631893",
"0.5628661",
"0.56006396",
"0.56003636",
"0.5595695",
"0.5562852",
"0.55001944",
"0.5490497",
"0.54806674",
"0.5473526",
"0.546539",
"0.5464783",
"0.5463707",
"0.5444247",
"0.54324925",
"0.5404788",
"0.53981614",
"0.53902024",
"0.53875005",
"0.53770643",
"0.5374425",
"0.5368941",
"0.53643143",
"0.53571767",
"0.5354789",
"0.53409594",
"0.53376615",
"0.53358334",
"0.5335678",
"0.5312747",
"0.53099144",
"0.52918315",
"0.52856565",
"0.5278659",
"0.5274945",
"0.5273",
"0.5269869",
"0.52519757",
"0.52519757",
"0.5247896",
"0.5198335",
"0.5194982",
"0.5188155",
"0.5187223",
"0.5181514",
"0.5180955",
"0.5178845",
"0.5175345",
"0.5172937",
"0.5166105",
"0.5148805",
"0.5145862",
"0.5144874",
"0.5137618",
"0.51300275",
"0.51282537",
"0.512679",
"0.51255894",
"0.51201725",
"0.51062024",
"0.51037025",
"0.50943476",
"0.5094038",
"0.5088155",
"0.50878435",
"0.5084259",
"0.5079859",
"0.50671995"
]
| 0.67832756 | 0 |
update teacher by id | @PutMapping("/{id}")
public TeacherDTO updateById(@RequestBody TeacherDTO teacherDTO, @PathVariable Long id, Locale locale) {
Teacher teacher = teacherService.updateById(convertToEntity(teacherDTO), id, locale);
return convertToDto(teacher);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void update(int id, int teacherid, int noteid );",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tdao.update(teacher);\n\t}",
"@Override\n\tpublic void update(Teacher teacher) {\n\t\tteacherDao.update(teacher);\n\t}",
"int updateByPrimaryKey(Teacher record);",
"public void update(Teacher o) throws SQLException {\n\t\t\r\n\t}",
"@Override\n\tpublic Integer do_updateTeacher(Teacher teacher) {\n\t\treturn teacherDAO.do_updateTeacher(teacher);\n\t}",
"public boolean updateTeacherT_id(Teacher teacher) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.updateTeacherT_id(teacher);\n\t\tSystem.out.println(\"--Into Dao Method of updateTeacherT_id!!!--\");\n\t\treturn true;\n\t}",
"public void edit(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Teacher existingTeacher = (Teacher) session.get(Teacher.class, teacher.getEmail());\n Transaction transaction = session.beginTransaction();\n\n existingTeacher.setName(teacher.getName());\n existingTeacher.setCountry(teacher.getCountry());\n existingTeacher.setInfo(teacher.getInfo());\n existingTeacher.setPicture(teacher.getPicture());\n existingTeacher.setBirthDate(teacher.getBirthDate());\n existingTeacher.setUniversity(teacher.getUniversity());\n existingTeacher.setPost(teacher.getPost());\n existingTeacher.setDegree(teacher.getDegree());\n\n session.save(existingTeacher);\n transaction.commit();\n }",
"private void updateFromListTeacher(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\ttry {\n\t\t\tTeacher teacher=teacherDAO.getTeacher(id);\n\t\t\treq.setAttribute(\"teacher\", teacher);\n\t\t\treq.getServletContext().getRequestDispatcher(\"/updateTeacher.jsp\")\n\t\t\t.forward(req, resp);\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Override\r\n\tpublic void editTea(Teacher teacher) {\n\r\n\t}",
"@RequestMapping(\"/upgrade/{id}\") public String upgradeToTeacher(@PathVariable(\"id\") long id, Model model){\n Student student = students.findById(id).get();\n model.addAttribute(\"newTeacher\", adminService.studentToTeacher(student));\n model.addAttribute(\"dpmnts\", dpmnts.findAll());\n students.delete(student);\n return \"admin/addteacher\";\n }",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void updateTeacher(int teacherID, int newTeacherID) {\n\n for (int i = 0; i < this.teachers.size(); i++) {\n if (getTeacherID(i) == teacherID) {\n this.teachers.set(i, newTeacherID);\n }\n }\n\n }",
"public void setTeacherId(String teacherId) {\n this.teacherId = teacherId;\n }",
"private void updateTeacherProfileInfo() {\n\t\t\n\t\tteacher.setLastName(tLastNameTF.getText());\n\t\tteacher.setFirstName(tFirstNameTF.getText());\n\t\tteacher.setSchoolName(tSchoolNameTF.getText());\n\t\t\n\t\t//Update Teacher profile information in database\n\t\t\n\t}",
"@Override\n\tpublic void updateByid(Teatask ta)\n\t{\n\t\tteataskMapper.updateByid(ta);\n\t}",
"int updateByPrimaryKey(ac_teacher_instrument record);",
"@Override\n\tpublic void modifyTeacherCourse(TeacherCourse tc) {\n\t\tcd.updateTeacherCourse(tc);\n\t}",
"@Override\r\n\t@Transactional\r\n\tpublic int saveTeacher(Teacher teacher) {\n\t\tString username = UserNameUtil.createUsername(teacher.getFirstName());\r\n\t\tSystem.out.println(username);\r\n\t\tList<String> roles = new ArrayList<String>();\r\n\t\troles.add(RoleConstants.TEACHER);\r\n\t\tint id = commonDao.createUserAndSetRoles(username, roles);\r\n\t\tSystem.out.println(\"user id : \"+ id );\r\n\t\tteacher.setTeacherId(id);\r\n\t\tint status = schoolDao.saveTeacher(teacher);\r\n\t\treturn status;\r\n\t}",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"void save(Teacher teacher);",
"@Override\n\tpublic boolean update(Teacher teacher) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic Teacher findOne(int id) {\n\t\treturn dao.findOne(id);\n\t}",
"public void add(Teacher teacher) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n session.save(teacher);\n transaction.commit();\n }",
"private void addorUpdteTeacher(HttpServletRequest req, HttpServletResponse resp,boolean update) throws ServletException, IOException {\n\t\tString url=\"/listTeacher.jsp\";\n\t\tTeacher teacher=new Teacher();\n\t\tString firstName=req.getParameter(\"firstName\");\n\t\tString lastName=req.getParameter(\"lastName\");\n\t\tString designation=req.getParameter(\"designation\");\n\t\tteacher.setFirstName(firstName);\n\t\tteacher.setLastName(lastName);\n\t\tteacher.setDesignation(designation);\n\t\t\n\t\t\ttry {\n\t\t\t\tif(!update) {\n\t\t\t\tteacherDAO.addTeacher(teacher);\n\t\t\t\t}else {\n\t\t\t\t\tint id=Integer.parseInt(req.getParameter(\"teacherid\"));\n\t\t\t\t\tteacher.setId(id);\n\t\t\t\t\tteacherDAO.updateTeacher(teacher);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\treq.setAttribute(\"message\", e.getMessage());\n\t\t\t\tif(!update)\n\t\t\t\t\turl=\"/addTeacher.jsp\";\n\t\t\t\telse \n\t\t\t\t\turl=\"/updateTeacher.jsp\";\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t\t\n\t\treq.getRequestDispatcher(url)\n\t\t.forward(req, resp);;\n\t\t\n\n\t}",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"public Teacher findTeacherId(Integer t_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tTeacher teacher = courtyardMapper.findTeacherId(t_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherId!!!--\");\n\t\treturn teacher;\n\t}",
"public void setTeacher(Student s) {\n // TODO implement here\n \tthis.teacher = s;\n }",
"int updateByPrimaryKeySelective(ac_teacher_instrument record);",
"public String getTeacherId() {\n return teacherId;\n }",
"@Override\n\tpublic int updateTeacherInfo(String id, String teacherIcon,\n\t\t\tString teacherNickName, String sex, String teacherIntro) {\n\t\treturn userMapper.updateTeacherInfo(id, teacherIcon, teacherNickName,\n\t\t\t\tsex, teacherIntro);\n\t}",
"public void update(Triplet t) throws DAOException;",
"private void viewTeacher() {\n //Lesen wir die ID\n Scanner sc = new Scanner(System.in);\n System.out.print(\"ID of the teacher to be viewed: \");\n long ID = sc.nextLong();\n\n Teacher t = ctrl.getTeacherRepo().findOne(ID);\n if (t != null)\n System.out.println(t.toString());\n else\n System.out.println(\"Teacher with this ID doesn't exist!\");\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"public Integer getTeacherId() {\n return teacherId;\n }",
"int updateByPrimaryKey(TResearchTeach record);",
"private void addTeacher() {\n\t\t\n\t\tString lastName = tLastNameTF.getText();\n\t\tString firstName = tFirstNameTF.getText();\n\t\tString schoolName = tSchoolNameTF.getText();\n\t\tString userName = tUsernameTF.getText();\n\t\tchar[] password = tPasswordPF1.getPassword();\n\t\tString sA1 = tSecurityQ1TF.getText();\n\t\tString sQ1 = (String)tSecurityList1.getSelectedItem();\n\t\tString sA2 = tSecurityQ2TF.getText();\n\t\tString sQ2 = (String)tSecurityList2.getSelectedItem();\n\t\t\n\t\tteacher = new Teacher(lastName, firstName, schoolName, userName, password, sA1, sQ1, sA2, sQ2);\n\t\t\n\t\t//Add teacher to database \n\t\t\n\t}",
"@Override\n\tpublic void updateTeachers(Professor ud) {\n\t\ttry{ \n\t\t\t\n\t\t\tstmt = conn.prepareStatement(\"UPDATE Professor set name=?,department=? where ssn=?\");\n\t\t\tstmt.setString(1, ud.getName());\n\t\t\tstmt.setString(2, ud.getDepartment());\n\t\t\tstmt.setString(3, ud.getSsn());\n\t\t\tstmt.executeUpdate();\n\t\t\t\n\t\t}catch(SQLException e){\n\t\t\tex=e;\n\t\t}finally{\n\t\t\tif(conn!=null){\n\t\t\t\ttry{\n\t\t\t\t\tconn.close();\n\t\t\t\t}catch(SQLException e){\n\t\t\t\t\tif(ex==null){\n\t\t\t\t\t\tex=e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\tif(ex!=null){\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic Integer do_insertTeacher(Teacher teacher) {\n\t\tString id = teacherDAO.getLastTeacherID();\n\t\tInteger int_id = Integer.valueOf(id.substring(2, id.length()));\n\t\tteacher.setT_id(id.substring(0, 2)+(int_id+1));\n\t\treturn teacherDAO.do_insertTeacher(teacher);\n\t}",
"public void addTeacher(Teacher teacher) {\n\t\tteachersRepository.save(teacher);\r\n\t\t//teachersList.add(teacher);\r\n\t}",
"public static void updatetea(String teaid2, String teaname2, Date teabirth2, String protitle2, String cno2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"update teacher set Tname = ?,Tbirth = ?,Tprotitle = ?,Cno = ? where ID = ? \");\n\t\t\tps.setString(1, teaname2);\n\t\t\tps.setDate(2, teabirth2);\n\t\t\tps.setString(3, protitle2);\n\t\t\tps.setString(4, cno2);\n\t\t\tps.setString(5, teaid2);\n\t\t\tps.executeUpdate();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录修改成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t}catch(Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据修改失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public boolean saveTeacher(Map map) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tcourtyardMapper.saveTeacher(map);\n\t\tSystem.out.println(\"--Into Dao Method of saveTeacher!!!--\");\n\t\treturn true;\n\t}",
"private void updateTeacherSecurityInfo() {\n\t\t\n\t\tteacher.setPassword(tOldPasswordPF.getPassword());\n\t\tteacher.setSecuirtyAnswer1(tSecurityQ1TF.getText());\n\t\tteacher.setSecurityQuestion1((String)tSecurityList1.getSelectedItem());\n\t\tteacher.setSecurityAnswer2(tSecurityQ2TF.getText());\n\t\tteacher.setSecurityQuestion2((String)tSecurityList1.getSelectedItem());\n\t\t\n\t\t//Update Teacher security information in database\n\t\t\n\t}",
"Teacher selectByPrimaryKey(Integer pkid);",
"public void update(RutaPk pk, Ruta dto) throws RutaDaoException;",
"public void modifyStudents(String id) {\r\n System.out.println(\"conectado con model ---> metodo modifyStudents\");\r\n //TODO\r\n }",
"public void update(long id, String name, String discipline, String grade) {\n SQLiteDatabase db = _openHelper.getWritableDatabase();\n if (db == null) {\n return;\n }\n ContentValues row = new ContentValues();\n row.put(\"name\", name);\n row.put(\"discipline\", discipline);\n row.put(\"grade\", grade);\n db.update(\"Exams\", row, \"_id = ?\", new String[] { String.valueOf(id) } );\n db.close();\n }",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public Boolean deleteTeacherById(int teacherId) {\n List<Lesson> lessonsAttachedToThisTeacher = lessonService.findAllLessonsByTeacher(teacherId).getBody();\n if (lessonsAttachedToThisTeacher != null) {\n for (Lesson lesson : lessonsAttachedToThisTeacher) {\n lessonService.removeLesson(lesson.getId());\n }\n }\n List<Map<String, Object>> eaattrList =\n learningCenterDataBaseUtil.getEntityAttrIdRelAttrNameByEntityName(\"Teacher\");\n // removing rows from value table\n for (Map<String, Object> eaAttr : eaattrList) {\n learningCenterDataBaseUtil.removeRowFromValue(\n teacherId,\n Integer.valueOf(eaAttr.get(\"entity_attribute_id\").toString())\n );\n }\n // removing row from object table\n learningCenterDataBaseUtil.removeRowFromObject(teacherId);\n return true;\n }",
"@PutMapping(\"{id}\")\n public Lesson updateLesson(@RequestBody Lesson lesson,\n @PathVariable long id) {\n //code\n return null;\n }",
"@Override\r\n\tpublic void insertTea(Teacher teacher) {\n\r\n\t}",
"@Test\n public void setTutor() {\n Employee em = employeeService.findById(5);\n System.out.println(\"=======\" + em.getName());\n Student student1 = studentService.findById(22);\n System.out.println(\"*********\" + student1.getName());\n student1.setTutor(em);\n studentService.update(student1);\n studentService.saveOrUpdate(student1);\n }",
"public void setTeacherOpView(int id) {\n\t\t\tviewTeacherOp = new TeacherOpView(id);\r\n\t\t\t//viewInsert.addBtnListener(listener);\r\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic ResponseEntity<?> postPutTeacher(UTeacherEntity teacher, UserDTO newTeacher) {\n\t\tif (newTeacher.getTeacherTitle() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Title must be provided\"), HttpStatus.BAD_REQUEST);\n\t\t}\n\t\tif (newTeacher.getTeacherNoOfLicence() == null) {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(2, \"Teacher number of licence must be provided\"),\n\t\t\t\t\tHttpStatus.BAD_REQUEST);\n\t\t}\n\t\tteacher.setName(newTeacher.getName());\n\t\tteacher.setLastName(newTeacher.getLastName());\n\t\tteacher.setEmail(newTeacher.getEmail());\n\t\tteacher.setTitle(newTeacher.getTeacherTitle());\n\t\tteacher.setNoOfLicence(newTeacher.getTeacherNoOfLicence());\n\t\tteacherRepo.save(teacher);\n\t\tlogger.error(\"Error occured while creating tgs\");\n\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail() + \") added new/updated teacher \" + teacher);\n\n\t\treturn new ResponseEntity<UTeacherEntity>(teacher, HttpStatus.OK);\n\t}",
"int updateByExample(TResearchTeach record, TResearchTeachExample example);",
"void updateLecture(String day, String time, String subject, String teacher);",
"public Teacher get(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n transaction.commit();\n return teacher;\n }",
"int updateByPrimaryKey(TrainingCourse record);",
"int updTravelById(Travel record) throws TravelNotFoundException;",
"@GetMapping(value = \"/update/{id}\")\n public String updateForm(@PathVariable(\"id\") Long id, Model model) {\n log.info(\"UPDATE itinerary by ID : {}\", id);\n \n Itinerary itinerary = itineraryService.findById(id);\n \n Set<Sector> sectors = sectorService.findAll();\n \n if (Objects.isNull(itinerary)) {\n log.info(\"Any itinerary found with ID : {}\", id);\n return \"redirect:/itineraries/\";\n }\n \n model.addAttribute(\"grades\", Grade.values());\n model.addAttribute(\"itinerary\", itinerary);\n model.addAttribute(\"sectors\", sectors);\n \n return UPDATE;\n }",
"int updateByPrimaryKey(TrainCourse record);",
"int updateByExample(@Param(\"record\") WstatTeachingClasshourTeacher record, @Param(\"example\") WstatTeachingClasshourTeacherExample example);",
"public void delete(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n session.delete(teacher);\n transaction.commit();\n }",
"public void setResearchteacherid(Long researchteacherid) {\r\n\t\tthis.researchteacherid = researchteacherid;\r\n\t}",
"int updateByPrimaryKey(ExamRoom record);",
"public void updateStudent(int id,Student student) {\n\t\tQuery q=session.createQuery(\"update Student set name=:stname ,city=:stcity where id=:stid\"); \n\t\tq.setParameter(\"stname\",student.getName()); \n\t\tq.setParameter(\"stcity\",student.getCity()); \n\t\tq.setParameter(\"stid\",id); \n\t\t \n\t\tq.executeUpdate(); \n\t\t\n\t}",
"int updateByPrimaryKeySelective(TResearchTeach record);",
"public static Teachers getTeacher(int teacher_id) {\n\n Teachers teacher = null;\n\n String sql = \"SELECT * FROM teachers WHERE teacher_id = \" + teacher_id;\n\n try (Connection connection = Database.getConnection();\n Statement statement = connection.createStatement();\n ResultSet set = statement.executeQuery(sql)) {\n\n if (set.next())\n teacher = new Teachers(set.getInt(\"teacher_id\"),\n set.getString(\"name\"),\n set.getInt(\"age\"),\n set.getString(\"gender\"),\n set.getString(\"email_id\"));\n\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n return teacher;\n }",
"int updateByExampleSelective(@Param(\"record\") WstatTeachingClasshourTeacher record, @Param(\"example\") WstatTeachingClasshourTeacherExample example);",
"@Override\n\tpublic TeacherInfo getTeacherInfo(String id) {\n\t\treturn userMapper.getTeacherInfo(id);\n\t}",
"public void addClassToTeacher(Classes teacher_class) {\n db.addClassToTeacher(teacher_class);\n }",
"private void modifyActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n String teaCollege = this.teaCollegeText.getText();\n String teaDepartment = this.teaDepartmentText.getText();\n String teaType = this.teaTypeText.getText();\n String teaPhone = this.teaPhoneText.getText();\n String teaRemark = this.teaRemarkText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n if(StringUtil.isEmpty(teaCollege)){\n JOptionPane.showMessageDialog(null, \"学院不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaDepartment)){\n JOptionPane.showMessageDialog(null, \"系不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaType)){\n JOptionPane.showMessageDialog(null, \"类型不能为空!\");\n return;\n }\n if(StringUtil.isEmpty(teaPhone)){\n JOptionPane.showMessageDialog(null, \"手机不能为空!\");\n return;\n }\n if(!StringUtil.isAllNumber(teaPhone)){\n JOptionPane.showMessageDialog(null, \"请输入合法的手机号!\");\n return;\n }\n if(teaPhone.length() != 11){\n JOptionPane.showMessageDialog(null, \"请输入11位的手机号!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认修改?\");\n if(confirm == 0){//确认修改\n Teacher tea = new Teacher(teaID,teaCollege,teaDepartment,teaType,teaPhone,teaRemark);\n Connection con = dbUtil.getConnection();\n int modify = teacherInfo.updateInfo(con, tea);\n if(modify == 1){\n JOptionPane.showMessageDialog(null, \"修改成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"修改失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"int updateByPrimaryKey(TempletLink record);",
"public void addteacher(Teacher Te){\n this.tlist.add(Te);\n }",
"private static void LessonDAOUpdate() {\n PersonDAO personDAO = new PersonDAOImpl();\n\n Person person = personDAO.getPersonById(7);\n person.setFirstName(\"Teddy\");\n\n if(personDAO.updatePerson(person)) {\n System.out.println(\"Person Update Success!\");\n } else {\n System.out.println(\"Person Update Fail!\");\n }\n }",
"private void updateCourse() throws ValidatorException, FileNotFoundException {\n //Lesen wir die Daten\n Scanner sc = new Scanner(System.in);\n Teacher newTeacher;\n int newMaxNr;\n System.out.print(\"Course Id: \");\n Long id = Long.parseLong(sc.next());\n System.out.print(\"New name: \");\n String name = sc.next();\n //Wir konnen nur einen neuer Lehrer auswahlen, der bereits existiert\n while (true) {\n System.out.print(\"New teacher ID: \");\n long ID = sc.nextLong();\n newTeacher = ctrl.getTeacherRepo().findOne(ID);\n if (newTeacher == null)\n System.out.println(\"Teacher with this ID doesn't exist! Please try again!\");\n else\n break;\n }\n int nrStudentEnrolledAlready = ctrl.getCourse(id).getStudentsEnrolled().size();\n /*\n Wir konnen die maximale Anzahl von Studenten nur auf eine Zahl andern, die großer als die aktuelle Anzahl\n von eingeschreibenen Studenten ist\n */\n while (true) {\n System.out.print(\"New maximum number of students: \");\n newMaxNr = sc.nextInt();\n if (newMaxNr < nrStudentEnrolledAlready)\n System.out.println(\"There are more than \" + newMaxNr + \" students already taking this course. (\"\n + nrStudentEnrolledAlready + \") Try again!\");\n else\n break;\n }\n System.out.print(\"New number of credits: \");\n int newNrCredits = sc.nextInt();\n\n //Wir rufen die updateCourse Funktion vom dem Controller mit den gelesenen Daten auf\n if(ctrl.updateCourse(id, name, newTeacher, newMaxNr, newNrCredits))\n System.out.println(\"Course updated with success!\");\n else\n System.out.println(\"Course with this ID doesn't exist!\");\n }",
"@Override\r\n\tpublic void deleteTea(Teacher teacher) {\n\r\n\t}",
"@Override\n\tpublic Map<String, Object> findTeacherCourseById(int id) {\n\t\treturn cd.findTeaCourInfoById(id);\n\t}",
"public void update(TdiaryArticle obj) throws SQLException {\n\r\n\t}",
"private static void editStudent () {\n System.out.println(\"Here is a list of Students..\");\n showStudentDB();\n System.out.println(\"Enter Id of student you want to edit: \");\n int studentId = input.nextInt();\n input.nextLine();\n Student student = null;\n\n for(Student s: studentDB) {\n if(s.getID() == studentId) {\n student = s;\n }\n }\n\n if(student != null) {\n System.out.println(\"Enter New Name\");\n String str = input.nextLine();\n student.setName(str);\n System.out.println(\"Name is changed!\");\n System.out.println(\"Id: \" + student.getID() + \"\\n\" + \"Name: \" + student.getName() );\n } else {\n System.out.println(\"Invalid Person!\");\n }\n }",
"boolean updateUser(SchoolSubject schoolSubject);",
"@Override\n\tpublic void update(double sal, int id) {\n\t\tConnection con=null;\n\t\tPreparedStatement stmt=null;\n\t\t\n\t\ttry {\n\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/ems?user=root&password=root\");\n\t\t\tString query=\"update employee set sal=? where id=?\";\n\t\t\tstmt=con.prepareStatement(query);\n\t\t\tstmt.setDouble(1, sal);\n\t\t\tstmt.setInt(2, id);\n\t\t\tstmt.execute();\n\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}",
"public void updateQuestion(int id_question, String texteQuestion) {\n ContentValues data=new ContentValues();\n data.put(\"texteQuestion\", texteQuestion);\n db.update(\"question\", data, \"id_question=\" + id_question, null);\n }",
"int updateByPrimaryKey(TSubjectInfo record);",
"public void updateStudentById(int id)\r\n {\r\n if(this.ID!=id){\r\n return;\r\n }\r\n Scanner input=new Scanner(System.in);\r\n if(ID==-1){\r\n System.out.println(\"Enter student name: \");\r\n Name=input.nextLine();\r\n System.out.println(\"Enter id: \");\r\n ID=input.nextInt();\r\n System.out.println(\"Enter University: \");\r\n \r\n University=input.nextLine();\r\n University=input.nextLine();\r\n \r\n \r\n System.out.println(\"Enter Department: \");\r\n Department=input.nextLine();\r\n \r\n }\r\n \r\n }",
"public void updateTraining(Training t) {\n\n //the new User's id\n Integer id = null;\n\n Session session = ConnectionFactory.getInstance().getSession();\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n //build relationship\n\n\n session.saveOrUpdate(t);\n tx.commit();\n\n id = t.getTrainingId();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n }",
"int updateByPrimaryKeySelective(TrainingCourse record);",
"int updateId(T data, ID newId) throws SQLException, DaoException;",
"@Override\r\n\t\tpublic boolean addTeacher(TeacherDto teacherDto) {\n\t\t\ttry{\r\n\t\t\t\tList<Teacher> list = teacherRepository.findBySubjectAndStudentid(teacherDto.getSubject(), teacherDto.getStudentid());\r\n\t\t\t\t\t\tif (list.size() > 0) {\r\n\t\t\t\treturn false;\r\n\t\t\t} else {\t\t\r\n\t\t\tArrayList arr=new ArrayList<>();\r\n\t\t\tarr.add(\"MATHS\");\r\n\t\t\tarr.add(\"PHYSICS\");\r\n\t\t\tarr.add(\"CHEMISTRY\");\r\n\t\t\tif(!arr.contains(teacherDto.getSubject()))\r\n\t\t\t{\r\n\t\t\tTeacher teacher=teacherRepository.save(TeacherTransformer.getTeacherDtoToEntity(teacherDto));\r\n\t\t\tStudent student = restTemplate.getForObject(\"http://localhost:8080/studentservice/students/\" + teacher.getStudentid(),Student.class);\r\n\t if(teacher.getSubject().toUpperCase().equals(\"MATHS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setMaths(teacher.getMarks());\r\n\t\t\t}else if(teacher.getSubject().toUpperCase().equals(\"PHYSICS\"))\r\n\t\t\t{\r\n\t\t\t\tstudent.setPhysics(teacher.getMarks());\r\n\t\t\t}\r\n\t\t\telse if(teacher.getSubject().toUpperCase().equals(\"CHEMISTRY\")) \r\n\t\t\t{\r\n\t\t\t\tstudent.setChemistry(teacher.getMarks());\r\n\t\t\t}else {}\r\n\t\t\t\t\trestTemplate.postForObject(\"http://localhost:8080/studentservice/students/update\", StudentTransformer.getStudentEntityToDto(student), StudentDto.class);\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t}\r\n\t\t\t}catch(Exception e)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}",
"int updateByPrimaryKey(Tourst record);",
"@PatchMapping(\"{id}\")\n public Lesson updateLessonName(@RequestBody String name, @PathVariable long id) {\n //code\n return null;\n }",
"public static void promuovi_utente(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\t\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}",
"int updateByPrimaryKeySelective(TrainCourse record);",
"@Override\n\tpublic ResponseEntity<?> subjectTeacher(Integer tId, Integer sId) {\n\t\tif (teacherRepo.existsById(tId)) {\n\t\t\tfor (Grade_Subject gs : gradeSubjectRepo.findBySubject_idAndGrade_LabelIsGreaterThan(sId, 4)) {\n\t\t\t\taddGradeSubject(tId, gs.getId());\n\t\t\t\tlogger.error(\"Error occured while creating tgs\");\n\t\t\t\tlogger.info(\"Admin (email: \" + AuthController.getEmail()\n\t\t\t\t\t\t+ \") added new grade_subject to subject teacher #id \" + tId);\n\t\t\t}\n\t\t\treturn new ResponseEntity<List<Teacher_Grade_Subject>>(teacherGradeSubjectRepo.findByTeacher_id(tId),\n\t\t\t\t\tHttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RestError>(new RestError(10, \"There is no teacher with such ID\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}",
"void updateQuestion(String questionId, Question question) throws SQLException;",
"int updateByPrimaryKey(Terms record);",
"T edit(long id, T obj);",
"@Override\n\tpublic void updateEtudiant(Etudiant etudiant) {\n\t\tthis.etudiantDao.updateEtudiant(etudiant);\n\t}"
]
| [
"0.8013928",
"0.77629346",
"0.7743405",
"0.765729",
"0.74933726",
"0.7399734",
"0.7354573",
"0.72274363",
"0.72235715",
"0.71800476",
"0.7145709",
"0.7031425",
"0.70188355",
"0.70188355",
"0.69499135",
"0.6839242",
"0.6837074",
"0.6715877",
"0.65302086",
"0.65247333",
"0.65048885",
"0.6495939",
"0.6482391",
"0.6477952",
"0.6423555",
"0.6384208",
"0.63532305",
"0.63456964",
"0.6331518",
"0.63108826",
"0.63012224",
"0.6283305",
"0.62585205",
"0.6255747",
"0.6245887",
"0.6225703",
"0.6225703",
"0.6211025",
"0.6191771",
"0.61894655",
"0.61834633",
"0.61034197",
"0.6097378",
"0.6046505",
"0.60394305",
"0.6037047",
"0.6022616",
"0.59927917",
"0.5982673",
"0.59794796",
"0.5968936",
"0.59405506",
"0.5918442",
"0.59183663",
"0.5901085",
"0.58936995",
"0.5889682",
"0.58866024",
"0.58629465",
"0.58565366",
"0.584382",
"0.58373886",
"0.5820389",
"0.58164304",
"0.5807517",
"0.5793709",
"0.5776059",
"0.577242",
"0.5769662",
"0.5758113",
"0.5747143",
"0.57252073",
"0.5721154",
"0.57122713",
"0.5705398",
"0.56962156",
"0.56835735",
"0.5670435",
"0.5660277",
"0.56527805",
"0.5645213",
"0.5639454",
"0.56322986",
"0.5629638",
"0.5628779",
"0.562652",
"0.5625142",
"0.56137556",
"0.56073594",
"0.5602032",
"0.5601658",
"0.5601589",
"0.55997795",
"0.5592484",
"0.55923486",
"0.55902493",
"0.55896515",
"0.5587314",
"0.55771446",
"0.55765414"
]
| 0.7182711 | 9 |
method delete teacher by id | @DeleteMapping("/{id}")
public void deleteById(@PathVariable Long id, Locale locale) {
teacherService.deleteById(id, locale);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void deleteTea(Teacher teacher) {\n\r\n\t}",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public Boolean deleteTeacherById(int teacherId) {\n List<Lesson> lessonsAttachedToThisTeacher = lessonService.findAllLessonsByTeacher(teacherId).getBody();\n if (lessonsAttachedToThisTeacher != null) {\n for (Lesson lesson : lessonsAttachedToThisTeacher) {\n lessonService.removeLesson(lesson.getId());\n }\n }\n List<Map<String, Object>> eaattrList =\n learningCenterDataBaseUtil.getEntityAttrIdRelAttrNameByEntityName(\"Teacher\");\n // removing rows from value table\n for (Map<String, Object> eaAttr : eaattrList) {\n learningCenterDataBaseUtil.removeRowFromValue(\n teacherId,\n Integer.valueOf(eaAttr.get(\"entity_attribute_id\").toString())\n );\n }\n // removing row from object table\n learningCenterDataBaseUtil.removeRowFromObject(teacherId);\n return true;\n }",
"public void delete(String id) {\n Session session = sessionFactory.getCurrentSession();\n Transaction transaction = session.beginTransaction();\n Teacher teacher = (Teacher) session.get(Teacher.class, id);\n session.delete(teacher);\n transaction.commit();\n }",
"@Override\n\tpublic void deleteTeacherCourse(int tcId) {\n\t\tcd.deleteTourse(tcId);\n\t}",
"@DeleteMapping(value = deleteTeacherStudentMapping + \"{studentId}/{teacherId}\")\r\n\tpublic ResponseEntity<HttpResponse> delete(@PathVariable(\"studentId\") String studentId,@PathVariable(\"teacherId\") String teacherId){\r\n\t\tteacherStudentService.delete(teacherId, studentId);\r\n\t\tHttpResponse response = new HttpResponse();\r\n\t\tresponse.setResponseMessage(\"TeacherStudent Deleted with StudentId : \"+ studentId + \" and TeacherId : \" + teacherId);\r\n\t\treturn ResponseEntity.ok().body(response);\r\n\t}",
"public String deleteResearcher(int id);",
"int deleteByExample(WstatTeachingClasshourTeacherExample example);",
"public void delUtente(int id);",
"void deleteLesson(int id) throws DataAccessException;",
"public void deleteBySubject(int id, TripletType type) throws DAOException;",
"int deleteByPrimaryKey(Integer acTeacherInstrumentId);",
"public static void deletetea(String teaid2) {\n\t\ttry {\n\t\t\tps = conn.prepareStatement(\"delete from teacher where ID = ? \");\n\t\t\tps.setString(1, teaid2);\n\t\t\tps.execute();\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"教师记录删除成功!\", \"提示消息\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\n\t\t}catch (Exception e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"数据删除失败!\", \"提示消息\", JOptionPane.ERROR_MESSAGE);\n\t\t\te1.printStackTrace();\n\t\t}\n\t}",
"@Override\n\tpublic void deleteStudentById(long id) {\n\t\t\n\t}",
"@Test\n public void testDeleteTeacher() {\n System.out.println(\"deleteTeacher\");\n School instance = new School();\n instance.setTeachers(teachers);\n instance.setTeacherClass(teacherClass);\n\n assertFalse(instance.deleteTeacher(teacher));\n System.out.println(\"PASS with a teacher currently teaching a class\");\n\n assertTrue(instance.deleteTeacher(teacher3));\n teachers.remove(teacher3.getId());\n assertEquals(teachers, instance.getTeachers());\n System.out.println(\"PASS with a teacher currently not teaching any classes\");\n\n System.out.println(\"PASS ALL\");\n }",
"@ResponseBody\n\t@RequestMapping(value=\"deleteTeacherByTeacherId\" ,produces=\"application/json;charset=UTF-8\")\n\tpublic String deleteTeacherByTeacherId(HttpServletRequest request,String page,String rows,String teacherId){\n\t\tteachersService.deleteTeacherById(teacherId);\n\t\tuserManageService.updateTeacherToUser(teacherId);\n\t\treturn EasyUiDataHandlerUtil.ConvertListMapToUiGrid(teachersService.queryAllTeachersInfo((Integer.parseInt(page)-1)*10,Integer.parseInt(rows)));\n\t}",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete Studente : {}\", id); studenteRepository.deleteById(id);\n }",
"public void deleteteacher(Teacher Te){\n this.tlist.remove(Te);\n }",
"public void delete(int id);",
"public Teacher(final String id) {\n this._id = id;\n \n }",
"public void deleteUsuario (int id);",
"@Override\r\n\tpublic void deleteTipoTramite(Integer idTipoTramite) {\n\t\t\r\n\t}",
"@DeleteMapping(\"{id}\")\n public Lesson deleteLesson(@PathVariable long id) {\n //code\n return null;\n }",
"public void eliminarTripulante(Long id);",
"void deleteQuestion(String questionId);",
"@RequestMapping(value=\"{teacherId}/students\", method=RequestMethod.DELETE)\n\tpublic List<Student> deleteAllStudentsInClass(@PathVariable int teacherId) {\n\t\treturn service.deleteStudentsInClassByTeacher(teacherId);\n\t}",
"void deleteDepartmentById(Long id);",
"public TeacherPage clickDeleteButton() {\n delete.click();\n return this;\n }",
"@Authorized(\"ADMIN\")\n @DeleteMapping(path = \"/{id}\")\n public Response<Object> delete\n (\n @PathVariable(\"id\") Long id\n )\n {\n try {\n return Response.ok().setPayload(this.facultyService.delete(id));\n } catch (FacultyNotFoundException e) {\n return Response.exception().setErrors(e.getMessage());\n }\n }",
"@RequestMapping(\"/upgrade/{id}\") public String upgradeToTeacher(@PathVariable(\"id\") long id, Model model){\n Student student = students.findById(id).get();\n model.addAttribute(\"newTeacher\", adminService.studentToTeacher(student));\n model.addAttribute(\"dpmnts\", dpmnts.findAll());\n students.delete(student);\n return \"admin/addteacher\";\n }",
"void deleteChallengeById(int id);",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public void delete(Integer id);",
"public void deleteStudent(){\r\n\t\t\r\n\t}",
"@Delete({\n \"delete from dept\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int deleteByPrimaryKey(Integer id);",
"@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}",
"public void deleteById(String id);",
"@Override\n\tpublic void deleteProfessor(int id) {\n\t\tprofessorDao.delete(Professor.class, id);\n\t}",
"void deletePersonById( final Long id );",
"void deleteUser(int id);",
"public void delete(int id) {\n\n\t}",
"private void deleteActionPerformed(ActionEvent evt) throws Exception {\n String teaID = this.teaIDText.getText();\n if(StringUtil.isEmpty(teaID)){\n JOptionPane.showMessageDialog(null, \"请先选择一条老师信息!\");\n return;\n }\n int confirm = JOptionPane.showConfirmDialog(null, \"确认删除?\");\n if(confirm == 0){//确认删除\n Connection con = dbUtil.getConnection();\n int delete = teacherInfo.deleteInfo(con, teaID);\n if(delete == 1){\n JOptionPane.showMessageDialog(null, \"删除成功!\");\n resetValues();\n }\n else{\n JOptionPane.showMessageDialog(null, \"删除失败!\");\n return;\n }\n initTable(new Teacher());//初始化表格\n }\n }",
"int deleteByPrimaryKey(Integer educationid);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"void deleteById(String id);",
"@Override\n\tpublic void delete(String id) {\n\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"@Override\n\tpublic void delete(String id) {\n\t\t\n\t}",
"public void delete(int id){\n \n SqlSession session = sqlSessionFactory.openSession();\n \n try {\n session.delete(\"Subject.delete\", id);\n } finally {\n session.commit();\n session.close();\n }\n System.out.println(\"delete(\"+id+\")\");\n\n }",
"@DeleteMapping(value = \"/{id}\")\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void deleteExam(@PathVariable long id) {\n examsService.delete(examsService.findById(id));\n }",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"public void delete(Integer id) {\n\r\n\t}",
"void DeleteCompteUser(int id);",
"public void delete(Long id) {\n\r\n\t}",
"@Override\r\n\tpublic void delete(String id) {\n\r\n\t}",
"public void delete(int id) {\n\t\tsubjectdao.delete(id);\n\t}",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"public void delete(Long id);",
"void deleteMataKuliah (int id);",
"public boolean delete(String id);",
"public boolean delete(String id);",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete College : {}\", id);\n collegeRepository.deleteById(id);\n collegeSearchRepository.deleteById(id);\n }",
"@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}",
"public int getTeacherid() {\r\n return teacherid;\r\n }",
"public void delete(Long id) {\n log.debug(\"Request to delete Faculty : {}\", id);\n facultyRepository.deleteById(id);\n }",
"void deleteById(int id);",
"void deleteById(final String id);",
"@Override\r\n\tpublic void delete(Long id) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteFilm(int id) {\n\r\n\t}",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public void setTeacherId(Integer teacherId) {\n this.teacherId = teacherId;\n }",
"public abstract void deleteByID( int id);",
"@Override\r\n\tpublic Exam deleteExam(int id)\r\n\t{\n\t\treturn null;\r\n\t}",
"void deleteUserById(Integer id);",
"@Override\n\tpublic Teacher getById(long id) {\n\t\treturn null;\n\t}",
"public void delete(RutaPk pk) throws RutaDaoException;",
"@Override\n\tpublic void deleteById(String id) {\n\t\t\n\t}",
"public void deleteById(int theId);",
"@Override\n\tpublic void delete(Long id) {\n\n\t}"
]
| [
"0.80912775",
"0.76120853",
"0.7527081",
"0.7465361",
"0.7112306",
"0.7015543",
"0.6998076",
"0.6918206",
"0.68443054",
"0.6797797",
"0.6766729",
"0.674829",
"0.672892",
"0.6678257",
"0.6588979",
"0.6586553",
"0.6586553",
"0.6586553",
"0.6586553",
"0.6586553",
"0.6574033",
"0.6563702",
"0.6558329",
"0.6546321",
"0.653124",
"0.653007",
"0.65232205",
"0.6520061",
"0.65158206",
"0.6505228",
"0.64839494",
"0.64727163",
"0.64690316",
"0.6468736",
"0.6452731",
"0.64510596",
"0.64510596",
"0.64510596",
"0.6443101",
"0.6430719",
"0.6430348",
"0.6427768",
"0.6426307",
"0.64216095",
"0.64205134",
"0.6413907",
"0.63994116",
"0.6397275",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63954246",
"0.63835067",
"0.6381221",
"0.6381221",
"0.6371116",
"0.63664144",
"0.63654184",
"0.63654184",
"0.63654184",
"0.63654184",
"0.63654184",
"0.63654184",
"0.63611466",
"0.6358808",
"0.63579094",
"0.6355098",
"0.63419074",
"0.634176",
"0.634176",
"0.634176",
"0.634176",
"0.634176",
"0.63306934",
"0.6318104",
"0.6318104",
"0.63177115",
"0.6305591",
"0.6290869",
"0.6290848",
"0.6289981",
"0.6287373",
"0.6278682",
"0.62776285",
"0.62748814",
"0.62748814",
"0.6274212",
"0.6272126",
"0.6271717",
"0.62636983",
"0.6253036",
"0.6251535",
"0.62499744",
"0.62488174"
]
| 0.72591615 | 4 |
method save entities in database from excel file | @PostMapping("/upload")
public ValidationStatus addGroupsToTeacher(@RequestParam(value = "file") MultipartFile file, Locale locale) throws IOException {
return fileService.parse(locale, file.getInputStream(), file.getOriginalFilename().split("\\.")[1], teacherService::validate, teacherService::save);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Transactional(propagation=Propagation.NOT_SUPPORTED)\r\n\tpublic List<T> importSave(MultipartFile file, T entity) throws Exception{\r\n\t\t\r\n\t\tString originName = file.getOriginalFilename();\t\t\t\t\t\t\t// 取得原文件名\r\n\t\tString fileExt = originName.substring(originName.lastIndexOf(\".\") + 1); // 取得文件后缀\r\n\t\t\r\n\t\tif(fileExt.equalsIgnoreCase(\"xls\") || fileExt.equalsIgnoreCase(\"xlsx\")){\r\n\t\t\tInputStream is = file.getInputStream();\r\n\t\t\t//读Excel转换成对象集合\r\n\t\t\tList<T> entityList = ExcelUtil.createEntity4ReadExcel(is, entity,this);\r\n\t\t\t\r\n\t\t\t//保存\r\n\t\t\t/*List<T> saveList = new ArrayList<T>();\r\n\t\t\tif(entityList != null && entityList.size() > 0){\r\n\t\t\t\tfor (int i = 0; i < entityList.size(); i++) {\r\n\t\t\t\t\tsaveList.add(entityList.get(i));\r\n\t\t\t\t\tif(i != 0 && i%batchNum==0){\r\n\t\t\t\t\t\tbatchSave(saveList);\r\n\t\t\t\t\t\tsaveList.clear();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif(saveList.size() > 0){\r\n\t\t\t\t\tbatchSave(saveList);\r\n\t\t\t\t\tsaveList.clear();\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\treturn entityList;\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"导入文件类型有误!\");\r\n\t\t}\r\n\t}",
"private void loadData(){\n try (BufferedReader br = new BufferedReader(new FileReader(this.fileName))) {\n String line;\n while((line=br.readLine())!=null){\n E e = createEntity(line);\n super.save(e);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static ByteArrayInputStream entityToExcel(List<ExcelModel> exceldownload) {\r\n\r\n\t\ttry (Workbook workbook = new XSSFWorkbook(); ByteArrayOutputStream out = new ByteArrayOutputStream();) {\r\n\t\t\tSheet sheet = workbook.createSheet(CommonConstants.SHEET);\r\n\r\n\t\t\t// Header\r\n\t\t\tRow headerRow = sheet.createRow(0);\r\n\r\n\t\t\tfor (int col = 0; col < CommonConstants.HEADERs.length; col++) {\r\n\t\t\t\tCell cell = headerRow.createCell(col);\r\n\t\t\t\tcell.setCellValue(CommonConstants.HEADERs[col]);\r\n\t\t\t}\r\n\r\n\t\t\tint rowIdx = 1;\r\n\r\n\t\t\tfor (ExcelModel excel : exceldownload) {\r\n\t\t\t\tRow row = sheet.createRow(rowIdx++);\r\n\r\n\t\t\t\trow.createCell(0).setCellValue(excel.getFirstname());\r\n\t\t\t\trow.createCell(1).setCellValue(excel.getMiddlename());\r\n\t\t\t\trow.createCell(2).setCellValue(excel.getLastname());\r\n\t\t\t\trow.createCell(3).setCellValue(excel.getEmailid());\r\n\t\t\t\trow.createCell(4).setCellValue(excel.getCreatePassword());\r\n\r\n\t\t\t}\r\n\r\n\t\t\tworkbook.write(out);\r\n\t\t\treturn new ByteArrayInputStream(out.toByteArray());\r\n\t\t} catch (IOException e) {\r\n\t\t\tthrow new RuntimeException(\"fail to import data to Excel file: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"public static List<CandidateEntity> excelToEntity(InputStream is) throws NoSuchAlgorithmException {\r\n\t\ttry {\r\n\t\t\tWorkbook workbook = new XSSFWorkbook(is);\r\n\t\t\tSheet sheet = workbook.getSheetAt(0);\r\n\t\t\tIterator<Row> rows = sheet.iterator();\r\n\t\t\tList<CandidateEntity> excelUploadsEntity = new ArrayList<>();\r\n\t\t\tint totalRowCount = sheet.getLastRowNum();\r\n\t\t\tlogger.info(totalRowCount);\r\n\t\t\tint rowNumber = 0;\r\n\t\t\tif (totalRowCount < 2000) {\r\n\t\t\t\twhile (rows.hasNext()) {\r\n\t\t\t\t\tRow currentRow = rows.next();\r\n\t\t\t\t\tif (rowNumber == 0 || rowNumber == 1) { // skip header\r\n\t\t\t\t\t\trowNumber++;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCandidateEntity candidateEntity = new CandidateEntity();\r\n\t\t\t\t\tcandidateEntity.setFirstname(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(0, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setMiddlename(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(1, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setLastname(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(2, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setEmailid(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(3, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setContactno(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(4, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setCity(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(5, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tcandidateEntity.setCountry(\r\n\t\t\t\t\t\t\tcurrentRow.getCell(6, MissingCellPolicy.CREATE_NULL_AS_BLANK).getStringCellValue());\r\n\t\t\t\t\tif (!candidateEntity.getCountry().isEmpty()) {\r\n\t\t\t\t\t\tcandidateEntity.setPassword(genDefaultPwd());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcandidateEntity.setDate(DateHelper.setCurrentDate(\"dd/MM/yyyy HH:mm:ss\", \"Asia/Kolkata\"));\r\n\t\t\t\t\texcelUploadsEntity.add(candidateEntity);\r\n\t\t\t\t}\r\n\t\t\t\tworkbook.close();\r\n\t\t\t} else {\r\n\t\t\t\tlogger.info(\"More than 2000\");\r\n\t\t\t}\r\n\t\t\tlogger.info(excelUploadsEntity);\r\n\t\t\treturn excelUploadsEntity;\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(String.format(\"Excel parsing error: %s\", e));\r\n\t\t\tthrow new RuntimeException(\"fail to parse Excel file: \" + e.getMessage());\r\n\t\t}\r\n\t}",
"private void saveEntity(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName, true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void insert(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.save(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public void loadData(){\n try {\n entities.clear();\n\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(fileName);\n\n Node root = document.getDocumentElement();\n NodeList nodeList = root.getChildNodes();\n for (int i = 0; i < nodeList.getLength(); i++){\n Node node = nodeList.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE){\n Element element = (Element) node;\n Department department = createDepartmentFromElement(element);\n try{\n super.save(department);\n } catch (RepositoryException | ValidatorException e) {\n e.printStackTrace();\n }\n }\n }\n } catch (SAXException | ParserConfigurationException | IOException e) {\n e.printStackTrace();\n }\n }",
"private void saveExpositionInDB(String badgeID, int expoSiteId, int expoMonth, int expoYear,\n Date expoDateBegin, Date expoDateEnd, String expoValue)\n throws SQLException {\n\n // do not process exposition is its value is 'M'.\n if(expoValue.equalsIgnoreCase(\"M\")){\n Logger.log(\"Skipped exposition because value is 'M'. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\",Logger.ERROR_LEVEL_INFO);\n }\n else{\n try{\n // check if value is an integer, otherwise, skip\n Integer.parseInt(expoValue);\n\n // find badgePersonId exposed to this exposition\n psGetPersonIds.setString(1,badgeID);\n psGetPersonIds.setInt(2,expoSiteId);\n psGetPersonIds.setString(3,expoYear+\"\");\n psGetPersonIds.setString(4,expoYear+\"\");\n psGetPersonIds.setTimestamp(5,new Timestamp(expoDateBegin.getTime()));\n psGetPersonIds.setTimestamp(6,new Timestamp(expoDateEnd.getTime()));\n psGetPersonIds.setTimestamp(7,new Timestamp(expoDateBegin.getTime()));\n psGetPersonIds.setTimestamp(8,new Timestamp(expoDateEnd.getTime()));\n ResultSet rs = psGetPersonIds.executeQuery();\n\n // convert to site-id to site-name\n String expoSite = \"\";\n if(expoSiteId==1) expoSite = \"DOEL\";\n else if(expoSiteId==2) expoSite = \"TIHANGE\";\n else if(expoSiteId==3) expoSite = \"IRE\";\n else if(expoSiteId==4) expoSite = \"OTHER\";\n\n // at least one badge found, so add the expoValue to table Items.\n int personCount = 0, personid;\n while(rs.next()){\n // get personid belonging to the found badge\n personid = rs.getInt(\"BadgePersonId\");\n\n // create 3 items to be stored\n itemVOs = new Vector();\n\n // expoValue\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_\"+expoSite+\"_GLOBAL_MONTH\"+expoMonth;\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,expoValue,new Date(),null);\n itemVOs.add(itemVO);\n\n // badgeID\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_BADGEID_\"+expoSite;\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,badgeID,new Date(),null);\n itemVOs.add(itemVO);\n\n // expoYear\n itemType = PREFIX+\"ITEM_TYPE_DOSIMETRY_REGISTRATIONYEAR\";\n itemVO = new ItemVO(new Integer(IdentifierFactory.getInstance().getTemporaryNewIdentifier()),itemType,expoYear+\"\",new Date(),null);\n itemVOs.add(itemVO);\n\n storeTransaction(personid,itemVOs,expoSite,expoYear);\n personCount++;\n }\n\n rs.close();\n psGetPersonIds.close();\n // rs empty, no badge found\n if(personCount == 0){\n Logger.log(\"No Badges with BadgeId (\"+badgeID+\") for site (\"+expoSite+\",\"+expoSiteId+\") found in year (\"+expoYear+\").\",Logger.ERROR_LEVEL_INFO);\n }\n }\n // expoValue is no integer\n catch(NumberFormatException e){\n Logger.log(\"Exposition value is no Integer. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\",Logger.ERROR_LEVEL_ERROR);\n if(Debug.enabled) Debug.println(\"ERROR : Exposition value is no Integer. (\"+badgeID+\",\"+expoMonth+\",\"+expoValue+\")\");\n }\n }\n }",
"@Override\n\tprotected void save() throws Exception {\n\t\t//turn the list of data into a unique list of tickets\n\t\tMap<String, ExtTicketVO> tickets= new HashMap<>(data.size());\n\t\tfor (SOHDRFileVO dataVo : data) {\n\t\t\t//035 are harvests and all we care about\n\t\t\tif (\"035\".equals(dataVo.getSoType())) {\n\t\t\t\tExtTicketVO vo = transposeTicketData(dataVo, new ExtTicketVO());\n\t\t\t\ttickets.put(vo.getTicketId(), vo);\n\t\t\t}\n\t\t}\n\n\t\tpopulateTicketDBData(tickets);\n\n\t\ttickets = removeGhostRecords(tickets);\n\n\t\t//don't bother with the rest of this class if we have no tickets\n\t\tif (tickets.isEmpty()) return;\n\n\t\tdecomissionUnits(tickets.keySet()); //ticket\n\n\t\tpurgePartShipments(tickets.keySet()); //calls purgeShipments to cascade deletion\n\n\t\tsetDispositionCode(tickets); //ticket_data attr_dispositionCode\tNONREPAIRABLE\n\n\t\tcorrectLedgerEntries(tickets);\n\t}",
"public void save(HrJBorrowcontract entity);",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"@Override\n\tpublic void saveOrUpdateAll(Collection<Export> entitys) {\n\t\t\n\t}",
"public void parsingExcel() {\n theresFile = new File(pathTo).exists();\n if (theresFile) {\n try {\n FileInputStream myxls = new FileInputStream(pathTo);\n Workbook workbook = WorkbookFactory.create(myxls);\n //getting the sheet at index zero\n Sheet sheet = workbook.getSheetAt(0);\n int lastRow = sheet.getLastRowNum();\n System.out.println(\"currentID: \" + currentID);\n Row row2 = sheet.createRow(lastRow + 1);\n Data data = new Data(currentID++, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n\n for (int i = 0; i < 7; i++) {\n Cell cell4 = row2.createCell(i);\n switch (i) {\n case 0:\n cell4.setCellValue(data.getID());\n break;\n case 1:\n cell4.setCellValue((String) data.getName());\n break;\n case 2:\n cell4.setCellValue((String) data.getDevice());\n break;\n case 3:\n cell4.setCellValue((String) data.getDeviceModel());\n break;\n case 4:\n cell4.setCellValue((String) data.getSerialNumber());\n break;\n case 5:\n cell4.setCellValue((int) data.getOptional());\n break;\n case 6:\n cell4.setCellValue((String) data.getDecription());\n break;\n }\n\n }\n FileOutputStream outputStream = new FileOutputStream(pathTo);\n workbook.write(outputStream);\n workbook.close();\n } catch (IOException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n } catch (EncryptedDocumentException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n if (jTextFieldComments.getText().equals(\"\") || jTextFieldComments.getText().equals(null)) {\n JOptionPane.showMessageDialog(null, \"Morate uneti količinu\");\n } else {\n try {\n Data data = new Data(1, jTextField1.getText(), jTextField2.getText(),\n jTextFieldModel.getText(), jTextFieldSerialN.getText(),\n Integer.parseInt(jTextFieldComments.getText()), jTextAreaDescription.getText());\n writtingExcelFile(makingExcelWorkbook(data));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(MainWindow.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n\n// try {\n// FileInputStream myxls = new FileInputStream(pathTo);\n// HSSFWorkbook studentsSheet = new HSSFWorkbook(myxls);\n// HSSFSheet worksheet = studentsSheet.getSheetAt(0);\n// int lastRow = worksheet.getLastRowNum();\n// System.out.println(lastRow);\n// Row row = worksheet.createRow(++lastRow);\n// row.createCell(1).setCellValue(\"Dr.Hola\");\n// myxls.close();\n// FileOutputStream output_file =new FileOutputStream(new File(\"poi-testt.xls\")); \n// //write changes\n// studentsSheet.write(output_file);\n// output_file.close();\n// System.out.println(\" is successfully written\");\n// } catch (Exception e) {\n// }\n }",
"public void insertdata(String file) {\n\r\n\r\n final String csvFile = file;\r\n\r\n try (BufferedReader br = new BufferedReader(new FileReader(csvFile))) {\r\n\r\n\r\n while ((line = br.readLine()) != null) {\r\n\r\n\r\n // use comma as separator\r\n String[] country = line.split(\",\");\r\n\r\n if (country.length == 12) {\r\n model_lacakMobil = new Model_LacakMobil();\r\n realmHelper = new RealmHelper(realm);\r\n\r\n model_lacakMobil.setNama_mobil(country[1]);\r\n model_lacakMobil.setNo_plat(country[2]);\r\n model_lacakMobil.setNamaunit(country[3]);\r\n model_lacakMobil.setFinance(country[4]);\r\n model_lacakMobil.setOvd(country[5]);\r\n model_lacakMobil.setSaldo(country[6]);\r\n model_lacakMobil.setCabang(country[7]);\r\n model_lacakMobil.setNoka(country[8]);\r\n model_lacakMobil.setNosin(country[9]);\r\n model_lacakMobil.setTahun(country[10]);\r\n model_lacakMobil.setWarna(country[11]);\r\n realmHelper.save(model_lacakMobil);\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n } finally {\r\n// fixing_data();\r\n\r\n }\r\n }",
"void save(Employee employee);",
"public void save() throws FileNotFoundException, IOException, ClassNotFoundException ;",
"@Override\r\n\tpublic void save() throws SaveException {\n\t\t\r\n\t}",
"private void createArticle(int startRecord, int endRecord, int contentSheet, int xpathSheet) {\n try {\n sheet = workbook.getSheet(contentSheet);\n xpathsheet = workbook.getSheet(xpathSheet);\n String xpath_author = xpathsheet.getCell(0, 1).getContents();\n String xpath_webSite = xpathsheet.getCell(1, 1).getContents();\n String xpath_topic = xpathsheet.getCell(2, 1).getContents();\n String xpath_headline = xpathsheet.getCell(3, 1).getContents();\n String xpath_callout = xpathsheet.getCell(4, 1).getContents();\n String xpath_body_iframe = xpathsheet.getCell(5, 1).getContents();\n String xpath_body = xpathsheet.getCell(6, 1).getContents();\n String xpath_image = xpathsheet.getCell(7, 1).getContents();\n String xpath_upload = xpathsheet.getCell(8, 1).getContents();\n String xpath_createArticle = xpathsheet.getCell(9, 1).getContents();\n String xpath_hiddenInput = xpathsheet.getCell(10, 1).getContents();\n String xpath_saveAndContinue = xpathsheet.getCell(11, 1).getContents();\n\n\n for (int i = startRecord; i <= endRecord; i++) {\n String author = sheet.getCell(0, i).getContents();\n String webSite = sheet.getCell(1, i).getContents();\n String topic = sheet.getCell(2, i).getContents();\n String headline = sheet.getCell(3, i).getContents();\n String callout = sheet.getCell(4, i).getContents();\n String body = sheet.getCell(5, i).getContents();\n String image = sheet.getCell(6, i).getContents();\n\n driver.findElement(By.xpath(xpath_createArticle)).click();\n\n // TODO: adding writer, changing site and topic\n\n\n driver.findElement(By.xpath(xpath_headline)).clear();\n driver.findElement(By.xpath(xpath_headline)).sendKeys(headline);\n\n driver.findElement(By.xpath(xpath_headline)).clear();\n driver.findElement(By.xpath(xpath_headline)).sendKeys(headline);\n\n driver.findElement(By.xpath(xpath_callout)).clear();\n driver.findElement(By.xpath(xpath_callout)).sendKeys(callout);\n\n driver.switchTo().frame(xpath_body_iframe);\n driver.findElement(By.xpath(xpath_body)).clear();\n driver.findElement(By.xpath(xpath_body)).sendKeys(body);\n driver.switchTo().defaultContent();\n\n driver.findElement(By.xpath(xpath_image)).click();\n\n // wait page to load\n // javaScriptHandleHiddenInput(xpath_hiddenInput, image);\n\n driver.findElement(By.xpath(xpath_upload)).click();\n driver.findElement(By.xpath(xpath_saveAndContinue)).click();\n articleSubmission(i, contentSheet, xpathSheet);\n checkArticle( author, webSite, headline);\n }\n } catch (java.lang.ArrayIndexOutOfBoundsException e) {\n System.out.println(\"The excel don't have that cell, check your excel file\");\n e.printStackTrace();\n }\n }",
"private void insertData() \n {\n for(int i = 0; i < 2; i++){\n RazaEntity razaEntity = factory.manufacturePojo(RazaEntity.class);\n em.persist(razaEntity);\n razaData.add(razaEntity);\n }\n for (int i = 0; i < 3; i++) {\n EspecieEntity especieEntity = factory.manufacturePojo(EspecieEntity.class);\n if(i == 0)\n {\n especieEntity.setRazas(razaData);\n }\n em.persist(especieEntity);\n especieData.add(especieEntity);\n }\n }",
"protected void saveValues() {\n dataModel.persist();\n }",
"@RequestMapping(value = \"/uploadHoliday\", method = RequestMethod.POST)\r\n\tpublic @ResponseBody\r\n\tvoid uploadHoliday(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows Exception {\n\t\tfinal String fileUrl = \"/home/esh/Holiday.xls\";\r\n\r\n\t\tnew UploadHolidayService().insertDB(fileUrl);\r\n\t}",
"private static void saveFile(Sheet sheet) throws IOException {\r\n File newFile = new File(\"evidence.ods\");\r\n sheet.getSpreadSheet().saveAs(newFile);\r\n }",
"@Override\r\n\t\t\tpublic boolean run() throws SQLException {\n\t\t\t\ttry {\r\n\t\t\t\t\tDecimalFormat df = new DecimalFormat(\"######0.00\");\r\n\t\t\t\t\t// 上传文件\r\n\t\t\t\t\tUploadFile file = getFile();\r\n\t\t\t\t\tFile delfile = new File(file.getUploadPath() + \"/\" + file.getFileName());\r\n\t\t\t\t\tString createBy = getPara(\"createBy\");\r\n\t\t\t\t\tString path = delfile.getPath();// 文件的路径\r\n\t\t\t\t\t// 读取文件内容\r\n\t\t\t\t\tReadExcelUtils readExcel = new ReadExcelUtils(path);\r\n\t\t\t\t\t// 读取文件标题(确定几月份的考勤)\r\n\t\t\t\t\tCell title = readExcel.readExcelTitle();\r\n\t\t\t\t\tString str = title.getStringCellValue();\r\n\t\t\t\t\tString[] split = str.split(\":\");\r\n\t\t\t\t\tString attendanceDate = split[1];\r\n\t\t\t\t\tString year = attendanceDate.split(\"-\")[0];\r\n\t\t\t\t\tString month = attendanceDate.split(\"-\")[1];\r\n\t\t\t\t\t// 查询 导入的文件是否已经导入过了\r\n\t\t\t\t\tPage<HrStaffAttendance> list = service.getStaffAttendanceInfo(1, 10, attendanceDate, null);\r\n\t\t\t\t\tif (list.getList().size() != 0) {\r\n\t\t\t\t\t\trenderError(\"不可重复导入同一数据\");\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tList<HrStaffAttendance> content = readExcel.readExcelContent(Integer.parseInt(year),\r\n\t\t\t\t\t\t\tInteger.parseInt(month));\r\n\r\n\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 从excel员工表导入的数据: \" + content);\r\n\t\t\t\t\tint export = 0;\r\n\t\t\t\t\tfor (HrStaffAttendance hrStaffAttendance : content) {\r\n\t\t\t\t\t\t// 处理考勤时间\r\n\t\t\t\t\t\tDouble actCheckDay = 0.0;\r\n\t\t\t\t\t\t// 实际考勤天数(工作量)\r\n\t\t\t\t\t\tDouble actCheckDay1 = 0.0;\r\n\t\t\t\t\t\tint checkDays = 0;// 打卡日期,即每天打卡2次以上\r\n\t\t\t\t\t\tint laterDay = 0;// 迟到天数\r\n\t\t\t\t\t\tint earlyRetreat = 0;// 早退天数\r\n\t\t\t\t\t\tint singleCheck = 0;// 单边打卡天数\r\n\t\t\t\t\t\tint workDay = hrStaffAttendance.getWorkDay();// 每月需工作天数\r\n\t\t\t\t\t\tJSONObject parse = (JSONObject) JSON.parse(hrStaffAttendance.getCheckRecord());\r\n\t\t\t\t\t\tJSONObject jsonA = (JSONObject) JSON.parse(parse.getString(\"A\"));\r\n\t\t\t\t\t\tString strB = parse.getString(\"B\");\r\n\t\t\t\t\t\tString checkIn = null;\r\n\t\t\t\t\t\tString checkOut = null;\r\n\t\t\t\t\t\tJSONObject workHour = null;\r\n\t\t\t\t\t\tJSONObject workHours = new JSONObject();\r\n\t\t\t\t\t\tJSONObject checkRecord = null;\r\n\t\t\t\t\t\tJSONObject checkRecords = new JSONObject();\r\n\t\t\t\t\t\tSimpleDateFormat simpleFormat = new SimpleDateFormat(\"HH:mm\");\r\n\t\t\t\t\t\t// 本月不存在打卡3次以上的情况\r\n\t\t\t\t\t\tif (strB == null || strB == \"\") {\r\n\t\t\t\t\t\t\tworkHour = new JSONObject();\r\n\t\t\t\t\t\t\tcheckRecords = parse;\r\n\t\t\t\t\t\t\tfor (Entry<String, Object> ent : jsonA.entrySet()) {\r\n\t\t\t\t\t\t\t\tString st = ent.getValue().toString();\r\n\t\t\t\t\t\t\t\tint hours = 0;\r\n\t\t\t\t\t\t\t\t// length > 1 说明今天至少打卡1次,保证checkIn不为空\r\n\t\t\t\t\t\t\t\tif (st.split(\",\").length > 1) {\r\n\t\t\t\t\t\t\t\t\tcheckIn = st.split(\",\")[0].trim();\r\n\t\t\t\t\t\t\t\t\t// checkIn 为空 说明今天未打卡\r\n\t\t\t\t\t\t\t\t\tcheckOut = st.split(\",\")[st.split(\",\").length - 1].trim();\r\n\t\t\t\t\t\t\t\t\t// checkOut 为空 今天只打卡一次,属于单边打卡\r\n\t\t\t\t\t\t\t\t\tif (!StrKit.notBlank(checkOut) || \"0\".equals(checkOut)) {\r\n\t\t\t\t\t\t\t\t\t\tsingleCheck++;\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t} else {// checkOut不为空,说明今天打卡两次\r\n\t\t\t\t\t\t\t\t\t\tcheckDays++;\r\n\t\t\t\t\t\t\t\t\t\tlong from = simpleFormat.parse(checkIn).getTime();\r\n\t\t\t\t\t\t\t\t\t\tlong to = simpleFormat.parse(checkOut).getTime();\r\n\t\t\t\t\t\t\t\t\t\t// 每天的工作时长\r\n\t\t\t\t\t\t\t\t\t\thours = Math.abs((int) ((to - from) / (1000 * 60 * 60)));\r\n\t\t\t\t\t\t\t\t\t\t;\r\n\t\t\t\t\t\t\t\t\t\tif (from > 3600000) {\r\n\t\t\t\t\t\t\t\t\t\t\tlaterDay++;// 迟到\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"18:00\").getTime()=36000000\r\n\t\t\t\t\t\t\t\t\t\tif (to < 36000000) {\r\n\t\t\t\t\t\t\t\t\t\t\tearlyRetreat++;// 早退\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (hours >= 9) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 1.0;\r\n\t\t\t\t\t\t\t\t\t\t} else if (hours < 9 && hours >= 4) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.5;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\thours = 0;\r\n\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tworkHour.put(String.valueOf(ent.getKey()), hours);\r\n\t\t\t\t\t\t\t\tactCheckDay1 += actCheckDay;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// 本月存在打卡3次以上的情况\r\n\t\t\t\t\t\t\tJSONObject jsonB = (JSONObject) JSON.parse(strB);\r\n\t\t\t\t\t\t\tworkHour = new JSONObject();\r\n\t\t\t\t\t\t\tcheckRecord = new JSONObject();\r\n\t\t\t\t\t\t\tfor (Entry<String, Object> ent : jsonB.entrySet()) {\r\n\t\t\t\t\t\t\t\tString string = ent.getValue().toString();\r\n\t\t\t\t\t\t\t\tint hours = 0;\r\n\t\t\t\t\t\t\t\tString cr = null;\r\n\t\t\t\t\t\t\t\t// string不为0 说明今天存在打卡3次以上情况 前两次均存在打卡记录\r\n\t\t\t\t\t\t\t\tif (!\"0\".equals(string)) {\r\n\t\t\t\t\t\t\t\t\t// 今天打卡3次以上\r\n\t\t\t\t\t\t\t\t\tcheckDays++;\r\n\t\t\t\t\t\t\t\t\t// 第一次打卡\r\n\t\t\t\t\t\t\t\t\tcheckIn = jsonA.getString(ent.getKey()).split(\",\")[0].trim();\r\n\t\t\t\t\t\t\t\t\t// 今天最后一次打卡\r\n\t\t\t\t\t\t\t\t\tcheckOut = string.split(\",\")[string.split(\",\").length - 1].trim();\r\n\t\t\t\t\t\t\t\t\t// 今天打卡记录合并 如:9:00,12:00,18:00\r\n\t\t\t\t\t\t\t\t\t// checkOut 为空,说明今天只打了3次卡,没有第四次\r\n\t\t\t\t\t\t\t\t\tif (!StrKit.notBlank(checkOut)) {\r\n\t\t\t\t\t\t\t\t\t\tcheckOut = string.split(\",\")[0].trim();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tlong from = simpleFormat.parse(checkIn).getTime();\r\n\t\t\t\t\t\t\t\t\tlong to = simpleFormat.parse(checkOut).getTime();\r\n\t\t\t\t\t\t\t\t\tif (from > 3600000) {\r\n\t\t\t\t\t\t\t\t\t\tlaterDay++;// 迟到\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"18:00\").getTime()=36000000\r\n\t\t\t\t\t\t\t\t\tif (to < 36000000) {\r\n\t\t\t\t\t\t\t\t\t\tearlyRetreat++;// 早退\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// 每天的工作时长\r\n\t\t\t\t\t\t\t\t\thours = Math.abs((int) ((to - from) / (1000 * 60 * 60)));\r\n\t\t\t\t\t\t\t\t\tif (hours >= 9) {\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 1.0;\r\n\t\t\t\t\t\t\t\t\t} else if (hours < 9 && hours >= 4) {\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.5;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcr = jsonA.getString(ent.getKey()).trim() + \",\" + string.trim();\r\n\t\t\t\t\t\t\t\t} else {// 今天不存在打3次卡以上的情况\r\n\t\t\t\t\t\t\t\t\t// 第一次打卡\r\n\t\t\t\t\t\t\t\t\tcheckIn = jsonA.getString(ent.getKey()).split(\",\")[0].trim();\r\n\t\t\t\t\t\t\t\t\t// 最后一次打卡\r\n\t\t\t\t\t\t\t\t\tcheckOut = jsonA.getString(ent.getKey())\r\n\t\t\t\t\t\t\t\t\t\t\t.split(\",\")[jsonA.getString(ent.getKey()).split(\",\").length - 1].trim();\r\n\t\t\t\t\t\t\t\t\t// checkIn 为空 说明今天未打卡 跳出本次循环\r\n\t\t\t\t\t\t\t\t\tif (!StrKit.notBlank(checkIn) || \"0\".equals(checkIn)) {\r\n\t\t\t\t\t\t\t\t\t\thours = 0;\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t\tworkHour.put(String.valueOf(ent.getKey()), 0);\r\n\t\t\t\t\t\t\t\t\t\tcheckRecord.put(String.valueOf(ent.getKey()), \"0\");\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// checkOut 为空 或者和checkIn相等 属于单边打卡\r\n\t\t\t\t\t\t\t\t\tif (!StrKit.notBlank(checkOut) || checkIn.equals(checkOut)) {\r\n\t\t\t\t\t\t\t\t\t\tsingleCheck++;\r\n\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t// 能走到这里,说明checkIn,checkOut均不为空,说明今天打卡2次\r\n\t\t\t\t\t\t\t\t\t\tcheckDays++;\r\n\t\t\t\t\t\t\t\t\t\tlong from = simpleFormat.parse(checkIn).getTime();\r\n\t\t\t\t\t\t\t\t\t\tlong to = simpleFormat.parse(checkOut).getTime();\r\n\t\t\t\t\t\t\t\t\t\t// 每天的工作时长\r\n\t\t\t\t\t\t\t\t\t\thours = Math.abs((int) ((to - from) / (1000 * 60 * 60)));\r\n\t\t\t\t\t\t\t\t\t\tif (from > 3600000) {\r\n\t\t\t\t\t\t\t\t\t\t\tlaterDay++;// 迟到\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"18:00\").getTime()=36000000\r\n\t\t\t\t\t\t\t\t\t\tif (to < 36000000) {\r\n\t\t\t\t\t\t\t\t\t\t\tearlyRetreat++;// 早退\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (hours >= 9) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 1.0;\r\n\t\t\t\t\t\t\t\t\t\t} else if (hours < 9 && hours >= 4) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.5;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcr = jsonA.getString(ent.getKey());\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tworkHour.put(String.valueOf(ent.getKey()), hours);\r\n\t\t\t\t\t\t\t\tcheckRecord.put(String.valueOf(ent.getKey()), cr);\r\n\t\t\t\t\t\t\t\tactCheckDay1 += actCheckDay;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tcheckRecords.put(\"A\", checkRecord);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tworkHours.put(\"A\", workHour);\r\n\t\t\t\t\t\tInteger checkInNum = hrStaffAttendance.getCheckInNum();\r\n\t\t\t\t\t\thrStaffAttendance.setActCheckDay(actCheckDay1.toString());\r\n\t\t\t\t\t\tDouble allDayNotSca = (1 - (double) checkDays / workDay);\r\n\t\t\t\t\t\tDouble earlyRetreatSca = ((double) earlyRetreat / workDay);\r\n\t\t\t\t\t\tDouble laterDaySca = ((double) laterDay / workDay);\r\n\t\t\t\t\t\tDouble singleCheckSca = ((double) singleCheck / workDay);\r\n\t\t\t\t\t\thrStaffAttendance.setCheckDay(checkDays);\r\n\t\t\t\t\t\thrStaffAttendance.setEarlyRetreat(earlyRetreat);\r\n\t\t\t\t\t\thrStaffAttendance.setSingleCheck(singleCheck);\r\n\t\t\t\t\t\thrStaffAttendance.setLaterDay(laterDay);\r\n\t\t\t\t\t\thrStaffAttendance.setAllDayNotSca(df.format(allDayNotSca));\r\n\t\t\t\t\t\thrStaffAttendance.setEarlyRetreatSca(df.format(earlyRetreatSca));\r\n\t\t\t\t\t\thrStaffAttendance.setLaterDaySca(df.format(laterDaySca));\r\n\t\t\t\t\t\thrStaffAttendance.setSingleCheckSca(df.format(singleCheckSca));\r\n\t\t\t\t\t\t// 通过考勤编号check_in_num去人员列表里找到相关的入场信息\r\n\t\t\t\t\t\tList<Record> personInfo = service.getPersonInfo(checkInNum);\r\n\t\t\t\t\t\t// 保证arrayList>1\r\n\t\t\t\t\t\tif (personInfo.size() == 0) {\r\n\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 考勤编号:\" + checkInNum\r\n\t\t\t\t\t\t\t\t\t+ \"在人员入场表里找不到该人员的相关入场信息\");\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 先判断一下时间 比如:3月入场,5月转场,导入4月的考勤\r\n\t\t\t\t\t\t// arrayList记录改考勤编号下的所有的入场日期及订单编号\r\n\t\t\t\t\t\tList<String> arrayList = new ArrayList<>();\r\n\t\t\t\t\t\t// array记录本月的入场时间\r\n\t\t\t\t\t\tList<String> array = new ArrayList<>();\r\n\t\t\t\t\t\t// 中间变量 用于排序入场时间\r\n\t\t\t\t\t\tString[] per = new String[personInfo.size() + 1];\r\n\t\t\t\t\t\tper[0] = attendanceDate.substring(0, 10);\r\n\t\t\t\t\t\tint i = 1;\r\n\t\t\t\t\t\tfor (Record record : personInfo) {\r\n\t\t\t\t\t\t\tper[i] = JSON.parseObject(record.get(\"in_field_json\")).getString(\"entry_date\");\r\n\t\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 对入场时间进行排序\r\n\t\t\t\t\t\tArrays.sort(per);\r\n\t\t\t\t\t\tfor (int j = 0; j < per.length; j++) {\r\n\t\t\t\t\t\t\tarrayList.add(per[j]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 本月考勤记录第一天所在所有入场日期的位置\r\n\t\t\t\t\t\tint index = arrayList.indexOf(attendanceDate.substring(0, 10));\r\n\t\t\t\t\t\t// 先判断本月有几条入离场信息的入场时间\r\n\t\t\t\t\t\tfor (int j = 0; j < per.length; j++) {\r\n\t\t\t\t\t\t\tif (per[j].substring(0, 7).equals(attendanceDate.substring(0, 7))) {\r\n\t\t\t\t\t\t\t\tarray.add(per[j]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// 说明本月无转场\r\n\t\t\t\t\t\tif (array.size() == 1) {\r\n\t\t\t\t\t\t\t// 根据入场时间和考勤编号查询入场信息\r\n\t\t\t\t\t\t\tif (index != 0) {\r\n\t\t\t\t\t\t\t\tindex = index - 1;// 该月无转场,直接入场(离场不用管,因为离场后就不会再打卡)(若index=0,说明该人员无入场)\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tRecord record = service.getUserInInfo(checkInNum, arrayList.get(index));\r\n\t\t\t\t\t\t\tif (record == null) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tObject object = record.get(\"in_field_json\");\r\n\t\t\t\t\t\t\tJSONObject fromObject = JSON.parseObject(object.toString());\r\n\t\t\t\t\t\t\tString orderNum = fromObject.getString(\"order_num\");\r\n\t\t\t\t\t\t\tString department = fromObject.getJSONObject(\"department\").getString(\"department_name\");\r\n\t\t\t\t\t\t\tString supplierName = fromObject.getString(\"supplier_name\");\r\n\t\t\t\t\t\t\tRecord rec = service.getCBbySupplierName(supplierName);\r\n\t\t\t\t\t\t\tif (rec != null) {\r\n\t\t\t\t\t\t\t\tcreateBy = rec.getStr(\"create_by\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tString personName = fromObject.getString(\"person_name\");\r\n\t\t\t\t\t\t\tString personNature = fromObject.getJSONObject(\"person_nature\")\r\n\t\t\t\t\t\t\t\t\t.getString(\"person_nature_name\");\r\n\t\t\t\t\t\t\tString personLevel = fromObject.getJSONObject(\"person_level\").getString(\"person_level_key\");\r\n\t\t\t\t\t\t\tString personClass = fromObject.getJSONObject(\"person_type\").getString(\"person_type_key\");\r\n\t\t\t\t\t\t\tString changePerson = fromObject.getJSONObject(\"change_person\")\r\n\t\t\t\t\t\t\t\t\t.getString(\"change_person_key\");\r\n\t\t\t\t\t\t\tString orderName = fromObject.getJSONObject(\"order_name\").getString(\"order_name_name\");\r\n\t\t\t\t\t\t\tString entryDate = fromObject.getString(\"entry_date\");\r\n\t\t\t\t\t\t\tString leaveDate = fromObject.getString(\"leave_date\");\r\n\t\t\t\t\t\t\thrStaffAttendance.setPersonLevel(personLevel);\r\n\t\t\t\t\t\t\thrStaffAttendance.setPersonName(personName);\r\n\t\t\t\t\t\t\thrStaffAttendance.setPersonNature(personNature);\r\n\t\t\t\t\t\t\thrStaffAttendance.setSupplierName(supplierName);\r\n\t\t\t\t\t\t\thrStaffAttendance.setDepartment(department);\r\n\t\t\t\t\t\t\thrStaffAttendance.setEntryDate(entryDate);\r\n\t\t\t\t\t\t\thrStaffAttendance.setAttendanceDate(attendanceDate);\r\n\t\t\t\t\t\t\thrStaffAttendance.setPersonClassKey(personClass);\r\n\t\t\t\t\t\t\thrStaffAttendance.setChangePersonKey(changePerson);\r\n\t\t\t\t\t\t\thrStaffAttendance.setCreateBy(createBy);\r\n\t\t\t\t\t\t\thrStaffAttendance\r\n\t\t\t\t\t\t\t\t\t.setCreateTime(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()));\r\n\t\t\t\t\t\t\tint status = 0;\r\n\t\t\t\t\t\t\tif (\"2\".equals(record.get(\"status_type\"))) {\r\n\t\t\t\t\t\t\t\tstatus = 1;// 1为离场状态\r\n\t\t\t\t\t\t\t\tleaveDate = JSON.parseObject(record.get(\"out_field_json\"))\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"actual_leave_date\");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tstatus = 0;// 0为入场状态\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\thrStaffAttendance.setStatusInorout(status);\r\n\t\t\t\t\t\t\thrStaffAttendance.setOrderNum(orderNum);\r\n\t\t\t\t\t\t\thrStaffAttendance.setOrderName(orderName);\r\n\t\t\t\t\t\t\t// 默认每人每月非开会事由补打卡次数最多为:3次\r\n\t\t\t\t\t\t\thrStaffAttendance.setFillupMaxcounts(3);\r\n\t\t\t\t\t\t\thrStaffAttendance.setLeaveDate(leaveDate);\r\n\t\t\t\t\t\t\thrStaffAttendance.setWorkHours(workHours.toString());\r\n\t\t\t\t\t\t\thrStaffAttendance.setCheckRecord(checkRecords.toString());\r\n\t\t\t\t\t\t\t// 默认工作工作量确认初始值为:0(未确认)\r\n\t\t\t\t\t\t\thrStaffAttendance.setStatus(Constants.STATUS);\r\n\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 将数据添加到数据库 \");\r\n\t\t\t\t\t\t\tint m = service.insertstaffAttendance(hrStaffAttendance);\r\n\t\t\t\t\t\t\tif (m < 0) {\r\n\t\t\t\t\t\t\t\trenderError(\"数据添加到数据库:失败\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\trenderSuccess(\"数据成功添加到数据库 \");\r\n\t\t\t\t\t\t} else if (array.size() == 2) {\r\n\t\t\t\t\t\t\tif (index == 0) {\r\n\t\t\t\t\t\t\t\tindex = index + 1;// 该月无转场 在本月入场\r\n\t\t\t\t\t\t\t\tRecord record = service.getUserInInfo(checkInNum, arrayList.get(index));\r\n\t\t\t\t\t\t\t\tif (record == null) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tObject object = record.get(\"in_field_json\");\r\n\t\t\t\t\t\t\t\tJSONObject fromObject = JSON.parseObject(object.toString());\r\n\t\t\t\t\t\t\t\tString orderNum = fromObject.getString(\"order_num\");\r\n\t\t\t\t\t\t\t\tString department = fromObject.getJSONObject(\"department\").getString(\"department_name\");\r\n\t\t\t\t\t\t\t\tString supplierName = fromObject.getString(\"supplier_name\");\r\n\t\t\t\t\t\t\t\tRecord rec = service.getCBbySupplierName(supplierName);\r\n\t\t\t\t\t\t\t\tif (rec != null) {\r\n\t\t\t\t\t\t\t\t\tcreateBy = rec.getStr(\"create_by\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tString personName = fromObject.getString(\"person_name\");\r\n\t\t\t\t\t\t\t\tString personNature = fromObject.getJSONObject(\"person_nature\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_nature_name\");\r\n\t\t\t\t\t\t\t\tString personLevel = fromObject.getJSONObject(\"person_level\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_level_key\");\r\n\t\t\t\t\t\t\t\tString personClass = fromObject.getJSONObject(\"person_type\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_type_key\");\r\n\t\t\t\t\t\t\t\tString changePerson = fromObject.getJSONObject(\"change_person\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"change_person_key\");\r\n\t\t\t\t\t\t\t\tString orderName = fromObject.getJSONObject(\"order_name\").getString(\"order_name_name\");\r\n\t\t\t\t\t\t\t\tString entryDate = fromObject.getString(\"entry_date\");\r\n\t\t\t\t\t\t\t\tString leaveDate = fromObject.getString(\"leave_date\");\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonLevel(personLevel);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonName(personName);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonNature(personNature);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSupplierName(supplierName);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setDepartment(department);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEntryDate(entryDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setAttendanceDate(attendanceDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonClassKey(personClass);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setChangePersonKey(changePerson);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCreateBy(createBy);\r\n\t\t\t\t\t\t\t\thrStaffAttendance\r\n\t\t\t\t\t\t\t\t\t\t.setCreateTime(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()));\r\n\t\t\t\t\t\t\t\tint status = 0;\r\n\t\t\t\t\t\t\t\tif (\"2\".equals(record.get(\"status_type\"))) {\r\n\t\t\t\t\t\t\t\t\tstatus = 1;// 1为离场状态\r\n\t\t\t\t\t\t\t\t\tleaveDate = JSON.parseObject(record.get(\"out_field_json\"))\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\"actual_leave_date\");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tstatus = 0;// 0为入场状态\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatusInorout(status);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderNum(orderNum);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderName(orderName);\r\n\t\t\t\t\t\t\t\t// 默认每人每月非开会事由补打卡次数最多为:3次\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setFillupMaxcounts(3);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLeaveDate(leaveDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setWorkHours(workHours.toString());\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckRecord(checkRecords.toString());\r\n\t\t\t\t\t\t\t\t// 默认工作工作量确认初始值为:0(未确认)\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatus(Constants.STATUS);\r\n\t\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 将数据添加到数据库 \");\r\n\t\t\t\t\t\t\t\tint m = service.insertstaffAttendance(hrStaffAttendance);\r\n\t\t\t\t\t\t\t\tif (m < 0) {\r\n\t\t\t\t\t\t\t\t\trenderError(\"数据添加到数据库:失败\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trenderSuccess(\"数据成功添加到数据库 \");\r\n\t\t\t\t\t\t\t} else {// 该月有转场\r\n\t\t\t\t\t\t\t\tcheckDays = 0;\r\n\t\t\t\t\t\t\t\tlaterDay = 0;\r\n\t\t\t\t\t\t\t\tearlyRetreat = 0;\r\n\t\t\t\t\t\t\t\tsingleCheck = 0;\r\n\r\n\t\t\t\t\t\t\t\tDouble actCheckDays1 = 0.0;\r\n\t\t\t\t\t\t\t\t// 转场前\r\n\t\t\t\t\t\t\t\tRecord record = service.getUserInInfo(checkInNum, arrayList.get(index - 1));\r\n\t\t\t\t\t\t\t\tif (record == null) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tObject object = record.get(\"in_field_json\");\r\n\t\t\t\t\t\t\t\tJSONObject fromObject = JSON.parseObject(object.toString());\r\n\t\t\t\t\t\t\t\tString orderNum = fromObject.getString(\"order_num\");\r\n\t\t\t\t\t\t\t\tString department = fromObject.getJSONObject(\"department\").getString(\"department_name\");\r\n\t\t\t\t\t\t\t\tString supplierName = fromObject.getString(\"supplier_name\");\r\n\t\t\t\t\t\t\t\tRecord rec = service.getCBbySupplierName(supplierName);\r\n\t\t\t\t\t\t\t\tif (rec != null) {\r\n\t\t\t\t\t\t\t\t\tcreateBy = rec.getStr(\"create_by\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tString personName = fromObject.getString(\"person_name\");\r\n\t\t\t\t\t\t\t\tString personNature = fromObject.getJSONObject(\"person_nature\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_nature_name\");\r\n\t\t\t\t\t\t\t\tString personLevel = fromObject.getJSONObject(\"person_level\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_level_key\");\r\n\t\t\t\t\t\t\t\tString personClass = fromObject.getJSONObject(\"person_type\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_type_key\");\r\n\t\t\t\t\t\t\t\tString changePerson = fromObject.getJSONObject(\"change_person\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"change_person_key\");\r\n\t\t\t\t\t\t\t\tString orderName = fromObject.getJSONObject(\"order_name\").getString(\"order_name_name\");\r\n\t\t\t\t\t\t\t\tString entryDate = fromObject.getString(\"entry_date\");\r\n\t\t\t\t\t\t\t\tString leaveDate = fromObject.getString(\"leave_date\");\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonLevel(personLevel);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonName(personName);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonNature(personNature);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSupplierName(supplierName);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setDepartment(department);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEntryDate(entryDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setAttendanceDate(attendanceDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonClassKey(personClass);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setChangePersonKey(changePerson);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCreateBy(createBy);\r\n\t\t\t\t\t\t\t\thrStaffAttendance\r\n\t\t\t\t\t\t\t\t\t\t.setCreateTime(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()));\r\n\t\t\t\t\t\t\t\tint status = 0;\r\n\t\t\t\t\t\t\t\tif (\"2\".equals(record.get(\"status_type\"))) {\r\n\t\t\t\t\t\t\t\t\tstatus = 1;\r\n\t\t\t\t\t\t\t\t\tleaveDate = JSON.parseObject(record.get(\"out_field_json\"))\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\"actual_leave_date\");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tstatus = 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatusInorout(status);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderNum(orderNum);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderName(orderName);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLeaveDate(leaveDate);\r\n\t\t\t\t\t\t\t\t// 默认每人每月非开会事由补打卡次数最多为:3次\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setFillupMaxcounts(3);\r\n\t\t\t\t\t\t\t\t// 默认工作工作量确认初始值为:0(未确认)\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatus(Constants.STATUS);\r\n\t\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 将数据添加到数据库 \");\r\n\t\t\t\t\t\t\t\tJSONObject wH = new JSONObject();\r\n\t\t\t\t\t\t\t\tJSONObject cR = new JSONObject();\r\n\t\t\t\t\t\t\t\tint co = 1;\r\n\t\t\t\t\t\t\t\tfor (Entry<String, Object> ent : workHour.entrySet()) {\r\n\t\t\t\t\t\t\t\t\tif (Integer.parseInt(ent.getKey()) > Integer.parseInt(leaveDate.substring(8, 10))) {\r\n\t\t\t\t\t\t\t\t\t\twH.put(ent.getKey(), 0);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\twH.put(ent.getKey(), ent.getValue());\r\n\r\n\t\t\t\t\t\t\t\t\t\tif (Integer.parseInt(ent.getValue().toString()) >= 9) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 1.0;\r\n\t\t\t\t\t\t\t\t\t\t} else if (Integer.parseInt(ent.getValue().toString()) < 9\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& Integer.parseInt(ent.getValue().toString()) >= 4) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.5;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDay = 0.0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tactCheckDays1 += actCheckDay;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tco++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tco = 1;\r\n\t\t\t\t\t\t\t\tfor (Entry<String, Object> ent : checkRecords.getJSONObject(\"A\").entrySet()) {\r\n\t\t\t\t\t\t\t\t\tif (Integer.parseInt(ent.getKey()) > Integer.parseInt(leaveDate.substring(8, 10))) {\r\n\t\t\t\t\t\t\t\t\t\tcR.put(ent.getKey(), \"0\");\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tcR.put(ent.getKey(), ent.getValue());\r\n\t\t\t\t\t\t\t\t\t\t// 保证上班打卡和下班打卡时间不能同时为空\r\n\t\t\t\t\t\t\t\t\t\tif (!\"0\".equals(ent.getValue())) {\r\n\t\t\t\t\t\t\t\t\t\t\tSimpleDateFormat sim = new SimpleDateFormat(\"HH:mm\");\r\n\t\t\t\t\t\t\t\t\t\t\tString[] split1 = ent.getValue().toString().split(\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\tString checkIn1 = split1[0].trim();\r\n\t\t\t\t\t\t\t\t\t\t\tString checkOut1 = split1[split1.length - 1].trim();\r\n\t\t\t\t\t\t\t\t\t\t\tif (!\"\".equals(checkIn) && !\"\".equals(checkOut)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tcheckDays++;// 打卡天数\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong from = sim.parse(checkIn1).getTime();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong to = sim.parse(checkOut1).getTime();\r\n\t\t\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"9:00\").getTime()=3600000\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (from > 3600000) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tlaterDay++;// 迟到\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"18:00\").getTime()=36000000\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (to < 36000000) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tearlyRetreat++;// 早退\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tsingleCheck++;// 单边打卡天数\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tco++;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tallDayNotSca = (1 - (double) checkDays / workDay);\r\n\t\t\t\t\t\t\t\tearlyRetreatSca = ((double) earlyRetreat / workDay);\r\n\t\t\t\t\t\t\t\tlaterDaySca = ((double) laterDay / workDay);\r\n\t\t\t\t\t\t\t\tsingleCheckSca = ((double) singleCheck / workDay);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckDay(checkDays);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEarlyRetreat(earlyRetreat);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSingleCheck(singleCheck);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLaterDay(laterDay);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setAllDayNotSca(df.format(allDayNotSca));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEarlyRetreatSca(df.format(earlyRetreatSca));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLaterDaySca(df.format(laterDaySca));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSingleCheckSca(df.format(singleCheckSca));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckDay(checkDays);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEarlyRetreat(earlyRetreat);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLaterDay(laterDay);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSingleCheck(singleCheck);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setActCheckDay(actCheckDays1.toString());\r\n\t\t\t\t\t\t\t\tJSONObject jswH = new JSONObject();\r\n\t\t\t\t\t\t\t\tJSONObject jscR = new JSONObject();\r\n\t\t\t\t\t\t\t\tjswH.put(\"A\", wH);\r\n\t\t\t\t\t\t\t\tjscR.put(\"A\", cR);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setWorkHours(jswH.toString());\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckRecord(jscR.toString());\r\n\t\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 将【转场前】数据添加到数据库 \");\r\n\t\t\t\t\t\t\t\tint m = service.insertstaffAttendance(hrStaffAttendance);\r\n\t\t\t\t\t\t\t\tif (m < 0) {\r\n\t\t\t\t\t\t\t\t\trenderError(\"数据添加到数据库:失败\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trenderSuccess(\"数据成功添加到数据库 \");\r\n\t\t\t\t\t\t\t\t// 转场后\r\n\t\t\t\t\t\t\t\tDouble actCheckDaylatter = 0.0;\r\n\t\t\t\t\t\t\t\tDouble actCheckDaylatter1 = 0.0;\r\n\t\t\t\t\t\t\t\tint checkDayslatter = 0;\r\n\t\t\t\t\t\t\t\tint laterDaylatter = 0;\r\n\t\t\t\t\t\t\t\tint earlyRetreatlatter = 0;\r\n\t\t\t\t\t\t\t\tint singleChecklatter = 0;\r\n\t\t\t\t\t\t\t\tRecord recordlatter = service.getUserInInfo(checkInNum, arrayList.get(index + 1));\r\n\t\t\t\t\t\t\t\tif (recordlatter == null) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tObject objectlatter = recordlatter.get(\"in_field_json\");\r\n\t\t\t\t\t\t\t\tJSONObject fromObjectlatter = JSON.parseObject(objectlatter.toString());\r\n\t\t\t\t\t\t\t\tString orderNumlatter = fromObjectlatter.getString(\"order_num\");\r\n\t\t\t\t\t\t\t\tString departmentlatter = fromObjectlatter.getJSONObject(\"department\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"department_name\");\r\n\t\t\t\t\t\t\t\tString supplierNamelatter = fromObjectlatter.getString(\"supplier_name\");\r\n\t\t\t\t\t\t\t\tRecord rec1 = service.getCBbySupplierName(supplierName);\r\n\t\t\t\t\t\t\t\tif (rec1 != null) {\r\n\t\t\t\t\t\t\t\t\tcreateBy = rec1.getStr(\"create_by\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tString personNamelatter = fromObjectlatter.getString(\"person_name\");\r\n\t\t\t\t\t\t\t\tString personNaturelatter = fromObjectlatter.getJSONObject(\"person_nature\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_nature_name\");\r\n\t\t\t\t\t\t\t\tString personLevellatter = fromObjectlatter.getJSONObject(\"person_level\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_level_key\");\r\n\t\t\t\t\t\t\t\tString personClasslatter = fromObjectlatter.getJSONObject(\"person_type\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"person_type_key\");\r\n\t\t\t\t\t\t\t\tString changePersonlatter = fromObjectlatter.getJSONObject(\"change_person\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"change_person_key\");\r\n\t\t\t\t\t\t\t\tString orderNamelatter = fromObjectlatter.getJSONObject(\"order_name\")\r\n\t\t\t\t\t\t\t\t\t\t.getString(\"order_name_name\");\r\n\t\t\t\t\t\t\t\tString entryDatelatter = fromObjectlatter.getString(\"entry_date\");\r\n\t\t\t\t\t\t\t\tString leaveDatelatter = fromObjectlatter.getString(\"leave_date\");\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonLevel(personLevellatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonName(personNamelatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonNature(personNaturelatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSupplierName(supplierNamelatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setDepartment(departmentlatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEntryDate(entryDatelatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setAttendanceDate(attendanceDate);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setPersonClassKey(personClasslatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setChangePersonKey(changePersonlatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCreateBy(createBy);\r\n\t\t\t\t\t\t\t\thrStaffAttendance\r\n\t\t\t\t\t\t\t\t\t\t.setCreateTime(new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()));\r\n\t\t\t\t\t\t\t\tint statuslatter = 0;\r\n\t\t\t\t\t\t\t\tif (\"2\".equals(recordlatter.get(\"status_type\"))) {\r\n\t\t\t\t\t\t\t\t\tstatuslatter = 1;\r\n\t\t\t\t\t\t\t\t\tleaveDatelatter = JSON.parseObject(recordlatter.get(\"out_field_json\"))\r\n\t\t\t\t\t\t\t\t\t\t\t.getString(\"actual_leave_date\");\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tstatuslatter = 0;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatusInorout(statuslatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderNum(orderNumlatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setOrderName(orderNamelatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLeaveDate(leaveDatelatter);\r\n\t\t\t\t\t\t\t\t// 默认每人每月非开会事由补打卡次数最多为:3次\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setFillupMaxcounts(3);\r\n\t\t\t\t\t\t\t\t// 默认工作工作量确认初始值为:0(未确认)\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setStatus(Constants.STATUS);\r\n\t\t\t\t\t\t\t\tJSONObject wHlatter = new JSONObject();\r\n\t\t\t\t\t\t\t\tJSONObject cRlatter = new JSONObject();\r\n\t\t\t\t\t\t\t\tint colatter = 1;\r\n\t\t\t\t\t\t\t\tfor (Entry<String, Object> entlatter : workHour.entrySet()) {\r\n\t\t\t\t\t\t\t\t\tif (Integer.parseInt(entlatter.getKey()) <= Integer\r\n\t\t\t\t\t\t\t\t\t\t\t.parseInt(entryDatelatter.substring(8, 10))) {\r\n\t\t\t\t\t\t\t\t\t\twHlatter.put(entlatter.getKey(), 0);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t\t\t\t\twHlatter.put(entlatter.getKey(), entlatter.getValue());\r\n\t\t\t\t\t\t\t\t\t\tif (Integer.parseInt(entlatter.getValue().toString()) >= 9) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDaylatter = 1.0;\r\n\t\t\t\t\t\t\t\t\t\t} else if (Integer.parseInt(entlatter.getValue().toString()) < 9\r\n\t\t\t\t\t\t\t\t\t\t\t\t&& Integer.parseInt(entlatter.getValue().toString()) >= 4) {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDaylatter = 0.5;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tactCheckDaylatter = 0.0;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tactCheckDaylatter1 += actCheckDaylatter;\r\n\t\t\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t\t\tcolatter++;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcolatter = 1;\r\n\t\t\t\t\t\t\t\tfor (Entry<String, Object> entlatter : checkRecords.getJSONObject(\"A\").entrySet()) {\r\n\t\t\t\t\t\t\t\t\tif (Integer.parseInt(entlatter.getKey()) <= Integer\r\n\t\t\t\t\t\t\t\t\t\t\t.parseInt(entryDatelatter.substring(8, 10))) {\r\n\t\t\t\t\t\t\t\t\t\tcRlatter.put(entlatter.getKey(), \"0\");\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tcRlatter.put(entlatter.getKey(), entlatter.getValue());\r\n\r\n\t\t\t\t\t\t\t\t\t\t// 保证上班打卡和下班打卡时间不能同时为空,不能为0\r\n\t\t\t\t\t\t\t\t\t\tif (!\"0\".equals(entlatter.getValue())) {\r\n\t\t\t\t\t\t\t\t\t\t\tSimpleDateFormat si = new SimpleDateFormat(\"HH:mm\");\r\n\t\t\t\t\t\t\t\t\t\t\tString[] splitlatter = entlatter.getValue().toString().split(\"\\n\");\r\n\t\t\t\t\t\t\t\t\t\t\tString checkInlatter = splitlatter[0].trim();\r\n\t\t\t\t\t\t\t\t\t\t\tString checkOutlatter = splitlatter[splitlatter.length - 1].trim();\r\n\t\t\t\t\t\t\t\t\t\t\tif (!\"\".equals(checkInlatter) && !\"\".equals(checkOutlatter)) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tcheckDayslatter++;// 打卡天数\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong from = si.parse(checkInlatter).getTime();\r\n\t\t\t\t\t\t\t\t\t\t\t\tlong to = si.parse(checkOutlatter).getTime();\r\n\t\t\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"9:00\").getTime()=3600000\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (from > 3600000) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tlaterDaylatter++;// 迟到\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t// simpleFormat.parse(\"18:00\").getTime()=36000000\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (to < 36000000) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tearlyRetreatlatter++;// 早退\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\tsingleChecklatter++;// 单边打卡天数\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tcolatter++;\r\n\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tint workDaylatter = hrStaffAttendance.getWorkDay();\r\n\t\t\t\t\t\t\t\tDouble allDayNotScalatter = (1 - (double) checkDayslatter / workDaylatter);\r\n\t\t\t\t\t\t\t\tDouble earlyRetreatScalatter = ((double) earlyRetreatlatter / workDaylatter);\r\n\t\t\t\t\t\t\t\tDouble laterDayScalatter = ((double) laterDaylatter / workDaylatter);\r\n\t\t\t\t\t\t\t\tDouble singleCheckScalatter = ((double) singleChecklatter / workDaylatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setAllDayNotSca(df.format(allDayNotScalatter));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEarlyRetreatSca(df.format(earlyRetreatScalatter));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLaterDaySca(df.format(laterDayScalatter));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSingleCheckSca(df.format(singleCheckScalatter));\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckDay(checkDayslatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setEarlyRetreat(earlyRetreatlatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setLaterDay(laterDaylatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setSingleCheck(singleChecklatter);\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setActCheckDay(actCheckDaylatter1.toString());\r\n\t\t\t\t\t\t\t\tJSONObject jswHlatter = new JSONObject();\r\n\t\t\t\t\t\t\t\tJSONObject jscRlatter = new JSONObject();\r\n\t\t\t\t\t\t\t\tjswHlatter.put(\"A\", wHlatter);\r\n\t\t\t\t\t\t\t\tjscRlatter.put(\"A\", cRlatter);\r\n\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setWorkHours(jswHlatter.toString());\r\n\t\t\t\t\t\t\t\thrStaffAttendance.setCheckRecord(jscRlatter.toString());\r\n\t\t\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 将 【转场后】 数据添加到数据库 \");\r\n\t\t\t\t\t\t\t\tint mlatter = service.insertstaffAttendance(hrStaffAttendance);\r\n\t\t\t\t\t\t\t\tif (mlatter < 0) {\r\n\t\t\t\t\t\t\t\t\trenderError(\"数据添加到数据库:失败\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\trenderSuccess(\"数据成功添加到数据库 \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\texport++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (export == 0) {\r\n\t\t\t\t\t\trenderError(\"该表中人员均在入场表里找不到相关信息 \");\r\n\t\t\t\t\t\tlogger.info(\"StaffAttendanceController staffAttendance 该表中人员均在入场表里找不到 相关信息\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\trenderError(\"数据导入失败\");\r\n\t\t\t\t\tlogger.error(\"Exception: \", e);\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}",
"private void insertData() {\r\n \r\n TeatroEntity teatro = factory.manufacturePojo(TeatroEntity.class);\r\n em.persist(teatro);\r\n FuncionEntity funcion = factory.manufacturePojo(FuncionEntity.class);\r\n List<FuncionEntity> lista = new ArrayList();\r\n lista.add(funcion);\r\n em.persist(funcion);\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n sala.setFuncion(lista);\r\n em.persist(sala);\r\n data.add(sala);\r\n }\r\n for (int i = 0; i < 3; i++) \r\n {\r\n SalaEntity sala = factory.manufacturePojo(SalaEntity.class);\r\n sala.setTeatro(teatro);\r\n em.persist(sala);\r\n sfdata.add(sala);\r\n }\r\n \r\n }",
"public void persistToDatabase(Stock stock, int id) throws ParseException {\n\n\n // Creating the config instance & passing the hibernate config file.\n Configuration config = new Configuration();\n config.configure(\"hibernate.cfg.xml\");\n\n // Session object to start the db transaction.\n Session s = config.buildSessionFactory().openSession();\n\n // Transaction object to begin the db transaction.\n Transaction t = s.beginTransaction();\n\n Stock_infoDAO stock_infoDAO = new Stock_infoDAO();\n stock_infoDAO.setId(id);\n stock_infoDAO.setSymbol(stock.getSymbol());\n BigDecimal price = new BigDecimal(stock.getPrice());\n stock_infoDAO.setPrice(price);\n\n String inDate= stock.getTime();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\n\n Timestamp ts = new Timestamp(((java.util.Date)dateFormat.parse(inDate)).getTime());\n stock_infoDAO.setTime(ts);\n\n\n // Saving the stockinfo object to the db.\n s.persist(stock_infoDAO);\n\n // Committing the transaction in the db.\n t.commit();\n\n System.out.println(\"\\n===================\\n\");\n\n\n // Closing the session object.\n s.close();\n }",
"public void saveData(){\r\n file.executeAction(modelStore);\r\n }",
"private int AddExcelRow(Row excelRow)\n {\n DataFormatter dataFormatter = new DataFormatter();\n int i=1;\n\n\n try {\n if (insertStatement == null)\n insertStatement =conn.prepareStatement(insertSQL);\n for(int idx =0;idx < fieldLength.size();idx++)\n {\n String cellValue =dataFormatter.formatCellValue(excelRow.getCell(idx)).trim();\n if (idx != 10) {\n\n if (ArrayUtils.contains( decimalIndex, idx ))\n {\n if (!cellValue.isEmpty()) {\n cellValue = cellValue.replaceAll(patt,\"\");\n if (cellValue.equals(\"\"))\n insertStatement.setObject(i, null, Types.DECIMAL);\n else\n insertStatement.setDouble(i, Double.parseDouble(cellValue));\n }\n else\n insertStatement.setObject(i, null, Types.DECIMAL);\n }\n else\n {\n if (!cellValue.isEmpty())\n insertStatement.setString(i, cellValue.substring(0, cellValue.length() > Integer.parseInt(fieldLength.get(idx + 1).toString()) ? Integer.parseInt(fieldLength.get(idx + 1).toString()) : cellValue.length()));\n else\n insertStatement.setObject(i, null, Types.NVARCHAR);\n }\n\n\n i = i + 1;\n }\n\n\n }\n insertStatement.setString(i, \"N\");\n i=i+1;\n insertStatement.setString(i, \"M\"+ fileId);\n insertStatement.addBatch();\n return 0;\n }\n catch (NumberFormatException numEx){\n logger.error(\"Error\",numEx);\n return -1;\n }\n catch (SQLException ex)\n {\n logger.error(\"Error\",ex);\n return -1;\n }\n finally {\n excelRow = null;\n }\n }",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n VueltasConDemoraEnOficinaEntity entity = factory.manufacturePojo(VueltasConDemoraEnOficinaEntity.class);\n \n em.persist(entity);\n data.add(entity);\n }\n }",
"private void writeToFile(E entity){\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(this.fileName,true))) {\n bw.write(entity.toFile());\n bw.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"@Override\n\tpublic void save(EmpType entity) {\n\t\t\n\t}",
"public void save() throws Exception{\n\t\tm_service = new DistrictService();\n\t\t//插入城市\t\t\n\t\t//String saveStr = \"~`哈迪~`达鲁~`哥本~`~`~`C~`9898~`9898~`0~`~`0~`~`从DHL地区表中导入~`N~`N~`N~`~`~`~`~`~`~`EMS~`~`~@~#\";\t\n\t\t//插入国家\n\t\tString saveStr = \"3785~`麦克1~`纽斯1~`迪录1~`~`~`C~`9898~`9898~`0~`~`0~`~`从DHL地区表中导入~`N~`N~`N~`1~`~`~`~`~`~`EMS~`~`~@~#\";\t\n\n\t\tDecoder objPD = new Decoder(saveStr);\n\t\tString objReturn = m_service.save(objPD);\n\t\tSystem.out.println(objReturn);\n\t\t\n\t}",
"private OSPARRecords parseExcelFile(String excelFilePath) {\n\n\t\ttry {\n\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tbuilder.setPrettyPrinting();\n\t\t\tGson gson = builder.create();\n\t\t\t\n\t\t\t\n\t\t\tOSPARRecords or = new OSPARRecords();\n\n\t\t\tFile file = new File(excelFilePath);\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n\n\t\t\tWorkbook workbook = new HSSFWorkbook(inputStream);\n\t\t\tSheet firstSheet = workbook.getSheetAt(0);\n\n\t\t\tint row = 0;\n\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\t\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tRow nextRow = firstSheet.getRow(row);\n\n\t\t\t\tif (nextRow == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString value=nextRow.getCell(0)+\"\";\n\t\t\t\t\n\t\t\t\tif (value.equals(\"\")) {\n\t\t\t\t\t\n\t\t\t\t\tString v3=nextRow.getCell(3)+\"\";\n\t\t\t\t\t\n\t\t\t\t\tif (!v3.equals(\"Source/Reference\")) {\n\t\t\t\t\t\tSystem.out.println(excelFilePath+\"\\t\"+or.CasNo+\"\\t\"+v3+\"\\t\"+value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.equals(\"null\")) break;\n\t\t\t\t\n\t\t\t\tfloat fvalue=Float.parseFloat(value);\n\t\t\t\tDecimalFormat decform=new DecimalFormat(\"0.0\");\n\t\t\t\tString svalue=decform.format(fvalue);\n\t\t\t\t\n//\t\t\t\tSystem.out.println(or.CasNo+\"\\t\"+svalue);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata_field df = createDataField(nextRow);\n\t\t\t\t\n\t\t\t\tif (df.Value.equals(\"\") && df.Source_Reference.equals(\"\")) {\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (svalue.equals(\"0.0\")) \n\t\t\t\t\tor.Name=df.Value;\n\t\t\t\tif (svalue.equals(\"1.1\"))\n\t\t\t\t\tor.CasNo=convertCAS(df.Value);\n\t\t\t\tif (svalue.equals(\"1.2\"))\n\t\t\t\t\tor.EINECS=df.Value;\n\t\t\t\tif (svalue.equals(\"1.3\"))\n\t\t\t\t\tor.Synonym=df.Value;\n\t\t\t\tif (svalue.equals(\"1.4\"))\n\t\t\t\t\tor.Group_Function=df.Value;\n\t\t\t\tif (svalue.equals(\"1.5\"))\n\t\t\t\t\tor.Initial_Selection=df.Value;\n\t\t\t\tif (svalue.equals(\"1.6\"))\n\t\t\t\t\tor.Prioritized_For_Action=df.Value;\n\n\t\t\t\tif (svalue.equals(\"2.1\"))\n\t\t\t\t\tor.Molecular_weight.add(df);\n\t\t\t\tif (svalue.equals(\"2.2\"))\n\t\t\t\t\tor.Water_Solubility.add(df);\n\t\t\t\tif (svalue.equals(\"2.3\"))\n\t\t\t\t\tor.Vapor_Pressure.add(df);\n\n\t\t\t\tif (svalue.equals(\"3.1\"))\n\t\t\t\t\tor.Abiotic_OH_Oxidation_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.2\"))\n\t\t\t\t\tor.Photolysis_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.3\"))\n\t\t\t\t\tor.Ready_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.4\"))\n\t\t\t\t\tor.Halflife.add(df);\n\t\t\t\tif (svalue.equals(\"3.5\"))\n\t\t\t\t\tor.Inherent_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.6\"))\n\t\t\t\t\tor.Biodeg_QSAR.add(df);\n\t\t\t\t\n\t\t\t\tif (svalue.equals(\"4.1\"))\n\t\t\t\t\tor.logKow.add(df);\n\t\t\t\tif (svalue.equals(\"4.2\"))\n\t\t\t\t\tor.Bcf.add(df);\n\n\t\t\t\tif (svalue.equals(\"5.1\"))\n\t\t\t\t\tor.Acute_toxicity_algae.add(df);\n\t\t\t\tif (svalue.equals(\"5.2\"))\n\t\t\t\t\tor.Acute_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.3\"))\n\t\t\t\t\tor.Acute_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.4\"))\n\t\t\t\t\tor.Chronic_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.5\"))\n\t\t\t\t\tor.Chronic_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.6\"))\n\t\t\t\t\tor.Aquatox_QSAR.add(df);\n\t\t\t\tif (svalue.equals(\"5.7\"))\n\t\t\t\t\tor.Aquatic_toxicity_Other.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"6.1\"))\n\t\t\t\t\tor.Acute_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.2\"))\n\t\t\t\t\tor.Carcinogenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.3\"))\n\t\t\t\t\tor.Chronic_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.4\"))\n\t\t\t\t\tor.Mutagenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.5\"))\n\t\t\t\t\tor.Reprotoxicity.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"7.1\"))\n\t\t\t\t\tor.Production_Volume.add(df);\n\t\t\t\tif (svalue.equals(\"7.2\"))\n\t\t\t\t\tor.Use_Industry_Category.add(df);\n\t\t\t\tif (svalue.equals(\"7.3\"))\n\t\t\t\t\tor.Use_in_articles.add(df);\n\t\t\t\tif (svalue.equals(\"7.4\"))\n\t\t\t\t\tor.Environm_Occur_Measured.add(df);\n\t\t\t\tif (svalue.equals(\"7.5\"))\n\t\t\t\t\tor.Environm_Occur_Modelled.add(df);\n\n\t\t\t\tif (svalue.equals(\"8.1\"))\n\t\t\t\t\tor.Dir_67_548_EEC_Classification.add(df);\n\t\t\t\tif (svalue.equals(\"8.2\"))\n\t\t\t\t\tor.Reg_793_93_EEC_Existing_substances.add(df);\n\t\t\t\tif (svalue.equals(\"8.3\"))\n\t\t\t\t\tor.Dir_2000_60_EEC_WFD.add(df);\n\t\t\t\tif (svalue.equals(\"8.4\"))\n\t\t\t\t\tor.Dir_76_769_EEC_M_U.add(df);\n\t\t\t\tif (svalue.equals(\"8.5\"))\n\t\t\t\t\tor.Dir_76_464_EEC_water.add(df);\n\t\t\t\tif (svalue.equals(\"8.6\"))\n\t\t\t\t\tor.Dir_91_414_EEC_ppp.add(df);\n\t\t\t\tif (svalue.equals(\"8.7\"))\n\t\t\t\t\tor.Dir_98_8_EEC_biocid.add(df);\n\n\t\t\t\tif (svalue.equals(\"9.1\"))\n\t\t\t\t\tor.Hazard_assessment_OECD.add(df);\n\t\t\t\tif (svalue.equals(\"9.2\"))\n\t\t\t\t\tor.Other_risk_assessments.add(df);\n\n\t\t\t\trow++;\n\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\treturn or;\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"private void saveEmployee(Employee employee) {\n ContentValues contentValues = new ContentValues();\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_KEY, employee.getKey());\n contentValues.put(ReportContract.EmployeeEntry.COLUMN_VALUE, employee.getValue());\n\n getContext().getContentResolver().insert(\n ReportContract.EmployeeEntry.CONTENT_URI,\n contentValues\n );\n\n }",
"private void importData() {\n Sheet sheet;\n Row row;\n int lastRowNum;\n // Discover how many sheets there are in the workbook....\n int numSheets = this.workbook.getNumberOfSheets();\n // and then iterate through them.\n for (int i = 0; i < numSheets; i++) {\n\n // Get a reference to a sheet and check to see if it contains\n // any rows.\n sheet = this.workbook.getSheetAt(i);\n if (sheet.getPhysicalNumberOfRows() > 0) {\n lastRowNum = sheet.getLastRowNum();\n for (int j = 1; j <= lastRowNum; j++) {\n row = sheet.getRow(j);\n this.rowToRenddet(row);\n }\n }\n }\n }",
"public static void saveExcel() {\r\n\t\ttry {\r\n\t\t\tFileOutputStream fileOut = new FileOutputStream(Constant.EXCEL_PATH);\r\n\t\t\tworkBook.write(fileOut);\r\n\t\t\tfileOut.flush();\r\n\t\t\tfileOut.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private String importExcelPromotionNew() {\n\t\ttry{\n\t\t\tList<List<String>> infoPromotion = new ArrayList<>();\n\t\t\tList<List<String>> infoPromotionDetail = new ArrayList<>();\n\t\t\tList<List<String>> infoPromotionShop = new ArrayList<>();\n\t\t\t\n\t\t\tList<CellBean> infoPromotionError = new ArrayList<>();\n\t\t\tList<CellBean> infoPromotionDetailError = new ArrayList<>();\n\t\t\tList<CellBean> infoPromotionShopError = new ArrayList<>();\n\t\t\tList<PromotionImportNewVO> promotionImportNewErrorVOs = null;\n\t\t\t\n\t\t\tgetDataImportExcelPromotion(infoPromotion, infoPromotionDetail, infoPromotionShop, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t// xu ly xuất lỗi\n\t\t\tif (infoPromotionError.size() > 0 || infoPromotionDetailError.size() > 0 || infoPromotionShopError.size() > 0) {\n\t\t\t\treturn WriteFileError(infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t}\n\t\t\t\n\t\t\tpromotionImportNewErrorVOs = new ArrayList<>();\n\t\t\tList<PromotionImportNewVO> promotionImportNewVOs = convertDataImportExcelPromotion(infoPromotion, infoPromotionDetail, infoPromotionShop, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\tif(promotionImportNewVOs != null && promotionImportNewVOs.size() > 0) {\n\t\t\t\t// bỏ những CT k hợp le và những CT nằm ngoài các ZV cần xử lý\n\t\t\t\tpromotionImportNewVOs = validatePromotionImport(promotionImportNewVOs, promotionImportNewErrorVOs);\n\t\t\t}\n\t\t\t// sap xep lại cac mức cho CTKM\n\t\t\tpromotionImportNewVOs = sortPromotionImport(promotionImportNewVOs);\n\t\t\t//save\n\t\t\ttotalItem = promotionImportNewErrorVOs.size() + promotionImportNewVOs.size();\n\t\t\tnumFail = promotionImportNewErrorVOs.size();\n\t\t\tif(promotionImportNewVOs != null && promotionImportNewVOs.size() > 0) {\n\t\t\t\tpromotionImportNewErrorVOs = promotionProgramMgr.saveImportPromotionNew(promotionImportNewVOs, promotionImportNewErrorVOs, getLogInfoVO());\n\t\t\t\t// thông tin tra ve\n\t\t\t\tnumFail = promotionImportNewErrorVOs.size();\n\t\t\t\tfor (PromotionImportNewVO promotion : promotionImportNewVOs) {\n\t\t\t\t\tPromotionProgram pp = promotionProgramMgr.getPromotionProgramByCode(promotion.getPromotionCode());\n\t\t\t\t\tif (pp != null) {\n\t\t\t\t\t\tpromotionProgramMgr.updateMD5ValidCode(pp, getLogInfoVO());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// xu ly nêu có loi\n\t\t\tif (promotionImportNewErrorVOs.size() > 0) {\n\t\t\t\tconvertObjectPromotionToCellBean(promotionImportNewErrorVOs, infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t\tif (infoPromotionError.size() > 0 || infoPromotionDetailError.size() > 0 || infoPromotionShopError.size() > 0) {\n\t\t\t\t\treturn WriteFileError(infoPromotionError, infoPromotionDetailError, infoPromotionShopError);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception ex) {\n\t\t\terrMsg = Configuration.getResourceString(ConstantManager.VI_LANGUAGE, \"system.error\");\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.importExcelPromotionNew\"), createLogErrorStandard(actionStartTime));\n\t\t}\t\t\n\t\treturn SUCCESS;\n\t}",
"void save();",
"void save();",
"void save();",
"EmployeeDetail save(EmployeeDetail detail) throws DBException;",
"@SuppressWarnings(\"unused\")\n\t@Override\n\tpublic void importUser(String fileName, InputStream inputStream) throws Exception {\n\t\tint rowIndex=1;\n\t\tBufferedInputStream bis = new BufferedInputStream(inputStream);\n\t\tlog.info(\"用户报表解析开始\");\n\t\t//获得 读取Excel的数据\n\t\tList<Object[]> users = null ;\n\t\ttry {\n\t\t\tusers= fileName.endsWith(\".xls\") ? ExcelOperator.readXLS(bis, 0, 25,false) : ExcelOperator.readXLSX(bis, 0, 25,false);\n\t\t\t//判断用户表内容\n\t\t\tif(users == null || users.size() <=1)\n\t\t\t{\n\t\t\t\tthrow new AppException(\"用户报表不能为空\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tList<User> userList=new ArrayList<User>();\n\t\t//循环行row\n\t\tfor(int row=1;row<users.size();row++){\n\t\t\tlog.info(\"开始对导入的excel表数据进行校验\");\n\t\t\tObject[] object = users.get(row);\n\t\t\tUser user=this.userDao.findUserByUserName(object[0].toString());\n\t\t\tif(user!=null)\n\t\t\t\tthrow new AppException(\"用户\"+user.getUserName()+\"已经存在\");\n\t\t\tuser=new User();\n\t\t\tif(FuncUtil.isEmpty(object[0].toString()))\n\t\t\t\tthrow new AppException(\"行:\"+row+\"列:\"+1+\"不能为空\");\n\t\t\tuser.setUserName(object[0].toString());\n\t\t\tif(FuncUtil.isEmpty(object[1].toString())){\n\t\t\t\tString encryptPWD = new SimpleHash(\"SHA-1\", object[0].toString(), \"123456\").toString();\n\t\t\t\tuser.setPassword(encryptPWD);\n\t\t\t}else {\n\t\t\t\tString encryptPWD = new SimpleHash(\"SHA-1\", object[0].toString(), object[1].toString()).toString();\n\t\t\t\tuser.setPassword(encryptPWD);\n\t\t\t}\n\t\t\tif(FuncUtil.isEmpty(object[2].toString()))\n\t\t\t\tthrow new AppException(\"行:\"+row+\"列:\"+3+\"不能为空\");\n\t\t\tuser.setName(object[2].toString());\n\t\t\tuser.setEmail(object[3].toString());\n\t\t\tuser.setMobilePhone(object[4].toString());\n\t\t\tif(FuncUtil.notEmpty(object[5].toString())){\n\t\t\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\tsdf.parse(object[5].toString());\n\t\t\t}\n\t\t\tif(FuncUtil.notEmpty(object[6].toString())){\n\t\t\t\tif(\"男\".equals(object[6].toString())){\n\t\t\t\t\tuser.setSex(1);\n\t\t\t\t}else if(\"女\".equals(object[6].toString())){\n\t\t\t\t\tuser.setSex(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\tuser.setRemark(object[7].toString());\n\t\t\tuser.setPhoto(\"/resources/images/user/\"+new Random().nextInt(9)+\".png\");\n\t\t\tList<Space> spaces=this.spaceDao.findAllSpace();//分配低配空间\n\t\t\tif(spaces!=null&&spaces.size()>0){\n\t\t\t\tuser.setSpace(spaces.get(0));\n\t\t\t\tlog.info(\"分配用户存储空间\"+spaces.get(0).getSpaceName()+\":\"+spaces.get(0).getSpaceSize());\n\t\t\t}\n\t\t\tuser.setStatus(1);\n\t\t\tuserList.add(user);\n\t\t}\n\t\tlog.info(\"用户报表解析结束\");\n\t\tthis.save(userList);\n\t\tlog.info(\"保存用户信息到数据库\");\n\t\t//行自增\n\t\trowIndex++;\n\t\tlog.info(\"用户报表处理完成\");\n\t}",
"private void insertData() {\n PodamFactory factory = new PodamFactoryImpl();\n for (int i = 0; i < 3; i++) {\n ViajeroEntity entity = factory.manufacturePojo(ViajeroEntity.class);\n\n em.persist(entity);\n data.add(entity);\n }\n }",
"public void saveGeominas(Geominas entity) throws Exception;",
"public void save(Employee employee) {\n String objectStr = MyUtils.serializeIntoAString(employee);\n Connection connection = null;\n Statement stmt = null;\n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n connection = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MyDB\", \"root\", \"password\");\n stmt = connection.createStatement();\n stmt.execute(\"INSERT INTO EMPLOYEE VALUES(\" + objectStr + \")\");\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n }",
"public void saveOffice(Office office) {\n\t\t\n\t}",
"public interface IImportService {\n /*插入从excel行得到的实体类*/\n Map<String, Object> insertAskLeave(String fileDir) throws IOException;\n\n Map<String, Object> insertBusinessTrip(String fileDir) throws IOException;\n\n Map<String, Object> insertSubway(String fileDir) throws IOException;\n\n Map<String, Object> insertYoOvertime(String fileDir) throws IOException;\n\n Map<String, Object> insertYoItemChange(String fileDir) throws IOException;\n\n Map<String, Object> insertYoYindaIdentify(String fileDir) throws IOException;\n}",
"void save(E entity);",
"public void persist(Timesheet ts) {\n\t em.persist(ts);\n\t }",
"void save(Cartera entity);",
"private void insertData() {\n\n for (int i = 0; i < 3; i++) {\n ProveedorEntity proveedor = factory.manufacturePojo(ProveedorEntity.class);\n BonoEntity entity = factory.manufacturePojo(BonoEntity.class);\n int noOfDays = 8;\n Date dateOfOrder = new Date();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n Date date = calendar.getTime();\n entity.setExpira(date);\n noOfDays = 1;\n calendar = Calendar.getInstance();\n calendar.setTime(dateOfOrder);\n calendar.add(Calendar.DAY_OF_YEAR, noOfDays);\n date = calendar.getTime();\n entity.setAplicaDesde(date);\n entity.setProveedor(proveedor);\n em.persist(entity);\n ArrayList lista=new ArrayList<>();\n lista.add(entity);\n proveedor.setBonos(lista);\n em.persist(proveedor);\n pData.add(proveedor);\n data.add(entity); \n }\n }",
"public void save(CbmCItemFininceItem entity);",
"private void insertData() {\n \n for (int i = 0; i < 4; i++) {\n EmpleadoEntity entity = factory.manufacturePojo(EmpleadoEntity.class);\n entity.setSolicitudes(new ArrayList<>());\n entity.setPropuestas(new ArrayList<>());\n entity.setInvitaciones(new ArrayList<>());\n entity.setTipoEmpleado(TipoEmpleado.TRADUCTOR);\n if(i == 0)\n {\n SolicitudEntity solicitud = factory.manufacturePojo(SolicitudEntity.class);\n em.persist(solicitud);\n entity.getSolicitudes().add(solicitud);\n solicitud.setEmpleado(entity);\n solicitudesData.add(solicitud);\n }\n else if (i == 1)\n {\n InvitacionEntity invitacion = factory.manufacturePojo(InvitacionEntity.class);\n em.persist(invitacion);\n entity.getInvitaciones().add(invitacion); \n invitacion.setEmpleado(entity);\n invitacionesData.add(invitacion);\n }\n else if (i == 2){\n PropuestaEntity propuesta = factory.manufacturePojo(PropuestaEntity.class);\n em.persist(propuesta);\n entity.getPropuestas().add(propuesta);\n propuesta.setEmpleado(entity);\n propuestasData.add(propuesta);\n }\n em.persist(entity);\n data.add(entity);\n }\n }",
"public void saveExpTypeBean_Step2_WorkflowConfiguration_ToDBModel(){\r\n\t\tExperimentBean expBean = (ExperimentBean)JSFUtil.getManagedObject(\"ExperimentBean\");\r\n //store information in the db entities\r\n\t\tExperimentExecutable expExecutable = expBean.getExperiment().getExperimentExecutable();\r\n //specify which batch processing system WEE or TB/Local we want to use for this experiment - default it's the old TB one.\r\n expExecutable.setBatchSystemIdentifier(BatchProcessor.BATCH_IDENTIFIER_TESTBED_LOCAL);\r\n }",
"void save(Bill bill);",
"public void saveData(){\n try{\n DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.newDocument();\n\n Element rootElement = document.createElement(\"departments\");\n document.appendChild(rootElement);\n for (Department department : entities){\n Element dep = document.createElement(\"department\");\n rootElement.appendChild(dep);\n\n dep.setAttribute(\"id\", department.getId().toString());\n dep.appendChild(createElementFromDepartment(\n document, \"name\", department.getName()));\n dep.appendChild(createElementFromDepartment(\n document, \"numberOfPlaces\", department.getNumberOfPlaces().toString()));\n }\n\n DOMSource domSource = new DOMSource(document);\n StreamResult streamResult = new StreamResult(fileName);\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n transformer.transform(domSource, streamResult);\n\n } catch (ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }",
"public void save(PtJJdwcy entity);",
"@Override\n\tpublic void importarExpediente(Expedientes exp) throws ExpedienteNoEncontradoException {\n\t\tem.merge(exp);//Si no estaba la crea y si estaba la va a actualizar\n\t\t\n\t}",
"public void save() throws DfException {\n\t\tobject.save();\n\t}",
"@Override\n public void save(Iterable<? extends LineEntity> entities) {\n\n }",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n RecipeEntity books = factory.manufacturePojo(RecipeEntity.class);\n em.persist(books);\n data.add(books);\n }\n }",
"@Override\n public void save(T pojo) {\n\n Map<Class, Set<ReflectionUtils.DataDescriptor>> valueMap = new HashMap<>();\n\n try {\n ReflectionUtils.valuesForClasses(valueMap, null, pojo);\n\n for (Map.Entry<Class, Set<ReflectionUtils.DataDescriptor>> entry : valueMap.entrySet()) {\n Insert insert = null;\n if (entry.getKey().getName().equals(pojo.getClass().getName())) {\n logger.info(\"Working on the root class \" + pojo);\n for (ReflectionUtils.DataDescriptor descriptor : entry.getValue()) {\n insert = QueryBuilder.insertInto(keySpace, tableName).values(ReflectionUtils.fieldNames(entry.getKey()),\n descriptor.getValues());\n\n logger.debug(\"Insert \" + insert);\n ResultSet res = session.execute(insert);\n logger.debug(\"Result \" + res);\n }\n } else {\n for (ReflectionUtils.DataDescriptor descriptor : entry.getValue()) {\n String nestedtableName = descriptor.getTableName();\n logger.debug(\"Insert builder \" + descriptor + \" into \" + keySpace + \".\" + nestedtableName);\n insert = QueryBuilder.insertInto(keySpace, nestedtableName).values(ReflectionUtils.fieldNames(entry.getKey()),\n descriptor.getValues());\n ResultSet res = session.execute(insert);\n logger.debug(\"Result \" + res);\n }\n }\n }\n }\n catch (HecateException e) {\n logger.error(\"Hecate problem \" + e);\n }\n }",
"@Override\n public int bathSave(List<T> entitys) throws Exception {\n return mapper.insertList(entitys);\n }",
"public static void saveData() throws FileNotFoundException {\t\n\t\t\t\n\tScanner inputStream = new Scanner(new File(\"bookings.dat\"));\n\t\ttry {\n\t\t\t\n\t\t\tBookingList.surName = inputStream.nextLine();\n\t\t\tBookingList.tableNo = inputStream.nextLine();\n\t\t\tBookingList.sittingTime = inputStream.nextLine();\n\t\t\tBookingList.partyOf = inputStream.nextLine();\n\t\t\t\t\n\t\t\tBooking<?> bookingData = new Booking<Object>(null, surName, tableNo, sittingTime, partyOf);\n\t\t\tb1.insert(bookingData);\n\t\t\t\t\n\t\t}finally {\n\t\t\tinputStream.close();\n\t\t}\n\t\t\t\n\t}",
"public void insert(Employee e) throws ClassNotFoundException, SQLException;",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"private void saveEntities(File folder) throws IOException\n {\n File file = new File(folder + \"/entities.dat\");\n\n if (!this.saveEntities)\n {\n if (file.exists()) file.delete();\n\n return;\n }\n\n AxisAlignedBB aabb = new AxisAlignedBB(this.range.min, this.range.max);\n NBTTagCompound output = new NBTTagCompound();\n List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, aabb);\n\n if (entities.isEmpty()) return;\n\n for (EntityLivingBase entity : entities)\n {\n if (entity instanceof EntityPlayer)\n {\n continue;\n }\n\n NBTTagCompound tag = entity.writeToNBT(new NBTTagCompound());\n String id = EntityList.getEntityStringFromClass(entity.getClass());\n\n tag.setString(\"id\", id);\n this.entities.appendTag(tag);\n }\n\n output.setTag(\"Entities\", this.entities);\n\n CompressedStreamTools.write(output, file);\n }",
"private void insertData() {\n\n cliente = factory.manufacturePojo(ClienteEntity.class);\n em.persist(cliente);\n for (int i = 0; i < 3; i++) {\n FormaPagoEntity formaPagoEntity = factory.manufacturePojo(FormaPagoEntity.class);\n formaPagoEntity.setCliente(cliente);\n em.persist(formaPagoEntity);\n data.add(formaPagoEntity);\n }\n }",
"@Override\n public void save() {\n \n }",
"void setExcelFileRows(List<Row> excelFileRows) throws ExcelFileException;",
"public void loadData() {\n Path path= Paths.get(filename);\n Stream<String> lines;\n try {\n lines= Files.lines(path);\n lines.forEach(ln->{\n String[] s=ln.split(\";\");\n if(s.length==3){\n try {\n super.save(new Teme(Integer.parseInt(s[0]),Integer.parseInt(s[1]),s[2]));\n } catch (ValidationException e) {\n e.printStackTrace();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }else\n System.out.println(\"linie corupta in fisierul teme.txt\");});\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic Optional<String> saveFoodTruckDetails(MultipartFile file) throws Exception {\n\t\t\n\t\tList<FoodTruckEntity> entity=csvParser(file);\n\t\trepo.saveAll(entity);\n\t\treturn Optional.of(entity.size()+\" -Record Inserted Successfully\");\n\t}",
"public void save() {\n }",
"public InventoryOrder transferExcelToObj(){\r\n\t\tList<InventoryOrderProduct> orderProducts = new ArrayList<InventoryOrderProduct>();\r\n\t\t\r\n\t\tHSSFSheet sheet = templateWorkbook.getSheetAt(0);\r\n\t\tint row_start = data_row;\r\n\r\n\t\twhile (true){\r\n\t\t\tHSSFRow row = sheet.getRow(row_start);\r\n\t\t\tif (row == null)\r\n\t\t\t\tbreak;\r\n\t\t\telse {\r\n\t\t\t\tHSSFCell cell = row.getCell(serial_column);\r\n\t\r\n\t\t\t\tif (cell == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tString barcode = getBarcodeFromExcel(row.getCell(barcode_column));\r\n\t\t\t\tloggerLocal.info(\"Import : \" + barcode);\r\n\t\t\t\t\r\n\t\t\t\tint quantity = ExcelUtil.getPuzzleNum(row.getCell(quantity_column)).intValue();\r\n\t\t\t\tdouble salesPriceSelected = ExcelUtil.getPuzzleNum(row.getCell(salePrice_column));\r\n\t\t\t\tdouble wholeSalePrice = ExcelUtil.getPuzzleNum(row.getCell(wholePrice_column));\r\n\t\t\t\tdouble discount = ExcelUtil.getPuzzleNum(row.getCell(discount_column));\r\n\t\t\t\t\r\n\t\t\t\tInventoryOrderProduct orderProduct = new InventoryOrderProduct();\r\n\t\t\t\torderProduct.setQuantity(quantity);\r\n\t\t\t\torderProduct.setWholeSalePrice(wholeSalePrice);\r\n\t\t\t\t//orderProduct.setSalesPrice(salesPrice);\r\n\t\t\t\torderProduct.setSalePriceSelected(salesPriceSelected);\r\n\t\t\t\torderProduct.setDiscount(discount);\r\n\t\t\t\torderProduct.getProductBarcode().setBarcode(barcode);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\torderProducts.add(orderProduct);\r\n\t\t\t\t\r\n\t\t\t\trow_start++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\torder.setProduct_List(orderProducts);\r\n\t\t\r\n\t\treturn order;\r\n\t}",
"private void insertData() {\n for (int i = 0; i < 3; i++) {\n PodamFactory factory = new PodamFactoryImpl();\n VisitaEntity entity = factory.manufacturePojo(VisitaEntity.class);\n em.persist(entity);\n data.add(entity);\n }\n }",
"private void insertData() {\n \n for (int i = 0; i < 3; i++) {\n ClienteEntity editorial = factory.manufacturePojo(ClienteEntity.class);\n em.persist(editorial);\n ClienteData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoPaseoEntity paseo = factory.manufacturePojo(ContratoPaseoEntity.class);\n em.persist(paseo);\n contratoPaseoData.add(paseo);\n }\n \n for (int i = 0; i < 3; i++) {\n ContratoHotelEntity editorial = factory.manufacturePojo(ContratoHotelEntity.class);\n em.persist(editorial);\n contratoHotelData.add(editorial);\n }\n \n for (int i = 0; i < 3; i++) {\n PerroEntity perro = factory.manufacturePojo(PerroEntity.class);\n //perro.setCliente(ClienteData.get(0));\n //perro.setEstadias((List<ContratoHotelEntity>) contratoHotelData.get(0));\n //perro.setPaseos((List<ContratoPaseoEntity>) contratoPaseoData.get(0));\n em.persist(perro);\n Perrodata.add(perro);\n }\n\n }",
"public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }",
"@Override\n\tpublic void save(Religiao obj) throws Exception {\n\t\t\n\t}",
"@Override\n public void save()\n {\n \n }",
"public static List<InputDto> readXLSXFile(File file) throws Exception {\n List<InputDto> inputDtos = new ArrayList<>();\n\n Integer i = 0;\n InputStream ExcelFileToRead = new FileInputStream(file);\n XSSFWorkbook wb = new XSSFWorkbook(ExcelFileToRead);\n\n XSSFWorkbook test = new XSSFWorkbook();\n\n XSSFSheet sheet = wb.getSheetAt(0);\n XSSFRow row;\n XSSFCell cell;\n\n Iterator rows = sheet.rowIterator();\n// ss = new String[sheet.getLastRowNum()];\n sheet.getLastRowNum();\n while (rows.hasNext()) {\n InputDto input = new InputDto();\n row = (XSSFRow) rows.next();\n Iterator cells = row.cellIterator();\n if (row.getRowNum() == 0) {\n continue; //just skip the rows if row number is 0 or 1\n }\n String s = \"\";\n while (cells.hasNext()) {\n cell = (XSSFCell) cells.next();\n\n if (cell.getCellType() == HSSFCell.CELL_TYPE_STRING) {\n// System.out.print(cell.getStringCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_NUMERIC) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getRawValue().trim() + \"|\";\n } else if (cell.getCellType() == HSSFCell.CELL_TYPE_BLANK) {\n// System.out.print(cell.getNumericCellValue() + \" \");\n s += cell.getStringCellValue().trim() + \"|\";\n }\n /*else {\n //U Can Handel Boolean, Formula, Errors\n }*/\n }\n if (!s.equals(\"\") && s.split(\"\\\\|\").length == 8) {\n input.setLoadName(s.split(\"\\\\|\")[6]);\n input.setLoadSize(s.split(\"\\\\|\")[1]);\n input.setLoadDate(s.split(\"\\\\|\")[0]);\n input.setLoadPath(s.split(\"\\\\|\")[4]);\n input.setLoadType(s.split(\"\\\\|\")[2]);\n input.setCicsName(s.split(\"\\\\|\")[5]);\n input.setRowId(s.split(\"\\\\|\")[7]);\n System.out.println(input.getRowId());\n inputDtos.add(input);\n// ss[i] = s;\n\n } else {\n throw new Exception(\"EXCEL DATA IS NOT COMPELETED\");\n }\n i++;\n }\n\n return inputDtos;\n }",
"public void save() {\t\n\t\n\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void update(UploadDF entity) {\n\t\tSession session = factory.openSession();\n\t\ttry{\n\t\t\tsession.beginTransaction();\n\t\t\tsession.update(entity);\n\t\t\tsession.getTransaction().commit();\n\t\t}catch(HibernateException exception){\n\t\t\tsession.getTransaction().rollback();\n\t\t\tthrow exception;\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public void SaveMuestra(MuestraMA objMx)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n session.saveOrUpdate(objMx);\n }",
"@Override\r\n\tpublic void saveEmployee(Employee employee) {\n\t\t\r\n\t}",
"public void testCreateNewFile() {\n List<SheetDataDto> data = new ArrayList<SheetDataDto>();\n RowDataDto headerRow = new RowDataDto();\n headerRow.getCells().add(new CellDataDto(\"Col 1\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 2\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 3\", CellDataTypeEnum.TEXT));\n headerRow.getCells().add(new CellDataDto(\"Col 4\", CellDataTypeEnum.TEXT));\n\n SheetDataDto sheet1 = new SheetDataDto();\n sheet1.setName(\"First sheet\");\n sheet1.setHeaderRow(headerRow);\n\n RowDataDto row1 = new RowDataDto();\n row1.getCells().add(new CellDataDto(1d, CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(\"IF(A2 > 0, \\\"1\\\", \\\"0\\\")\", CellDataTypeEnum.FORMULAR));\n row1.getCells().add(new CellDataDto(\"123456789\", CellDataTypeEnum.NUMBER));\n row1.getCells().add(new CellDataDto(new Date(), CellDataTypeEnum.DATE));\n\n sheet1.getRows().add(row1);\n data.add(sheet1);\n\n excelExportingService.exportToExcel(\"t1.xls\", data, false, ExcelFormatTypeEnum.XLS);\n excelExportingService.exportToExcel(\"t1.xlsx\", data, false, ExcelFormatTypeEnum.XLSX);\n }",
"void save(Object entity);",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\r\n\tpublic void save() {\n\r\n\t}",
"@Override\n public void run(String... strings) throws Exception {\n Employee employee = new Employee(\"Stamat\",\"Dobrev\", BigDecimal.valueOf(1125.25),new Date());\n serviceEmployee.persist(employee);\n }",
"public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }",
"private void writeAll(){\n try (BufferedWriter ignored = new BufferedWriter(new FileWriter(this.fileName))) {\n Iterable<E> values=entities.values();\n values.forEach(this::writeToFile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n\tpublic static void createMigrationInputFiles()\n\t{\n\t\t@SuppressWarnings({ \"rawtypes\" })\n\t\tMultiValueMap structureMap = new MultiValueMap(); // MultiValueMap for adding child item rows for every parentId\n\n\t\ttry\n\t\t{\n\t\t\tWorkbook workbook = new XSSFWorkbook(EXCEL_FILE);\n\t\t\tSheet datatypeSheet = workbook.getSheetAt(0);\n\n\t\t\tint linkDocCount = 0, linkDwgCount = 0, linkPurchSpecCount = 0, linkMadeFromCount = 0, engParts = 0, altPartsCount = 0;\n\n\t\t\tList<String> serviceItemsList = new ArrayList<String>();\n\t\t\tList<String> engItemsList = new ArrayList<String>();\n\n\t\t\t// Skipping top two rows\n\t\t\tIterator<Row> rowIterator = datatypeSheet.iterator();\n\t\t\tif (rowIterator.hasNext())\n\t\t\t\trowIterator.next();\n\t\t\tif (rowIterator.hasNext())\n\t\t\t\trowIterator.next();\n\n\t\t\t// Reading the rows one by one\n\t\t\twhile (rowIterator.hasNext())\n\t\t\t{\n\t\t\t\tcurrentRow = rowIterator.next();\n\t\t\t\tString tierType = BLANK;\n\t\t\t\tif (v(TIER_TYPE) != null && v(TIER_TYPE).trim().length() != 0\n\t\t\t\t\t\t&& !v(TIER_TYPE).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\ttierType = v(TIER_TYPE).replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\ttierType = tierType.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\ttierType = tierType.replace(SEMICOLON, COMMA);\n\t\t\t\t}\n\n\t\t\t\tString engineFamily = BLANK;\n\t\t\t\tif (v(ENGINE_FAMILY) != null && v(ENGINE_FAMILY).trim().length() != 0\n\t\t\t\t\t\t&& !v(ENGINE_FAMILY).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tengineFamily = v(ENGINE_FAMILY).replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\tengineFamily = engineFamily.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\tengineFamily = engineFamily.replace(SEMICOLON, COMMA);\n\t\t\t\t\t/*\n\t\t\t\t\tengineFamily = v(ENGINE_FAMILY).replace(SPACE, BLANK);\n\t\t\t\t\tengineFamily = engineFamily.replace(SEMICOLON, COMMA);*/\n\t\t\t\t}\n\n\t\t\t\tString componentId = BLANK;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (v(SERVICE_CMP_ID) != null && v(SERVICE_CMP_ID).trim().length() != 0\n\t\t\t\t\t\t\t&& !v(SERVICE_CMP_ID).trim().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\t/*System.out.println(currentRow.getCell(SERVICE_CMP_ID)\n\t\t\t\t\t\t\t\t.getRichStringCellValue()); */\n\t\t\t\t\t\tcomponentId = (currentRow.getCell(SERVICE_CMP_ID).getRichStringCellValue())\n\t\t\t\t\t\t\t\t.toString();\n\t\t\t\t\t\tcomponentId = componentId.replace(SEMICOLON_SPACE, COMMA);\n\t\t\t\t\t\tcomponentId = componentId.replace(SPACE_SEMICOLON, COMMA);\n\t\t\t\t\t\tcomponentId = componentId.replace(SEMICOLON, COMMA);\n\t\t\t\t\t\t//System.out.println(componentId);\n\t\t\t\t\t}\n\t\t\t\t} catch (IllegalStateException e)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"\\nError : Item \" + v(ITEM_ID)\n\t\t\t\t\t\t\t+ \" has invalid Component ID formula.\");\n\t\t\t\t\tLOG_WRITER.write(\"\\nError : Item \" + v(ITEM_ID)\n\t\t\t\t\t\t\t+ \" has invalid Component ID formula.\");\n\t\t\t\t}\n\n\t\t\t\tString catalogNum = BLANK;\n\t\t\t\tif (v(CATALOG_ITEM) != null && v(CATALOG_ITEM).trim().length() != 0\n\t\t\t\t\t\t&& !v(CATALOG_ITEM).trim().isEmpty())\n\t\t\t\t{\n\t\t\t\t\tcatalogNum = v(CATALOG_ITEM).replace(SPACE, BLANK);\n\t\t\t\t\tcatalogNum = catalogNum.replace(SEMICOLON, COMMA);\n\t\t\t\t}\n\t\t\t\t//convertRowToPipeDelimited(currentRow);\n\t\t\t\t//if it is for Service Part\n\t\t\t\tif (v(LINE_TYPE).equals(NEW_SERVICE_PART))\n\t\t\t\t{\n\t\t\t\t\t/* Check for the revision field */\n\t\t\t\t\tString revision_id = DEFAULT_REVISION_ID;\n\t\t\t\t\tif (v(REVISION) != null && v(REVISION).trim().length() != 0\n\t\t\t\t\t\t\t&& !v(REVISION).trim().isEmpty())\n\t\t\t\t\t{\n\t\t\t\t\t\trevision_id = v(REVISION).replace(SPACE, BLANK);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Service Part Writer */\n\n\t\t\t\t\tif (!serviceItemsList.contains(v(ITEM_ID)))\n\t\t\t\t\t{\n\t\t\t\t\t\tSERVICE_PART_WRITER\n\t\t\t\t\t\t\t\t.write(v(ITEM_ID)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ITEM_NAME)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ revision_id\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ TYPE_REAL_NAME\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ ((v(UOM) == null || v(UOM).trim().length() == 0\n\t\t\t\t\t\t\t\t\t\t\t\t|| v(UOM).trim().isEmpty() || v(UOM)\n\t\t\t\t\t\t\t\t\t\t\t\t.equalsIgnoreCase(EACH)) ? BLANK : v(UOM).trim())\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(IP_CLASS)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(OBJ_WEIGHT)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(OBJ_WEIGHT_UOM)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ENG_PRODUCT_LINE)\n\t\t\t\t\t\t\t\t\t\t+ DEL\n\t\t\t\t\t\t\t\t\t\t+ ((v(DATA_MODEL).contains(MODEL_BASED)) ? MB\n\t\t\t\t\t\t\t\t\t\t\t\t: ((v(DATA_MODEL).contains(MODEL_CENTRIC)) ? MC\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: BLANK)\n\n\t\t\t\t\t\t\t\t\t\t)\n\n\t\t\t\t\t\t\t\t\t\t+ DEL + v(ECCN) + DEL + v(ECCN_SOURCE) + DEL + v(OBJ_EVI)\n\t\t\t\t\t\t\t\t\t\t+ DEL + v(CTQ) + DEL + v(CCC) + DEL + v(ECC) + DEL + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(HOMOLOGATION) + DEL + v(CRITICAL_PART) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(ENG_MAKE_BUY) + NEW_LINE);\n\n\t\t\t\t\t\t/* Service Form Update Writer */\n\t\t\t\t\t\tSERVICE_FORM_WRITER\n\t\t\t\t\t\t\t\t.write(v(ITEM_NAME) + DEL + v(ITEM_ID) + DEL + componentId + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERVICEABLE) + DEL + v(REPAIRABLE) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERIALIZED) + DEL + v(POS_TRACKED) + DEL\n\t\t\t\t\t\t\t\t\t\t+ v(SERVICE_ITEM_TYPE) + DEL + tierType + DEL\n\t\t\t\t\t\t\t\t\t\t+ engineFamily + DEL + catalogNum + NEW_LINE);\n\n\t\t\t\t\t\t/* Service Parts' Owning Group update */\n\t\t\t\t\t\tSP_GROUP_ID_WRITER.write(v(ITEM_ID) + NEW_LINE);\n\n\t\t\t\t\t\t/* Relate Service Parts to Document */\n\t\t\t\t\t\tif (v(LINK_DOC) != null && v(LINK_DOC).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_DOC).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_DOC) + DEL + SP_DOC_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkDocCount++;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t/* Relate Service Parts to Drawing */\n\t\t\t\t\t\tif (v(LINK_DWG) != null && v(LINK_DWG).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_DWG).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_DWG) + DEL + SP_DWG_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkDwgCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Relate Service Parts to Purchase Specifications */\n\t\t\t\t\t\tif (v(LINK_PURCHSPEC) != null && v(LINK_PURCHSPEC).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_PURCHSPEC).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSP_ATTACHMENT_WRITER.write(v(ITEM_ID) + DEL + revision_id + DEL\n\t\t\t\t\t\t\t\t\t+ v(LINK_PURCHSPEC) + DEL + SP_PURCHSPEC_RELATION_NAME\n\t\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\t\tlinkPurchSpecCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t/* Relate Service Parts to MadeFrom */\n\t\t\t\t\t\tif (v(LINK_MADEFROM) != null && v(LINK_MADEFROM).trim().length() != 0\n\t\t\t\t\t\t\t\t&& !v(LINK_MADEFROM).isEmpty())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tMADE_FROM_RELATION_WRITER.write(v(ITEM_ID) + DEL + v(LINK_MADEFROM)\n\t\t\t\t\t\t\t\t\t+ DEL + SP_MADEFROM_RELATION_NAME + NEW_LINE);\n\t\t\t\t\t\t\tlinkMadeFromCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tserviceItemsList.add(v(ITEM_ID));\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG_WRITER.write(DUPLICATE_ENTRY + v(ITEM_ID));\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\telse if (v(LINE_TYPE).equals(EXISTING_ENG_PART))\n\t\t\t\t{\n\t\t\t\t\t/* EngParts' Service Form Creation - ITEM_ID will be used as the Service Form's NAME */\n\t\t\t\t\tif (!engItemsList.contains(v(ITEM_ID)))\n\t\t\t\t\t{\n\t\t\t\t\t\tEP_SERVICE_FORM_WRITER.write(v(ITEM_NAME) + DEL + componentId + DEL\n\t\t\t\t\t\t\t\t+ v(SERVICEABLE) + DEL + v(REPAIRABLE) + DEL + v(SERIALIZED) + DEL\n\t\t\t\t\t\t\t\t+ v(POS_TRACKED) + DEL + v(SERVICE_ITEM_TYPE) + DEL + tierType\n\t\t\t\t\t\t\t\t+ DEL + engineFamily + DEL + catalogNum + DEL + v(ITEM_ID)\n\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\tengParts++;\n\t\t\t\t\t\tengItemsList.add(v(ITEM_ID));\n\t\t\t\t\t} else\n\t\t\t\t\t{\n\t\t\t\t\t\tLOG_WRITER.write(DUPLICATE_ENTRY + v(ITEM_ID));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\tAdd child item rows for each assembly */\n\t\t\t\tif (v(PARENT_ID) != null && v(PARENT_ID).trim().length() != 0\n\t\t\t\t\t\t&& !v(PARENT_ID).isEmpty())\n\t\t\t\t{\n\t\t\t\t\tstructureMap.put(v(PARENT_ID), currentRow.getRowNum());\n\t\t\t\t\t/*\tSTRUCTURE_WRITER.write(v(PARENT_ID) + DEL + v(ITEM_ID) + DEL + v(QTY) + DEL\n\t\t\t\t\t\t\t\t+ v(SEQ) + NEW_LINE); - can not write it here, as the same parent might come again later. IPS_DATA_UPLOAD fails if the parent has existing BVR with -bom mode. */\n\t\t\t\t}\n\n\t\t\t\t/* Global Alternate */\n\t\t\t\tString globalAltStr = v(GLOBAL_ALT);\n\t\t\t\tif (globalAltStr != null && !globalAltStr.trim().isEmpty()\n\t\t\t\t\t\t&& globalAltStr.trim().length() != 0)\n\t\t\t\t{\n\t\t\t\t\tglobalAltStr = globalAltStr.replace(SPACE, BLANK);\n\t\t\t\t\tString globalAltArray[] = globalAltStr.split(SEMICOLON);\n\t\t\t\t\tfor (int i = 0; i < globalAltArray.length; i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tSP_GLOBAL_ALT_WRITER.write(v(ITEM_ID) + DEL + globalAltArray[i].trim()\n\t\t\t\t\t\t\t\t+ NEW_LINE);\n\t\t\t\t\t\taltPartsCount++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tLOG_WRITER.write(TOTAL_SERVICE_PARTS + serviceItemsList.size() + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_DOCUMENTS_TO_ATTACH + linkDocCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_DRAWINGS_TO_ATTACH + linkDwgCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_PURCHSPEC_TO_ATTACH + linkPurchSpecCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_MADEFROM_TO_ATTACH + linkMadeFromCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_ALTERNATE_PARTS_TO_ADD + altPartsCount + NEW_LINE);\n\t\t\tLOG_WRITER.write(TOTAL_ENG_PARTS_FOR_SERVICE_FORM_CREATON + engParts + NEW_LINE);\n\t\t\tLOG_WRITER.write(LINE_SEPERATOR);\n\n\t\t\t/* Write Structures */\n\t\t\tLOG_WRITER.write(STRUCTURE_START_TIME + new java.util.Date() + NEW_LINE);\n\t\t\tSet<String> parentIDs = structureMap.keySet();\n\t\t\tIterator parentIDsIterator = parentIDs.iterator();\n\t\t\tLOG_WRITER.write(TOTAL_STRUCTURES + parentIDs.size() + NEW_LINE);\n\t\t\t/*PS_STRUCTURE_WRITER.write(NEW_LINE + HASH_SIGN + TOTAL_STRUCTURES + parentIDs.size()\n\t\t\t\t\t+ NEW_LINE);*/\n\t\t\twhile (parentIDsIterator.hasNext())\n\t\t\t{\n\t\t\t\tObject parentID = parentIDsIterator.next();\n\n\t\t\t\t/*PS_STRUCTURE_WRITER.write(NEW_LINE + parentID + DEL + DEFAULT_REVISION_ID + DEL\n\t\t\t\t\t\t+ TYPE_REAL_NAME + DEL + ZERO + NEW_LINE);*/\n\n\t\t\t\tCollection childRows = (Collection) structureMap.get(parentID);\n\t\t\t\tIterator childRowsIterator = childRows.iterator();\n\t\t\t\twhile (childRowsIterator.hasNext())\n\t\t\t\t{\n\t\t\t\t\tRow cRow = datatypeSheet.getRow((int) childRowsIterator.next());\n\t\t\t\t\t/*PS_STRUCTURE_WRITER.write(rv(cRow, ITEM_ID) + DEL + DEFAULT_REVISION_ID + DEL\n\t\t\t\t\t\t\t+ TYPE_REAL_NAME + DEL + ONE + DEL + rv(cRow, SEQ) + DEL\n\t\t\t\t\t\t\t+ rv(cRow, QTY) + NEW_LINE);*/\n\t\t\t\t\tSTRUCTURE_WRITER.write(parentID + DEL + rv(cRow, ITEM_ID) + DEL + rv(cRow, QTY)\n\t\t\t\t\t\t\t+ DEL + rv(cRow, SEQ) + NEW_LINE);\n\t\t\t\t}\n\t\t\t}\n\t\t\tLOG_WRITER.write(STRUCTURE_END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\tworkbook.close();\n\t\t} catch (FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t} catch (IOException e)\n\t\t{\n\t\t\tSystem.out.println(EXCEPTION + e.getMessage());\n\t\t} finally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (SERVICE_PART_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSERVICE_PART_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SERVICE_FORM_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSERVICE_FORM_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (EP_SERVICE_FORM_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tEP_SERVICE_FORM_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_GLOBAL_ALT_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_GLOBAL_ALT_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_GROUP_ID_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_GROUP_ID_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (SP_ATTACHMENT_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSP_ATTACHMENT_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (MADE_FROM_RELATION_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tMADE_FROM_RELATION_WRITER.close();\n\t\t\t\t}\n\t\t\t\t/*\n\t\t\t\tif (PS_STRUCTURE_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tPS_STRUCTURE_WRITER.close();\n\t\t\t\t}*/\n\t\t\t\tif (STRUCTURE_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tSTRUCTURE_WRITER.close();\n\t\t\t\t}\n\t\t\t\tif (LOG_WRITER != null)\n\t\t\t\t{\n\t\t\t\t\tLOG_WRITER.write(END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\t\t\tSystem.out.println(END_TIME + new java.util.Date() + LINE_SEPERATOR);\n\t\t\t\t\tLOG_WRITER.close();\n\t\t\t\t}\n\n\t\t\t} catch (IOException ex)\n\t\t\t{\n\t\t\t\tSystem.out.println(EXCEPTION + ex.getMessage());\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void save() {\n\n }",
"public void saveData(String filename) throws Exception {\r\n\t\tlog.info(\"Attempting save data to filename: \" + filename);\r\n\r\n\t\tsaveData(new XSSFWorkbook(), filename);\r\n\r\n\t}",
"boolean saveExpense(Expenses exp);"
]
| [
"0.64480823",
"0.6446681",
"0.631084",
"0.6260228",
"0.5994516",
"0.59119904",
"0.58970106",
"0.5843126",
"0.5832677",
"0.5784971",
"0.5721135",
"0.5721135",
"0.5721135",
"0.5721135",
"0.5719796",
"0.5713331",
"0.5708585",
"0.5688029",
"0.56646526",
"0.5663522",
"0.56509054",
"0.56236416",
"0.56154746",
"0.5589277",
"0.5588123",
"0.5587921",
"0.5586244",
"0.5583644",
"0.55797577",
"0.55780727",
"0.5560697",
"0.55289733",
"0.55246127",
"0.55094206",
"0.5508863",
"0.55071425",
"0.55027103",
"0.5495593",
"0.5485164",
"0.5477674",
"0.5477384",
"0.5477384",
"0.5477384",
"0.5477372",
"0.5475838",
"0.54751146",
"0.5470258",
"0.54660577",
"0.5455139",
"0.5453614",
"0.5452044",
"0.54509366",
"0.54454744",
"0.5444392",
"0.5439548",
"0.5439105",
"0.54366946",
"0.54340947",
"0.54290926",
"0.542512",
"0.5418402",
"0.5418349",
"0.5416101",
"0.5415742",
"0.540937",
"0.5409185",
"0.5405214",
"0.54029566",
"0.53967595",
"0.5389778",
"0.5385895",
"0.5366758",
"0.536028",
"0.5353781",
"0.5345203",
"0.53434837",
"0.5337988",
"0.533391",
"0.53319716",
"0.5331865",
"0.5321636",
"0.5316935",
"0.53150064",
"0.5312424",
"0.5309114",
"0.5306444",
"0.5306444",
"0.53064275",
"0.5300515",
"0.5299302",
"0.52876556",
"0.5287061",
"0.52810824",
"0.52810824",
"0.52807885",
"0.528054",
"0.5276005",
"0.52750844",
"0.527492",
"0.527279",
"0.5268398"
]
| 0.0 | -1 |
method return all sorted teachers using oracle package | @GetMapping("/sort-asc")
public List<TeacherDTO> getSortedTeachers() {
return teacherService.getSortedTeachers().stream()
.map(this::convertToDto)
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private ArrayList<Teacher> sortTeacherByPriorty(ArrayList<Teacher> teachers, ArrayList<Integer> preferedTeachers, int numSections) {\n ArrayList<Teacher> aux = new ArrayList<>();\r\n if (preferedTeachers.isEmpty()) {\r\n return aux;\r\n }\r\n\r\n for (int i = 0; i < numSections; i++) {\r\n Teacher teacher = findTeacher(teachers, preferedTeachers.get(i % preferedTeachers.size()));\r\n aux.add(teacher);\r\n }\r\n return aux;\r\n }",
"List<Teacher> selectAll();",
"@GetMapping(\"/sort-desc\")\n public List<TeacherDTO> getSortedRevertTeachers() {\n return teacherService.getSortedRevertTeachers().stream()\n .map(this::convertToDto)\n .collect(Collectors.toList());\n }",
"List<StatementsWithSorting> selectAll();",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public List<Teacher> getAllTeachers() {\n List<Map<String, Object>> teachersIds = getJdbcTemplate().queryForList(sqlGetAllTeachersIds);\n if (teachersIds.size() == 0) {\n return null;\n }\n // find list of lessons by ID's\n List<Teacher> resultTeachers = new ArrayList<>();\n for (Map<String, Object> teacherId : teachersIds) {\n resultTeachers.add(getTeacherById((int) teacherId.get(\"id\")));\n }\n return resultTeachers;\n }",
"@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}",
"public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}",
"List<Athlete> getAllOrderByScore(OrderBy orderBy);",
"public String sortBy();",
"public String doSort();",
"public static void main(String[] args) {\n\t\t\r\n\t\tTreeSet<Employee> list=new TreeSet<Employee>();\r\n\t\tlist.add(new Employee(1,\"Nisha\",\"Dhore\"));\r\n\t\tlist.add(new Employee(3,\"Shamal\",\"Dambe\"));\r\n\t\tlist.add(new Employee(4,\"Ravi\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(2,\"Ram\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(1,\"Manisha\",\"Oberoys\"));\r\n\t\t\r\n\t\t\r\n//\t\tTreeSet<Integer> t=new TreeSet();\r\n//\t\tt.add(1);\r\n//\t\tt.add(7);\r\n//\t\tt.add(5);\r\n//\t\tSystem.out.println(\"id sort\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"-------sort asce by id\"+list);\r\n//\t\tCollections.sort(list, new ComparatorId());\r\n//\t\tSystem.out.println(\"------After sort\"+list);\r\n//\t\t\r\n\t\tSystem.out.println(\"lastname sorting\");\r\n\t\t\r\n\t\tList<Employee> l=new ArrayList<Employee>(list);\r\n\t\tCollections.sort(l, new ComparatorFirstName());\r\n\t\tSystem.out.println(\"------After sort\"+l);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n\tpublic List<Users> listTeacher() {\n\t\treturn genericDAO.listTeacher();\n\t}",
"@Override\n\tpublic List<Student> getStudentsByTeacher(String teacherName) {\n\t\tCollection<Student> allStudents = getAllEntities(); \n\t\t\n\t\t/** Here add students only bounded to this teacher */\n\t\tList<Student> studentsByTeacher = new ArrayList<>();\n\t\t\n\t\t/** Loop through all students in collection */\n\t\tfor(Student student : allStudents) { \n\t\t\tHibernate.initialize(student.getSubjects());\n\t\t\tfor(int i = 0; i < student.getTeachers().size(); i++) {\n\t\t\t\t/** Compare passed argument's teacher's name with teacher names bounded with students */\n\t\t\t\tif(teacherName.equals(student.getTeachers().get(i).getUsername())) {\n\t\t\t\t\tstudentsByTeacher.add(student);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn studentsByTeacher;\n\t}",
"private void displayStudentByGrade() {\n\n studentDatabase.sortArrayList();\n\n for (Student student : studentDatabase) {\n\n stdOut.println(student.toStringsort() + \"\\n\");\n }\n }",
"List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;",
"@Override\r\n\tpublic List<BingTu> selectTeaByRR_NameAndCount() {\n\t\treturn teachersDao.selectTeaByRR_NameAndCount();\r\n\t}",
"private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }",
"private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<Teacher> findAllTeacher(){\n\t\tList<Teacher> teachers = new ArrayList<Teacher>();\n\t\tSession session = null;\n\t\ttry{\n\t\t\tsession = HibernateSessionFactory.getSession();\n\t\t\tteachers = session.getNamedQuery(\"findAllTeacher\").list();\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t} finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn teachers;\n\t}",
"@Test\n\tpublic void testGetBooksSortedByAuthor() {\n\t\tSystem.out.println(\"Sorting books by author name...\");\n\t\tList<Book> result = store.getBooksSortedByAuthor();\n\t\tSystem.out.println(result);\n\t}",
"public static void main(String[] args) {\n ArrayList<Course> courses = new ArrayList<>();\n courses.add(new Course(\"Math\", \"12030\"));\n courses.add(new Course(\"English\", \"46537\"));\n courses.add(new Course(\"Programming\", \"64537\"));\n\n ArrayList<Teacher> teachers = new ArrayList<>();\n teachers.add(new Teacher(\"Albert\", \"Einstein\", \"[email protected]\", \"1\"));\n teachers.add(new Teacher(\"Nikola\", \"Tesla\", \"[email protected]\", \"2\"));\n teachers.add(new Teacher(\"Ada\", \"Lovelace\", \"[email protected]\", \"3\"));\n teachers.add(new Teacher(\"Charles\", \"Babbage\", \"[email protected]\", \"4\"));\n\n courses.get(0).getTaughtBy().add(teachers.get(1));\n courses.get(0).getTaughtBy().add(teachers.get(2));\n courses.get(1).getTaughtBy().add(teachers.get(0));\n courses.get(1).getTaughtBy().add(teachers.get(1));\n courses.get(2).getTaughtBy().add(teachers.get(2));\n\n\n\n ArrayList<Student> students = new ArrayList<>();\n students.add(new Student(\"Irina\", \"Smirnova\", \"[email protected]\", \"245\"));\n students.add(new Student(\"Andrey\", \"Smirnov\", \"[email protected]\", \"249\"));\n students.add(new Student(\"Galina\", \"Kutarina\", \"[email protected]\", \"246\"));\n\n courses.get(0).getTakenBy().add(students.get(1));\n courses.get(0).getTakenBy().add(students.get(2));\n courses.get(1).getTakenBy().add(students.get(1));\n courses.get(2).getTakenBy().add(students.get(0));\n\n\n listCourses(courses);\n // listTeachers(teachers);\n// listStudents(students);\n\n\n\n }",
"List<TeacherRecord> getTeachers(String clientId) throws Exception;",
"public void showteachers(){\n for (int i=0; i<tlist.size(); i++){\n System.out.println(tlist.get(i).getTeacher());\n }\n }",
"public void sortProposals() {\n\n\t}",
"public List<OrgTO> getAllTeachersAcsi(String jasperOrgId) throws Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<OrgTO> allTeachers = new ArrayList<OrgTO>();\r\n\t\tOrgTO teacher = null;\r\n\t\ttry {\r\n\t\t\tconn = driver.connect(DATA_SOURCE, null);\r\n\r\n\t\t\t/*String query = \"SELECT COUNT(STU.STUDENT_BIO_ID), \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.JASPER_USERID, \" + \r\n\t\t\t\t\t\t \"U.USER_NAME \" + \r\n\t\t\t\t\t\t \"FROM ORG_NODE_DIM ORG, ORG_USERS U, STUDENT_BIO_DIM STU \" + \r\n\t\t\t\t\t\t \"WHERE ORG.LEVEL3_JASPER_ORGID = ? \" + \r\n\t\t\t\t\t\t \"AND U.JASPER_ORGID = ORG.LEVEL4_JASPER_ORGID \" + \r\n\t\t\t\t\t\t \"AND STU.ORG_NODEID = ORG.ORG_NODEID \" + \r\n\t\t\t\t\t\t \"AND u.new_user = 'Y' \" + \r\n\t\t\t\t\t\t \"GROUP BY ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.JASPER_USERID, \" + \r\n\t\t\t\t\t\t \"U.USER_NAME \" + \r\n\t\t\t\t\t\t \"ORDER BY ORG.ORG_NODEID\";*/\r\n\t\t\t/** Changing query for Phase II */\r\n\t\t\tString query = /*\"SELECT COUNT(STU.STUDENT_BIO_ID), \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.USER_ID, \" + \r\n\t\t\t\t\t\t \"U.USERNAME, \" + \r\n\t\t\t\t\t\t \"U.ORG_ID \" + \r\n\t\t\t\t\t\t \"FROM ORG_NODE_DIM ORG, USERS U, STUDENT_BIO_DIM STU \" + \r\n\t\t\t\t\t\t \"WHERE ORG.LEVEL3_JASPER_ORGID = ? \" + \r\n\t\t\t\t\t\t \"AND U.ORG_ID = ORG.LEVEL4_JASPER_ORGID \" + \r\n\t\t\t\t\t\t \"AND STU.ORG_NODEID = ORG.ORG_NODEID \" + \r\n\t\t\t\t\t\t \"AND u.new_user = 'Y' and u.activation_status = 'AC' \" + \r\n\t\t\t\t\t\t \" and u.adminid = (select adminid from admin_dim where current_admin = 'Y') \" +\r\n\t\t\t\t\t\t \"GROUP BY ORG.LEVEL4_ELEMENT_NAME, \" + \r\n\t\t\t\t\t\t \"ORG.LEVEL4_JASPER_ORGID, \" + \r\n\t\t\t\t\t\t \"ORG.ORG_NODEID, \" + \r\n\t\t\t\t\t\t \"U.USER_ID, \" + \r\n\t\t\t\t\t\t \"U.USERNAME, U.ORG_ID \" + \r\n\t\t\t\t\t\t \"ORDER BY ORG.ORG_NODEID\";*/\r\n\t\t\tCustomStringUtil.appendString(\r\n\t\t\t\t\t\"SELECT COUNT(SBD.STUDENT_BIO_ID), \",\r\n \" OND.ORG_NODE_NAME, \",\r\n \" OND.ORG_NODEID, \",\r\n \" OND.ORG_NODEID, \",\r\n \" U.USERID, \",\r\n \" U.USERNAME, \",\r\n \" OND.ORG_NODEID, \",\r\n \" P.PRODUCT_CODE \",\r\n \" FROM USERS U, ORG_USERS OU, ORG_NODE_DIM OND, STUDENT_BIO_DIM SBD, \",\r\n \" ORG_PRODUCT_LINK OPL,PRODUCT P, CUST_PRODUCT_LINK CPL \",\r\n \" WHERE U.USERID = OU.USERID \",\r\n \" AND U.IS_NEW_USER = 'Y' \",\r\n \" AND U.ACTIVATION_STATUS = 'AC' \",\r\n \" AND OU.ORG_NODEID = OND.ORG_NODEID \",\r\n \" AND OND.PARENT_ORG_NODEID = ? \",\r\n \" AND SBD.ORG_NODEID = OND.ORG_NODEID \",\r\n \" AND OPL.ORG_NODEID = OU.ORG_NODEID \",\r\n \" AND OPL.CUST_PROD_ID = CPL.CUST_PROD_ID \",\r\n \" AND P.PRODUCTID = CPL.PRODUCTID \",\r\n \" GROUP BY OND.ORG_NODE_NAME, OND.ORG_NODEID, U.USERID, U.USERNAME, P.PRODUCT_CODE \",\r\n \" ORDER BY OND.ORG_NODEID\");\r\n\t\t\t\r\n\t\t\tpstmt = conn.prepareCall(query);\r\n\t\t\tpstmt.setString(1, jasperOrgId);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tteacher = new OrgTO();\r\n\t\t\t\tteacher.setStudentCount(rs.getString(1));\r\n\t\t\t\tString elementName = rs.getString(2);\r\n\t\t\t\tteacher.setElementName(elementName);\r\n\t\t\t\tteacher.setFullName(elementName);\r\n\t\t\t\tteacher.setJasperOrgId(rs.getString(3));\r\n\t\t\t\tteacher.setOrgNodeId(rs.getString(4));\r\n\t\t\t\tteacher.setUserId(rs.getString(5)); // this is jasper user id\r\n\t\t\t\tteacher.setUserName(rs.getString(6)); // userid \r\n\t\t\t\tteacher.setTenantId(rs.getString(7));\r\n\t\t\t\tteacher.setTestAdministration(rs.getString(8));\r\n\t\t\t\tallTeachers.add(teacher);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {rs.close();} catch (Exception e2) {}\r\n\t\t\ttry {pstmt.close();} catch (Exception e2) {}\r\n\t\t\ttry {conn.close();} catch (Exception e2) {}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + allTeachers.size() + \" Teachers\");\r\n\t\treturn getGradeForTeacherUsersAcsi(allTeachers);\r\n\t}",
"@Override\r\n\tpublic Teacher retrieveStudents(Teacher teacher) {\n\t\tStudent student1 = new Student(\"www\", \"ÄÐ\");\r\n\t\tStudent student2 = new Student(\"zzz\", \"Å®\");\r\n\t\tStudent student3 = new Student(\"qqq\", \"ÄÐ\");\r\n\t\tTeacher teacher1 = new Teacher(1, \"Íõ\", null);\r\n\t\tTeacher teacher2 = new Teacher(2, \"ÁÖ\", null);\r\n\t\t\r\n\t\tArrayList<Student> students = new ArrayList<Student>();\r\n\t\tif (teacher1.getId() == teacher.getId()) {\r\n\t\t\tteacher1.getStudents().add(student1);\r\n\t\t\tteacher1.getStudents().add(student2);\r\n\t\t\treturn teacher1;\r\n\t\t} else if (teacher2.getId() == teacher.getId()) {\r\n\t\t\tteacher2.getStudents().add(student3);\r\n\t\t\treturn teacher2;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\t\tEmployee e=new Employee(104, \"vik\");\r\n\t\tEmployee e1=new Employee(105, \"wik\");\r\n\t\tEmployee e2=new Employee(101, \"xik\");\r\n\t\tEmployee e3=new Employee(102, \"yik\");\r\n\t\tEmployee e4=new Employee(103, \"zik\");\r\n\t\tArrayList<Employee>al=new ArrayList<>();\r\n\t\tal.add(e);\r\n\t\tal.add(e1);\r\n\t\tal.add(e2);\r\n\t\tal.add(e3);\r\n\t\tal.add(e4);\r\n\tSystem.out.println(al);\r\n\tCollections.sort(al);// ArrayList is not ascending order so in order to do sorting we need to use .sort {its default in TreeSet so in TreeSet we don't write .sort method to sort}\r\n\tfor(Employee em:al)\r\n\t{\r\n\t\tSystem.out.println(em.getEno()+\" \"+em.getEname());\r\n\t}\r\n\t}",
"List<User> getUsersSortedByNameAndAge(List<User> users);",
"public static void main(String[] args) {\n\t\tArrayList<Employee> list= new ArrayList<Employee>();\n\t\t\n\t\tlist.add(new Employee(3,6000,\"vinod\"));\n\t\tlist.add(new Employee(6,7500,\"Rangu\"));\n\t\tlist.add(new Employee(1,9000,\"kittu\"));\n\t\tlist.add(new Employee(5,5000,\"bunny\"));\n\t\t\n\t\tCollections.sort(list, new NameComparator());\n\t\t\n\t\tIterator it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()){\n\t\t\tEmployee emp = (Employee)it.next();\n\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t\t\n\t\t\t/*Collections.sort(list, new SalaryComparator());\n\t\t\t\n\t\t\tIterator it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tEmployee emp = (Employee)it.next();\n\t\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t}*/\n\t}\n\t}",
"public static ArrayList<Teacher> getAllDocenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_TEACHERS;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Teacher> lis = (ArrayList<Teacher>) rp1.parameters[0];\n\t\t\treturn lis;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new ArrayList<Teacher>();\n\t}",
"public List<Teacher> getTeachers() {\n\t\tList<Teacher> teachers = this.hibernateTemplate.loadAll(Teacher.class);\n\t\treturn teachers;\n\t}",
"public void sortCompetitors(){\n\t\t}",
"@Override\n\tpublic ArrayList<Teacher> fetchDetails() throws myException {\n\t\tConnection con = GetConnection.getConnection();\n\t\tResultSet rs = null;\n\t\tString query = \"select * from teacher\";\n\t\tStatement st = null;\n\t\ttry {\n\t\t\tst = con.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t} catch (Exception e) {\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\tArrayList<Teacher> ls3 = new ArrayList<Teacher>();\n\t\ttry {\n\t\t\twhile (rs.next()) {\n\t\t\t\t// Teacher teacher = new Teacher();\n\t\t\t\tString name = rs.getString(\"teacherName\");\n\t\t\t\tShort id = rs.getShort(\"teacherId\");\n\t\t\t\tShort yoe = rs.getShort(\"yOE\");\n\t\t\t\tSubject[] subject = null;// getSubjects(name);\n\t\t\t\tTeacher teacher = new Teacher(name, id, yoe, subject);\n\t\t\t\tls3.add(teacher);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new myException(e.getMessage());\n\t\t}\n\t\treturn ls3;\n\t}",
"public List<Teacher> findTeacherList(Integer i_id) {\n\t\tCourtyardMapper courtyardMapper = this.getSqlSession().getMapper(CourtyardMapper.class);\n\t\tList<Teacher> teachers = courtyardMapper.findTeacherList(i_id);\n\t\tSystem.out.println(\"--Into Dao Method of findTeacherList!!!--\");\n\t\treturn teachers;\n\t}",
"public void getStudentNameStudentAsc()\n\t{\n\t\tDatabaseHandler db = new DatabaseHandler(getApplicationContext());\n\n\t\tstudent_name_studname_asc = db.getStudentNameAllEnquiryStudentAsc();\n\t\tIterator itr = student_name_studname_asc.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\n\t}",
"public void sort() {\n }",
"public List<OrgTO> getGradeForTeacherUsersAcsi(List<OrgTO> teachers) throws Exception {\r\n\t\tStringBuffer allNodes = new StringBuffer();\r\n\t\tStringBuffer allJasperOrgIds = new StringBuffer();\r\n\t\tboolean firstRec = false;\r\n\t\tfor(OrgTO t : teachers) {\r\n\t\t\tif(firstRec) {\r\n\t\t\t\tallNodes.append(\",\");\r\n\t\t\t\tallJasperOrgIds.append(\",\");\r\n\t\t\t}\r\n\t\t\tfirstRec = true;\r\n\t\t\tallNodes.append(t.getOrgNodeId());\r\n\t\t\tallJasperOrgIds.append(t.getJasperOrgId());\r\n\t\t}\r\n\t\t//logger.info(\"nodes\"+allNodes);\r\n\t\tList<OrgTO> allGrades = null;\r\n\t\tList<UserTO> allStudents = null;\r\n\t\tList<UserTO> students = null;\r\n\t\tif(allNodes.toString() != null && allNodes.toString().length() > 0) {\r\n\t\t\tlogger.info(\"Fetching grades for teachers\");\r\n\t\t\t//allGrades = getGrades(allNodes.toString());\r\n\t\t\tallGrades = getGradesAcsi(allJasperOrgIds.toString());\r\n\t\t\t\r\n\t\t\tlogger.info(\"Fetching students for teachers\");\r\n\t\t\tallStudents = getStudentsAcsi(allNodes.toString());\r\n\t\t\r\n\t\t\tfor(OrgTO tech : teachers) {\r\n\t\t\t\tfor(OrgTO grade : allGrades) {\r\n\t\t\t\t\tif(tech.getJasperOrgId() != null && tech.getJasperOrgId().equals(grade.getJasperOrgId())) {\r\n\t\t\t\t\t\ttech.setGrade(grade.getGrade());\r\n\t\t\t\t\t\ttech.setGradeSeq(grade.getGradeSeq());\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tstudents = new ArrayList<UserTO>();\r\n\t\t\t\tfor(UserTO student : allStudents) {\r\n\t\t\t\t\tif(tech.getOrgNodeId() != null && tech.getOrgNodeId().equals(student.getOrgNodeId())) {\r\n\t\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttech.setUsers(students);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + teachers.size() + \" Grades for Teacher Users\");\r\n\t\treturn teachers;\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tArrayList<Student2> studs = new ArrayList<>();\r\n\t\tstuds.add(new Student2(6,\"neena\"));\r\n\t\tstuds.add(new Student2(1,\"nimmy\"));\r\n\t\tstuds.add(new Student2(4,\"cookie\"));\r\n\t\t\r\n\t\tCollections.sort(studs);\r\n\t\t\r\n\t\tfor(Student2 s : studs) {\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args) {\n\n\t\tMap <Student,Integer> m = new TreeMap<Student,Integer>(new sortById());\n\t\t\n\t\tm.put(new Student(1,\"anil\",\"prasad\") , 100);\n\t\tm.put(new Student(1,\"haridwar\",\"prasad\") , 200);\n\t\tm.put(new Student(2,\"durgesh\",\"mishra\") , 300);\n\t\tm.put(new Student(3,\"durgesh\",\"jugani\") , 400);\n\t\tSystem.out.println(m);\n\t\tfor(Map.Entry<Student,Integer> en :m.entrySet())\n\t\t{\n\t\t\tSystem.out.println(en.getKey());\n\t\t\tSystem.out.println(en.getValue());\n\t\t}\n\t\t\n\t List<Student> ss = new ArrayList<Student>(m.keySet());\n\t\tSystem.out.println(ss);\n\t\t List<Integer> st = new ArrayList<Integer>(m.values());\n\t\t\tSystem.out.println(st);\n\t}",
"@Override\n\tpublic List<Teacher> findAll() {\n\t\treturn dao.findAll();\n\t}",
"public void sortBasedYearService();",
"@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }",
"public void sortKnowledgeBase()\n {\n int i;\n Random random;\n String aPredicate;\n StringTokenizer tokenizer;\n //------------\n random = new Random();\n i = 0;\n while (i < knowledgeBase.size())\n {\n aPredicate = knowledgeBase.get(i).commitments.get(0).predicate;\n tokenizer = new StringTokenizer(aPredicate,\"(), \");\n if(tokenizer.nextToken().equals(\"secuencia\"))\n knowledgeBase.get(i).priority = random.nextInt(100);\n //end if\n else\n knowledgeBase.get(i).priority = random.nextInt(10000);\n //end else\n i = i + 1;\n }//end while\n Collections.sort(knowledgeBase);\n }",
"List<User> getNaturalSortedUsersByAge(List<User> users);",
"public static void main (String args []) throws Exception {\n\n\n ArrayList<Person> people = new ArrayList<Person>();\n Person youngestPerson = getYoungestPerson(people);\n Person oldestPerson = getOldestPerson(people);\n ArrayList<Person> sortedByAgeList = getSortedListByAge(people);\n ArrayList<Person> sortedByNameList = getSortedListByName(people, false);\n\n\n /*\n For the below to work where you can see what you've done, you must have\n done the section 1 recap portion where you override the toString() method of the\n Person class!\n */\n\n for(Person p : sortedByAgeList) {\n System.out.println(p);\n }\n\n for(Person p : sortedByNameList) {\n System.out.println(p);\n }\n }",
"@Override\n\tpublic List<Spittle> findAllSorted() {\n\t\treturn null;\n\t}",
"List selectByExample(TResearchTeachExample example);",
"@Override\n\tpublic List<Map<String, Object>> getTeacher() {\n\t\treturn getSession().selectList(getNamespace() + \"getTeacher\");\n\t}",
"public List<String> getPatternAuthors() {\n Set<String> authors = mapAuths.keySet();\r\n //int n = authors.size();\r\n List <String> authorList = new LinkedList<String>();\r\n //iterate through set and add to list\r\n for(String author : authors) {\r\n authorList.add(author);\r\n }\r\n\r\n Collections.sort(authorList, new Comparator<String>() {\r\n public int compare(String author1, String author2) {\r\n return author1.compareToIgnoreCase(author2);\r\n }\r\n });\r\n\r\n return authorList;\r\n }",
"public static void main(String[] args) {\n\n Set<Student> set = Sets.newTreeSet();\n Student s3 = new Student(3);\n Student s4 = new Student(4);\n Student s5 = new Student(5);\n Student s1 = new Student(1);\n Student s2 = new Student(2);\n List<Student> list = Lists.newArrayList();\n list.add(s4);\n list.add(s3);\n list.add(s5);\n list.add(s1);\n list.add(s2);\n\n list.sort(new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n return o1.getAge() - o2.getAge() < 0 ? 1 : -1;\n }\n });\n System.out.println(list);\n\n// s1.toString();\n// set.add(s3);\n// set.add(s4);\n// set.add(s5);\n// set.add(s1);\n// set.add(s2);\n// System.out.println(set);\n// for (Student s : set) {\n// System.out.println(s);\n// }\n\n\n }",
"public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }",
"public List<Chemin> getSortants() {\n return sortants;\n }",
"public List<WebRecommendation> findAllOrderBySequence();",
"@Override\r\n\tpublic List<Gjjtqyyb> findtqyy() {\n\t\treturn tqyydao.findall();\r\n\t}",
"public List<Employee> findAllByOrderByLastNameAsc();",
"public List<Employee> findAllByOrderByLastNameAsc();",
"public List<Employee> findAllByOrderByLastNameAsc();",
"public List<Employee> findAllByOrderByLastNameAsc();",
"public List<Employee> findAllByOrderByLastNameAsc();",
"public static void main(String[] args) {\n TreeSet<Person> personsByName=new TreeSet<>(new NameComparator());\n personsByName.add(new Person(\"Popescu\", 27));\n personsByName.add(new Person(\"Ionescu\", 32));\n personsByName.add(new Person(\"Andrei\", 18));\n\n for (Person p:personsByName){\n System.out.println(\"nume: \"+p.getName()+\", varsta:\"+p.getAge());\n }\n\n //creating a TreeSet with persons sorted by age\n TreeSet<Person> personsByAge=new TreeSet<>(new AgeComparator());\n personsByAge.addAll(personsByName);\n\n for (Person p:personsByAge){\n System.out.println(\"nume: \"+p.getName()+\", varsta:\"+p.getAge());\n }\n\n //creating an HashMap with persons and hobbies\n HashMap<Person, List<Hobby>> personHobbies=new HashMap<>();\n\n Adress a1=new Adress(\"Lacul Morii\", \"Bucuresti\", \"Romania\");\n Adress a2=new Adress(\"Tineretului\", \"Bucuresti\", \"Romania\");\n Adress a3=new Adress(\"Bois de Vincennes\", \"Paris\", \"France\");\n Adress a4=new Adress(\"Via Capella\", \"Nocelle\", \"Italy\");\n\n List<Adress> adressesForHobby1=new ArrayList<>();\n adressesForHobby1.add(a1);\n adressesForHobby1.add(a2);\n adressesForHobby1.add(a4);\n\n List<Adress> adressesForHobby2=new ArrayList<>();\n adressesForHobby2.add(a3);\n adressesForHobby2.add(a4);\n\n Hobby hobby1=new Hobby(\"running\", 4, adressesForHobby1);\n Hobby hobby2=new Hobby(\"cycling\", 3, adressesForHobby2);\n\n List<Hobby> hobbies=new ArrayList<>();\n hobbies.add(hobby1);\n hobbies.add(hobby2);\n\n Person person=new Person(\"Popescu\", 27);\n personHobbies.put(person, hobbies);\n for (Hobby h: personHobbies.get(person)){\n for (Adress adr: h.getAdresses()){\n System.out.println(h.getName()+\" \"+adr.getCountry());\n }\n }\n\n\n\n\n\n }",
"public void sort() // sort according to primary key defined in RecordTemplate\n\t{\n\t\trecordList.sort((Record r1, Record r2)->r1.getValue(PRIMARY_KEY_FIELD_INDEX).compareTo(r2.getValue(PRIMARY_KEY_FIELD_INDEX))); \n //recordList.forEach((r)->System.out.println(r)); \n\t}",
"@Override\n\tpublic List<Teacher> getTeaNameAndID() {\n\t\treturn teacherDAO.getTeaNameAndID();\n\t}",
"List<WstatTeachingClasshourTeacher> selectByExample(WstatTeachingClasshourTeacherExample example);",
"public List<Teaching> getInstructorsCourses() throws SQLException {\n\t\tTeaching teaching = null;\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Teaching> teachings = new ArrayList<Teaching>();\n\t\t\n\t\ttry {\n\t\t\tconn = OracleConnection.getConnection();\n stmt = conn.prepareStatement(OracleQueries.GETAllINSTRUCTORFROMTEACHING);\n result = stmt.executeQuery();\n \n while(result != null && result.next()){\n \tteaching = new Teaching();\n \tteaching.setCourse_name(result.getString(1));\n \tteaching.setMinimum_gpa(result.getDouble(2));\n \tteaching.setFull_name(result.getString(3));\n \tteaching.setEmail(result.getString(4));\n \t\n \tteachings.add(teaching);\n }\n\t\t\t\n\t\t} catch (ClassNotFoundException | IOException | SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n result.close();\n if(stmt != null){\n stmt.close();\n }\n if(conn != null){\n conn.close();\n }\n }\n\t\t\n\t\treturn teachings;\t\n\t}",
"@Override\n public LinkedList<String> orderAlphabetically(){\n LinkedList<String> stringLL = super.orderAlphabetically();\n stringLL.add(\"Years Until Tenure: \" + m_yearsUntilTenure);\n Collections.sort(stringLL);\n return stringLL;\n }",
"@Override\r\n\tpublic ArrayList<Sort> selectAll() {\n\t\tResultSet rs;\r\n\t\tConnection conn = db.getConnection();\r\n\t\tArrayList<Sort> list=new ArrayList<Sort>();\r\n\t\tString sql = \"select * from movie_sort\";\r\n\t\tPreparedStatement pstmt;\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t list.add(new Sort(rs.getString(1), rs.getInt(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {//현재 메서드가 종료하기 전에 꼭 실행해야하는 코드 작성\r\n\t\t\tdb.disConn();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public static void main(String[] args) {\n\t\tList<Employee_Dai> employeeList = new ArrayList<>();\r\n\t\temployeeList.add(new Employee_Dai(1, 300, 14, \"dainguyen97\", \"Nguyen Ngoc Dai\"));\r\n\t\temployeeList.add(new Employee_Dai(2, 500, 16, \"tryhard\", \"Dao Thi Nhung\"));\r\n\t\temployeeList.add(new Employee_Dai(3, 800, 18, \"nevergiveup\", \"Dinh Tien Kiet\"));\r\n\t\temployeeList.add(new Employee_Dai(4, 2000, 30, \"nothing100\", \"Nguyen Ngoc Tam\"));\r\n\t\temployeeList.add(new Employee_Dai(5, 1300, 24, \"thosan80\", \"Kieu Viet Anh\"));\r\n\t\temployeeList.add(new Employee_Dai(6, 900, 20, \"justiceleague\", \"Pham Ngoc Anh\"));\r\n\t\temployeeList.add(new Employee_Dai(7, 1000, 22, \"overnight\", \"Tran Van Phung\"));\r\n\t\temployeeList.add(new Employee_Dai(8, 1500, 28, \"theend\", \"Dang Viet Bac\"));\r\n\t\t\r\n\t\tSortBySalary(employeeList);\r\n\t\tSortByAge(employeeList);\r\n\t\tSortByName(employeeList);\r\n\t\tSearchCharacterNInUser(employeeList);\r\n\t}",
"public TreeMap<String, Professor> getAllProfessors(String params) {\n\n StringBuffer json = new StringBuffer();\n ArrayList<Professor> allProfessors = new ArrayList<>();\n\n try {\n\n int i = 1;\n while (true) {\n if (params == null) {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i).readUrl());\n } else {\n json.append(new JsonReader(\"http://api.umd\" +\n \".io/v0/professors?per_page=100&page=\" + i + \"&\" +\n params).readUrl());\n }\n\n allProfessors.addAll(new Gson().fromJson(json.toString().replace\n (\"][\", \",\"),\n new TypeToken<ArrayList<Professor>>(){}.getType()));\n\n if (allProfessors.size() % 100 == 0) {\n i++;\n continue;\n } else {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n TreeMap<String, Professor> genProfessors = new TreeMap<>();\n\n for (Professor p : allProfessors) {\n genProfessors.put(p.getName(), p);\n }\n\n return genProfessors;\n }",
"public String listResearchers();",
"public static void main(String[] args) {\n\t\tStud1 s1=new Stud1(1,\"Yogi\");\r\n\t\tStud1 s2=new Stud1(4,\"Rushi\");\r\n\t\tStud1 s3=new Stud1(2,\"Praje\");\r\n\t\tStud1 s4=new Stud1(3,\"Amre\");\r\n\t\t\r\n\t\tList l=new ArrayList();\r\n\t\tl.add(s1);\r\n\t\tl.add(s2);\r\n\t\tl.add(s3);\r\n\t\tl.add(s4);\r\n\t\t\r\n\t\tSystem.out.println(l);\r\n\t\t\r\n\t\tCollections.sort(l);\r\n\t\t\r\n\t\tEnumeration e=Collections.enumeration(l);\r\n\t\t\r\n\t\twhile(e.hasMoreElements())\r\n\t\t{\r\n\t\t\tObject o=e.nextElement();\r\n\t\t\tSystem.out.println(o);\r\n\t\t}\r\n\r\n\t}",
"public static void main(String[] args){\n\n List<Student> arrList = new ArrayList<>(); // arraylist of our own class type\n arrList.add(new Student(111, \"bbb\", \"London\"));\n arrList.add(new Student(222,\"aaa\", \"nyc\"));\n arrList.add(new Student(333, \"ccc\", \"Jaipur\"));\n\n System.out.println(\"Unsorted list : \");\n for (Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on roll no\n Collections.sort(arrList, new Sortbyroll());\n\n System.out.println(\"Sorted by rollNo : \");\n for(Student student : arrList)\n System.out.println(student);\n\n // Sort the arrayList based on name\n Collections.sort(arrList, new Sortbyname());\n\n System.out.println(\"Sorted by name : \");\n for (int i=0; i<arrList.size(); i++)\n System.out.println(arrList.get(i));\n }",
"public List<Patient> findAllByOrderByFirstNameAsc();",
"@Override\n public ImmutableList<Id> topsortIdList() {\n return idDag.topsortIdList();\n }",
"List<E> findAll(Sort sort);",
"public static void runExercise8() {\n List <Integer> years = students.stream().map(student -> student.getBirthYear()).sorted(Comparator.reverseOrder()).collect(Collectors.toList());\n System.out.println(years);\n }",
"public static void main(String[] args) {\n\t\tList<Employee> list = new ArrayList<Employee>();\r\n\t\tlist.add(new Employee(\"Ashish\", new Integer(37), new Double(373727)));\r\n\t\tlist.add(new Employee(\"Ashish\", new Integer(37), new Double(373)));\r\n\t\tlist.add(new Employee(\"Rakesh\", new Integer(37), new Double(373727)));\r\n\r\n\t\tlist.add(new Employee(\"Sakal\", new Integer(25), new Double(3434737)));\r\n\t\tlist.add(new Employee(\"Manish\", new Integer(26), new Double(373727)));\r\n\t\tlist.add(new Employee(\"Manish\", new Integer(37), new Double(373727)));\r\n\r\n\t\t// In collections class one sort method is there which taking two\r\n\t\t// argument\r\n\t\t// one list one one comparator type so here\r\n\t\t// SortBasedOnNameAgeAndSalary is comparator type note: sortimg in\r\n\t\t// assending\r\n\r\n\t\tCollections.sort(list, new SortBasedOnNameAgeAndSalary());\r\n\t\tSystem.out.println(\"after Sorting\" + list);\r\n\t\t// Here i am iterating list and getting sorted result\r\n\t\tfor (Employee employee : list) {\r\n\t\t\tSystem.out.println(employee);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n TreeSet<Employee> treeEmp = new TreeSet<>();\n \n for(int i =0; i<100 ; i++){\n treeEmp.add(new Employee(\"Pera\"+i, (int)(Math.random()*100+1)));\n } \n \n \n Iterator<Employee> iteratorEmp = treeEmp.iterator();\n while (iteratorEmp.hasNext()) { \n Employee ite = iteratorEmp.next();\n System.out.println(\"Empployee name: \"+ite.name+\" id: \"+ite.id);\n }\n \n System.out.println(treeEmp.first());\n System.out.println(treeEmp.last());\n \n Employee e = new Employee(\"Perica499\");\n e.id = \"50\";\n treeEmp.add(e);\n Iterator<Employee> headSetIterator = treeEmp.headSet(e).iterator();\n while (headSetIterator.hasNext()) { \n System.out.println(\"object Id \"+headSetIterator.next().id);\n }\n \n System.out.println(\"*****************************\");\n \n TreeSet<Employee> emps = new TreeSet<>(new CustomComparator());\n \n \n }",
"@Override\n\tpublic List<User> showTeacher() {\n\t\treturn userDao.showTeacher();\n\t}",
"public String sortOrder();",
"@Test\n\n public void student_Givenstudentobject_shouldbesorted() {\n Student s1 = new Student(1, \"shivani\", 24);\n Student s2 = new Student(2, \"madhuri\", 25);\n Student s3 = new Student(3, \"neha\", 24);\n Student s4 = new Student(4, \"shivani\", 22);\n Student s5 = new Student(5, \"minal\", 20);\n // list of type students\n ArrayList<Student> al = new ArrayList<Student>();\n al.add(s1);\n al.add(s2);\n al.add(s3);\n al.add(s4);\n al.add(s5);\n // store all list elements in list\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n Collections.sort(al, new StudentSorter());\n System.out.println(\"\\nSorted list\");\n for (int i=0; i<al.size(); i++)\n System.out.println(al.get(i));\n }",
"public List<Employee> findAllByOrderByFirstName();",
"public static void main(String[] args) {\n TreeSet<String> ts = new TreeSet<>(new MyComp().reversed());\n\n ts.add(\"C\");\n ts.add(\"B\");\n ts.add(\"A\");\n ts.add(\"G\");\n ts.add(\"Z\");\n ts.add(\"Q\");\n\n for (String element : ts){\n System.out.print(element);\n }\n }",
"@Override\n\tpublic List<Teacher> getAll() {\n\t\treturn null;\n\t}",
"public void sortMatches();",
"public List<User> findEmployees(String companyShortName, int start, int rows, String sortBy, String sortHow);",
"@NotNull\n EntityIterable asSortResult();",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tList<Student> students = new ArrayList<>();\r\n\t\t\r\n\t\tstudents.add(new Student(23, \"Aryan\"));\r\n\t\tstudents.add(new Student(23, \"Jeet\"));\r\n\t\tstudents.add(new Student(83, \"Dhruv\"));\r\n\t\tstudents.add(new Student(13, \"Amit\"));\r\n\t\tstudents.add(new Student(65, \"Aditya\"));\r\n\t\tstudents.add(new Student(57, \"Jeet\"));\r\n\t\t\r\n//\t\tCollections.sort(students);\r\n\t\t\r\n//\t\tCollections.sort(students, new SortByNameThenMarks());\t// We passed our own comparator object.\r\n\t\t\r\n\t\t// We can have our own anonymous comparator without making a class. We can do that so by doing the following:\r\n\t\t\r\n//\t\tCollections.sort(students, new Comparator<Student>() {\r\n//\r\n//\t\t\t@Override\r\n//\t\t\tpublic int compare(Student obj1, Student obj2) {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t}\r\n//\t\t\t\r\n//\t\t});\r\n\t\t\r\n\t\t// With the help of Lambda we could cut short the lines but we have to mention the sign \"->\".\r\n//\t\tCollections.sort(students,(Student obj1, Student obj2) -> {\r\n\t\t\r\n//\t\tCollections.sort(students,(obj1, obj2) -> {\r\n//\t\t\t\tif(obj1.name.equals(obj2)) return obj1.marks - obj2.marks;\r\n//\t\t\t\treturn obj1.name.compareTo(obj2.name);\r\n//\t\t\t});\r\n\t\t\r\n//\t\tCollections.sort(students, (obj1, obj2) -> obj1.name.compareTo(obj2.name));\r\n\t\t\r\n//\tThe comparator SortByNameThenMarks can be written in one line as follows. Also \".reversed()\" is used to reverse the order of comparison.\r\n\t\tCollections.sort(students, Comparator.comparing(Student::getName).thenComparing(Student::getMarks).reversed());\r\n\t\t\r\n\t\tstudents.forEach(System.out::println);\t// This is lambda expression to print \r\n\t}",
"@Given(\"^I want to sort the student list$\")\r\n\tpublic void SortStudent() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(\".//*[@id='_ING_WAR_INGportlet_:ing:student']\"))\r\n\t\t\t\t.click();\r\n\t\t//click on sort\r\n\t\tdriver.findElement(By.xpath(\".//*[@id='tabs4']/ul/li[3]/input\")).click();\r\n\t}",
"public void employeeSorter(){\n Collections.sort(employees, new Comparator<Employee>() {\n @Override\n public int compare(Employee o1, Employee o2) {\n if(o1.getSalary() < o2.getSalary())\n return 1;\n else if(o1.getSalary() > o2.getSalary())\n return -1;\n else\n return 0;\n }\n });\n }",
"@RequestMapping(value = \"getRosterStudentsByTeacher.htm\", method = RequestMethod.POST)\n\tpublic final @ResponseBody JQGridJSONModel getRosterStudents(@RequestParam(\"rows\") String limitCountStr,\n\t\t\t@RequestParam(\"page\") String page, @RequestParam(\"sidx\") String sortByColumn,\n\t\t\t@RequestParam(\"sord\") String sortType, @RequestParam(\"testSessionId\") Long testSessionId,\n\t\t\t@RequestParam(\"filters\") String filters, @RequestParam(\"schoolOrgId\") Long schoolOrgId,\n\t\t\t@RequestParam(\"assessmentProgramId\") Long assessmentProgramId) {\n\t\tLOGGER.trace(\"Entering the getRosterStudentsByTeacher page for getting results\");\n\n\t\tInteger currentPage = -1;\n\t\tInteger limitCount = -1;\n\t\tInteger totalCount = -1;\n\t\tJQGridJSONModel jqGridJSONModel = null;\n\t\t// String orderByclause = \"\";\n\t\t// TODO move all 3 steps to a service.\n\t\tUserDetailImpl userDetails = (UserDetailImpl) SecurityContextHolder.getContext().getAuthentication()\n\t\t\t\t.getPrincipal();\n\t\tcurrentPage = Integer.parseInt(page);\n\t\tlimitCount = Integer.parseInt(limitCountStr);\n\t\tMap<String, String> studentRosterCriteriaMap = recordBrowserJsonUtil\n\t\t\t\t.constructRecordBrowserFilterCriteria(filters);\n\t\tint currentSchoolYear = (int) (long) userDetails.getUser().getContractingOrganization().getCurrentSchoolYear();\n\t\t// Temporary fix for\n\t\t/*\n\t\t * if(sortByColumn.equals(\"stateStudentIdentifier\")){ orderByclause =\n\t\t * \"substring(statestudentidentifier, '^[0-9]+')::bigint \"+ sortType +\n\t\t * \", substring(statestudentidentifier, '[^0-9]*$') \"+sortType; }else{\n\t\t * orderByclause = sortByColumn + ParsingConstants.BLANK_SPACE +\n\t\t * sortType; }\n\t\t */\n\n\t\tTimerUtil timerUtil = TimerUtil.getInstance();\n\t\tList<StudentRoster> studentRosters = enrollmentService.getEnrollmentWithRosterAssessmentProgram(userDetails,\n\t\t\t\tpermissionUtil.hasPermission(userDetails.getAuthorities(),\n\t\t\t\t\t\tRestrictedResourceConfiguration.getViewAllRostersPermissionCode()),\n\t\t\t\tsortByColumn, sortType, (currentPage - 1) * limitCount, limitCount, studentRosterCriteriaMap,\n\t\t\t\ttestSessionId, schoolOrgId, null, currentSchoolYear, assessmentProgramId);\n\t\ttimerUtil.resetAndLog(LOGGER, \"Getting student records for test session took \");\n\n\t\ttotalCount = enrollmentService.countEnrollmentWithRosterAssessmentProgram(userDetails,\n\t\t\t\tpermissionUtil.hasPermission(userDetails.getAuthorities(),\n\t\t\t\t\t\tRestrictedResourceConfiguration.getViewAllRostersPermissionCode()),\n\t\t\t\tstudentRosterCriteriaMap, testSessionId, schoolOrgId, null, currentSchoolYear,assessmentProgramId);\n\t\ttimerUtil.resetAndLog(LOGGER, \"Counting student records for test session took \");\n\n\t\tjqGridJSONModel = StudentRosterJsonConverter.convertToStudentRosterJson(studentRosters, totalCount, currentPage,\n\t\t\t\tlimitCount, studentsTestsStatusConfiguration);\n\n\t\tLOGGER.trace(\"Leaving the getRosterStudentsByTeacher page.\");\n\t\treturn jqGridJSONModel;\n\t}",
"public static void main(String args[]) {\n\tSystem.out.println(\"--------------------------------------------------------------------\");\r\n\tSystem.out.println(\"Program 2.2: Sorting TreeSet when it has user-defined Objects/values\");\r\n\tTreeSet TS3 = new TreeSet();\r\n\tassign3And4_SubClass_Employee e31 = new assign3And4_SubClass_Employee(9, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e41 = new assign3And4_SubClass_Employee(4, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e51 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tassign3And4_SubClass_Employee e61 = new assign3And4_SubClass_Employee(2, \"Mamta\", 200);\r\n\tTS3.add(e31);\r\n\tTS3.add(e41);\r\n\tTS3.add(e51);\r\n\tTS3.add(e61);\r\n\tSystem.out.println(\"Sorted TreeSet TS3 is : \"+TS3); // sort then in Asc order + it doesnt allow duplicate values.\r\n\t}",
"public PagerModel<Teacher> list(int uid, String order, int pageSize, int pageIndex, String where)\r\n\t\t\tthrows SQLException {\n\t\treturn null;\r\n\t}",
"public Query_GetAllStudentsOrderNachname(DataSource ds) {\n\t\t\tsuper(ds, sql_getAllStudents + \" order by nachname\");\n\t\t\tcompile();\n\t\t}",
"public static void main(String[] args) {\n\n Person person1 = new Person(\"Tom Brady\");\n Person person2 = new Person(\"David Letterman\");\n\n List<Person> personList = new ArrayList<Person>();\n personList.add(person1);\n personList.add(person2);\n\n // Sorting\n // Collections.sort(personList, new PersonComparer());\n // Collections.sort(personList, (o1, o2) -> o1.getName().compareTo(o2.getName()));\n personList.sort((o1, o2) -> o1.getName().compareTo(o2.getName()));\n\n // Print out the people!\n for (Person p : personList)\n {\n System.out.println(p.getName());\n }\n\n }",
"public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }",
"void sort();",
"void sort();",
"public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}",
"List<TeacherRecord> getTeachersWithNameFilter(char lastNameCharFilter, String clientId) throws Exception;",
"List<Account> findAccountByOrderByAge();"
]
| [
"0.61441296",
"0.6055155",
"0.59686464",
"0.591254",
"0.58704126",
"0.581893",
"0.5798971",
"0.5760366",
"0.5699084",
"0.56615746",
"0.565213",
"0.5628237",
"0.5619795",
"0.5605186",
"0.55979925",
"0.5569948",
"0.55541575",
"0.552829",
"0.5523416",
"0.55217725",
"0.55195075",
"0.5514409",
"0.5492717",
"0.54907894",
"0.54895544",
"0.5487982",
"0.5476766",
"0.5471766",
"0.5461732",
"0.54563415",
"0.54562896",
"0.54470026",
"0.5429669",
"0.54240805",
"0.5398781",
"0.53833777",
"0.5355002",
"0.53370816",
"0.5326211",
"0.5326081",
"0.53223556",
"0.5322196",
"0.52880484",
"0.52869266",
"0.5283942",
"0.5280085",
"0.5278478",
"0.5263718",
"0.52633345",
"0.52623254",
"0.5254305",
"0.5247857",
"0.52472687",
"0.5238026",
"0.52349144",
"0.52349144",
"0.52349144",
"0.52349144",
"0.52349144",
"0.52256966",
"0.52196276",
"0.5201278",
"0.5192672",
"0.51879126",
"0.5182354",
"0.5180911",
"0.5178888",
"0.51773643",
"0.51678854",
"0.51639664",
"0.5157282",
"0.51529956",
"0.51482344",
"0.5146908",
"0.514484",
"0.5144512",
"0.5136043",
"0.5133172",
"0.51323503",
"0.5129199",
"0.5116568",
"0.51152176",
"0.5114573",
"0.51131237",
"0.5112919",
"0.5110848",
"0.5108748",
"0.51053774",
"0.5103947",
"0.5101396",
"0.5095887",
"0.5095445",
"0.5091909",
"0.50709236",
"0.5066349",
"0.50618434",
"0.50618434",
"0.50554913",
"0.5055068",
"0.5051854"
]
| 0.6475666 | 0 |
method return all sorted revert teachers using oracle package | @GetMapping("/sort-desc")
public List<TeacherDTO> getSortedRevertTeachers() {
return teacherService.getSortedRevertTeachers().stream()
.map(this::convertToDto)
.collect(Collectors.toList());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"LiveData<List<Recommendation>> getAllRecsSortRefreshed() {\n allRecs = recommendationRepository.getAllRecsSortRefreshed();\n return allRecs;\n }",
"List<StatementsWithSorting> selectAll();",
"private ArrayList<Teacher> sortTeacherByPriorty(ArrayList<Teacher> teachers, ArrayList<Integer> preferedTeachers, int numSections) {\n ArrayList<Teacher> aux = new ArrayList<>();\r\n if (preferedTeachers.isEmpty()) {\r\n return aux;\r\n }\r\n\r\n for (int i = 0; i < numSections; i++) {\r\n Teacher teacher = findTeacher(teachers, preferedTeachers.get(i % preferedTeachers.size()));\r\n aux.add(teacher);\r\n }\r\n return aux;\r\n }",
"public static void main(String[] args) {\n TreeSet<String> ts = new TreeSet<>(new MyComp().reversed());\n\n ts.add(\"C\");\n ts.add(\"B\");\n ts.add(\"A\");\n ts.add(\"G\");\n ts.add(\"Z\");\n ts.add(\"Q\");\n\n for (String element : ts){\n System.out.print(element);\n }\n }",
"@GetMapping(\"/sort-asc\")\n public List<TeacherDTO> getSortedTeachers() {\n return teacherService.getSortedTeachers().stream()\n .map(this::convertToDto)\n .collect(Collectors.toList());\n }",
"public List<WebRecommendation> findAllOrderBySequence();",
"public void sortProposals() {\n\n\t}",
"@Override\n\tpublic List<Translator> findAll(Sort sort) {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void sortir() {\n\t\tif (!estVide()) {\n\t\t\tTC next = getProchain();\t\t\t\t//On recupere le prochain\n\t\t\tsalle.get(next.getPrio()).remove(next);\t//Antinomie de entrer\n\t\t}\n\t}",
"protected void ucitajSortiranoPoBrojRez() {\n\t\tObject[]redovi=new Object[9];\r\n\t\tdtm.setRowCount(0);\r\n\t\t\r\n\t\tfor(Rezervacije r:alSort) {\r\n\t\t\t\r\n\t\t\tredovi[0]=r.getID_Rez();\r\n\t\t\tredovi[1]=r.getImePrezime();\r\n\t\t\tredovi[2]=r.getImePozorista();\r\n\t\t\tredovi[3]=r.getNazivPredstave();\r\n\t\t\tredovi[4]=r.getDatumIzvodjenja();\r\n\t\t\tredovi[5]=r.getVremeIzvodjenja();\r\n\t\t\tredovi[6]=r.getScenaIzvodjenja();\r\n\t\t\tredovi[7]=r.getBrRezUl();\r\n\t\t\tredovi[8]=r.getCenaUlaznica();\r\n\t\t\tdtm.addRow(redovi);\r\n\t\t}\r\n\t}",
"public void sortAllRows(){\n\t\t/* code goes here */ \n\t\t\n\t\t\n\t\t//WHY SHOULD THEY BE SORTED LIKE THE EXAMPLE SAYS???????\n\t\t\n\t}",
"public static List<Recette> getAllRecettes() {\n\t\tList<Recette> listeRecette = new ArrayList<Recette>();\n\t\tSet<Recette> tempListe = new TreeSet<Recette>();\n\t\tfor (Entity entity : getAllEntities()) {\n\t\t\ttempListe.add(getRecette(entity));\n\t\t}\n\t\tlisteRecette.addAll(tempListe);\n\t\treturn listeRecette;\n\t}",
"public static void main(String[] args) {\n\t// write your code here\n System.out.println(\"Welcome to Frontline Electronics :\");\n admin();\n customer();\n /* for (int i =0; i<ll.size();i++) {\n System.out.println(ll.get(i));\n }*/\n // System.out.println(ll.getLast());\n Iterator it = pal.iterator();//.descendingIterator();\n while (it.hasNext())\n {\n System.out.println(it.next());\n }\n\n }",
"private void skrivOversikt() {\n System.out.println(\"\\n- Leger -\\n\");\n for (Lege lege : leger){\n System.out.println(lege);\n }\n\n System.out.println(\"\\n- Pasienter -\");\n for (Pasient pasient : pasienter){\n System.out.println(\"\\n\" + pasient);\n }\n\n System.out.println(\"\\n- Legemidler -\");\n for (Legemiddel legemiddel : legemidler){\n System.out.println(\"\\n\" + legemiddel);\n }\n\n System.out.println(\"\\n- Resepter -\");\n for (Resept resept : resepter){\n System.out.println(\"\\n\" + resept);\n }\n }",
"public String sortOrder();",
"public List<Chemin> getSortants() {\n return sortants;\n }",
"public String doSort();",
"public void sortieBloc() {\n this.tableLocaleCourante = this.tableLocaleCourante.getTableLocalPere();\n }",
"@Override\n\tpublic List<Spittle> findAllSorted() {\n\t\treturn null;\n\t}",
"@Override\n public Collection<ExchangeTradedFund> getAllExchangeTradedFunds() {\n return exchangeTradedFundRepository.findAllSorted();\n }",
"public static void main(String[] args) {\n\t\tSet<String> lista = new TreeSet<>();\n\t\t\tlista.add(\"vermelho\");\n\t\t\tlista.add(\"verde\");\n\t\t\tlista.add(\"verde\");\n\t\t\tlista.add(\"amarelo\");\n\t\t\n\t\tSystem.out.println(lista);\n\t\t\n\t\t//Result.: mostrou na ordem invertida\n\t}",
"@Override\n public ImmutableList<Id> topsortIdList() {\n return idDag.topsortIdList();\n }",
"void decreaseSortLetter();",
"public List getTrabajadores();",
"private static List<StudentRecord> vratiSortiranuListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getGrade() == 5)\n\t\t\t\t\t\t.sorted(StudentRecord.BY_POINTS.reversed())\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t}",
"public List<Idea> allIdeasLikersDesc() {\n\n List<Idea> ideas = ideaRepo.findAll();\n\n ideas.sort(new Comparator<Idea>() {\n @Override\n public int compare(Idea i1, Idea i2) {\n if(i1.getLikers().size() == i2.getLikers().size()){\n return 0;\n }\n return i1.getLikers().size() > i2.getLikers().size() ? -1 : 1;\n }\n });\n\n return ideas;\n }",
"public ArrayList<Player> getLeaderboard() {\n ArrayList<Player> result = new ArrayList(players);\n for (Player player : players) {\n Collections.sort(result);\n Collections.reverse(result);\n }\n return result;\n}",
"@Override\r\n\tpublic List<Gjjtqyyb> findtqyy() {\n\t\treturn tqyydao.findall();\r\n\t}",
"List<Teacher> selectAll();",
"public List<Revista> getRevistas(){\n List<Revista> revistas = new ArrayList<>();\n Revista r = null;\n String id, nome, categoria, nrConsultas, editorID, empresaID;\n LocalDate edicao;\n\n\n try {\n connection = con.connect();\n PreparedStatement stm = connection.prepareStatement(\"SELECT * FROM Revista\");\n ResultSet rs = stm.executeQuery();\n\n while(rs.next()){\n id = rs.getString(\"ID\");\n nome = rs.getString(\"Nome\");\n edicao = rs.getDate(\"Edicao\").toLocalDate();\n categoria = rs.getString(\"Categoria\");\n nrConsultas = rs.getString(\"NrConsultas\");\n editorID = rs.getString(\"Editor_ID\");\n empresaID = rs.getString(\"Empresa_ID\");\n r = new Revista(id,nome,edicao,categoria,nrConsultas,editorID,empresaID);\n revistas.add(r);\n }\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n finally{\n con.close(connection);\n }\n return revistas;\n }",
"public void sortCompetitors(){\n\t\t}",
"void sortUI();",
"public static void main(String[] args) {\nArrayList<String>names=new ArrayList<String>();\r\nnames.add(\"Volve\");\r\nnames.add(\"BMW\");\r\nnames.add(\"Audi\");\r\nnames.add(\"Benz\");\r\nSystem.out.println(names);\r\nCollections.sort(names);\r\nSystem.out.println(names);\r\nSystem.out.println(Collections.binarySearch(names,\"i10\"));\r\nCollections.reverse(names);\r\nSystem.out.println(names);\r\n\r\nTreeSet<String>ts=new TreeSet<String>();\r\nts.add(\"ram\");\r\nts.add(\"jai\");\r\nts.add(\"sandy\");\r\nts.add(\"jam\");\r\nts.add(\"sim\");\r\nSystem.out.println(ts);\r\nTreeSet<String>rev=(TreeSet<String>)ts.descendingSet();\r\nSystem.out.println(ts);\r\nSystem.out.println(ts.contains(\"santhosh\"));\r\n\r\n\r\n\t}",
"public List<String> revList(RevSort[] sortings, String fromRev, String toRev, Date fromDate, Date toDate, int maxLines) \n \tthrows IOException {\n \t\tList<String> revisions = new ArrayList<String>();\n \t\tList<RevCommit> revs = getRevCommits(sortings, fromRev, toRev, fromDate, toDate, maxLines);\n \n \t\tfor (RevCommit c : revs) {\n \t\t\trevisions.add(c.getId().name());\n \t\t}\n \t\treturn revisions;\n \t}",
"List<Athlete> getAllOrderByScore(OrderBy orderBy);",
"public ArrayList<String> mostraRegles(){\n ArrayList<String> tauleta = new ArrayList<>();\n String aux = reg.getAssignacions().get(0).getAntecedents().getRangs().get(0).getNom();\n for (int i=1; i<list.getAtribs().size(); i++){\n aux += \"\\t\" + list.getAtribs().get(i).getNom();\n }\n tauleta.add(aux);\n for (int j=0; j<list.getNumCasos(); j++) {\n aux = list.getAtribs().get(0).getCasos().get(j);\n for (int i = 1; i < list.getAtribs().size(); i++) {\n aux += \"\\t\" + list.getAtribs().get(i).getCasos().get(j);\n }\n tauleta.add(aux);\n }\n return tauleta;\n }",
"public void move_elevator() {\n\n // Sort in descending order\n\n int temp;\n int n = passengers.size();\n\n\n\n\n\n\n }",
"public List findVerses(int chapt) {\n if (testament.equals(\"old\")) {\n try {\n //if its old testament then open old testament folder\n this.scan = new Scanner(new File(\"Old Testament\\\\\" + BookModel.old[chapter][0] + \".txt\"));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Finder.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n } else if (testament.equals(\"new\")) {\n try {\n //if its new testament then open new testament folder\n this.scan = new Scanner(new File(\"New Testament\\\\\" + BookModel.newT[chapter][0] + \".txt\"));\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Finder.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n }\n //compile pattern object with a digit regex which finds numeric digits\n Pattern p = Pattern.compile(\"(\\\\d+)\");\n Matcher m;\n list = new ArrayList();\n int numb;\n //loop through each line in the selected file\n while (scan.hasNext()) {\n String txt = scan.nextLine();\n m = p.matcher(txt);\n m.find();\n //check if the line starts with a numbered book so as to loop twice to get the chapter\n if (txt.startsWith(\"1\", 2) || txt.startsWith(\"2\", 2) || txt.startsWith(\"3\", 2)) {\n //call find again to get the chapter as the second number and assign the chapter to numb\n m.find();\n numb = Integer.parseInt(m.group());\n if (chapt == numb) {\n //call find again to get the verse so as to edit the line\n m.find();\n txt = txt.substring(m.end() + 1, txt.length() - 1);\n //add edited text to list\n list.add(m.group() + \". \" + txt);\n }\n } //if the book is not nuumbered get the chapter from the first find\n else {\n numb = Integer.parseInt(m.group());\n if (chapt == numb) {\n //call find again to get the verse number so as to edit the line\n m.find();\n txt = txt.substring(m.end() + 1, txt.length() - 1);\n //add edited text to list\n list.add(m.group() + \". \" + txt);\n }\n }\n }\n\n scan.close();\n return list;\n }",
"public List<Artikel> getArtikelBestandSortiertNachBezeichnung() {\n\t\tList<Artikel> ergebnis = new Vector<Artikel>();\n\t\tergebnis.addAll(artikelBestand);\n\t\tCollections.sort(ergebnis, new SortierungNachBezeichnung());\n\t\treturn ergebnis;\n\t}",
"List<Employee> sort(Sorting selectedSortColoumn) throws SQLException;",
"public static void runExercise8() {\n List <Integer> years = students.stream().map(student -> student.getBirthYear()).sorted(Comparator.reverseOrder()).collect(Collectors.toList());\n System.out.println(years);\n }",
"@Override\n\tpublic List findUncheckedOrder() {\n\t\treturn jewelOrderDao.selectUncheckedOrder();\n\t}",
"public String sortBy();",
"public static void main(String[] args) {\n\t\tEmployee e=new Employee(104, \"vik\");\r\n\t\tEmployee e1=new Employee(105, \"wik\");\r\n\t\tEmployee e2=new Employee(101, \"xik\");\r\n\t\tEmployee e3=new Employee(102, \"yik\");\r\n\t\tEmployee e4=new Employee(103, \"zik\");\r\n\t\tArrayList<Employee>al=new ArrayList<>();\r\n\t\tal.add(e);\r\n\t\tal.add(e1);\r\n\t\tal.add(e2);\r\n\t\tal.add(e3);\r\n\t\tal.add(e4);\r\n\tSystem.out.println(al);\r\n\tCollections.sort(al);// ArrayList is not ascending order so in order to do sorting we need to use .sort {its default in TreeSet so in TreeSet we don't write .sort method to sort}\r\n\tfor(Employee em:al)\r\n\t{\r\n\t\tSystem.out.println(em.getEno()+\" \"+em.getEname());\r\n\t}\r\n\t}",
"@Produces(MediaType.APPLICATION_JSON)\n @Override\n public List<Teacher> getAllTeachers() {\n List<Map<String, Object>> teachersIds = getJdbcTemplate().queryForList(sqlGetAllTeachersIds);\n if (teachersIds.size() == 0) {\n return null;\n }\n // find list of lessons by ID's\n List<Teacher> resultTeachers = new ArrayList<>();\n for (Map<String, Object> teacherId : teachersIds) {\n resultTeachers.add(getTeacherById((int) teacherId.get(\"id\")));\n }\n return resultTeachers;\n }",
"public List findChapters() {\n chap = new ArrayList();\n int c_count = 0;\n //check if testament is old \n if (testament.equals(\"old\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.old[chapter][1]);\n } //check if testament is new \n else if (testament.equals(\"new\")) {\n //assign the value of the number of chapters to c_count\n c_count = Integer.parseInt(BookModel.newT[chapter][1]);\n }\n\n //add chapter number to a string for each chapter\n for (int y = 1; y <= c_count; y++) {\n chap.add(\"Chapter \" + y);\n }\n //return a list of chapters for the selected book\n return chap;\n }",
"SiteLotteryOdds getOddBetSortLine(String code ,Integer siteId,String hid,String betSort);",
"public String sort() throws DatabaseException {\n //doesn't do anything\n return this.tableName;\n\n }",
"@Override\r\n\tpublic List<BingTu> selectTeaByRR_NameAndCount() {\n\t\treturn teachersDao.selectTeaByRR_NameAndCount();\r\n\t}",
"public abstract void sort() throws RemoteException;",
"public List<Artikel> getArtikelBestandSortiertNachArtikelnummer() {\n\t\tList<Artikel> ergebnis = new Vector<Artikel>();\n\t\tergebnis.addAll(artikelBestand);\n\t\tCollections.sort(ergebnis, new SortierungNachArtikelnummer());\n\t\treturn ergebnis;\n\t}",
"public void sortMatches();",
"@Override\n public List<Client> clientsSortedByMoneySpent(){\n log.trace(\"clientsSortedByMoneySpent -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getMoneySpent).reversed()).collect(Collectors.toList());\n log.trace(\"clientsSortedByMoneySpent: result={}\", result);\n return result;\n }",
"@Override\r\n\tpublic Collection<TVA> obtenirTousTVA() {\n\t\treturn null;\r\n\t}",
"public void sort() {\n }",
"private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }",
"public String getSortOrder();",
"List<E> findAll(Sort sort);",
"public void changeSortOrder();",
"@Override\n public LinkedList<String> orderAlphabetically(){\n LinkedList<String> stringLL = super.orderAlphabetically();\n stringLL.add(\"Years Until Tenure: \" + m_yearsUntilTenure);\n Collections.sort(stringLL);\n return stringLL;\n }",
"@Test(dependsOnMethods = \"verifyAmountSortTest\")\r\n\tpublic void verifyPayerSortTest() throws InterruptedException {\n\t\tcarrierschedulepayment.clickPayerColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tfirstRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// click Payer Column to change sort from ascending to descending\r\n\t\tcarrierschedulepayment.clickPayerColumn();\r\n\t\t// click first row to expand\r\n\t\tcarrierschedulepayment.clickFirstRow();\r\n\t\t// get the data elements from the first row displayed\r\n\t\tlastRowData = carrierschedulepayment.getFirstRowData();\r\n\t\t// verify row data exists\r\n\t\tAssert.assertNotNull(firstRowData, \"First Row Data: \\n\" + firstRowData);\r\n\t\tAssert.assertNotNull(lastRowData, \"\\nLast Row Data: \\n\" + lastRowData);\r\n\t}",
"@Override\r\n\tpublic List<Teacher> findallTeachers() throws Exception {\n\t\ttry {\r\n\t\t\treturn this.dao.findallTeachers();\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t}",
"List<ExamPackage> getListExercise();",
"@Override\r\n\tpublic ArrayList<Sort> selectAll() {\n\t\tResultSet rs;\r\n\t\tConnection conn = db.getConnection();\r\n\t\tArrayList<Sort> list=new ArrayList<Sort>();\r\n\t\tString sql = \"select * from movie_sort\";\r\n\t\tPreparedStatement pstmt;\r\n\t\ttry {\r\n\t\t\tpstmt = conn.prepareStatement(sql);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\t list.add(new Sort(rs.getString(1), rs.getInt(2)));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {//현재 메서드가 종료하기 전에 꼭 실행해야하는 코드 작성\r\n\t\t\tdb.disConn();\r\n\t\t}\r\n\t\treturn list;\r\n\t}",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> unsort =new ArrayList<Integer>();\n\t\tunsort.add(21);\n\t\tunsort.add(24);\n\t\tunsort.add(42);\n\t\tunsort.add(29);\n\t\tunsort.add(23);\n\t\tunsort.add(13);\n\t\tunsort.add(8);\n\t\tunsort.add(39);\n\t\tunsort.add(38);\n\t\t\n\t\tArrayList<Card> cards = new ArrayList<Card>();\n\t\tcards.add(new Card(\"Heart\",13));\n\t\tcards.add(new Card(\"Heart\",2));\n\t\tcards.add(new Card(\"Heart\",4));\n\t\t\n\t\tArrayList<Card> sort = Sort.insertSort(cards,false);\n\t\t\n\t\tfor(Card i: sort) \n\t\t{\n\t\t\tSystem.out.println(i.getNumber());\n\t\t}\n\t\t\n\t}",
"@Override\n public List<Client> clientsSortedAlphabetically(){\n log.trace(\"clientsSortedAlphabetically -- method entered\");\n Iterable<Client> clients = clientRepository.findAll();\n List<Client> result = StreamSupport.stream(clients.spliterator(),false).sorted(Comparator.comparing(Client::getName)).collect(Collectors.toList());\n log.trace(\"clientsSortedAlphabetically: result={}\", result);\n return result;\n\n }",
"@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tTreeSet<Employee> list=new TreeSet<Employee>();\r\n\t\tlist.add(new Employee(1,\"Nisha\",\"Dhore\"));\r\n\t\tlist.add(new Employee(3,\"Shamal\",\"Dambe\"));\r\n\t\tlist.add(new Employee(4,\"Ravi\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(2,\"Ram\",\"Astarkar\"));\r\n\t\tlist.add(new Employee(1,\"Manisha\",\"Oberoys\"));\r\n\t\t\r\n\t\t\r\n//\t\tTreeSet<Integer> t=new TreeSet();\r\n//\t\tt.add(1);\r\n//\t\tt.add(7);\r\n//\t\tt.add(5);\r\n//\t\tSystem.out.println(\"id sort\");\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"-------sort asce by id\"+list);\r\n//\t\tCollections.sort(list, new ComparatorId());\r\n//\t\tSystem.out.println(\"------After sort\"+list);\r\n//\t\t\r\n\t\tSystem.out.println(\"lastname sorting\");\r\n\t\t\r\n\t\tList<Employee> l=new ArrayList<Employee>(list);\r\n\t\tCollections.sort(l, new ComparatorFirstName());\r\n\t\tSystem.out.println(\"------After sort\"+l);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public NSArray tosRepartFdpComp() {\n\t\tNSArray tosRepartFdpComp = super.tosRepartFdpComp();\n\t\treturn CktlSort.sortedArray(tosRepartFdpComp, EORepartFdpComp.RFC_POSITION_KEY);\n\t}",
"private void viewTeachers() {\n Iterable<Teacher> teachers = ctrl.getTeacherRepo().findAll();\n teachers.forEach(System.out::println);\n }",
"List<TeacherRecord> getTeachers(String clientId) throws Exception;",
"public static void main(String[] args) {\n//\t\tcrearNodos(cantNodos);\n//\t\tlista.extractFront();\n//\t\tlista.extractLast();\n//\t\tlista.insertLast(33);\n//\t\tlista.imprimir();\n//\t\t//System.out.print(lista.get(0));\n//\t\t\n//\t\tIterator<Integer> it1 = lista.iterator();\n//\t\t\twhile(it1.hasNext()) {\n//\t\t\t\tint valor = it1.next();\n//\t\t\t\tSystem.out.println(valor);\n//\t\t\t}\n//\t\tMyIterator<Integer> it2 = lista.iteratorReverse();\n//\t\t\twhile(it2.hasNext()) {\n//\t\t\t\tint valor = it2.back();\n//\t\t\t\tSystem.out.println(valor);\n//\t\t\t}\n\n\t\tlistaDeso1.insertFront(4);\n\t\tlistaDeso1.insertFront(2);\n\t\tlistaDeso1.insertFront(13);\n\t\tlistaDeso1.insertFront(7);\n\t\tlistaDeso1.insertFront(6);\n\n\t\tlistaDeso2.insertFront(9);\n\t\tlistaDeso2.insertFront(4);\n\t\tlistaDeso2.insertFront(6);\n\t\tlistaDeso2.insertFront(5);\n\t\tlistaDeso2.insertFront(13);\n\n//\t\tlistaOrde1.insertFront(2);\n//\t\tlistaOrde1.insertFront(4);\n//\t\tlistaOrde1.insertFront(6);\n//\t\tlistaOrde1.insertFront(8);\n//\t\tlistaOrde1.insertFront(11);\n//\t\t\n//\t\tlistaOrde2.insertFront(1);\n//\t\tlistaOrde2.insertFront(4);\n//\t\tlistaOrde2.insertFront(9);\n//\t\tlistaOrde2.insertFront(11);\n//\t\tlistaOrde2.insertFront(15);\n\t\t\n\t\tEje6<Integer> ord = new Eje6<Integer>();\n\t\t\n\t\tlista=ord.ambasDeso(listaDeso1, listaDeso2);\n\t}",
"public ArrayList<Transaction> isRenting(){\n ArrayList<Transaction> renting= new ArrayList<Transaction>();\n for(int i=0;i< Library.Transactions.size();i++){\n //transaction book title equals the book returning\n if((Library.Transactions.get(i).getUsername().equals(this.getUserName()))&&(Library.Transactions.get(i).getReturndate()==null)){\n renting.add(Library.Transactions.get(i));\n }\n }\n return renting;\n\t}",
"List<Trade> getAllTrades();",
"public List<Idea> allIdeasLikersAsc() {\n\n List<Idea> ideas = ideaRepo.findAll();\n\n ideas.sort(new Comparator<Idea>() {\n @Override\n public int compare(Idea i1, Idea i2) {\n if(i1.getLikers().size() == i2.getLikers().size()){\n return 0;\n }\n return i1.getLikers().size() < i2.getLikers().size() ? -1 : 1;\n }\n });\n\n return ideas;\n\n }",
"public List reverseTopologicalSort( ){\r\n return this.topologicalsorting.reverseTraverse();\r\n }",
"public List<Team> getAllOrdered() {\n TeamDB tdb = new TeamDB();\n return tdb.getAllOrdered();\n }",
"public static ArrayList<Teacher> getAllDocenti() {\n\t\ttry {\n\t\t\tRequestContent rp = new RequestContent();\n\t\t\trp.type = RequestType.GET_ALL_TEACHERS;\n\t\t\tReceiveContent rp1 = sendReceive(rp);\n\t\t\tArrayList<Teacher> lis = (ArrayList<Teacher>) rp1.parameters[0];\n\t\t\treturn lis;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn new ArrayList<Teacher>();\n\t}",
"public ArrayList<Question> getQuestionsSortedByLastChangedDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new ChangedDateComparator());\n \n \t\treturn sortedQuestions;\n \t}",
"public List<PrioridadTicket> obtenerTodasLasPrioridades() {\n return this.prioridadTicketFacade.findAll();\n }",
"@Test\r\n public void descendingSetIterator() throws Exception {\r\n TreeSet<Integer> kek = new TreeSet<>();\r\n kek.addAll(sInt);\r\n TreeSet<Integer> check = (TreeSet<Integer>) kek.descendingSet();\r\n Object[] arr1 = kek.toArray();\r\n Object[] arr2 = check.toArray();\r\n for (int i = 0; i < arr1.length; i++) {\r\n assertEquals(arr1[i], arr2[arr1.length - 1 - i]);\r\n }\r\n }",
"public static void main(String[] args) {\n Set<String> list = new TreeSet<>();\n list.add(\"Song\");\n list.add(\"Album\");\n list.add(\"Artist\");\n list.add(\"Year\");\n list.add(\"Genre\");\n list.add(\"Song\");\n list.add(\"Song\");\n\n System.out.println();\n for(String x : list){\n System.out.println(x);\n }\n\n //NO REPITTED VALUES AND ASCENDED ORDER WHIT COMPARABLE, HASHCODE AND EQUALS\n Set<Persona> list2 = new TreeSet<>();\n list2.add(new Persona(1, \"Rayman\"));\n list2.add(new Persona(2, \"Castlevania\"));\n list2.add(new Persona(3, \"Silent Hill\"));\n list2.add(new Persona(4, \"Silent Hill\"));\n list2.add(new Persona(1, \"Rayman\"));\n\n System.out.println();\n for(Persona x : list2){\n System.out.println(x.getId() + \" - \" + x.getName());\n }\n }",
"List<AlgCollation> getCollationList();",
"@Override\n\tpublic List getPaperCompare(int teaId) {\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\r\n\t\tAlunoTreinar alunoTreinar = new AlunoTreinar();\r\n\t\t\r\n\t\talunoTreinar.setNome(\"Teste\");\r\n\t\talunoTreinar.setCpf(123);\r\n\t\talunoTreinar.setNome(\"Albert\");\r\n\t\talunoTreinar.setCpf(321)\r\n\t\t\r\n\t\tList<String> lista = new ArrayList<>();\r\n\t\tlista.add(alunoTreinar.toString());\r\n\t\t\r\n\t\tSystem.out.print(lista.get(0));\r\n\t\t\r\n\t\tCollections.sort(lista);\r\n\t\t\r\n\t\tfor (alunoTreinar AlunoTreinar : lista) {\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.out.print(lista);\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public List<String> getAllEncumberedTo() {\n\t\tList<String> list = new LinkedList<String>();\n\t\ttry {\n\t\t\tStatement st = Database.getInstance().getDBConn().createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT DISTINCT v.encumbered_to FROM vehicles v ORDER BY v.encumbered_to ASC\");\n\t\t\t\n\t\t\twhile(rs.next()) {\n\t\t\t\tlist.add(rs.getString(\"v.encumbered_to\"));\n\t\t\t}\n\t\t\t\n\t\t\tst.close();\n\t\t\trs.close();\n\t\t} catch(Exception err) {\n\t\t\terr.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"@Override\n public List<Client> sortByNameAndID(){\n return null;\n }",
"public List<Theater> findPreferedTheaterListByUserNo(int user_no) throws Exception;",
"public Run sortRun(Run run) throws DatabaseException {\n //Doesn't do anything\n return run;\n }",
"public void cmdRevert(User teller) {\n exit(6, \"Reverting to prior release at the request of {0}. I''ll be right back!\", teller);\n }",
"public void sort() // sort according to primary key defined in RecordTemplate\n\t{\n\t\trecordList.sort((Record r1, Record r2)->r1.getValue(PRIMARY_KEY_FIELD_INDEX).compareTo(r2.getValue(PRIMARY_KEY_FIELD_INDEX))); \n //recordList.forEach((r)->System.out.println(r)); \n\t}",
"void sortV();",
"public void sortKnowledgeBase()\n {\n int i;\n Random random;\n String aPredicate;\n StringTokenizer tokenizer;\n //------------\n random = new Random();\n i = 0;\n while (i < knowledgeBase.size())\n {\n aPredicate = knowledgeBase.get(i).commitments.get(0).predicate;\n tokenizer = new StringTokenizer(aPredicate,\"(), \");\n if(tokenizer.nextToken().equals(\"secuencia\"))\n knowledgeBase.get(i).priority = random.nextInt(100);\n //end if\n else\n knowledgeBase.get(i).priority = random.nextInt(10000);\n //end else\n i = i + 1;\n }//end while\n Collections.sort(knowledgeBase);\n }",
"public static void main(String[] args) {\n String [] folge = {\"ab\",\"cd\", \"aa\"};\n new SortierenBeiEinfugen().sortiereAbsteigend(folge);\n System.out.println(Arrays.toString(folge));\n new SortierenBeiEinfugen().sortiereAufsteigend(folge);\n System.out.println(Arrays.toString(folge));\n\n\n\n\n\n\n int[] feld = {2,8,5,6,3,1,4,7};\n\n int countVergleich=0;\n int countTausch = 0;\n for (int i = 0; i < feld.length; i++) {\n for (int j = i; j > 0 ; j--) {\n countVergleich++;\n if (feld[j - 1]>(feld[j]) ) {\n int temp = feld[j];\n feld[j] = feld[j - 1];\n feld[j - 1] = temp;\n countTausch++;\n } else {\n System.out.println(countVergleich);\n System.out.println(countTausch);\n break;\n }\n }\n }\n }",
"public boolean verifyTableSort(String colomName){\n\t\t\t\t\t\n\t\tTestLog.log.info(\"verification sort according to the colom \");\n\t\tboolean flag = false;\n\t\t\n List<String> expColom = new ArrayList();\n \n List<String> actColom = new ArrayList();\n \n List<String> tempColom = new ArrayList();\n \n try{\n\t\t\tTestLog.log.info(\"get the elements to an arrey\"); \n \n if(colomName.contains(\"User ID\")){\n \tList<WebElement> elementUserID= driver.findElements(By.xpath(\"//tbody/tr/td[2]\"));\n \t\n \tfor(WebElement ele: elementUserID){\n \t\texpColom.add(ele.getText());\n \t\tactColom.add(ele.getText());\n \t\t\n \t}\n \t\n \tTestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom,new Comparator<String>() {\n\n\t\t\t\tpublic int compare(String o1, String o2) {\n\t\t\t\t\t\tint a = Integer.parseInt(o1);\n\t\t\t\t\t\tint b = Integer.parseInt(o2);\n\t\t\t\t\t\t\n\t\t\t\t\treturn a-b;\n\t\t\t\t}\n\t\t\t});\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String i:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"User ID coloum sorted\");\n flag=true;\n break; \n\n }\n \t}\n \t\n }else if(colomName.contains(\"User Name\")){\n \tList<WebElement> elementUserID= driver.findElements(By.xpath(\"//tbody/tr/td[3]\"));\n \t\n \tfor(WebElement ele: elementUserID){\n \t\texpColom.add(ele.getText());\n \t\tactColom.add(ele.getText());\n \t}\n \t\n \tTestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom);\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String i:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"User Name coloum sorted\");\n flag=true;\n break; \n\n }\n TestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom);\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String j:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"User Name coloum sorted\");\n flag=true;\n break; \n\n }\n \t} \n \t}\n }else if(colomName.contains(\"First Name\")){\n \tList<WebElement> elementUserID= driver.findElements(By.xpath(\"//tbody/tr/td[4]\"));\n \t\n \tfor(WebElement ele: elementUserID){\n \t\texpColom.add(ele.getText());\n \t\tactColom.add(ele.getText());\n \t}\n TestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom);\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String j:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"First Name coloum sorted\");\n flag=true;\n break; \n\n }\n \t} \n }else if(colomName.contains(\"Last Name\")){\n \tList<WebElement> elementUserID= driver.findElements(By.xpath(\"//tbody/tr/td[5]\"));\n \t\n \tfor(WebElement ele: elementUserID){\n \t\texpColom.add(ele.getText());\n \t\tactColom.add(ele.getText());\n \t}\n TestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom);\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String k:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"Last Name coloum sorted\");\n flag=true;\n break; \n\n }\n \t} \n }else if(colomName.contains(\"Job Role\")){\n \tList<WebElement> elementUserID= driver.findElements(By.xpath(\"//tbody/tr/td[6]\"));\n \t\n \tfor(WebElement ele: elementUserID){\n \t\texpColom.add(ele.getText());\n \t\tactColom.add(ele.getText());\n \t}\n TestLog.log.info(\"sort according to the colom as expected\");\n \tCollections.sort(expColom);\n \tSystem.out.println(expColom);\n \tSystem.out.println(actColom);\t\n \t\n \t\n \tfor (String l:expColom) {\n \n if ((expColom.equals(actColom))) {\n System.out.println(\"Job Role coloum sorted\");\n flag=true;\n break; \n\n }\n \t} \n } else {System.out.println(\"coloum does not exist\");}\n \n }catch (Exception ex) {\n\t\t\tTestLog.log.info(\"Coloum not sorted:\" + ex);\n\t\t}\n\t\t\n\t\treturn flag;\n\t}",
"@Override\n public int compare(Chapter t, Chapter t1) {\n //return Long.valueOf(t.getDate()).compareTo(t1.getDate());\n return Integer.valueOf(t1.getNumber()).compareTo(t.getNumber());\n }",
"public void sortElements(){\n\t\tgetInput();\n\t\tPeople[] all = countAndSort(people, 0, people.length-1);\n\t\t//PrintArray(all);\n\t\tSystem.out.println(InversionCount);\n\t}",
"public String listResearchers();",
"@Override\r\n\tpublic ArrayList<Object> getAllStu_result() {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tArrayList<Object> list = new ArrayList<Object>(); // 考卷集合\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result order by stu_r_id desc;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\tlist.add(stu_r);// 把一个考试试卷加入集合\r\n\t\t\t}\r\n\t\t\treturn list; // 返回集合。\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private Iterator<Pintavel> getIRPintaveis() {\n\t\treturn pintaveis.descendingIterator();\n\t}"
]
| [
"0.5569337",
"0.54326546",
"0.5369069",
"0.53171957",
"0.5306997",
"0.52942455",
"0.5291552",
"0.52805907",
"0.52732146",
"0.52446973",
"0.52133226",
"0.5207644",
"0.5188922",
"0.51743984",
"0.51677",
"0.51388574",
"0.51361495",
"0.5108931",
"0.50932705",
"0.50930566",
"0.50919026",
"0.50881684",
"0.50634885",
"0.50607127",
"0.5037244",
"0.5021878",
"0.5016905",
"0.49979138",
"0.49917707",
"0.49646157",
"0.49548012",
"0.49547824",
"0.4951066",
"0.4939516",
"0.49388957",
"0.4919594",
"0.49059093",
"0.48845622",
"0.4877233",
"0.48731846",
"0.48730615",
"0.48721328",
"0.4871033",
"0.48702845",
"0.48631862",
"0.48625073",
"0.48611492",
"0.48573565",
"0.4853193",
"0.48492256",
"0.4847444",
"0.48458645",
"0.484245",
"0.48407638",
"0.48347113",
"0.483042",
"0.48245722",
"0.48159027",
"0.48103204",
"0.47968376",
"0.47765207",
"0.47724178",
"0.4769998",
"0.47657907",
"0.47614086",
"0.4759805",
"0.47546667",
"0.47529927",
"0.47528276",
"0.47450024",
"0.47433013",
"0.47418454",
"0.47296825",
"0.47261634",
"0.4723478",
"0.47230852",
"0.47205004",
"0.4719038",
"0.47137466",
"0.47127628",
"0.47081932",
"0.47017726",
"0.47016633",
"0.4700068",
"0.4697133",
"0.4695847",
"0.46932295",
"0.4689886",
"0.468975",
"0.46753892",
"0.46673486",
"0.46638447",
"0.46619612",
"0.4661684",
"0.46583217",
"0.46538413",
"0.46486863",
"0.46470588",
"0.46469405",
"0.4646609"
]
| 0.6559899 | 0 |
added by Jacob Davidson | public void setTrajectoryID(int trajectoryid) {
this.trajectoryid = trajectoryid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"protected boolean func_70814_o() { return true; }",
"public void method_4270() {}",
"private static void cajas() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private void kk12() {\n\n\t}",
"private void strin() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"public void mo12628c() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"protected abstract Set method_1559();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public abstract void mo70713b();",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public abstract void mo6549b();",
"private stendhal() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void skystonePos4() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public abstract String mo13682d();",
"@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}",
"public void mo21877s() {\n }",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public abstract String mo118046b();",
"public abstract void mo27385c();",
"public abstract void mo56925d();",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo115190b() {\n }",
"void mo57277b();",
"public void mo6081a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }",
"@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}",
"java.lang.String getField1853();",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"private void m50367F() {\n }",
"public void mo12930a() {\n }",
"public abstract String mo41079d();",
"private void level7() {\n }",
"private void parseData() {\n\t\t\r\n\t}",
"public void mo21779D() {\n }",
"public void smell() {\n\t\t\n\t}",
"public abstract String mo11611b();",
"public abstract long mo9229aD();",
"public void skystonePos6() {\n }",
"public void m23075a() {\n }",
"public void mo21793R() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public abstract Object mo1185b();",
"java.lang.String getField1753();",
"public void mo21825b() {\n }",
"private SBomCombiner()\n\t{}",
"public void mo21878t() {\n }",
"public abstract void mo27386d();",
"public void mo9848a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"java.lang.String getField1873();",
"@Override\n protected void prot() {\n }",
"java.lang.String getField1773();",
"java.lang.String getField1781();",
"java.lang.String getField1784();",
"public final void mo91715d() {\n }",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"public void mo21794S() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"java.lang.String getField1673();"
]
| [
"0.562478",
"0.5473972",
"0.54549044",
"0.54067904",
"0.539698",
"0.5360954",
"0.5356728",
"0.5339144",
"0.53388065",
"0.53280026",
"0.531321",
"0.5308296",
"0.5287214",
"0.5282353",
"0.52499604",
"0.52446395",
"0.5234513",
"0.5234513",
"0.5227142",
"0.5198145",
"0.5183228",
"0.5174449",
"0.51615936",
"0.5138072",
"0.51285475",
"0.5124321",
"0.5115045",
"0.5094278",
"0.50885534",
"0.5066012",
"0.50648564",
"0.5057157",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.50360066",
"0.50302714",
"0.5028932",
"0.5017852",
"0.50124323",
"0.4998543",
"0.49962622",
"0.49939486",
"0.498992",
"0.49894634",
"0.49807334",
"0.4980262",
"0.4952597",
"0.4949496",
"0.49458027",
"0.4939267",
"0.49349844",
"0.4934193",
"0.49286124",
"0.4925748",
"0.4922339",
"0.49179953",
"0.49087924",
"0.49077082",
"0.49032295",
"0.49022573",
"0.48933625",
"0.4892534",
"0.48873726",
"0.4884669",
"0.48820204",
"0.48799032",
"0.48797038",
"0.48779064",
"0.48748899",
"0.48715264",
"0.48651063",
"0.48648393",
"0.48647907",
"0.48630217",
"0.48603192",
"0.4854214",
"0.4849226",
"0.48480436",
"0.48464063",
"0.4845284",
"0.4842829",
"0.48412645",
"0.48411313",
"0.4838656",
"0.48360375",
"0.48338875",
"0.48336005",
"0.48301008",
"0.48296115",
"0.4822214",
"0.4822183",
"0.48207402",
"0.48207387",
"0.48189172",
"0.48173526",
"0.48149455"
]
| 0.0 | -1 |
Returns the type corresponding to a name, but never throws an exception. Returns NotCarrying if a valid value could not be found. | public static Activity safeValueOf(String name) {
try {
return valueOf(name);
}
catch (Exception ex) {
return NotCarrying;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Type<?> get(String name);",
"public static Type valueOfIgnoreCase(String name) throws IllegalArgumentException {\n for(Type type: Type.values()) {\n if(type.getName().equalsIgnoreCase(name)) return type;\n }\n\n throw new IllegalArgumentException(String.format(\"Type object with the name '%s' could not be found.\", name));\n }",
"public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }",
"public Type type(String name);",
"protected Type getPokemonTypeByName(String typeName) {\n Optional<Type> type = typeDao.getTypeByName(typeName);\n if (!type.isPresent()) {\n throw new TypeNotFoundException(typeName);\n }\n return type.get();\n }",
"public String TypeOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getType();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getType();\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static byte findTypeByName(String name) {\n if (name == null) return NULL;\n else if (\"boolean\".equalsIgnoreCase(name)) return BOOLEAN;\n else if (\"byte\".equalsIgnoreCase(name)) return BYTE;\n else if (\"int\".equalsIgnoreCase(name)) return INTEGER;\n else if (\"biginteger\".equalsIgnoreCase(name)) return BIGINTEGER;\n else if (\"bigdecimal\".equalsIgnoreCase(name)) return BIGDECIMAL;\n else if (\"long\".equalsIgnoreCase(name)) return LONG;\n else if (\"float\".equalsIgnoreCase(name)) return FLOAT;\n else if (\"double\".equalsIgnoreCase(name)) return DOUBLE;\n else if (\"datetime\".equalsIgnoreCase(name)) return DATETIME;\n else if (\"bytearray\".equalsIgnoreCase(name)) return BYTEARRAY;\n else if (\"bigchararray\".equalsIgnoreCase(name)) return BIGCHARARRAY;\n else if (\"chararray\".equalsIgnoreCase(name)) return CHARARRAY;\n else if (\"map\".equalsIgnoreCase(name)) return MAP;\n else if (\"internalmap\".equalsIgnoreCase(name)) return INTERNALMAP;\n else if (\"tuple\".equalsIgnoreCase(name)) return TUPLE;\n else if (\"bag\".equalsIgnoreCase(name)) return BAG;\n else if (\"generic_writablecomparable\".equalsIgnoreCase(name)) return GENERIC_WRITABLECOMPARABLE;\n else return UNKNOWN;\n }",
"public StateType getStateTypeFromName(String name) {\n\t\tfor(StateType stateType : StateType.values()) {\n\t\t\tif(stateType.toString().equals(name)) {\n\t\t\t\treturn stateType;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static EnumMoreSwords getType(String name) {\n\n for (EnumMoreSwords swordType : values()) {\n\n if (swordType.swordName.equalsIgnoreCase(name)) {\n\n return swordType;\n }\n }\n\n Constants.LOGGER.info(\"There was an error when attempting to look up \" + name);\n return null;\n }",
"public static CoverageType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCoverageType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static Type getByHttpName(String httpName) {\n/* 126 */ if (httpName == null) return null; \n/* 127 */ return byName.get(httpName.toUpperCase(Locale.ROOT));\n/* */ }",
"public static int getType(String name) {\n if (name == null)\n return UNKNOWN_TYPE;\n Integer i = (Integer) TYPE_MAP.get(name);\n if (i != null) {\n return i.intValue();\n } else {\n return UNKNOWN_TYPE;\n }\n }",
"public static CompressorType fromString(String name) {\n for (CompressorType v : values()) {\n if (v.name().equalsIgnoreCase(name)) {\n return v;\n }\n }\n\n // cannot get here\n assert false;\n return null;\n }",
"private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }",
"public TYPE SemantMe() {\n\t\tSYM_TABLE sym_table = SYM_TABLE.getInstance();\n\t\t\n\t\t// Lookup the name\n\t\tTYPE t = sym_table.find(this.type);\n\t\t// Check it\n\t\tif (t == null || !t.isTypeName())\n\t\t {\n\t\t\t// Code bug -- type given does not exist in table or just is not a name a of a type\n\t\t\treport_error();\n\t\t }\n\t\t\t// Its fine, declare it\n\t\treturn new TYPE_VAR_DEC(t.name,this.name);\n }",
"public static TableSpaceType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTableSpaceType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"FieldType getFieldTypeByName(QName name) throws FieldTypeNotFoundException, TypeException, InterruptedException;",
"public static ResponseType getByName(String name) {\n if (name == null || name.length() < 1) {\n return ResponseType.INVALID;\n }\n name = name.trim();\n for (int i = 0; i < list.size(); i++) {\n ResponseType temp = (ResponseType) list.get(i);\n if (temp.getName().equalsIgnoreCase(name)) {\n return temp;\n }\n }\n return ResponseType.INVALID;\n }",
"@Override\n public SymbolReference<ReferenceTypeDeclaration>\n tryToSolveType(String name)\n {\n if (foundTypes.containsKey(name)) {\n return SymbolReference.solved(foundTypes.get(name));\n }\n \n SymbolReference<ReferenceTypeDeclaration> result\n = tryToSolveTypeUncached(name);\n \n if (result.isSolved()) {\n foundTypes.put(name, result.getCorrespondingDeclaration());\n }\n return result;\n }",
"public static Material getType(String name) {\n Material material = null;\n name = name.toUpperCase(Locale.ROOT).trim();\n if (!name.startsWith(\"#\")) {\n if (name.contains(NAMESPACE.toUpperCase(Locale.ROOT))) {\n name = name.split(\":\")[1];\n }\n\n name = BukkitAdapter.ADAPTER.parseLegacyName(name);\n material = Material.matchMaterial(name);\n }\n\n return material;\n }",
"public static Resource_kind getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tResource_kind result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@Override\n public SymbolReference<ResolvedReferenceTypeDeclaration> tryToSolveType(String name) {\n try {\n return foundTypes.get(name, () -> {\n SymbolReference<ResolvedReferenceTypeDeclaration> result = tryToSolveTypeUncached(name);\n if (result.isSolved()) {\n return SymbolReference.solved(result.getCorrespondingDeclaration());\n }\n return result;\n });\n } catch (ExecutionException e) {\n throw new RuntimeException(e);\n }\n }",
"public IAttributeType<?> getAttributeType(String name);",
"public static APIVersionType getByName(String name) {\n for (int i = 0; i < VALUES_ARRAY.length; ++i) {\n APIVersionType result = VALUES_ARRAY[i];\n if (result.getName().equals(name)) {\n return result;\n }\n }\n return null;\n }",
"public static JdbcTypeType getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tJdbcTypeType result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public AbsenceType findByName(String name);",
"public String KindOf(String name) {\n\t\tValues tmp = currScope.get(name);\n\t\tString kind = null;\n\t\t\n\t\tif(tmp != null)\n\t\t\treturn tmp.getKind();\n\t\t\n\t\tif(currScope != classScope) {\n\t\t\ttmp = classScope.get(name);\n\t\t\tif(tmp != null)\n\t\t\t\treturn tmp.getKind();\n\t\t}\n\t\t\n\t\treturn \"NONE\";\n\t}",
"public static PseudostateKind getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tPseudostateKind result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private TYPE getType(final String type) {\n String temp = type.replaceAll(\"-\", \"_\");\n TYPE answer = Arrays.stream(\n TYPE.values()\n )\n .filter(value -> value.name().equals(temp))\n .findFirst()\n .orElse(TYPE.unknown);\n return answer;\n }",
"public FactType getFactType(String name) {\r\n return typeRepository.getFactType(name);\r\n }",
"NamedType createNamedType();",
"private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }",
"public static HydroPlantType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tHydroPlantType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Optional<Type<?>> findFieldTypeOpt(final String name) {\n return Optional.empty();\n }",
"public static StatusType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tStatusType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Type getFieldType(String name) throws NoSuchElementException {\n return getFieldType(getIndexFromName(name));\n }",
"public static PortType getByName(String name)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n PortType result = VALUES_ARRAY[i];\n if (result.getName().equals(name))\n {\n return result;\n }\n }\n return null;\n }",
"public static TopmarkType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTopmarkType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static UserType getUserTypeByName(String name) {\n return UserType.finder.where().eq(\"name\", name).findUnique();\n }",
"public static DataType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tDataType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public ContainsNamedTypeChecker(String name) {\n myNames.add(name);\n }",
"public static Robustness getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tRobustness result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public Optional<ResolvedType> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n ResolvedType type = typeDeclaration.getField(name).getType();\n type = useThisTypeParametersOnTheGivenType(type);\n return Optional.of(type);\n }",
"public static VisualizationType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tVisualizationType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"<T> T resolve(String name, Class<T> type);",
"public Type handleTypeName(SourceLocation loc, Identifier name) {\n return lookupType(name, loc).getAliasType();\n }",
"public static RequirementType create(String name) {\n throw new IllegalStateException(\"Enum not extended\");\n }",
"private ProductType getType(String productName) {\n\n\t\tfor (Entry<ProductType, List<String>> productTypeEntry : AppConstants.PRODUCT_TYPES_MAPPER.entrySet())\n\t\t\tfor (String expectedProductName : productTypeEntry.getValue())\n\t\t\t\tif (productName.contains(expectedProductName))\n\t\t\t\t\treturn productTypeEntry.getKey();\n\n\t\treturn ProductType.ANONYMOUS;\n\n\t}",
"public Classification nameOf(String name) {\n throw new IllegalStateException(\"Unknown definition: \" + this); // basically unreachable\n }",
"public static EndConditionTypes getByName(String name)\n {\n for (int i = 0; i < VALUES_ARRAY.length; ++i)\n {\n EndConditionTypes result = VALUES_ARRAY[i];\n if (result.getName().equals(name))\n {\n return result;\n }\n }\n return null;\n }",
"public static FileType getByName(String name) {\n\t\tfor(int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tFileType result = VALUES_ARRAY[i];\n\t\t\tif(result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public <T extends Base> T findByName(Class<T> T, String name)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"private @Nullable Type resolveType(@NotNull String typeName) {\n QnTypeRef typeRef = new QnTypeRef(Qn.fromDotSeparated(typeName));\n return (Type) typesResolver.resolve(typeRef);\n }",
"public final static ScopeType getScopeTypeByName(String name) {\n if (name != null && !(name = name.replace(\" \", \"\")).isEmpty()) {\n for (ScopeType scopeType : ScopeType.values()) {\n if (scopeType.getName().equalsIgnoreCase(name)) {\n return scopeType;\n }\n }\n }\n return null;\n }",
"public TypeDefinition findInternalType(DefinitionName name){\n \treturn(internalTypeDefs.get(name));\n }",
"public static OptimallityCriterionKind getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tOptimallityCriterionKind result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Type.cpp\", line = 545,\n FQN=\"llvm::Module::getTypeByName\", NM=\"_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Type.cpp -nm=_ZNK4llvm6Module13getTypeByNameENS_9StringRefE\")\n //</editor-fold>\n public StructType /*P*/ getTypeByName(StringRef Name) /*const*/ {\n return getContext().pImpl.NamedStructTypes.lookup(new StringRef(Name));\n }",
"default Class<?> getType(String key) {\n Object v = get(key);\n return v == null ? null : v.getClass();\n }",
"public static SimulationType getSimulationType(String str) {\n for(SimulationType type: SimulationType.values()) {\n if(type.name().equalsIgnoreCase(str)) {\n return type;\n }\n }\n return null;\n }",
"<U extends T> U maybeCreate(String name, Class<U> type) throws InvalidUserDataException;",
"@Override\n public TypeImpl getType(String typeName) {\n return typeName2TypeImpl.get(typeName);\n }",
"public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }",
"public static CollectionTypes getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tCollectionTypes result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public static DsoType parse(String text) {\n DsoType result = map.get(text);\n if (result == null) {\n throw new IllegalArgumentException(\"Unknown type: '\" + text + \"'\");\n }\n return result;\n }",
"public Optional<TypeUsage> getFieldType(String name) {\n if (!typeDeclaration.hasField(name)) {\n return Optional.empty();\n }\n TypeUsage typeUsage = typeDeclaration.getField(name).getType();\n typeUsage = replaceTypeParams(typeUsage);\n return Optional.of(typeUsage);\n }",
"public T lookup( String name )\r\n {\r\n T result = null;\r\n \r\n for( HashMap<String,T> table : tables )\r\n {\r\n result = table.get( name );\r\n if( result!=null ) break;\r\n }\r\n \r\n return result;\r\n }",
"public static TypeOfContext getByName(String name) {\r\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\r\n\t\t\tTypeOfContext result = VALUES_ARRAY[i];\r\n\t\t\tif (result.getName().equals(name)) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String getType(String xmlName)\n {\n int index = getIndex(xmlName);\n \n if (index < 0)\n {\n return null;\n }\n return getType(index);\n }",
"public static YesNo nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }",
"public T get(String name) {\n\t\treturn get(name, 0);\n\t}",
"public static RegisterModuleType nameOf(String name) {\n if (name == null) { return null; }\n try { return valueOf(name); } catch (RuntimeException ignored) { return null; }\n }",
"public static Type forSymbol( String symbol ) {\n CheckArg.isNotNull(symbol, \"symbol\");\n return TYPE_BY_SYMBOL.get(symbol.toUpperCase().trim());\n }",
"@NotNull\n public static GPTModel getByName(@NotNull String name) {\n Optional<GPTModel> model = Arrays.stream(values()).filter(it -> it.name.equals(name)).findFirst();\n return model.orElse(GPT_TURBO16);\n }",
"public abstract <T> T read(String name, Class<T> clazz);",
"String provideType();",
"private void checkNamingCollisions(String typeName, JavaType type, JavaType knownType) {\n\n // If there is no existing type, or if both types are the same then there is no collision\n if (knownType == null || knownType.getRawClass().equals(type.getRawClass())) return;\n\n // Ignore date-time, since multiple classes legitimately map to this\n if (\"date-time\".equals(typeName)) return;\n\n // Ignore if either type is primitive, since the collision is probably with the boxed type\n if (type.isPrimitive() || knownType.isPrimitive()) return;\n\n // Ignore if either type is an enum, since it doesn't need to be represented as a model\n if (type.isEnumType() || knownType.isEnumType()) return;\n\n // Ignore if the types are both containers, since they will map to the same thing\n if (type.isContainerType() && knownType.isContainerType()) return;\n\n // To get here there must be two different types colliding on the name\n throw new IllegalStateException(\"Name collision for name [\" + typeName + \"]. Classes [\" + knownType.getRawClass() + \", \" + type.getRawClass() + \"].\");\n }",
"IArenaClass getClass(final String name);",
"public static DataFeedMissingDataPointFillType fromString(String name) {\n return fromString(name, DataFeedMissingDataPointFillType.class);\n }",
"@JsonCreator\n public static CheckNameResourceTypes fromString(String name) {\n return fromString(name, CheckNameResourceTypes.class);\n }",
"private Keyword basicType()\r\n {\r\n Keyword x = Keyword.NONESY;\r\n\r\n if (typeKW.contains(nextSymbol))\r\n {\r\n x = nextSymbol;\r\n lookAhead();\r\n }\r\n\r\n return x;\r\n }",
"public void removeType(String name) {\n String nameInLowerCase = Ascii.toLowerCase(name);\n Preconditions.checkState(!registered);\n Preconditions.checkArgument(types.containsKey(nameInLowerCase), \"missing key: %s\", name);\n types.remove(nameInLowerCase);\n }",
"public abstract T findByName(String name) ;",
"public static EndpointType getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tEndpointType result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@JsonCreator\n public static DataType fromString(String name) {\n return fromString(name, DataType.class);\n }",
"public AssetClass findAssetClassByName(String name_);",
"public static AccessType fromExternalName(String externalName) {\n\t\tif (externalName == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (AccessType accessType : AccessType.values()) {\n\t\t\tif (accessType.getExternalName().equals(externalName)) {\n\t\t\t\treturn accessType;\n\t\t\t}\n\t\t}\n\t\tthrow new UnknownEnumExternalNameException(externalName);\n\t}",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"java.lang.String getType();",
"public final PrimitiveType findPrimitiveType(String name)\n {\n for (int i = 0; i < primitiveTypes.size(); i++) {\n PrimitiveType a = (PrimitiveType)(primitiveTypes.elementAt(i));\n if (a.getName().equals(name))\n return a;\n }\n return null;\n }"
]
| [
"0.6562009",
"0.6554395",
"0.64689434",
"0.6467875",
"0.6084218",
"0.59734744",
"0.5955249",
"0.5944994",
"0.59121937",
"0.58946896",
"0.58204937",
"0.58104104",
"0.5808518",
"0.5800091",
"0.5797486",
"0.5796104",
"0.5749199",
"0.5741798",
"0.56656414",
"0.56324977",
"0.5568694",
"0.5545016",
"0.5544536",
"0.5543107",
"0.55289334",
"0.55279344",
"0.5518578",
"0.550768",
"0.54908794",
"0.54547024",
"0.5442248",
"0.54249156",
"0.541074",
"0.54105806",
"0.54041004",
"0.53978693",
"0.5370875",
"0.5368483",
"0.536522",
"0.5344164",
"0.53414696",
"0.5310364",
"0.5294604",
"0.527432",
"0.5263382",
"0.5260538",
"0.5249879",
"0.52465904",
"0.5243795",
"0.5227529",
"0.5222432",
"0.5199906",
"0.5159728",
"0.51525575",
"0.51499385",
"0.51415825",
"0.51376534",
"0.5131553",
"0.5114442",
"0.51129866",
"0.51090735",
"0.5101493",
"0.5097104",
"0.5077989",
"0.5073145",
"0.50668997",
"0.5062545",
"0.5046859",
"0.50344145",
"0.5027757",
"0.5021321",
"0.5016037",
"0.5015594",
"0.49988613",
"0.49780425",
"0.49675304",
"0.49602076",
"0.49580994",
"0.49555477",
"0.4953104",
"0.49508423",
"0.4949586",
"0.4947648",
"0.49376318",
"0.49359053",
"0.491109",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.4910964",
"0.48872653"
]
| 0.5508958 | 27 |
Constructs a copy of another point | public Point(Point other) {
super(other);
this.x = other.x;
this.y = other.y;
this.activity = other.activity;
this.frame = other.frame;
this.trajectoryid = other.trajectoryid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Point clone ();",
"public SoPickedPoint \ncopy() \n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPickedPoint newCopy = new SoPickedPoint(this);\n return newCopy;\n}",
"public Object clone() {\n return new PointImpl( this );\n }",
"@Override\n public GeoPoint clone() {\n return new GeoPoint(this.latitude, this.longitude);\n }",
"@Override\r\n\tpublic Point clone() {\r\n\t\tPoint p = new RotatedPoint(this.geoObjectLabel, this.originalPoint, this.centerOfRotation, this.degAngleMeasure);\r\n\t\t\r\n\t\tif (this.getX() != null)\r\n\t\t\tp.setX((UXVariable) this.getX().clone());\r\n\t\tif (this.getY() != null)\r\n\t\t\tp.setY((UXVariable) this.getY().clone());\r\n\t\tp.setInstanceType(this.instanceType);\r\n\t\tp.setPointState(this.pointState);\r\n\t\tp.setConsProtocol(this.consProtocol);\r\n\t\tp.setIndex(this.index);\r\n\t\t\r\n\t\treturn p;\r\n\t}",
"public Point(Point point) {\n super(point.getReferenceX(), point.getReferenceY());\n this.x = point.x;\n this.y = point.y;\n this.setHeight(point.getHeight());\n }",
"@Override\n public MapPoint clone(){\n MapPoint pl = new MapPoint();\n pl.setId(this.pointId);\n pl.setX(this.pointX);\n pl.setY(this.pointY);\n pl.setTags(this.tags);\n return pl;\n }",
"@Override\n public Shape deepCopy(double... points) {\n return this.deepCopy(points[0], points[1]);\n }",
"Point createPoint();",
"public Point(Point p)\r\n\t{\r\n\t\tx = p.x;\r\n\t\ty = p.y;\r\n\t}",
"public Point(Point point) {\n this.x = point.x;\n this.y = point.y;\n }",
"public Point(Point obj)\n\t{\n\t\t// Instantiate properties with parameter values \n\t\tthis.x = obj.x;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's x-coordinate\t\n\t\tthis.y = obj.y;\t\t\t\t\t\t\t\t\t\t\t\t// Shallow copy point's y-coordinate\n\t}",
"public Point2D(Point2D point){\n \n //on peut faire point.x et point.y puisqu'on est dans la classe\n this.x = point.x;\n this.y = point.y;\n }",
"private P clonePoint(P point)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// clone\n\t\t\treturn (P) point.clone();\n\t\t}\n\t\tcatch (CloneNotSupportedException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn null;\n\t}",
"private Point(Point p) {\n\t\tthis.name = p.name;\n\t\tthis.position = p.position.copy();\n\t\tthis.collisionRadius = p.collisionRadius;\n\t}",
"public MyPoint1 (double x, double y) {}",
"@Override\r\n public Object clone() {\r\n\r\n Coordinate c = new Coordinate( this );\r\n return c;\r\n }",
"public Coordinates copy() {\n\t\treturn new Coordinates(this);\n\t}",
"Prototype makeCopy();",
"private void CreaCoordinate(){\n \n this.punto = new Point(80, 80);\n \n }",
"public Line copy() {\r\n Line l = new Line();\r\n l.line = new ArrayList < Point > (this.line);\r\n l.direction = this.direction;\r\n l.clickedPoint = this.clickedPoint;\r\n return l;\r\n }",
"@Override\n public Shape deepCopy(double x, double y) {\n MyEllipse newShape = new MyEllipse(dashLine,rotate,x, y, this.radiusX, this.radiusY,\n this.lineWidth, this.getStroke(), this.getFill());\n newShape.createDate = this.createDate;\n System.out.println(\"new Ellipse:\" + newShape.toString());\n return newShape;\n }",
"Point(int x_, int y_){\n x = x_;\n y = y_;\n }",
"public SoPickedPoint( final SoPickedPoint pp)\n//\n////////////////////////////////////////////////////////////////////////\n{\n worldPoint.copyFrom(pp.worldPoint);\n worldNormal.copyFrom(pp.worldNormal);\n imageTexCoords.copyFrom(pp.imageTexCoords);\n materialIndex = pp.materialIndex;\n path = pp.path;\n onGeometry = pp.onGeometry;\n vpRegion.copyFrom(pp.vpRegion);\n\n // Copy the details - note that the copy() method for SoDetailList\n // makes copies of the detail instances. This has to be done\n // because the instances are deleted when the list is deleted.\n details.operator_equal(pp.details);\n\n // Ref the path, since we unref it when we are deleted\n path.ref();\n}",
"public void\n\tcopy( Point3 point )\n\t{\n\t\tdata[0] = point.x;\n\t\tdata[1] = point.y;\n\t\tdata[2] = point.z;\n\t}",
"public Point[] clone(){\n\t\tPoint[] test = new Point[currentPiece.length];\n\t\tfor(int i = 0; i < currentPiece.length; i ++){\n\t\t\ttest[i] = new Point(currentPiece[i]);\n\t\t}\n\t\treturn test;\n\t}",
"public Point(double a, double b) {\n this.x = a;\n this.y = b;\n }",
"private static <P> P copyValue(P val) {\r\n if (val instanceof Point2D) {\r\n return (P) ((Point2D)val).clone();\r\n } else {\r\n return val;\r\n }\r\n }",
"public abstract Shape getCopy();",
"public Triangle copy()\r\n {\r\n return new Triangle (v1.getX(),v1.getY(),v2.getX(),v2.getY(),v3.getX(),v3.getY());\r\n }",
"public VariablePoint2(){\n super(0, 0);\n x = 0;\n y = 0;\n }",
"public Point(double x, double y){\n this.x = x;\n this.y = y;\n }",
"void copyPosition (DVector3 pos);",
"public Point(double x, double y){\n\t\tsuper();\n\t\tthis.x = x; \n\t\tthis.y = y;\n\t}",
"public MyPoint1(double x, int y) {\n this.x = x;\n this.y = y;\n }",
"private GoodPoint(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(){\n this.x = 0;\n this.y = 0;\n }",
"@Override\n public Piece copy() {\n return new Knight(this.getSide(), this.getCoordinate());\n }",
"Point(Double x, Double y) {\n\t\tthis.setX(x);\n\t\tthis.setY(y);\n\t}",
"public Point(Vector position) {\n\t\tthis(position, 5.0);\n\t}",
"public Vector(Point point) {\n\t\tthis(point.x, point.y);\n\t}",
"public void Duplicate()\n {\n\n tacc2 = tacc.clone();\n px2 = px.clone();\n py2 = py.clone();\n pz2 = pz.clone();\n\n tgyro2 = tgyro.clone();\n\n accx2 = accx.clone();\n accy2 = accy.clone();\n accz2 = accz.clone();\n\n lng2 = lng.clone();\n lat2 = lat.clone();\n }",
"Coordinate createCoordinate();",
"public Point applyToPoint(Point p) {\n double newX, newY;\n Point newP;\n //the new x\n newX = p.getX() + this.dx;\n //the new y\n newY = p.getY() + this.dy;\n //the new point\n newP = new Point((newX), (newY));\n return newP;\n }",
"public ParticleRenderData copy()\n\t{\n\t\tRenderData copy = super.copy();\n\t\tParticleRenderData pcopy = new ParticleRenderData(new Vector3f(), new Euler(), new Vector3f());\n\t\tpcopy.transform = copy.transform;\n\t\tpcopy.postStage = this.postStage;\n\t\tpcopy.currStage = this.currStage;\n\t\tpcopy.particleColor = this.particleColor;\n\t\treturn pcopy;\n\t}",
"public Point() {\n this.x = Math.random();\n this.y = Math.random();\n }",
"public Object clone() {\n View v2;\n try {\n v2 = (View) super.clone();\n } catch (CloneNotSupportedException cnse) {\n v2 = new View();\n }\n v2.center = (Location) center.clone();\n v2.zoom = zoom;\n v2.size = (Dimension) size.clone();\n return v2;\n }",
"public Line(Point p1, Point p2) {\n super(p1, p2);\n this.p1 = p1;\n this.p2 = p2;\n }",
"public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n }",
"public Point(int x, int y){\n this.x = x;\n this.y = y;\n }",
"public Point2D(double x, double y){\n this.x = x;\n this.y = y;\n }",
"@Override\n\tprotected GeoPointND newGeoPoint(Construction cons1) {\n\t\tpolar2D = new GeoPoint(cons1);\n\t\tpolarCoords = new double[3];\n\n\t\t// create 3D line\n\t\treturn new GeoPoint3D(cons1);\n\t}",
"private Point toInnerPoint(Point punto){\r\n \treturn punto.add(-coord.X(), -coord.Y());\r\n// return new Point(punto.getRow() - coord.getRow(), punto.getCol() - coord.getCol());\r\n }",
"public Point2D()\n {\n this.x = this.y = 0f;\n }",
"public VariablePoint2(double x, double y){\n super(x, y);\n this.x = x;\n this.y = y;\n }",
"public Punch getShallowCopy(){\n Punch p = new Punch();\n p.id = id;\n p.time = time;\n //p.taskId = punchTask.getID();\n return p;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"public Point(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"Point() {\n this.x = 0;\n this.y = 0;\n }",
"PointDouble() {\n x = y = 0.0;\n }",
"Point() {\n\t\tthis.x = 0;\n\t\tthis.y = 0;\n\t}",
"public PointC(double x, double y) {\n this.x = x;\n this.y = y;\n }",
"T copy();",
"public Point(double x, double y) {\r\n this.x = x;\r\n this.y = y;\r\n this.c = Color.COLORLESS;\r\n }",
"public GeoPoint(Geometry geometry, Point3D point) {\n\tsuper();\n\tthis.geometry = geometry;\n\tthis.point = point;\n}",
"public MyOverlay(GeoPoint P1,GeoPoint P2){\n\t \t\n\t \t goeP1=P1;\n\t \t geoP2=P2;\n\t \t \n\t }",
"public Vec2double clone() {\n\t\treturn new Vec2double(this.x, this.y);\n\t}",
"public abstract CTxDestination clone();",
"public void testGetOldPosition1() {\n WayPointEvent event = new WayPointEvent(edge, wayPoint, offset);\n\n Point pt = event.getOldPosition();\n\n assertEquals(\"Failed to get the correct old position.\", wayPoint, pt);\n\n // verify the point should be set by clone\n pt.x = 876;\n assertEquals(\"The old position getter should return a cloned point.\", wayPoint, event.getOldPosition());\n\n pt = new Point(wayPoint);\n wayPoint.x = 987;\n assertEquals(\"The old position should be set by clone in constructor.\", pt, event.getOldPosition());\n }",
"protected Point getNewPointRelatively(Point p){\n\t\treturn new Point((int) (p.getX()-CELL_SIZE),(int) (p.getY()-CELL_SIZE));\n\t}",
"public Point() {\n }",
"public Point() {\n }",
"public void copy(final Coordinate c) { row = c.row; col = c.col; }",
"public Point(double x, double y) {\r\n\t\t//Constructors\r\n\t\tthis.x = x;\r\n\t\tthis.y = y;\r\n\t}",
"public Polygon(Polygon source)\n {\n // Iterating over source.points directly here instead of just source\n // eliminates an unnecessary copy that VertexIterator would make for\n // each point.\n\n for (PointF point : source.points)\n {\n add(point);\n }\n }",
"public PointCutASTNode(PointCutASTNode self) {\n\t\tsuper(self);\n\t}",
"private Path(Path other){\n\t\t\n\t\tthis.source = other.source;\n\t\tthis.destination = other.destination;\n\t\tthis.cities = other.cities;\n\t\t\n\t\tthis.cost = other.cost;\n\t\tthis.destination = other.destination;\n\t\t\n\t\tthis.connections = new LinkedList<Connection>();\n\t\t\n\t\tfor (Connection c : other.connections){\n\t\t\tthis.connections.add((Connection) c.clone());\n\t\t}\n\t\t\n\t}",
"public abstract Pessoa clone();",
"public AST copy()\n {\n return new Implicate(left, right);\n }",
"protected Point(double x, double y) {\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"public T setPoint(float x, float y) {\n this.startX = x;\n this.startY = y;\n return self();\n }",
"public Short2DPoint() {\n this(0,0);\n }",
"@Before\n\tpublic void before() {\n\t\tpoint = new Point(-200, 150);\n\t\tpoint1 = new Point(-400, -150);\n\t}",
"public abstract INodo copy();",
"abstract public Vertex cloneMe();",
"public Position copy() {\n return new Position(values.clone());\n }",
"public Point(double x, double y) {\n this.xPosition = x;\n this.yPosition = y;\n }",
"public abstract void setPoint(Point p);",
"public Square copy() {\n\t\tSquare s = new Square(x,y);\n\t\ts.z = z;\n\t\ts.c = new Color(c.getRGB());\n\t\treturn s;\n\t}",
"public StsPoint2D()\n\t{\n\t}",
"public Vector3f copyLocation() {\r\n Vector3f result = location.clone();\r\n return result;\r\n }",
"public Point applyToPoint(Point p) {\r\n double newX = p.getX() + this.dx;\r\n double newY = p.getY() + this.dy;\r\n Point newP = new Point(newX, newY);\r\n return newP;\r\n }",
"public Ping dup (Ping self)\n {\n if (self == null)\n return null;\n\n Ping copy = new Ping ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.digest = new ArrayList <State> (self.digest);\n return copy;\n }",
"public Point2d() {\r\n\t // Call two-argument constructor and specify the origin.\r\n\t\t this(0, 0);\r\n\t\t System.out.println(\"Point2d default initiializing\");\r\n\t }",
"synchronized public Displayable clone(final Project pr, final boolean copy_id) {\n \t\tfinal long nid = copy_id ? this.id : pr.getLoader().getNextId();\n \t\tfinal Polyline copy = new Polyline(pr, nid, null != title ? title.toString() : null, width, height, alpha, this.visible, new Color(color.getRed(), color.getGreen(), color.getBlue()), this.locked, (AffineTransform)this.at.clone());\n \t\t// The data:\n \t\tif (-1 == n_points) setupForDisplay(); // load data\n \t\tcopy.n_points = n_points;\n \t\tcopy.p = new double[][]{(double[])this.p[0].clone(), (double[])this.p[1].clone()};\n \t\tcopy.p_layer = (long[])this.p_layer.clone();\n \t\tcopy.addToDatabase();\n \n \t\treturn copy;\n \t}",
"public PrecisePoint() {\n }",
"public Point(int x, int y) {\r\n this.x = x;\r\n this.y = y;\r\n }"
]
| [
"0.8245929",
"0.7190616",
"0.7178689",
"0.7164989",
"0.71556073",
"0.7112724",
"0.7090368",
"0.69846743",
"0.6961145",
"0.6919659",
"0.68910646",
"0.6830259",
"0.6684309",
"0.6683675",
"0.66660017",
"0.6662406",
"0.6554786",
"0.654411",
"0.64904976",
"0.6356418",
"0.6285728",
"0.6211709",
"0.62059885",
"0.6205168",
"0.61453253",
"0.61381227",
"0.6136929",
"0.61363465",
"0.6133956",
"0.6127105",
"0.6120247",
"0.60826916",
"0.60638726",
"0.60485965",
"0.603999",
"0.6031232",
"0.6003495",
"0.59431773",
"0.59323627",
"0.59263486",
"0.59239864",
"0.59221256",
"0.5920103",
"0.59153295",
"0.58988196",
"0.589774",
"0.5894374",
"0.5885165",
"0.5881708",
"0.5868375",
"0.58666956",
"0.58603257",
"0.5858844",
"0.5855382",
"0.58526",
"0.58421284",
"0.5832464",
"0.5832464",
"0.5832464",
"0.5832464",
"0.5832464",
"0.58310235",
"0.58236694",
"0.58163154",
"0.5812461",
"0.5801022",
"0.5797263",
"0.57950145",
"0.57929",
"0.5788089",
"0.5785582",
"0.5775579",
"0.5765666",
"0.5763761",
"0.5763761",
"0.5753072",
"0.57523835",
"0.5752155",
"0.5741199",
"0.5735635",
"0.573311",
"0.5728724",
"0.5727751",
"0.57255626",
"0.5713143",
"0.57117176",
"0.5704808",
"0.57028407",
"0.5700113",
"0.56989086",
"0.5692188",
"0.5691566",
"0.56911254",
"0.5682727",
"0.5682435",
"0.56816566",
"0.56811345",
"0.5675605",
"0.5673852",
"0.5665118"
]
| 0.7258417 | 1 |
added by Jacob Davidson | public int getTrajectoryID() {
return trajectoryid;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void func_104112_b() {\n \n }",
"protected boolean func_70814_o() { return true; }",
"public void method_4270() {}",
"private static void cajas() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"private void kk12() {\n\n\t}",
"private void strin() {\n\n\t}",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"private void m50366E() {\n }",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"public void mo12628c() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"protected abstract Set method_1559();",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public abstract void mo70713b();",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"protected boolean func_70041_e_() { return false; }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override public int describeContents() { return 0; }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public abstract void mo6549b();",
"private stendhal() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void skystonePos4() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public abstract String mo13682d();",
"@Override\r\n\tpublic int sub() {\n\t\treturn 0;\r\n\t}",
"public void mo21877s() {\n }",
"protected void mo6255a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public abstract String mo118046b();",
"public abstract void mo27385c();",
"public abstract void mo56925d();",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo115190b() {\n }",
"void mo57277b();",
"public void mo6081a() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }",
"@Override\n\tpublic void interpretBytes() {\n\t\t\n\t}",
"java.lang.String getField1853();",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"private void m50367F() {\n }",
"public void mo12930a() {\n }",
"public abstract String mo41079d();",
"private void level7() {\n }",
"private void parseData() {\n\t\t\r\n\t}",
"public void mo21779D() {\n }",
"public void smell() {\n\t\t\n\t}",
"public abstract String mo11611b();",
"public abstract long mo9229aD();",
"public void skystonePos6() {\n }",
"public void m23075a() {\n }",
"public void mo21793R() {\n }",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public abstract Object mo1185b();",
"java.lang.String getField1753();",
"public void mo21825b() {\n }",
"private SBomCombiner()\n\t{}",
"public void mo21878t() {\n }",
"public abstract void mo27386d();",
"public void mo9848a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"java.lang.String getField1873();",
"@Override\n protected void prot() {\n }",
"java.lang.String getField1773();",
"java.lang.String getField1781();",
"java.lang.String getField1784();",
"public final void mo91715d() {\n }",
"protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }",
"public void mo21794S() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"java.lang.String getField1673();"
]
| [
"0.562478",
"0.5473972",
"0.54549044",
"0.54067904",
"0.539698",
"0.5360954",
"0.5356728",
"0.5339144",
"0.53388065",
"0.53280026",
"0.531321",
"0.5308296",
"0.5287214",
"0.5282353",
"0.52499604",
"0.52446395",
"0.5234513",
"0.5234513",
"0.5227142",
"0.5198145",
"0.5183228",
"0.5174449",
"0.51615936",
"0.5138072",
"0.51285475",
"0.5124321",
"0.5115045",
"0.5094278",
"0.50885534",
"0.5066012",
"0.50648564",
"0.5057157",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.5045763",
"0.50360066",
"0.50302714",
"0.5028932",
"0.5017852",
"0.50124323",
"0.4998543",
"0.49962622",
"0.49939486",
"0.498992",
"0.49894634",
"0.49807334",
"0.4980262",
"0.4952597",
"0.4949496",
"0.49458027",
"0.4939267",
"0.49349844",
"0.4934193",
"0.49286124",
"0.4925748",
"0.4922339",
"0.49179953",
"0.49087924",
"0.49077082",
"0.49032295",
"0.49022573",
"0.48933625",
"0.4892534",
"0.48873726",
"0.4884669",
"0.48820204",
"0.48799032",
"0.48797038",
"0.48779064",
"0.48748899",
"0.48715264",
"0.48651063",
"0.48648393",
"0.48647907",
"0.48630217",
"0.48603192",
"0.4854214",
"0.4849226",
"0.48480436",
"0.48464063",
"0.4845284",
"0.4842829",
"0.48412645",
"0.48411313",
"0.4838656",
"0.48360375",
"0.48338875",
"0.48336005",
"0.48301008",
"0.48296115",
"0.4822214",
"0.4822183",
"0.48207402",
"0.48207387",
"0.48189172",
"0.48173526",
"0.48149455"
]
| 0.0 | -1 |
Returns true if the attribute "radioValue" is set. | public final boolean isRadioValueSetted() {
return engine.isPropertySetted(Properties.RADIO_VALUE);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (value == null)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}",
"public boolean isSetValue()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(VALUE$12) != null;\n }\n }",
"public boolean isValue() {\n return value;\n }",
"public boolean isValue() {\n return value;\n }",
"public boolean validateDefaultRadioButtonSelection() {\n\n\t\tboolean b = AttDefaultShowRadioBtn.isSelected();\n\t\tSystem.out.println(\"VISHNU its getting value as:...........\"+b);\n\t\tif(b){\n\t\t\treturn true;\n\t\t}else {\n\t\t\tSystem.out.println(\"Invalid Default redio button selection\");\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isSetRFAdaptiveRule() {\n return (this.rfAdaptiveRule != null ? this.rfAdaptiveRule.isSetValue() : false);\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public boolean isSetValue() {\n return this.value != null;\n }",
"public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }",
"public boolean hasValue() {\n return value_ != null;\n }",
"public boolean hasValue() {\n return valueBuilder_ != null || value_ != null;\n }",
"public boolean isSetRFSlotDuration() {\n return (this.rfSlotDuration != null ? this.rfSlotDuration.isSetValue() : false);\n }",
"private void checkRadio( String groupName, String refValue, XPropertySet form ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n XPropertySet xRadio = getRadioModel( groupName, refValue, form );\n\n\t\tXRadioButton radioButton = (XRadioButton)UnoRuntime.queryInterface(\n\t\t\tXRadioButton.class, m_document.getCurrentView().getControl( xRadio ) );\n\t\tradioButton.setState( true );\n }",
"public boolean isSetObservedRFValues() {\n return ((this.observedRFValues != null) && (!this.observedRFValues.isEmpty()));\n }",
"public boolean hasValue() {\n return result.hasValue();\n }",
"public boolean hasValue() {\n return result.hasValue();\n }",
"public boolean isValidated()\n {\n if (noRadio.isSelected())\n {\n parent.exit();\n return false;\n }\n return (yesRadio.isSelected());\n }",
"@Override\n\tpublic boolean hasValue(Attribute attribute) {\n\t\treturn false;\n\t}",
"public boolean isSetNumRFElements() {\n return (this.numRFElements != null ? this.numRFElements.isSetValue() : false);\n }",
"public boolean isSetRFMean() {\n return (this.rfMean != null ? this.rfMean.isSetValue() : false);\n }",
"public boolean isSetRFStandardDeviation() {\n return (this.rfStandardDeviation != null ? this.rfStandardDeviation.isSetValue() : false);\n }",
"public boolean isSetRFAdaptiveDriver() {\n return (this.rfAdaptiveDriver != null ? this.rfAdaptiveDriver.isSetValue() : false);\n }",
"public boolean isSetRFChangeRate() {\n return (this.rfChangeRate != null ? this.rfChangeRate.isSetValue() : false);\n }",
"public boolean getValue() {\n\t\treturn _checked;\n\t}",
"default boolean hasValue() {\n\t\t\treturn getValue() != null;\n\t\t}",
"public boolean isSetRFSequenceDesc() {\n return (this.rfSequenceDesc != null ? this.rfSequenceDesc.isSetValue() : false);\n }",
"public boolean getValuePresent() {\r\n return ValuePresent;\r\n }",
"public final boolean isValueLockedSetted() {\n\t\treturn engine.isPropertySetted(Properties.VALUE_LOCKED);\n\t}",
"public boolean isSetPolarisationAngle() {\n return (this.polarisationAngle != null ? this.polarisationAngle.isSetValue() : false);\n }",
"boolean isValue();",
"public boolean isSetNumRFSimultaneous() {\n return (this.numRFSimultaneous != null ? this.numRFSimultaneous.isSetValue() : false);\n }",
"public final String getValueAttribute() {\n String value = getAttributeValue(\"value\");\n if( value == ATTRIBUTE_NOT_DEFINED && this instanceof HtmlCheckBoxInput ) {\n value = \"on\";\n }\n return value;\n }",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"boolean hasValue();",
"public boolean getValue();",
"public static boolean radioIsChecked() throws Exception { \n\t\tWebElement[] radioCheck= Elements.selectRadioButtonElement();\n\t\tboolean\tradioBtn=false; ;\n\t\tfor(int i=0; i<4;i++) {\n\t\t\ttry {\n\t\t\t\tif(radioCheck[i].isSelected()==true) {\n\t\t\t\t\tradioBtn=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\t\n\t\t}\n\t\treturn radioBtn;\n\t}",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean isSetUrlValue()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(URLVALUE$2) != null;\r\n }\r\n }",
"public boolean isSetBrandattr() {\n return __isset_bit_vector.get(__BRANDATTR_ISSET_ID);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue(String value) {\r\n\t\tfor(Attribute curAttr: valInstances) {\r\n\t\t\tif(value.equals(curAttr.getVal())) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isSetRFPatternPeriod() {\n return (this.rfPatternPeriod != null ? this.rfPatternPeriod.isSetValue() : false);\n }",
"public boolean isSet() {\n\t\treturn is_set_;\n\t}",
"public boolean attributeIsDensityValue ()\n\t{\n\t\n\t\treturn mAttributeTypeDensityButton.isSelected();\n\t\n\t}",
"public boolean isSetRFBasicClockPeriod() {\n return (this.rfBasicClockPeriod != null ? this.rfBasicClockPeriod.isSetValue() : false);\n }",
"public Boolean getValue() {\n return value;\n }",
"public boolean isValue() {\n switch(this.getType()) {\n case CONSTANT_INTEGER : \n case CONSTANT_FLOAT :\n case CONSTANT_DOUBLE : \n case CONSTANT_LONG : \n case CONSTANT_STRING:\n return true ;\n default :\n return false;\n }\n }",
"public boolean isSet() {\n\t\treturn false;\n\t}",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }",
"public boolean isValue() {\n return false;\n }",
"boolean hasOptionalValue();",
"public boolean isSetSex() {\n\t\treturn this.sex != null;\n\t}",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }",
"public boolean getValue() {\r\n\t\treturn this.value;\r\n\t}",
"@Override\n public boolean isDefined()\n {\n return getValue() != null || getChildrenCount() > 0\n || getAttributeCount() > 0;\n }",
"public boolean isSetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(PIR$12) != 0;\r\n }\r\n }",
"public Boolean getValue() {\n return this.value;\n }",
"public Boolean getValue() {\n return this.value;\n }",
"public Boolean getValue() {\n return this.value;\n }",
"public boolean isSetPreRepayAmt() {\n return EncodingUtils.testBit(__isset_bitfield, __PREREPAYAMT_ISSET_ID);\n }",
"public boolean isSetRFFreqMax() {\n return (this.rfFreqMax != null ? this.rfFreqMax.isSetValue() : false);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"boolean getestadoRadio(){\n return estadoRadio;\n }",
"public boolean isSetPhone() {\n return this.phone != null;\n }",
"public double getRadio() {\n return radio;\n }",
"public double getRadio() {\n return radio;\n }",
"public boolean isPresent() {\r\n\t\treturn value != null;\r\n\t}",
"public boolean hasValue() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"public boolean isSetTicketValue() {\n return this.ticketValue != null;\n }",
"public boolean isSetRFRestFreq() {\n return (this.rfRestFreq != null ? this.rfRestFreq.isSetValue() : false);\n }",
"public boolean isSetPhone() {\n\t\treturn this.phone != null;\n\t}",
"public boolean isSetPhone() {\n\t\treturn this.phone != null;\n\t}",
"public boolean hasValue() { return false; }",
"private boolean isVal() {\n\t\treturn look.type == Tag.BOOLEAN || look.type == Tag.NUMBER\n\t\t\t\t|| look.type == Tag.STRING || look.type == Tag.NULL;\n\n\t}",
"public boolean isSetRFMedian() {\n return (this.rfMedian != null ? this.rfMedian.isSetValue() : false);\n }",
"public boolean isSetPhoneNumber() {\n return this.phoneNumber != null;\n }",
"public boolean isSetNumber() {\n return (this.number != null ? this.number.isSetValue() : false);\n }",
"public boolean isSetChipRate() {\n return (this.chipRate != null ? this.chipRate.isSetValue() : false);\n }",
"public boolean isSetEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ENUMSKILLNAME$8) != null;\n }\n }",
"public boolean isSetRuntime() {\n return EncodingUtils.testBit(__isset_bitfield, __RUNTIME_ISSET_ID);\n }",
"public boolean isSetField() {\r\n return this.field != null;\r\n }",
"public boolean isSetField() {\r\n return this.field != null;\r\n }"
]
| [
"0.6666272",
"0.64535606",
"0.6248936",
"0.6231041",
"0.61704534",
"0.61623174",
"0.6152496",
"0.6150921",
"0.6110908",
"0.61043286",
"0.6020867",
"0.6002174",
"0.5997164",
"0.5831065",
"0.5829528",
"0.5829528",
"0.58262473",
"0.5823484",
"0.57973135",
"0.5746798",
"0.57375544",
"0.5732185",
"0.5728845",
"0.5691739",
"0.56582665",
"0.55799526",
"0.5575341",
"0.557357",
"0.55706483",
"0.55689895",
"0.55564165",
"0.55546933",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.5548799",
"0.55216527",
"0.5521416",
"0.55192673",
"0.55192673",
"0.55140865",
"0.55073434",
"0.55025417",
"0.54904723",
"0.54904723",
"0.54904723",
"0.54896367",
"0.54882705",
"0.54871655",
"0.54822767",
"0.54812866",
"0.5473409",
"0.5471146",
"0.54581654",
"0.5445927",
"0.5445927",
"0.5445501",
"0.5445183",
"0.5441649",
"0.54400426",
"0.54384345",
"0.5435891",
"0.54319435",
"0.54309165",
"0.54309165",
"0.54309165",
"0.5422735",
"0.54209685",
"0.5420722",
"0.5420722",
"0.5407112",
"0.5402629",
"0.54015344",
"0.54015344",
"0.5400277",
"0.53970844",
"0.5391386",
"0.5370922",
"0.53647304",
"0.53647304",
"0.5362255",
"0.53584105",
"0.5354227",
"0.5352606",
"0.53377646",
"0.53342813",
"0.53326744",
"0.5331463",
"0.5330574",
"0.5330574"
]
| 0.8030418 | 0 |
Returns true if the attribute "groupName" is set. | public final boolean isGroupNameSetted() {
return engine.isPropertySetted(Properties.GROUP_NAME);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isSetGroup() {\n return this.group != null;\n }",
"public boolean groupSpecified() {\n return group != null && !group.isEmpty();\n }",
"public boolean inGroup(String groupName) {\r\n return true;\r\n }",
"public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(NAME$2) != null;\r\n }\r\n }",
"private boolean isValid(String groupName) {\n if (groupName != null) {\n if (groupName.length() > 1) {\n return true;\n }\n }\n return false;\n }",
"boolean hasAdGroupLabel();",
"public boolean inGroup(String groupName);",
"public boolean isVehicleGroupNameLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Vehicle Group Name\"), SHORTWAIT);\r\n\t}",
"public boolean isSetName() {\n return this.name != null;\n }",
"public boolean isSetName() {\n return this.name != null;\n }",
"public boolean isSetName() {\n return this.name != null;\n }",
"public boolean isSetName() {\n return this.name != null;\n }",
"public boolean isSetName() {\n\t\treturn this.name != null;\n\t}",
"public boolean isSetName() {\r\n return this.name != null;\r\n }",
"public synchronized boolean checkGroup(String groupName) {\n\t\t\tif(groupList.containsKey(groupName)) { \n\t\t\t\treturn true; \n\t\t\t}\n\t\t\telse { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}",
"public boolean isGroup(String name) {\n return grouptabs.containsKey(name);\n }",
"public boolean hasGroup(String groupName){\n\t\tGuild self = this;\r\n//\t\tSystem.out.println(\"this=\" + name +\" self.groups=\"+ groups);\r\n\t\tif (self.groups == null || self.groups.isEmpty())/// try and get it again from db\r\n\t\t\tself = MysticGuilds.getGuild(this.getName());\r\n\t\tif (self == null || self.groups == null || self.groups.isEmpty())\r\n\t\t\treturn false;\r\n\t\tfor (PermissionGroup group: self.groups){\r\n//\t\t\tSystem.out.println(\"looking at group = \" + group);\r\n\t\t\tif (group.getName().equalsIgnoreCase(groupName))\r\n\t\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isSetName() {\n return this.name != null;\n }",
"boolean isSetName();",
"boolean hasAdGroupCriterionLabel();",
"public boolean isSetName() {\n return this.Name != null;\n }",
"boolean hasAdGroup();",
"public boolean isVehicleGroupLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Vehicle Group\"), SHORTWAIT);\r\n\t}",
"boolean isSetProductGroup();",
"boolean hasAttribute(String name);",
"public boolean containAttribute(String name);",
"public boolean isSetFriendlyName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(FRIENDLYNAME$2) != 0;\r\n }\r\n }",
"public String getGroupName() {\n return groupName;\n }",
"public boolean isGroup() {\n if (overrideGroupKey != null || isAppGroup()) {\n return true;\n }\n return false;\n }",
"public boolean isNotNullGroupId() {\n return genClient.cacheValueIsNotNull(CacheKey.groupId);\n }",
"public String getGroupName() {\r\n return groupName;\r\n }",
"public String getGroupName() {\n return groupName;\n }",
"boolean hasAdGroupAdLabel();",
"public String getGroupName()\n {\n return groupName;\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$8) != 0;\n }\n }",
"public boolean isVehiclesGroupFieldPresent() {\r\n\t\treturn isElementPresent(addVehiclesHeader.replace(\"Add Vehicle\", \"Select Vehicle Group\"), SHORTWAIT);\r\n\t}",
"public void setGroupName(String groupName) {\r\n this.groupName = groupName == null ? null : groupName.trim();\r\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }",
"public boolean isSetName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(NAME$0) != 0;\n }\n }",
"public boolean isSetName()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(NAME$0) != 0;\r\n }\r\n }",
"public String getGroupName() {\n return groupName;\n }",
"public String getGroupName() {\n return groupName;\n }",
"@Override\n public boolean existsGroupWithName(String groupName) {\n // \"Feature 'existsGroupWithName in OAuth 2 identity server' is not implemented\"\n return false;\n }",
"public boolean isFilterByGroup()\r\n {\r\n return getSemanticObject().getBooleanProperty(swpres_filterByGroup);\r\n }",
"public boolean hasAttribute(String name) {\n // if attribute() returns a value, then this jode has that attribute\n return attribute(name, true) != null;\n }",
"public boolean isAddVehicleGroupHeadingNamePresent() {\r\n\t\treturn isElementPresent(addVehicleGroupHeading, SHORTWAIT);\r\n\t}",
"boolean hasAdGroupCriterion();",
"void setGroupName(String groupName) {\n this.groupName = new String(groupName);\n }",
"public void setGroupName(String groupName) {\n this.groupName = groupName;\n }",
"public void setGroupName(String groupName) {\n this.groupName = groupName;\n }",
"@Test\n\tpublic void testNameExistsInGroupSuccess() {\n\n\t\tgrupo.addColaborador(col2);\n\t\tcol2.setNome(\"Sergio\");\n\t\tboolean result = grupo.nameExistsInGroup(\"Sergio\");\n\n\t\tassertTrue(result);\n\t}",
"boolean isSetDisplayName();",
"public boolean hasValue() throws SdpParseException {\n\t\tNameValue nameValue = getAttribute();\n\t\tif (nameValue == null)\n\t\t\treturn false;\n\t\telse {\n\t\t\tObject value = nameValue.getValue();\n\t\t\tif (value == null)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}\n\t}",
"public String getGroupName() {\n\t\treturn groupName;\n\t}",
"public boolean createGroup(String groupName) {\r\n \t\tboolean result = this.dataLayer.addGroup(groupName);\r\n \r\n \t\t// if succesfuly created on dataLayer, then add into GroupList\r\n \t\tif (result)\r\n \t\t\tthis.groupList.addGroup(groupName);\r\n \r\n \t\treturn result;\r\n \t}",
"public boolean getInValidGroup(){return this.inValidGroup;}",
"private boolean isAttributeDefined(String attrName)\n {\n return getAttributes().get(attrName) != null;\n }",
"public boolean isNameSet( ) {\n \t\t\treturn id == null;\n \t\t}",
"public boolean isVehicleGroupDescriptionLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Vehicle Group Description\"), SHORTWAIT);\r\n\t}",
"public boolean hasName() {\n return fieldSetFlags()[1];\n }",
"public void setGroupName(String groupName) {\n\t\tthis.groupName = groupName;\n\t}",
"boolean hasSetAttribute();",
"public java.lang.String getGroupName() {\n return groupName;\n }",
"public boolean isAttributeDefined(String attrName) {\n Assert.notNull(attrName, \"attrName\");\n return (attrNST.getRowCount(\"name EQ '\" + attrName.toLowerCase() + \"'\") > 0);\n }",
"@Override\r\n\t\tpublic boolean hasAttribute(String name)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean isSetTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(TITLE$2) != null;\n }\n }",
"boolean hasConceptGroup();",
"public String getGroupName(){\r\n return Validator.unescapeJava(this.groupName);\r\n }",
"boolean hasPublisherGroupID();",
"@Nullable\n // Safe as we want to provide all getters being public for POJOs\n @SuppressWarnings({\"unused\", \"WeakerAccess\"})\n public final String getGroupName() {\n return groupName;\n }",
"boolean hasCampaignName();",
"boolean isXMLGroup(Object groupID) throws Exception;",
"protected boolean hasAttribute(String name) {\n\tfor (int i = 0; i < this.attributeFields.size(); i++) {\n\t AttributeField af = \n\t\t(AttributeField) this.attributeFields.elementAt(i);\n\t if (af.getAttribute().getName().equals(name))\n\t\treturn true;\n\t}\n\treturn false;\n }",
"public boolean isSetMaterialName() {\n return this.materialName != null;\n }",
"public boolean hasAttribute(String name)\n/* */ {\n/* 1234 */ return findAttribute(name) != null;\n/* */ }",
"public void setGroupName(String newGroupName)\n {\n this.groupName = newGroupName;\n }",
"Boolean groupingEnabled();",
"public boolean hasGroupByCategory() {\n return groupByCategoryBuilder_ != null || groupByCategory_ != null;\n }",
"public String getGroupName() {\n return this.GroupName;\n }",
"public boolean hasGroupByCategory() {\n return groupByCategory_ != null;\n }",
"public boolean isGroupBy() {\n return groupBy;\n }",
"public String getGroupName() {\n\t\t\treturn groupName;\n\t\t}",
"public String getGroupName();",
"public boolean isSetPhasename() {\n return this.phasename != null;\n }",
"public void setGroupName(java.lang.String groupName) {\n this.groupName = groupName;\n }",
"public void setGroupName(String groupName) {\n\t\t\tthis.groupName = groupName;\n\t\t}",
"public boolean hasGroupId() {\n return genClient.cacheHasKey(CacheKey.groupId);\n }",
"public boolean isSetEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ENUMSKILLNAME$8) != null;\n }\n }",
"boolean isAttribute();",
"public final boolean hasAttribute ()\r\n {\r\n return _value.hasAttribute();\r\n }",
"public boolean isSetCatName() {\n return this.catName != null;\n }",
"public boolean isSetMGroupCount() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MGROUPCOUNT_ISSET_ID);\n }",
"public boolean getIsGroup() {\n return (mParticipantCount > 1);\n }",
"boolean isUniqueAttribute();",
"public boolean isGroupLinkPathPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Group List\"), SHORTWAIT);\r\n\t}",
"boolean hasAdGroupSimulation();",
"boolean hasAttributes();",
"boolean hasAttributes();",
"public boolean hasName() {\n return fieldSetFlags()[0];\n }",
"public boolean isSetEthnicGroupCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(ETHNICGROUPCODE$20) != 0;\n }\n }"
]
| [
"0.7043588",
"0.70147026",
"0.69311655",
"0.6830658",
"0.68109465",
"0.6685956",
"0.6592286",
"0.65636265",
"0.6464959",
"0.6464959",
"0.6464959",
"0.6464959",
"0.64549726",
"0.6445037",
"0.64427745",
"0.6431303",
"0.64301807",
"0.64241266",
"0.6370602",
"0.63469213",
"0.6332507",
"0.6310268",
"0.6284692",
"0.6280516",
"0.6275431",
"0.62504905",
"0.6216341",
"0.6212496",
"0.62005603",
"0.61965406",
"0.61694366",
"0.6148389",
"0.6136296",
"0.6135796",
"0.6133563",
"0.6122891",
"0.6112505",
"0.6111928",
"0.6111928",
"0.61027163",
"0.6090245",
"0.6090245",
"0.6085991",
"0.6064772",
"0.6048343",
"0.60200244",
"0.6008078",
"0.6002291",
"0.5984279",
"0.5984279",
"0.5974648",
"0.59738076",
"0.5936666",
"0.5933678",
"0.5927183",
"0.59210485",
"0.5905098",
"0.58945817",
"0.5891887",
"0.5875849",
"0.58732194",
"0.58673024",
"0.5852121",
"0.58506835",
"0.5830669",
"0.5820647",
"0.58198744",
"0.58195436",
"0.581554",
"0.58152336",
"0.5812345",
"0.5808615",
"0.580163",
"0.5800353",
"0.5799306",
"0.57991135",
"0.5792896",
"0.5792804",
"0.5792691",
"0.5788352",
"0.5785983",
"0.57809246",
"0.5771735",
"0.5765094",
"0.57535803",
"0.57509834",
"0.5750865",
"0.5749281",
"0.5744695",
"0.57446516",
"0.5733135",
"0.5726872",
"0.5718537",
"0.5711397",
"0.5707595",
"0.5698338",
"0.5684994",
"0.5684994",
"0.5681862",
"0.56810796"
]
| 0.78704894 | 0 |
TODO Autogenerated method stub | public static void main(String[] args) {
Mammal mammalFirst = new Mammal();
int mammalFirstEnergy = mammalFirst.displayEnergy();
System.out.println("Mammal Energy Level is: " + mammalFirstEnergy);
Gorilla gorillaFirst = new Gorilla();
String printCurrentGorillaEnergyLevel = "Gorilla Energy Level is: " + gorillaFirst.displayEnergy();
int gorrillaFirstEnergy = gorillaFirst.displayEnergy();
System.out.println("Gorilla Energy Level is: " + gorrillaFirstEnergy);
//throw 3
String gorillaThrow1 = gorillaFirst.throwSomething();
System.out.println(gorillaThrow1);
System.out.println(printCurrentGorillaEnergyLevel);
String gorillaThrow2 = gorillaFirst.throwSomething();
System.out.println(gorillaThrow2);
System.out.println(printCurrentGorillaEnergyLevel);
String gorillaThrow3 = gorillaFirst.throwSomething();
System.out.println(gorillaThrow3);
System.out.println(printCurrentGorillaEnergyLevel);
//eat 2
String gorillaEatBan1 = gorillaFirst.eatBananas();
System.out.println(gorillaEatBan1);
System.out.println(printCurrentGorillaEnergyLevel);
String gorillaEatBan2 = gorillaFirst.eatBananas();
System.out.println(gorillaEatBan2);
System.out.println(printCurrentGorillaEnergyLevel);
//climb 1
String gorillaClimb1 = gorillaFirst.climb();
System.out.println(gorillaClimb1);
System.out.println(printCurrentGorillaEnergyLevel);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
]
| [
"0.66708666",
"0.65675074",
"0.65229905",
"0.6481001",
"0.64770633",
"0.64584893",
"0.6413091",
"0.63764185",
"0.6275735",
"0.62541914",
"0.6236919",
"0.6223816",
"0.62017626",
"0.61944294",
"0.61944294",
"0.61920846",
"0.61867654",
"0.6173323",
"0.61328775",
"0.61276996",
"0.6080555",
"0.6076938",
"0.6041293",
"0.6024541",
"0.6019185",
"0.5998426",
"0.5967487",
"0.5967487",
"0.5964935",
"0.59489644",
"0.59404725",
"0.5922823",
"0.5908894",
"0.5903041",
"0.5893847",
"0.5885641",
"0.5883141",
"0.586924",
"0.5856793",
"0.58503157",
"0.58464456",
"0.5823378",
"0.5809384",
"0.58089525",
"0.58065355",
"0.58065355",
"0.5800514",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57912874",
"0.57896614",
"0.5789486",
"0.5786597",
"0.5783299",
"0.5783299",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5773351",
"0.5760369",
"0.5758614",
"0.5758614",
"0.574912",
"0.574912",
"0.574912",
"0.57482654",
"0.5732775",
"0.5732775",
"0.5732775",
"0.57207066",
"0.57149917",
"0.5714821",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57132614",
"0.57115865",
"0.57045746",
"0.5699",
"0.5696016",
"0.5687285",
"0.5677473",
"0.5673346",
"0.56716853",
"0.56688815",
"0.5661065",
"0.5657898",
"0.5654782",
"0.5654782",
"0.5654782",
"0.5654563",
"0.56536144",
"0.5652585",
"0.5649566"
]
| 0.0 | -1 |
some double adds that should not matter | public static void enter_values(TagBasedEncoder<?> encoder) {
encoder.addEntryT(bool_test_tag, bool_test_value);
encoder.addEntryT("confuse???123123", 1234123+"WeirdTag ValueSwear");
encoder.addEntryT(str_test_tag, str_test_value);
encoder.addEntryT("confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT("confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(int_test_tag, int_test_value);
encoder.addEntryT("WeirdTag confuse", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT("confuse???", 1234123+"WeirdTagVa lueSwear");
encoder.addEntryT(weird_long_tag, weird_long_value);
encoder.addEntryT(empty_tag_test_tag, empty_tag_test_value);
encoder.addEntryT(empty_val_test_tag, empty_val_test_value);
encoder.addEntryT("confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(empty_strarr_test_tag, empty_strarr_test_value); //empty is not written into the system.
encoder.addEntryT(strarr_test_tag, strarr_test_value);
encoder.addEntryT(empty_intarr_test_tag, empty_intarr_test_value); //empty is not written into the system.
encoder.addEntryT(intarr_test_tag, intarr_test_value);
encoder.addEntryT("confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(strarr2d_test_tag, strarr2d_test_value);
encoder.addEntryT("confuse???1231235", 1234123+"WeirdTa gValueSwear");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic double add(double in1, double in2) {\n\t\treturn 0;\n\t}",
"public void add()\r\n {\r\n resultDoubles = Operations.addition(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"@Override\n\tpublic double add(double a, double b) {\n\t\treturn (a+b);\n\t}",
"Double add(Double a, Double b);",
"public void add(Double addedAmount) {\n }",
"void add(double val) {\r\n\t\tresult = result + val;\r\n\t}",
"void add(double p1, double p2){\n this.p1 += p1;\n this.p2 += p2;\n }",
"public static double add(double a, double b){\r\n\t\treturn a+b;\r\n\t}",
"static double add(double a, double b){\nreturn a+b;\n}",
"@Override\r\n\tpublic double add() {\r\n\t\tdouble outcome = firstVariable + secondVariable;\r\n\t\treturn outcome;\r\n\t\r\n\t}",
"default DiscreteDoubleMap2D plus(double value) {\r\n\t\treturn pushForward(d -> d + value);\r\n\t}",
"public static double add(double a, double b)\n\t{\n\t\treturn a + b;\n\t}",
"private void addTwoNumbers() {\n\t\t\n\t}",
"public int sumDouble(int a, int b) {\n int sum = a + b;\n if (a == b){\n sum *= 2;\n }\n\n return sum; \n}",
"public void add(double i)\n\t{\n\t\tthis.i += i;\n\t}",
"public double add(int a, int b){\r\n return a + b;\r\n }",
"@Override\n\tpublic void add(double dx, double dy) {\n\t\t\n\t}",
"public void adaugT(Double temp) {\r\n\t\tset.add(temp); \r\n\t}",
"public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }",
"@Override\n\tpublic void\n\tscalarAdd( double value )\n\t{\n\t\tdata[0] += value;\n\t\tdata[1] += value;\n\t\tdata[2] += value;\n\t}",
"public double add(double num1, double num2) {\n return num1 + num2;\n }",
"@Override\r\n\tpublic void add(float var) {\n\t\t\r\n\t}",
"public void addDif() {\n this.polyAddSolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.daa = 3 * this.aadd;\n this.dba = 2 * this.badd;\n this.dca = this.cadd;\n if (this.adddegree == 3) {\n d1 = \"dy/dx = \" + this.daa + \"x^2 \";\n if (this.badd == 0) {\n dd2 = 1;\n } else {\n if (this.dba > 0) {\n d2 = \"+ \" + this.dba + \"x \";\n } else {\n d2 = \"- \" + -this.dba + \"x \";\n }\n }\n if (this.cadd == 0) {\n dd3 = 1;\n } else {\n if (this.dca > 0) {\n d3 = \"+ \" + this.dca;\n } else {\n d3 = \"- \" + -this.dca;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.adddiff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.adddiff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.adddiff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.adddiff = d1 + d3;\n }\n\n }\n if (this.adddegree == 2) {\n d1 = \"dy/dx = \" + this.db + \"x \";\n if (this.dca == 0) {\n this.adddiff = d1;\n } else {\n if (this.dca > 0) {\n this.adddiff = d1 + \"+\" + this.dca;\n } else {\n this.adddiff = d1 + \"-\" + -this.dca;\n }\n }\n }\n if (this.adddegree == 1) {\n this.adddiff = \"dy/dx = \" + this.cadd;\n }\n if (this.adddegree == 0) {\n this.adddiff = \"dy/dx = \" + 0;\n }\n\n }",
"@Override\r\n\tpublic double extra() {\n\t\treturn 0.05;\r\n\t}",
"public void testPlus() {\n \tMeasurement a = new Measurement(1,10);\n \tMeasurement b = new Measurement(1,13);\n \tMeasurement c = a.plus(b);\n \t\n assertTrue(a.getFeet() == 1);\n assertTrue(a.getInches() == 10);\n assertTrue(b.getFeet() == 2);\n assertTrue(b.getInches() == 1);\n \n assertTrue(c.getFeet() == 3);\n assertTrue(c.getInches() == 11);\n }",
"public double add(double x, double y) {\n\t\treturn x+y;\n\t}",
"public void visitDADD(DADD o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tif (stack().peek(1) != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack next-to-top is not of type 'double', but of type '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}",
"public void testAdd() {\r\n System.out.println(\"Add\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E300, -1.1E300}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E300, -1.1E300}, \r\n {-6., 0., -1., 0., 2., 0., 6.4, 7.2, 2.2E300, -2.2E300}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Add(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }",
"@Override\n public Float plus(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs + rhs;\n\treturn res;\t\n }",
"public void AddMoneySaved(double moneySaved){\n MoneySaved += moneySaved;\n }",
"void add(double a, double b) {\n\t\tdouble sum = a + b;\n\t\tSystem.out.println(\"Sum of a+b is \" + sum);\n\t}",
"@Parameters({\"12, 2, 14\", \"3, 4, 7\", \"4, 4, 8\", \"1, 2, 3\", \"1, 2, 3\", \"10, 4, 14\", \"100, 100, 200\", \"50, 25, 75\",\n \"50, 25, 75\", \"30, 30, 60\", \"0, 0, 0\", \"2147483646, 1, 2147483647\"})\n public void testAddMethod(double a, double b, double result) {\n assertEquals(result, calc.add(a, b), 0.1);\n }",
"static void add() {\r\n\t\t\r\n\t\tint a = 500;\r\n\t\tint b = 300;\r\n\t\t\r\n\t\tint s = a +b;\r\n\t\tSystem.out.println(s);\r\n\t}",
"public static double Add(double x, double y) \n\t{\n\t\treturn x + y;\n\t\t\n\t}",
"private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}",
"public double addToSpent(double addAmount){\r\n\t\tspent +=addAmount;\r\n\t\treturn spent;\r\n\t}",
"public void add(double val) {\n sum += val;\n sumQ += val * val;\n count++;\n if (val < min) min = val;\n if (val > max) max = val;\n }",
"@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }",
"@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}",
"public void add(double a, double b)\n\t{\n\t\tdouble c = a+b;\n\t\tSystem.out.println(\"Sum of numbers is \"+c);\n\t\t\n\t}",
"public void add (double a , int b) {\n\t\tdouble c=a+b;\r\n\t\tSystem.out.println(\"Sum of numbers is : \" + c);\r\n\t}",
"@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}",
"public final void plus (Unit unit) throws ArithmeticException {\n\t\tboolean error = false;\n\t\tif (((mksa|unit.mksa)&_abs)!=0) {\t// Special dates\n\t\t\tif (mksa != (_abs^unit.mksa)) error = true;\n\t\t\telse mksa |= _abs;\t\t\t// Result is a date\n\t\t}\n\t\telse error = (mksa&(~_pic)) != (unit.mksa&(~_pic));\n\t\tif (error) throw new ArithmeticException\n\t\t(\"****Unit: can't combine: \" + symbol + \" + \" + unit.symbol);\n\t\t/* Addition in log scale: a+b=a+f*log(1.+10^((b-a)/f)) */\n\t\tvalue += (unit.value*unit.factor)/factor;\n\t}",
"void add(int idx, float incr);",
"@Test\n public void addTest() {\n double expected = 5.5;\n double actual = calculatorApp.add();\n Assert.assertThat(\"Addition function in CalculatorApp: Expected != Real\", actual, is(expected));\n }",
"public void add(int index, double value) {\n\t\t\n\t}",
"public MutableDouble add(double value) {\n\t\tmDouble += value;\n\t\treturn this;\n\t}",
"@Override\n\t\tpublic Double fazCalculo(Double num1, Double num2) {\n\t\t\treturn num1 + num2;\n\t\t}",
"double getSum();",
"double getSum();",
"long getAndAdd(long delta);",
"public void add (int b , double a) {\n\t\tdouble c=a+b;\r\n\t\tSystem.out.println(\"Sum of numbers is : \" + c);\r\n\t}",
"BaseNumber add(BaseNumber operand);",
"public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}",
"public T plus( double b ) {\n T ret = createLike();\n ops.plus(mat, b, ret.mat);\n return ret;\n }",
"@Override\n\tpublic void visit(Addition arg0) {\n\n\t}",
"boolean isAdditionAllowed();",
"@Override\r\n\tprotected Integer add(Integer x1, Integer x2) {\n\t\treturn x2+x1;\r\n\t}",
"public static double dAdd(double i, double j) {\n \t\treturn i + j;\n \t}",
"public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }",
"@Override\n\tpublic double multiply(double in1, double in2) {\n\t\treturn 0;\n\t}",
"private static double addOneAndHalf(int x) {\n return x + 1.5;\n }",
"@Override\n public Tuple3<Long, Double, Double> add(Tuple3<Long, Double, Double> tuple, Tuple3<Long, Double, Double> acc) {\n acc.f0 = tuple.f0;\n acc.f1 += tuple.f1;\n acc.f2 += tuple.f2;\n return acc;\n }",
"public void add(final Double e) {\n data.add(e);\n }",
"public static void add(float a,int b){ }",
"protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}",
"public int addValue(double f) {\n return foldIn(Double.doubleToLongBits(f));\n }",
"@Override\r\n\tpublic int numCurrentsToAdd() {\n\t\treturn 2;\r\n\t}",
"static public Object add(Object a, Object b) throws Exception {\r\n\t\t//\r\n\t\tif (a instanceof String || b instanceof String)\r\n\t\t\treturn asString(a) + asString(b);\r\n\t\treturn new Double(asNumber(a) + asNumber(b));\r\n\t}",
"@Override\n public InterpreterValue add(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the addition-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() + ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the addition-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() + ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '+' is not defined for type double and \" + v.getName());\n\n }",
"protected boolean performAdd(Triple e) {\n return wrapped.add(e);\n }",
"@Test\n\tpublic void testAddition() {\n\t\tint tmpRndVal = 0;\n\t\tint tmpRndVal2 = 0;\n\t\tint tmpResult = 0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = RandomNegativeNumbers();\n\t\t\ttmpRndVal2 = RandomNegativeNumbers();\n\t\t\ttmpResult = tmpRndVal + tmpRndVal2;\n\t\t\tassertEquals(bc.addition(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = RandomPositiveNumbers();\n\t\t\ttmpRndVal2 = RandomPositiveNumbers();\n\t\t\ttmpResult = tmpRndVal + tmpRndVal2;\n\t\t\tassertEquals(bc.addition(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tint zero = 0;\n\t\tint tmpVal = 7;\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tassertTrue( ((bc.addition(tmpVal, zero) == zero) \n\t\t\t\t\t|| (bc.addition(zero, zero) == zero)\n\t\t\t\t\t|| (bc.addition(zero, tmpVal) == zero) ));\n\t\t}\n\t\t\n\t}",
"public void add(int add) {\r\n value += add;\r\n }",
"public static void add(int a,float b){ }",
"@Test\n public void testSumActualAddedModifiedSizeSquared()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSizeSquared(), 7604693.0, 0.01);\n }",
"@Override\n\tpublic double calc(double d1, double d2) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add(int x, int y) {\n\t\treturn x * y;\n\t}",
"@Test\n\tpublic void addWorksForModeNone() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tfinal ReadOnlyTimeSeries sum = MultiTimeSeriesUtils.add(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0, 120, true, null, false);\n\t\tAssert.assertEquals(\"Time series sum has wrong number of data points\", 13, sum.size());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 30, sum.getValue(20).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 20, sum.getValue(45).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 10, sum.getValue(80).getValue().getIntegerValue());\n\t}",
"private static BigInteger forceAdd(BigInteger first, BigInteger second) {\n\t\tBigInteger i = new BigInteger();\n\t\tint sign1 = first.sign(), sign2 = second.sign();\n\t\ti.front = new DigitNode(0, null); // dummy\n\t\tfor(DigitNode n1 = first.front, n2 = second.front, n = i.front; n1 != null || n2 !=null; n = n.next) {\n\t\t\tint value = 0;\n\t\t\tif (n1 != null) {\n\t\t\t\tvalue += n1.digit*sign1;\n\t\t\t\tn1 = n1.next;\n\t\t\t}\n\t\t\tif (n2 != null) {\n\t\t\t\tvalue += n2.digit*sign2;\n\t\t\t\tn2 = n2.next;\n\t\t\t}\n\t\t\tn.next = new DigitNode(value, null);\n\t\t\tif (value != 0) i.negative = (value < 0);\n\t\t\ti.numDigits++;\n\t\t}\n\t\ti.front = i.front.next; //skip the dummy\n\t\treturn i;\n\t}",
"void addToAmount(double amount) {\n this.currentAmount += amount;\n }",
"void addDistance(float distanceToAdd);",
"Point add (double x, double y, Point result);",
"public void add(double sthis, Vec vthat, double sthat);",
"@Test\n public void test01() {\n\n float a = 0.1f;\n float b = 0.2f;\n float c = 0.4f;\n float d = 0.6f;\n\n\n System.out.println(a+b);\n System.out.println(c+d);\n\n System.out.println(a+b == 0.3d);\n System.out.println(c+d == 1.0d);\n }",
"@Test\n public void testSumActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSize(), 6389.0, 0.01);\n }",
"@Override\r\n\tpublic int add(int a,int b) {\n\t\treturn a+b;\r\n\t}",
"public void add(int arg0, int arg1, double arg2) {\n\t\tif (Math.max(0, arg1 - hbw_) <= arg0 && arg0 <= arg1)\n\t\t\tmat_[arg0][arg1 - arg0] += arg2;\n\t}",
"private static double totalPrice(double price_interest, double dwnpymnt) {\n \treturn price_interest + dwnpymnt;\n }",
"@Test\n\tpublic void addTest() {\n\t\t\n\t\tFraction expected = new Fraction(120, 200);\n\t\tFraction actual = x.add(y);\n\t\t\n\t\tassertEquals(expected.getNumerator(), actual.getNumerator());\n\t\tassertEquals(expected.getDenominator(), actual.getDenominator());\n\t\tassertEquals(expected.toString(), actual.toString());\n\t\t\n\t}",
"@Override\n\tpublic int add(int a, int b) {\n\t\treturn a+b;\n\t}",
"public strictfp double sum() {\n double num1 = 10e+10;\n double num2 = 6e+08;\n return (num1 + num2);\n }",
"@Override\r\n\t\tvoid calculate() {\r\n\t\t\tnum3=num1+num2;\r\n\t\t\t\r\n\t\t}",
"public double add(double firstNumber, double secondNUmber){\n\t\treturn firstNumber + secondNUmber;\n\t}",
"@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}",
"public void add(Number v)\n\t{ total = total + v.doubleValue(); }",
"@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int plus(int left, int right) {\n\t\treturn left + right; \r\n\t\t//return 0;\r\n\t}",
"private String doAddition(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"+\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"+\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 + number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}",
"@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}",
"public void addPrice(float add) {\n price += add;\n totalPrizeLabel.setText(String.format(\"£%.02f\", price));\n }",
"public static void add(Double[] vector, Double adder) {\r\n // ...\r\n for (int i = 0; i < vector.length; i++){\r\n vector[i] = vector[i] + adder;\r\n }\r\n }"
]
| [
"0.7498091",
"0.7243579",
"0.7154469",
"0.71069074",
"0.694341",
"0.6879942",
"0.674453",
"0.6598903",
"0.6566361",
"0.6556864",
"0.64059687",
"0.64015454",
"0.6376668",
"0.63438666",
"0.63360614",
"0.6283175",
"0.62240297",
"0.61955094",
"0.6194916",
"0.6188527",
"0.61861956",
"0.6157468",
"0.6143743",
"0.6126752",
"0.61239415",
"0.6099193",
"0.6069857",
"0.60677826",
"0.60637116",
"0.60630745",
"0.60361594",
"0.60261",
"0.5994817",
"0.5980164",
"0.5965226",
"0.59521145",
"0.593785",
"0.5927868",
"0.5924252",
"0.59192586",
"0.5905592",
"0.5904532",
"0.58986866",
"0.5894881",
"0.58948016",
"0.58944285",
"0.5893964",
"0.58939534",
"0.5891565",
"0.5891565",
"0.5880672",
"0.58759266",
"0.58717334",
"0.5870896",
"0.5865996",
"0.58656126",
"0.5861552",
"0.586078",
"0.5858918",
"0.5846708",
"0.58350307",
"0.5832318",
"0.58289164",
"0.581243",
"0.58118534",
"0.58068955",
"0.5803649",
"0.58035934",
"0.57936317",
"0.57875514",
"0.5784375",
"0.57835895",
"0.57831824",
"0.5779296",
"0.5773953",
"0.5764542",
"0.57446",
"0.5741909",
"0.5741284",
"0.5718734",
"0.5718594",
"0.5712964",
"0.5691974",
"0.5686337",
"0.5678854",
"0.5669844",
"0.56635165",
"0.5661779",
"0.565887",
"0.56576145",
"0.56574816",
"0.5650653",
"0.56503224",
"0.56406593",
"0.5627938",
"0.5623538",
"0.5622895",
"0.5616553",
"0.5615622",
"0.5614214",
"0.5613843"
]
| 0.0 | -1 |
Tests for most(except infinite variations on arrays) available, supported data types whether or not it can correctly recreate the stored object. This functionality is required by the serializer | public static void basic_typed_system_test(TagBasedEncoder<?> tbe) {
Object orig_1 = "whatup";
Object orig_2 = false;
Object orig_3 = (byte) 123;
Object orig_4 = 65432;
Object orig_5 = 45645674655L;
Object orig_6 = true;
Object orig_7 = (byte)-23;
Object orig_8 = -6123123;
Object orig_9 = -32472532423245L;
Object orig_10 = new String[] {"123123141", "234234234", "gsdkjlhgsjdfsjlg", "test"};
Object orig_11 = new boolean[]{false, true, true, false};
Object orig_12 = new byte[]{-12, 13, 15, 93, -80};
Object orig_13 = new int[]{121321, -123123, 123123, 123123, -14123, 876574};
Object orig_14 = new long[]{-32472213123423245L, -32472212423245L, -32472532423242L};
Object orig_15 = new String[][]{{"test", "test", "test"}, {"1", "2", "3"}};
Object orig_16 = new LIbae();
Object orig_17 = new LIse("hallo", "dies", "ist", "ein", "test");
tbe.addEntryT("#####1", orig_1);
tbe.addEntryT("#####2", orig_2);
tbe.addEntryT("#####3", orig_3);
tbe.addEntryT("#####4", orig_4);
tbe.addEntryT("#####5", orig_5);
tbe.addEntryT("#####6", orig_6);
tbe.addEntryT("#####7", orig_7);
tbe.addEntryT("#####8", orig_8);
tbe.addEntryT("#####9", orig_9);
tbe.addEntryT("#####10", orig_10);
tbe.addEntryT("#####11", orig_11);
tbe.addEntryT("#####12", orig_12);
tbe.addEntryT("#####13", orig_13);
tbe.addEntryT("#####14", orig_14);
tbe.addEntryT("#####15", orig_15);
tbe.addEntryT("#####16", orig_16);
tbe.addEntryT("#####17", orig_17);
String result_1 = tbe.getEntryT("#####1", String.class);
Boolean result_2 = tbe.getEntryT("#####2", Boolean.class);
Byte result_3 = tbe.getEntryT("#####3", Byte.class);
Integer result_4 = tbe.getEntryT("#####4", Integer.class);
Long result_5 = tbe.getEntryT("#####5", Long.class);
boolean result_6 = tbe.getEntryT("#####6", boolean.class);
byte result_7 = tbe.getEntryT("#####7", byte.class);
int result_8 = tbe.getEntryT("#####8", int.class);
long result_9 = tbe.getEntryT("#####9", long.class);
String[] result_10 = tbe.getEntryT("#####10", String[].class);
boolean[] result_11 = tbe.getEntryT("#####11", boolean[].class);
byte[] result_12 = tbe.getEntryT("#####12", byte[].class);
int[] result_13 = tbe.getEntryT("#####13", int[].class);
long[] result_14 = tbe.getEntryT("#####14", long[].class);
String[][] result_15 = tbe.getEntryT("#####15", String[][].class);
LIbae result_16 = tbe.getEntryT("#####16", LIbae.class);
LIse result_17 = tbe.getEntryT("#####17", LIse.class);
assertEquals(orig_1, result_1);
assertEquals(orig_2, result_2);
assertEquals(orig_3, result_3);
assertEquals(orig_4, result_4);
assertEquals(orig_5, result_5);
assertEquals(orig_6, result_6);
assertEquals(orig_7, result_7);
assertEquals(orig_8, result_8);
assertEquals(orig_9, result_9);
assertArrayEquals((String[])orig_10, result_10);
assertArrayEquals((boolean[]) orig_11, result_11);
assertArrayEquals((byte[]) orig_12, result_12);
assertArrayEquals((int[]) orig_13, result_13);
assertArrayEquals((long[]) orig_14, result_14);
assertArrayEquals((String[][]) orig_15, result_15);
assertEquals(orig_16, result_16);
assertEquals(orig_17, result_17);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean isArray() {\n return false;\n }",
"@Override\r\n public boolean isArray() throws Exception\r\n {\n return false;\r\n }",
"public static boolean isArray_dataType() {\n return false;\n }",
"public void fixmetestPositiveArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n final String[] values1 = { \"10\", \"20\", \"30\" };\n Object value = LocaleConvertUtils.convert(values1, Integer.TYPE);\n final int[] shape = {};\n assertEquals(shape.getClass(), value.getClass());\n final int[] results1 = (int[]) value;\n assertEquals(results1[0], 10);\n assertEquals(results1[1], 20);\n assertEquals(results1[2], 30);\n\n final String[] values2 = { \"100\", \"200\", \"300\" };\n value = LocaleConvertUtils.convert(values2, shape.getClass());\n assertEquals(shape.getClass(), value.getClass());\n final int[] results2 = (int[]) value;\n assertEquals(results2[0], 100);\n assertEquals(results2[1], 200);\n assertEquals(results2[2], 300);\n }",
"@Test(expected = PathMismatchException.class)\n public void testArrayAddUniqueInArrayWithNonPrimitives() {\n JsonObject root = JsonObject.create().put(\"array\", JsonArray.create().add(JsonArray.empty()));\n ctx.bucket().upsert(JsonDocument.create(key, root));\n\n //not a primitive only array => MISMATCH\n DocumentFragment<String> fragment = DocumentFragment.create(key, \"array\", \"arrayInsert\");\n DocumentFragment<String> result = ctx.bucket().addUniqueIn(fragment, false, PersistTo.NONE, ReplicateTo.NONE);\n }",
"Boolean isSingleValueOrArray();",
"public boolean isArrayType()\n/* */ {\n/* 138 */ return true;\n/* */ }",
"public static boolean isArray_quality() {\n return false;\n }",
"public boolean isArray(){\n\t\treturn false;\n\t}",
"@Override\n public boolean isObject() {\n return false;\n }",
"@Test public void getBaseTypeShouldReturnCorrectType() throws SQLException {\n\t\tList<Object> list = new ArrayList<>();\n\t\tArray array;\n\t\tfor (int type : Array.TYPES_SUPPORTED) {\n\t\t\tarray = new ListArray(list, type);\n\t\t\tassertEquals(type, array.getBaseType());\n\t\t}\n\t}",
"public void fixmetestObjectToStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n final int[] intArray0 = {};\n final int[] intArray1 = { 123 };\n final int[] intArray2 = { 123, 456 };\n final String[] stringArray0 = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"def\" };\n\n assertEquals(\"intArray0\", null, LocaleConvertUtils.convert(intArray0));\n assertEquals(\"intArray1\", \"123\", LocaleConvertUtils.convert(intArray1));\n assertEquals(\"intArray2\", \"123\", LocaleConvertUtils.convert(intArray2));\n\n assertEquals(\"stringArray0\", null, LocaleConvertUtils.convert(stringArray0));\n assertEquals(\"stringArray1\", \"abc\", LocaleConvertUtils.convert(stringArray1));\n assertEquals(\"stringArray2\", \"abc\", LocaleConvertUtils.convert(stringArray2));\n\n }",
"@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}",
"public boolean isArray() {\n return false;\n }",
"public boolean isArray() {\n return false;\n }",
"void setArrayGeneric(int paramInt)\n/* */ {\n/* 1062 */ this.length = paramInt;\n/* 1063 */ this.datums = new Datum[paramInt];\n/* 1064 */ this.pickled = null;\n/* 1065 */ this.pickledCorrect = false;\n/* */ }",
"default boolean isArray() {\n return false;\n }",
"@Test\r\n\tpublic void testToArrayType() {\r\n\t\tMunitions[] sample1 = new Munitions[5];\r\n\t\tsample1 = list.toArray(sample1);\r\n\t\tAssert.assertEquals(15, sample1.length);\r\n\t\tfor (int i = 0; i < sample1.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t\tMunitions[] sample2 = new Munitions[20];\r\n\t\tsample2 = list.toArray(sample2);\r\n\t\tAssert.assertEquals(20, sample2.length);\r\n\t\tfor (int i = 0; i < sample2.length - list.size(); i++) {\r\n\t\t\tAssert.assertNotNull(sample1[i]);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean isPrimitiveTypeExpected() {\n\t\treturn false;\n\t}",
"public boolean isArray();",
"public static boolean isArray_data() {\n return true;\n }",
"public static boolean isArray_infos_type() {\n return false;\n }",
"@Test\r\n public void testGenericArray()\r\n {\r\n Type t0 = Types.create(List.class).withType(Number.class).build();\r\n Type arrayType = Types.createGenericArrayType(t0);\r\n test(arrayType);\r\n }",
"public void fixmetestPositiveIntegerArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final int[] intArray = {};\n final int[] intArray1 = { 0 };\n final int[] intArray2 = { 0, 10 };\n\n value = LocaleConvertUtils.convert(\"{ }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n\n value = LocaleConvertUtils.convert(\"0\", intArray.getClass());\n checkIntegerArray(value, intArray1);\n value = LocaleConvertUtils.convert(\" 0 \", intArray.getClass());\n checkIntegerArray(value, intArray1);\n value = LocaleConvertUtils.convert(\"{ 0 }\", intArray.getClass());\n checkIntegerArray(value, intArray1);\n\n value = LocaleConvertUtils.convert(\"0,10\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"0 10\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{0,10}\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{0 10}\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{ 0, 10 }\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n value = LocaleConvertUtils.convert(\"{ 0 10 }\", intArray.getClass());\n checkIntegerArray(value, intArray2);\n }",
"@Test\n public void testDeSerializeArray() throws Exception {\n Writable w = new Text(\"{\\\"country\\\":\\\"Switzerland\\\",\\\"languages\\\": [ \\\"Italian\\\" ],\\\"religions\\\": \\\"christian\\\" }\");\n\n JSONObject result = (JSONObject) instance.deserialize(w);\n StructObjectInspector soi = (StructObjectInspector) instance.getObjectInspector();\n\n // this one is an actuall array\n StructField sflang = soi.getStructFieldRef(\"languages\");\n // this one has a scalar, which will be promoted to a one element array\n StructField sfrel = soi.getStructFieldRef(\"religions\");\n\n assertEquals(sflang.getFieldObjectInspector().getCategory(), ObjectInspector.Category.LIST);\n assertEquals(sfrel.getFieldObjectInspector().getCategory(), ObjectInspector.Category.LIST);\n\n ListObjectInspector loi = (ListObjectInspector) sflang.getFieldObjectInspector();\n Object val = soi.getStructFieldData(result, sflang);\n assertEquals(1, loi.getListLength(val));\n assertEquals(\"Italian\", loi.getListElement(val, 0));\n\n loi = (ListObjectInspector) sfrel.getFieldObjectInspector();\n val = soi.getStructFieldData(result, sfrel);\n assertEquals(1, loi.getListLength(val));\n assertEquals(\"christian\", loi.getListElement(val, 0));\n\n }",
"void arrays_hierarchy_may_lead_to_unsafety() {\n\r\n Object[] objectArray = new Long[1];\r\n objectArray[0] = \"boom\"; // Throws ArrayStoreException\r\n\r\n // Generic Collections are invariant (don't preserve inheritance):\r\n // i.e. if Child extends Parent, then List<Child> isn't a subtype of List<Parent>.\r\n\r\n // Using Collections, it raises issue at compile time:\r\n\r\n /**\r\n * List<Object> numbers = new ArrayList<Number>();\r\n * numbers.add(\"boom\");\r\n */\r\n\r\n }",
"@Test\r\n\tpublic void getRelatedFieldsArraySizeOne() {\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"relatedFields size should be 1\", 1, testObj.getRelatedFieldsArray().length);\r\n\t}",
"@Test\n public void testDeSerializeEmptyArray() throws Exception {\n Writable[] wa = new Writable[]{\n new Text(\"{\\\"country\\\":\\\"Switzerland\\\",\\\"languages\\\":[\\\"Italian\\\"],\\\"religions\\\":\\\"\\\"}\")\n };\n\n for (Writable w : wa) {\n JSONObject result = (JSONObject) instance.deserialize(w);\n StructObjectInspector soi = (StructObjectInspector) instance.getObjectInspector();\n StructField sfr = soi.getStructFieldRef(\"religions\");\n\n assertEquals(sfr.getFieldObjectInspector().getCategory(), ObjectInspector.Category.LIST);\n\n ListObjectInspector loi = (ListObjectInspector) sfr.getFieldObjectInspector();\n Object val = soi.getStructFieldData(result, sfr);\n\n assertEquals(-1, loi.getListLength(val));\n }\n\n }",
"@Test(timeout = 4000)\n public void test048() throws Throwable {\n JSONObject jSONObject0 = new JSONObject();\n jSONObject0.put(\",\\n\", (Object) null);\n Float float0 = new Float(1.0);\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(float0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"public void fixmetestNegativeIntegerArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final int[] intArray = {};\n\n value = LocaleConvertUtils.convert((String) null, intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"a\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ a }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"1a3\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ 1a3 }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"0,1a3\", intArray.getClass());\n checkIntegerArray(value, intArray);\n value = LocaleConvertUtils.convert(\"{ 0, 1a3 }\", intArray.getClass());\n checkIntegerArray(value, intArray);\n\n }",
"@Override\r\n\tprotected Object covertToArrayType(Object componentType) throws SerializeException {\r\n\t\t//return super.covertToArrayType(AdvancedDeserializerUtil.covertToArrayType(componentType));\r\n\t\treturn super.covertToArrayType(AdvancedDeserializerUtil.covertToArrayType(componentType));\r\n\t}",
"@Override\n\tpublic boolean checkHomogeneous(List<int[]> input) {\n\t\treturn false;\n\t}",
"private Object arrayToSPLArray(String name, JSONArray jarr, Type ptype) throws Exception {\n\t\tif(l.isLoggable(TraceLevel.DEBUG)) {\n\t\t\tl.log(TraceLevel.DEBUG, \"Creating Array: \" + name);\n\t\t}\n\t\tCollectionType ctype = (CollectionType) ptype;\n\t\tint cnt=0;\n\t\tString cname = \"List: \" + name;\n\n\t\tswitch(ctype.getElementType().getMetaType()) {\n\t\tcase INT8:\n\t\tcase UINT8: \n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tbyte[] arr= new byte[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Byte)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT16:\n\t\tcase UINT16:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tshort[] arr= new short[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Short)val;\n\t\t\treturn arr;\n\t\t} \n\t\tcase INT32:\n\t\tcase UINT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tint[] arr= new int[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Integer)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase INT64:\n\t\tcase UINT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tlong[] arr= new long[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Long)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase BOOLEAN:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tboolean[] arr= new boolean[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Boolean)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT32:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tfloat[] arr= new float[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Float)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase FLOAT64:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj!=null) lst.add(obj);\n\t\t\t}\n\n\t\t\tdouble[] arr= new double[lst.size()];\n\t\t\tfor(Object val : lst)\n\t\t\t\tarr[cnt++] = (Double)val;\n\t\t\treturn arr;\n\t\t} \n\n\t\tcase USTRING:\n\t\t{\n\t\t\tList<String> lst = new ArrayList<String>();\n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((String)obj);\n\t\t\t}\n\t\t\treturn lst.toArray(new String[lst.size()]);\n\t\t} \n\n\t\tcase BSTRING:\n\t\tcase RSTRING:\n\t\t{\n\t\t\tList<RString> lst = new ArrayList<RString>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((RString)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase TUPLE:\n\t\t{\n\t\t\tList<Tuple> lst = new ArrayList<Tuple>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Tuple)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\t\tcase LIST:\n\t\tcase BLIST:\n\t\t{\n\t\t\tList<Object> lst = new ArrayList<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase SET:\n\t\tcase BSET:\n\t\t{\n\t\t\tSet<Object> lst = new HashSet<Object>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add(obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase DECIMAL32:\n\t\tcase DECIMAL64:\n\t\tcase DECIMAL128:\n\t\t{\n\t\t\tList<BigDecimal> lst = new ArrayList<BigDecimal>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((BigDecimal)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\t\tcase TIMESTAMP:\n\t\t{\n\t\t\tList<Timestamp> lst = new ArrayList<Timestamp>(); \n\t\t\tfor(Object jsonObj : jarr) {\n\t\t\t\tObject obj =jsonToAttribute(cname, ctype.getElementType(), jsonObj, ptype);\n\t\t\t\tif(obj != null) \n\t\t\t\t\tlst.add((Timestamp)obj);\n\t\t\t}\n\t\t\treturn lst;\n\t\t}\n\n\n\t\t//TODO -- not yet supported types\n\t\tcase BLOB:\n\t\tcase MAP:\n\t\tcase BMAP:\n\t\tcase COMPLEX32:\n\t\tcase COMPLEX64:\n\t\tdefault:\n\t\t\tthrow new Exception(\"Unhandled array type: \" + ctype.getElementType().getMetaType());\n\t\t}\n\n\t}",
"@Test\n public void testArrayCreationWithGeneralReturnType() {\n final Object obj = ArrayUtils.toArray(\"foo\", \"bar\");\n assertTrue(obj instanceof String[]);\n }",
"public static boolean isArray_infos_size_data() {\n return false;\n }",
"@SuppressWarnings(\"unchecked\") // this will stop Java complaining about the cast\n private void ensureCapacity() {\n if (count == data.length) { //if count is equal to the length of data a new array is made doubling the initial size, it then makes the data collection == to the temp collection\n E[] temp = (E[]) new String[data.length * 2]; //effectivly increasing the size of the array\n for (int i = 0; i < data.length; i++) {\n temp[i] = data[i];\n }\n data = temp;\n }\n }",
"public void testConstructorWithMalformedArrayValuesProperty3() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_SIMPLE_STRING, \"1\", \"{\\\"1\\\",\\\"2}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"public void fixmetestPositiveStringArray() {\n\n fail(\"Array conversions not implemented yet.\");\n\n Object value;\n final String[] stringArray = {};\n final String[] stringArray1 = { \"abc\" };\n final String[] stringArray2 = { \"abc\", \"de,f\" };\n\n value = LocaleConvertUtils.convert(\"\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\" \", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{}\", stringArray.getClass());\n checkStringArray(value, stringArray);\n value = LocaleConvertUtils.convert(\"{ }\", stringArray.getClass());\n checkStringArray(value, stringArray);\n\n value = LocaleConvertUtils.convert(\"abc\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{abc}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"'abc'\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n value = LocaleConvertUtils.convert(\"{'abc'}\", stringArray.getClass());\n checkStringArray(value, stringArray1);\n\n value = LocaleConvertUtils.convert(\"abc 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{abc, 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"\\\"abc\\\",\\\"de,f\\\"\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{\\\"abc\\\" 'de,f'}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"'abc' 'de,f'\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n value = LocaleConvertUtils.convert(\"{'abc', \\\"de,f\\\"}\", stringArray.getClass());\n checkStringArray(value, stringArray2);\n\n }",
"public void testConstructorWithMalformedArrayValuesProperty6() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2,3,,5}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"@SuppressWarnings(\"all\")\n protected static boolean writeArrayType(Output out, Object arrType) {\n log.trace(\"writeArrayType\");\n if (arrType instanceof Collection) {\n out.writeArray((Collection<Object>) arrType);\n } else if (arrType instanceof Iterator) {\n writeIterator(out, (Iterator<Object>) arrType);\n } else if (arrType.getClass().isArray() && arrType.getClass().getComponentType().isPrimitive()) {\n out.writeArray(arrType);\n } else if (arrType instanceof Object[]) {\n out.writeArray((Object[]) arrType);\n } else {\n return false;\n }\n return true;\n }",
"public void testConstructorWithMalformedArrayValuesProperty4() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"2\", \"{{1},{2}}}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"@Override\n public Boolean isSuitableAs(Type rhs) {\n //since an array can be null\n if (rhs == null || rhs == virtualArrayType) return true;\n return rhs instanceof ArrayType\n && baseType.isSuitableAs(((ArrayType) rhs).baseType);\n }",
"public void testConstructorWithMalformedArrayValuesProperty1() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"{1,2\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"public boolean supportsJsonType() {\n return false;\n }",
"static public boolean isSavable(Object obj) {\n\tboolean rc = false;\n\n\tif ((obj instanceof Short) ||\n\t (obj instanceof Integer) ||\n\t (obj instanceof Long) ||\n\t (obj instanceof Float) ||\n\t (obj instanceof Double) ||\n\t (obj instanceof Boolean) ||\n\t (obj instanceof String) ||\n\t (obj instanceof Byte) ||\n\t (obj instanceof Color) ||\n\t (obj instanceof Font) ||\n\t (obj instanceof Rectangle2D) ||\n\t (obj instanceof AffineTransform) ||\n\t (obj instanceof Image) ||\n\t (obj instanceof ZSerializable)) {\n\t rc = true;\n\t}\n\n\treturn rc;\n }",
"public void testConstructorWithMalformedArrayValuesProperty7() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"2\", \"{{1,2},,{3,5}}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"@Test\r\n\tpublic void testToArray() {\r\n\t\tObject[] sample = list.toArray();\r\n\t\tAssert.assertEquals(15, sample.length);\r\n\t\tfor (int i = 0; i < sample.length; i++) {\r\n\t\t\tAssert.assertNotNull(sample[i]);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic boolean isObjectTypeExpected() {\n\t\treturn false;\n\t}",
"public static boolean isArray_counter() {\n return false;\n }",
"public static boolean isArray_cost() {\n return false;\n }",
"private boolean isArray() {\n return this.stack.peek() instanceof JsonArray;\n }",
"public void testConstructorWithMalformedArrayValuesProperty2() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_INT, \"1\", \"1,2}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"public static boolean isArray_estLength() {\n return false;\n }",
"@Test\n public void testReflectionFloatArrayArray() {\n float[][] array = { { 1.0f, 2.29686f }, null, { Float.NaN } };\n final String baseString = this.toBaseString(array);\n assertEquals(baseString + \"[{{1.0,2.29686},<null>,{NaN}}]\", ToStringBuilder.reflectionToString(array));\n array = null;\n assertReflectionArray(\"<null>\", array);\n }",
"@Override public boolean accepts(Type other) {\n if(!(other instanceof FixArray)) return false;\n FixArray that = (FixArray) other;\n return this.length == that.length\n && this.indexType().equals(that.indexType())\n && this.elemType.accepts(that.elemType);\n }",
"public boolean hasMixed() {\n return true;\n }",
"void decodeObjectArray();",
"public void testConstructorWithMalformedArrayValuesProperty5() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_SIMPLE_STRING, \"2\", \"{{\\\"1\\\"},{},}\"));\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"static private boolean isArray(Object[] ids) \n { \n boolean result = true; \n for (Object id : ids) \n { \n if (id instanceof Integer == false) \n { \n result = false; \n break; \n } \n } \n return result; \n }",
"public interface StandardTypesLocalService {\n BigInteger getNewBigInteger(BigInteger bi);\n BigInteger[] getNewBigIntegerArray(BigInteger[] bia);\n \n BigDecimal getNewBigDecimal(BigDecimal bd);\n BigDecimal[] getNewBigDecimalArray(BigDecimal[] bda);\n\n Calendar getNewCalendar(Calendar c);\n Calendar[] getNewCalendarArray(Calendar[] ca);\n \n Date getNewDate(Date d);\n Date[] getNewDateArray(Date[] da);\n\n QName getNewQName(QName qname);\n QName[] getNewQNameArray(QName[] qnames);\n \n URI getNewURI(URI uri);\n URI[] getNewURIArray(URI[] uris);\n \n XMLGregorianCalendar getNewXMLGregorianCalendar(XMLGregorianCalendar xgcal);\n XMLGregorianCalendar[] getNewXMLGregorianCalendarArray(XMLGregorianCalendar[] xgcal);\n \n Duration getNewDuration(Duration d);\n Duration[] getNewDurationArray(Duration[] da);\n \n Object getNewObject(Object obj);\n Object[] getNewObjectArray(Object[] objs);\n \n Image getNewImage(Image img);\n Image[] getNewImageArray(Image[] imgs);\n \n DataHandler getNewDataHandler(DataHandler dh);\n DataHandler[] getNewDataHandlerArray(DataHandler[] dha);\n\n Source getNewSource(Source src);\n Source[] getNewSourceArray(Source[] srcs);\n \n UUID getNewUUID(UUID uuid);\n UUID[] getNewUUIDArray(UUID[] uuids);\n}",
"private static void writeNonArrayToBuffer(ByteBuffer buffer, Class<?> standardType, Object value) {\n if (null == value) {\n buffer.put(ABIToken.NULL.identifier);\n }\n \n // Primitive types.\n if (ABIToken.BYTE.standardType == standardType) {\n buffer.put(ABIToken.BYTE.identifier);\n buffer.put((Byte) value);\n } else if (ABIToken.BOOLEAN.standardType == standardType) {\n buffer.put(ABIToken.BOOLEAN.identifier);\n buffer.put((byte)((Boolean) value ? 1 : 0));\n } else if (ABIToken.CHAR.standardType == standardType) {\n buffer.put(ABIToken.CHAR.identifier);\n buffer.putChar((Character) value);\n } else if (ABIToken.SHORT.standardType == standardType) {\n buffer.put(ABIToken.SHORT.identifier);\n buffer.putShort((Short) value);\n } else if (ABIToken.INT.standardType == standardType) {\n buffer.put(ABIToken.INT.identifier);\n buffer.putInt((Integer) value);\n } else if (ABIToken.LONG.standardType == standardType) {\n buffer.put(ABIToken.LONG.identifier);\n buffer.putLong((Long) value);\n } else if (ABIToken.FLOAT.standardType == standardType) {\n buffer.put(ABIToken.FLOAT.identifier);\n buffer.putFloat((Float) value);\n } else if (ABIToken.DOUBLE.standardType == standardType) {\n buffer.put(ABIToken.DOUBLE.identifier);\n buffer.putDouble((Double) value);\n \n // Primitive array types.\n } else if (ABIToken.A_BYTE.standardType == standardType) {\n buffer.put(ABIToken.A_BYTE.identifier);\n if (null != value) {\n byte[] cast = (byte[])value;\n writeLength(buffer, cast.length);\n buffer.put(cast);\n }\n } else if (ABIToken.A_BOOLEAN.standardType == standardType) {\n buffer.put(ABIToken.A_BOOLEAN.identifier);\n if (null != value) {\n boolean[] cast = (boolean[])value;\n writeLength(buffer, cast.length);\n byte[] ready = new byte[cast.length];\n for (int i = 0; i < ready.length; ++i) {\n ready[i] = (byte)(cast[i] ? 1 : 0);\n }\n buffer.put(ready);\n }\n } else if (ABIToken.A_CHAR.standardType == standardType) {\n buffer.put(ABIToken.A_CHAR.identifier);\n if (null != value) {\n char[] cast = (char[])value;\n writeLength(buffer, cast.length);\n for (char c : cast) {\n buffer.putChar(c);\n }\n }\n } else if (ABIToken.A_SHORT.standardType == standardType) {\n buffer.put(ABIToken.A_SHORT.identifier);\n if (null != value) {\n short[] cast = (short[])value;\n writeLength(buffer, cast.length);\n for (short s : cast) {\n buffer.putShort(s);\n }\n }\n } else if (ABIToken.A_INT.standardType == standardType) {\n buffer.put(ABIToken.A_INT.identifier);\n if (null != value) {\n int[] cast = (int[])value;\n writeLength(buffer, cast.length);\n for (int i : cast) {\n buffer.putInt(i);\n }\n }\n } else if (ABIToken.A_LONG.standardType == standardType) {\n buffer.put(ABIToken.A_LONG.identifier);\n if (null != value) {\n long[] cast = (long[])value;\n writeLength(buffer, cast.length);\n for (long l : cast) {\n buffer.putLong(l);\n }\n }\n } else if (ABIToken.A_FLOAT.standardType == standardType) {\n buffer.put(ABIToken.A_FLOAT.identifier);\n if (null != value) {\n float[] cast = (float[])value;\n writeLength(buffer, cast.length);\n for (float f : cast) {\n buffer.putFloat(f);\n }\n }\n } else if (ABIToken.A_DOUBLE.standardType == standardType) {\n buffer.put(ABIToken.A_DOUBLE.identifier);\n if (null != value) {\n double[] cast = (double[])value;\n writeLength(buffer, cast.length);\n for (double d : cast) {\n buffer.putDouble(d);\n }\n }\n \n // Special types\n } else if (ABIToken.STRING.standardType == standardType) {\n buffer.put(ABIToken.STRING.identifier);\n if (null != value) {\n byte[] cast = ((String)value).getBytes(StandardCharsets.UTF_8);\n writeLength(buffer, cast.length);\n buffer.put(cast);\n }\n } else if (ABIToken.ADDRESS.standardType == standardType) {\n buffer.put(ABIToken.ADDRESS.identifier);\n if (null != value) {\n byte[] cast = ((Address)value).unwrap();\n RuntimeAssertionError.assertTrue(Address.avm_LENGTH == cast.length);\n buffer.put(cast);\n }\n \n } else {\n // There should be no other kind of case.\n RuntimeAssertionError.unreachable(\"Unknown type in encoder\");\n }\n }",
"@Override\n public boolean insertjsonarray(List<ModelPerson> persons) {\n return false;\n }",
"public void testConstructorWithMalformedTypeSpecification2() throws Exception {\r\n ConfigurationObject object = createObject(\"name\", TYPE_OBJECT);\r\n object.setPropertyValue(PROPERTY_ARRAY_TYPE, TYPE_OBJECT);\r\n root.addChild(object);\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"public void testStorageContainerAddWithArrayType() //Container Added only with the existing values of Storage Type\r\n\t\t{\n\t\t\tString[] arr = getDataObject().getValues();\r\n\r\n\t\t\tStorageContainerForm storageContainerForm = new StorageContainerForm();\r\n\t\t\tsetRequestPathInfo(\"/OpenStorageContainer\");\r\n\t\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\t\taddRequestParameter(\"pageOf\",\"pageOfStorageContainer\");\r\n\t\t\tsetActionForm(storageContainerForm);\r\n\t\t\tactionPerform();\r\n\t\t\tverifyForward(\"success\");\r\n\r\n\t\t\tsetRequestPathInfo(\"/StorageContainer\");\r\n\t\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\t\taddRequestParameter(\"pageOf\",\"pageOfStorageContainer\");\r\n\t\t\tsetActionForm(storageContainerForm);\r\n\t\t\tactionPerform();\r\n\t\t\tverifyForward(\"pageOfStorageContainer\");\r\n\r\n\t\t\tstorageContainerForm=(StorageContainerForm)getActionForm();\r\n\t\t\tstorageContainerForm.setTypeId(Long.parseLong(arr[0]));\r\n\t\t\tstorageContainerForm.setSelectedContainerName(arr[1]);\r\n\t\t\tstorageContainerForm.setSiteId(Long.parseLong(arr[2]));\r\n\t\t\tstorageContainerForm.setNoOfContainers(Integer.parseInt(arr[3]));\r\n\t\t\tstorageContainerForm.setDefaultTemperature(arr[4]);\r\n\t\t\tstorageContainerForm.setOneDimensionCapacity(Integer.parseInt(arr[5]));\r\n\t\t\tstorageContainerForm.setTwoDimensionCapacity(Integer.parseInt(arr[6]));\r\n\t\t\tstorageContainerForm.setActivityStatus(arr[7]);\r\n\r\n\t\t\tlong[] arr1={Long.parseLong(arr[8].trim())};\r\n\t\t\tstorageContainerForm.setHoldsSpecimenArrTypeIds(arr1);\r\n\r\n\t\t\tlong[] arr2={Long.parseLong(arr[9].trim())};\r\n\t\t\tstorageContainerForm.setHoldsStorageTypeIds(arr2);\r\n\r\n\t\t\tString[] arr3={(arr[10].trim())};\r\n\t\t\tstorageContainerForm.setHoldsTissueSpType(arr3);\r\n\r\n\t\t\tString[] arr4={(arr[11].trim())};\r\n\t\t\tstorageContainerForm.setHoldsFluidSpType(arr4);\r\n\r\n\t\t\tString[] arr5={(arr[12].trim())};\r\n\t\t\tstorageContainerForm.setHoldsCellSpType(arr5);\r\n\r\n\t\t\tString[] arr6={(arr[13].trim())};\r\n\t\t\tstorageContainerForm.setHoldsMolSpType(arr6);\r\n\r\n\r\n\t\t\tsetRequestPathInfo(\"/StorageContainerAdd\");\r\n\t\t\taddRequestParameter(\"operation\",\"add\");\r\n\t\t\taddRequestParameter(\"pageOf\",\"pageOfStorageType\");\r\n\t\t\tsetActionForm(storageContainerForm);\r\n\t\t\tactionPerform();\r\n\t\t\tverifyForward(\"success\");\r\n\t\t\tverifyActionMessages(new String[]{\"object.add.successOnly\"});\r\n\t\t}",
"public static boolean isArray_infos_timestamp() {\n return false;\n }",
"public boolean isObject() {\n return false;\n }",
"@Override\n\tpublic boolean checkData() {\n\t\treturn false;\n\t}",
"@Test\n public void testReflectionArrayCycle() {\n final Object[] objects = new Object[1];\n objects[0] = objects;\n assertEquals(\n this.toBaseString(objects) + \"[{\" + this.toBaseString(objects) + \"}]\",\n ToStringBuilder.reflectionToString(objects));\n }",
"public void mo44054a(String str, Object obj) {\n if (this.f41052d == null) {\n this.f41052d = new ArrayList(this.f41051c != null ? 2 : 1);\n }\n if (this.f41051c != null) {\n this.f41052d.add(str);\n }\n int i = 0;\n if (obj instanceof byte[]) {\n byte[] bArr = (byte[]) obj;\n ArrayList arrayList = new ArrayList(bArr.length);\n int length = bArr.length;\n while (i < length) {\n arrayList.add(Byte.valueOf(bArr[i]));\n i++;\n }\n this.f41052d.add(arrayList);\n } else if (obj instanceof boolean[]) {\n boolean[] zArr = (boolean[]) obj;\n ArrayList arrayList2 = new ArrayList(zArr.length);\n int length2 = zArr.length;\n while (i < length2) {\n arrayList2.add(Boolean.valueOf(zArr[i]));\n i++;\n }\n this.f41052d.add(arrayList2);\n } else if (obj instanceof short[]) {\n short[] sArr = (short[]) obj;\n ArrayList arrayList3 = new ArrayList(sArr.length);\n int length3 = sArr.length;\n while (i < length3) {\n arrayList3.add(Short.valueOf(sArr[i]));\n i++;\n }\n this.f41052d.add(arrayList3);\n } else if (obj instanceof char[]) {\n char[] cArr = (char[]) obj;\n ArrayList arrayList4 = new ArrayList(cArr.length);\n int length4 = cArr.length;\n while (i < length4) {\n arrayList4.add(Character.valueOf(cArr[i]));\n i++;\n }\n this.f41052d.add(arrayList4);\n } else if (obj instanceof int[]) {\n int[] iArr = (int[]) obj;\n ArrayList arrayList5 = new ArrayList(iArr.length);\n int length5 = iArr.length;\n while (i < length5) {\n arrayList5.add(Integer.valueOf(iArr[i]));\n i++;\n }\n this.f41052d.add(arrayList5);\n } else if (obj instanceof long[]) {\n long[] jArr = (long[]) obj;\n ArrayList arrayList6 = new ArrayList(jArr.length);\n int length6 = jArr.length;\n while (i < length6) {\n arrayList6.add(Long.valueOf(jArr[i]));\n i++;\n }\n this.f41052d.add(arrayList6);\n } else if (obj instanceof float[]) {\n float[] fArr = (float[]) obj;\n ArrayList arrayList7 = new ArrayList(fArr.length);\n int length7 = fArr.length;\n while (i < length7) {\n arrayList7.add(Float.valueOf(fArr[i]));\n i++;\n }\n this.f41052d.add(arrayList7);\n } else if (obj instanceof double[]) {\n double[] dArr = (double[]) obj;\n ArrayList arrayList8 = new ArrayList(dArr.length);\n int length8 = dArr.length;\n while (i < length8) {\n arrayList8.add(Double.valueOf(dArr[i]));\n i++;\n }\n this.f41052d.add(arrayList8);\n } else {\n this.f41052d.add(obj);\n }\n }",
"public static boolean isArray_reading() {\n return false;\n }",
"@Test\n public void testIndirectArrayCreation() {\n final String[] array = toArrayPropagatingType(\"foo\", \"bar\");\n assertEquals(2, array.length);\n assertEquals(\"foo\", array[0]);\n assertEquals(\"bar\", array[1]);\n }",
"@Override\n protected boolean accept(Field f) {\n\t\t return !Collection.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t!List.class.isAssignableFrom(f.getType()) &&\n\t\t \t\t\t\t!BaseEntity.class.isAssignableFrom(f.getType())\n\t\t \t\t\t\t&& acceptToStringField(f);\n\t\t }",
"public void testConstructorWithStringTypeArrayWithReferences() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{str1, \\\"string2\\\"}\"));\r\n\r\n ConfigurationObject object = createObject(\"str1\", TYPE_FULL_STRING);\r\n ConfigurationObject params = new DefaultConfigurationObject(\"params\");\r\n params.addChild(createParam(1, TYPE_FULL_STRING, \"string1\"));\r\n object.addChild(params);\r\n root.addChild(object);\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be str1.\", specificationFactory.getObjectSpecification(\"str1\",\r\n null), string1);\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }",
"void setNullArray()\n/* */ {\n/* 1051 */ this.length = -1;\n/* 1052 */ this.elements = null;\n/* 1053 */ this.datums = null;\n/* 1054 */ this.pickled = null;\n/* 1055 */ this.pickledCorrect = false;\n/* */ }",
"public void testCheckArray() {\n Object[] objects = new Object[] {\"one\"};\n Util.checkArray(objects, \"test\");\n }",
"private boolean savePrice(ArrayList<ArrayList<Object>> objArr) {\n //TODO: create string array construction method with String... array\n //TODO: create generic method to create POJO object from objArr and map to JSON data\n logger.trace(\"BEGIN boolean savePrice(ArrayList<ArrayList<Object>> objArr)\");\n boolean result = false;\n TSDBData pricingData = new TSDBData();\n ArrayList<String> strArr = new ArrayList<String>();\n InfluxDBClient dbClient = new InfluxDBClient();\n ObjectMapper mapper = new ObjectMapper();\n String jsonData = null;\n\n strArr.add(\"resource\");\n strArr.add(\"userId\");\n strArr.add(\"usage\");\n strArr.add(\"price\");\n pricingData.setName(Loader.getSettings().getInfluxDBSettings().getCdrRecord());\n pricingData.setColumns(strArr);\n pricingData.setPoints(objArr);\n //get tags and put them into pricingData\n logger.trace(\"DATA boolean savePrice(ArrayList<ArrayList<Object>> objArr): pricingData=\" + pricingData);\n\n try {\n jsonData = mapper.writeValueAsString(pricingData);\n } catch (JsonProcessingException e) {\n logger.error(\"EXCEPTION JSONPROCESSINGEXCEPTION boolean savePrice(ArrayList<ArrayList<Object>> objArr)\");\n e.printStackTrace();\n }\n\n //System.out.println(jsonData);\n logger.trace(\"DATA boolean savePrice(ArrayList<ArrayList<Object>> objArr): jsonData=\" + jsonData);\n result = dbClient.saveData(jsonData);\n logger.trace(\"END boolean savePrice(ArrayList<ArrayList<Object>> objArr)\");\n return result;\n }",
"public abstract boolean isArrayParams();",
"@Test(timeout = 4000)\n public void test24() throws Throwable {\n double double0 = 0.0;\n Double double1 = new Double(0.0);\n JSONObject jSONObject0 = new JSONObject(double1);\n long long0 = 0L;\n Long long1 = new Long(0L);\n String string0 = \"] is not a JSONArray.\";\n HashMap<Float, JSONArray> hashMap0 = new HashMap<Float, JSONArray>();\n jSONObject0.optJSONArray(\"] is not a JSONArray.\");\n JSONArray jSONArray0 = new JSONArray();\n jSONObject0.toJSONArray(jSONArray0);\n float float0 = (-2236.0F);\n Float float1 = new Float((float) 0L);\n Object object0 = JSONObject.NULL;\n JSONArray jSONArray1 = null;\n try {\n jSONArray1 = new JSONArray(object0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // JSONArray initial value should be a string or collection or array.\n //\n verifyException(\"wheel.json.JSONArray\", e);\n }\n }",
"@Test\r\n\tpublic void getNativeFieldsArraySizeOne() {\r\n\t\ttestObj.addNativeField(1);\r\n\t\ttestObj.makeArrays();\r\n\t\tassertEquals(\"nativeFields size should be 1\", 1, testObj.getNativeFieldsArray().length);\r\n\t}",
"protected boolean isValidData() {\n return true;\n }",
"public JsonDeserializer<?> modifyArrayDeserializer(DeserializationConfig config, ArrayType valueType, BeanDescription beanDesc, JsonDeserializer<?> deserializer)\n/* */ {\n/* 134 */ return deserializer;\n/* */ }",
"public void testValueOfByteArray()\n {\n // lets test some error cases\n // first, passing null\n try\n {\n /*EthernetAddress ethernet_address =*/\n EthernetAddress.valueOf((byte[])null);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NullPointerException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n \n // now an array that is too small\n try\n {\n /*EthernetAddress ethernet_address =*/\n EthernetAddress.valueOf(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH - 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NumberFormatException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // now an array that is too big\n try\n {\n /*EthernetAddress ethernet_address =*/\n EthernetAddress.valueOf(\n new byte[ETHERNET_ADDRESS_ARRAY_LENGTH + 1]);\n // if we reached here we failed because we didn't get an exception\n fail(\"Expected exception not caught\");\n }\n catch (NumberFormatException ex)\n {\n // this is the success case so do nothing\n }\n catch (Exception ex)\n {\n fail(\"Caught unexpected exception: \" + ex);\n }\n\n // test that creating a EthernetAddress from an zero'd array\n // gives us a null EthernetAddress (definition of null EthernetAddress)\n EthernetAddress ethernet_address =\n EthernetAddress.valueOf(new byte[ETHERNET_ADDRESS_ARRAY_LENGTH]);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good byte array\n ethernet_address =\n EthernetAddress.valueOf(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }",
"public static boolean isArray_sum_e() {\n return false;\n }",
"public MutableArray(ARRAY paramARRAY, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 155 */ this.length = -1;\n/* 156 */ this.elements = null;\n/* 157 */ this.datums = null;\n/* 158 */ this.pickled = paramARRAY;\n/* 159 */ this.pickledCorrect = true;\n/* 160 */ this.sqlType = paramInt;\n/* 161 */ this.old_factory = paramCustomDatumFactory;\n/* 162 */ this.isNChar = false;\n/* */ }",
"private void prepare( ) {\n super.prepare( schema.getCount( ) );\n serializer = new FieldSerializer[ fieldCount ];\n for ( int i = 0; i < fieldCount; i++ ) {\n FieldSchema field = schema.getField( i );\n serializer[i] = serializerByType[ field.getType().ordinal() ];\n }\n }",
"@Override\r\n\tpublic boolean validaObj() {\n\t\treturn false;\r\n\t}",
"public void testConstructorWithStringTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_FULL_STRING, \"1\", \"{\\\"string1\\\", \\\"string2\\\"}\"));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be String.\", TYPE_FULL_STRING, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n ObjectSpecification string1 = (ObjectSpecification) array1[0];\r\n ObjectSpecification string2 = (ObjectSpecification) array1[1];\r\n\r\n assertEquals(\"Array should have 2 elements.\", 2, array1.length);\r\n assertTrue(\"SpecType of array elements should be simple.\", string1.getSpecType().equals(\r\n ObjectSpecification.SIMPLE_SPECIFICATION)\r\n && string2.getSpecType().equals(ObjectSpecification.SIMPLE_SPECIFICATION));\r\n assertTrue(\"Elements should be 'String'.\", string1.getType().equals(TYPE_FULL_STRING)\r\n && string2.getType().equals(TYPE_FULL_STRING));\r\n assertEquals(\"Element should be \\\"string1\\\".\", \"string1\", string1.getValue());\r\n assertEquals(\"Element should be \\\"string2\\\".\", \"string2\", string2.getValue());\r\n }",
"public MutableArray(Object[] paramArrayOfObject, int paramInt, CustomDatumFactory paramCustomDatumFactory)\n/* */ {\n/* 180 */ this.sqlType = paramInt;\n/* 181 */ this.old_factory = paramCustomDatumFactory;\n/* 182 */ this.isNChar = false;\n/* */ \n/* 184 */ setObjectArray(paramArrayOfObject);\n/* */ }",
"void checkReconstructible() throws InvalidObjectException {\n // subclasses can override\n }",
"@Test\n\tvoid testCheckNulls2() {\n\t\tObject[] o = {2,5f,\"Test\",null,\"Test2\"};\n\t\tassertTrue(DataChecker.checkNulls(o));\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\t@Test\n\tpublic void retrieveArrays() {\n\t\tObjectSet result = db.queryByExample(new double[] { 0.6, 0.4 });\n\t\tlistResult(result);\n\n\t\t// Important note QBE does not work well with arrays\n\t\tassertEquals(0, result.size());\n\n\t}",
"public static boolean isArray_min() {\n return false;\n }",
"@Test\n public void testGenericArrayType() throws Exception {\n ArrayList<Type> typeList = Lists.newArrayList();\n typeList.add(String[].class);\n typeList.addAll(getBothParameters(ArrayToListArray.class));\n typeList.add(getFirstTypeParameter(NoOpSink.class));\n PipelineRegisterer.validateTypes(typeList);\n }",
"public void test_getTypedValues_accuracy() {\n instance.addTypedValue(typedValue);\n assertEquals(\"TypedValue got incorrectly\", 1, instance.getTypedValues().size());\n }",
"@Nullable\n protected Object handleSpecialTypes(MappingContext context, Object value) {\n final Class<?> rawClass = context.getTypeInformation().getSafeToWriteClass();\n if (Collection.class.isAssignableFrom(rawClass)) {\n return createCollection(context, value);\n } else if (Map.class.isAssignableFrom(rawClass)) {\n return createMap(context, value);\n } else if (Optional.class.isAssignableFrom(rawClass)) {\n return createOptional(context, value);\n }\n return null;\n }",
"protected OfNonPrimitiveArray(Object value, Class<?> componentType) {\n this.value = value;\n this.componentType = componentType;\n }",
"@Test(expected=MapperException.class)\n public void badInput2() throws MapperException {\n JSONValue json = new JSONArray();\n helper.toJava(mapper, json, BigDecimal.class);\n }",
"public interface ExternalArrayData{\n /**\n * Return the element at the specified index. The result must be a type that is valid in JavaScript:\n * Number, String, or Scriptable. This method will not be called unless \"index\" is in\n * range.\n */\n Object getArrayElement(int index);\n\n /**\n * Set the element at the specified index. This method will not be called unless \"index\" is in\n * range. The method must check that \"value\" is a valid type, and convert it if necessary.\n */\n void setArrayElement(int index, Object value);\n\n /**\n * Return the length of the array.\n */\n int getArrayLength();\n}",
"public void testConstructorWithMalformedTypeSpecification7() throws Exception {\r\n ConfigurationObject array = createArray(\"name\", TYPE_OBJECT, \"1\", \"{1, 2}\");\r\n array.addChild(new DefaultConfigurationObject(\"params\"));\r\n root.addChild(array);\r\n\r\n try {\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n fail(\"IllegalReferenceException is expected.\");\r\n } catch (IllegalReferenceException e) {\r\n // ok\r\n }\r\n }",
"private boolean isSerializable(FieldDescriptor childFd, Object object)\n \t\t\tthrows SIMPLTranslationException\n \t{\n \t\tswitch (childFd.getType())\n \t\t{\n \t\tcase SCALAR:\n \t\t\tif (childFd.isDefaultValueFromContext(object))\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\tcase COMPOSITE_ELEMENT:\n \t\tcase COLLECTION_ELEMENT:\n \t\tcase MAP_ELEMENT:\n \t\t\tObject obj = childFd.getObject(object);\n \t\t\tif (obj == null)\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\tcase COLLECTION_SCALAR:\n \t\tcase MAP_SCALAR:\n\t\t\tObject scalarCollectionObject = childFd.getObject(object);\n\t\t\tCollection<?> scalarCollection = XMLTools.getCollection(scalarCollectionObject);\n \t\t\tif (scalarCollection == null || scalarCollection.size() <= 0)\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\t}\n \n \t\treturn true;\n \t}",
"public void testConstructorWithNullComplexTypeArray() throws Exception {\r\n root.addChild(createArray(\"array1\", TYPE_OBJECT, \"1\", \"{object:ob1,object:ob2,null}\"));\r\n root.addChild(createObject(\"object:ob1\", TYPE_OBJECT));\r\n root.addChild(createObject(\"object:ob2\", TYPE_OBJECT));\r\n\r\n specificationFactory = new ConfigurationObjectSpecificationFactory(root);\r\n\r\n ObjectSpecification array = specificationFactory.getObjectSpecification(\"array1\", null);\r\n\r\n assertEquals(\"SpecType should be array.\", ObjectSpecification.ARRAY_SPECIFICATION, array\r\n .getSpecType());\r\n assertNull(\"Identifier should be null.\", array.getIdentifier());\r\n assertEquals(\"Type should be 'A'.\", TYPE_OBJECT, array.getType());\r\n assertEquals(\"Dimension should be 1.\", 1, array.getDimension());\r\n\r\n Object[] array1 = array.getParameters();\r\n\r\n assertEquals(\"array1[0] should be object:ob1.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob1\"), array1[0]);\r\n assertEquals(\"array1[1] should be object:ob2.\", specificationFactory\r\n .getObjectSpecification(\"object\", \"ob2\"), array1[1]);\r\n assertEquals(\"array1[2] should be null.\", ObjectSpecification.NULL_SPECIFICATION,\r\n ((ObjectSpecification) array1[2]).getSpecType());\r\n }"
]
| [
"0.61779934",
"0.6124134",
"0.6109963",
"0.59630734",
"0.5833123",
"0.5764128",
"0.5726039",
"0.56614447",
"0.5660996",
"0.5654333",
"0.5576033",
"0.55685955",
"0.55659246",
"0.5562296",
"0.5562296",
"0.55170137",
"0.55043423",
"0.5495773",
"0.5493811",
"0.54799765",
"0.5479399",
"0.54570377",
"0.5455714",
"0.5452269",
"0.5410063",
"0.54024047",
"0.5398803",
"0.53483987",
"0.53236246",
"0.5317926",
"0.53084975",
"0.5295454",
"0.5269477",
"0.5264489",
"0.5255251",
"0.524781",
"0.524418",
"0.5238851",
"0.5237344",
"0.52330726",
"0.5220292",
"0.52142984",
"0.52078354",
"0.52000433",
"0.5198525",
"0.5198209",
"0.516254",
"0.51571274",
"0.51444876",
"0.51379794",
"0.51374114",
"0.51368684",
"0.5133459",
"0.5131911",
"0.51158816",
"0.5109914",
"0.51042056",
"0.50971764",
"0.50950456",
"0.508587",
"0.50828564",
"0.5075908",
"0.5056405",
"0.5051252",
"0.5046364",
"0.50461465",
"0.5040262",
"0.50230116",
"0.5022828",
"0.50167614",
"0.50150496",
"0.5008517",
"0.49978518",
"0.49923968",
"0.49907488",
"0.49901417",
"0.49766007",
"0.49733987",
"0.49710485",
"0.49575242",
"0.49442735",
"0.49397105",
"0.49339405",
"0.4924415",
"0.491499",
"0.49135503",
"0.49131516",
"0.491057",
"0.4908692",
"0.490032",
"0.4900063",
"0.48991555",
"0.48959357",
"0.48945785",
"0.48919603",
"0.4883864",
"0.48828718",
"0.48784494",
"0.4876893",
"0.4876461",
"0.48752725"
]
| 0.0 | -1 |
some double adds that should not matter | public static void enter_values(TupleTagBasedEncoder<?> encoder) {
encoder.addEntryT(super_tag_1, bool_test_tag, bool_test_value);
encoder.addEntryT(super_tag_1,"confuse???123123", 1234123+"WeirdTag ValueSwear");
encoder.addEntryT(super_tag_2, str_test_tag, str_test_value);
encoder.addEntryT(super_tag_1, "confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(super_tag_1, "confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(super_tag_1, int_test_tag, int_test_value);
encoder.addEntryT(super_tag_4, "WeirdTag confuse", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(super_tag_2, "confuse???", 1234123+"WeirdTagVa lueSwear");
encoder.addEntryT(super_tag_2, weird_long_tag, weird_long_value);
encoder.addEntryT(super_tag_4, empty_tag_test_tag, empty_tag_test_value);
encoder.addEntryT(super_tag_2, empty_val_test_tag, empty_val_test_value);
encoder.addEntryT(super_tag_2, "confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(super_tag_4, empty_strarr_test_tag, empty_strarr_test_value); //empty is not written into the system.
encoder.addEntryT(super_tag_2, strarr_test_tag, strarr_test_value);
encoder.addEntryT(super_tag_2, empty_intarr_test_tag, empty_intarr_test_value); //empty is not written into the system.
encoder.addEntryT(super_tag_4, intarr_test_tag, intarr_test_value);
encoder.addEntryT(super_tag_3, "confuse???1231235", 1234123+"WeirdTa gValueSwear");
encoder.addEntryT(super_tag_2, strarr2d_test_tag, strarr2d_test_value);
encoder.addEntryT(super_tag_4, "confuse???1231235", 1234123+"WeirdTa gValueSwear");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic double add(double in1, double in2) {\n\t\treturn 0;\n\t}",
"public void add()\r\n {\r\n resultDoubles = Operations.addition(leftOperand, rightOperand);\r\n resultResetHelper();\r\n }",
"@Override\n\tpublic double add(double a, double b) {\n\t\treturn (a+b);\n\t}",
"Double add(Double a, Double b);",
"public void add(Double addedAmount) {\n }",
"void add(double val) {\r\n\t\tresult = result + val;\r\n\t}",
"void add(double p1, double p2){\n this.p1 += p1;\n this.p2 += p2;\n }",
"public static double add(double a, double b){\r\n\t\treturn a+b;\r\n\t}",
"static double add(double a, double b){\nreturn a+b;\n}",
"@Override\r\n\tpublic double add() {\r\n\t\tdouble outcome = firstVariable + secondVariable;\r\n\t\treturn outcome;\r\n\t\r\n\t}",
"default DiscreteDoubleMap2D plus(double value) {\r\n\t\treturn pushForward(d -> d + value);\r\n\t}",
"public static double add(double a, double b)\n\t{\n\t\treturn a + b;\n\t}",
"private void addTwoNumbers() {\n\t\t\n\t}",
"public int sumDouble(int a, int b) {\n int sum = a + b;\n if (a == b){\n sum *= 2;\n }\n\n return sum; \n}",
"public void add(double i)\n\t{\n\t\tthis.i += i;\n\t}",
"public double add(int a, int b){\r\n return a + b;\r\n }",
"@Override\n\tpublic void add(double dx, double dy) {\n\t\t\n\t}",
"public void adaugT(Double temp) {\r\n\t\tset.add(temp); \r\n\t}",
"public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }",
"@Override\n\tpublic void\n\tscalarAdd( double value )\n\t{\n\t\tdata[0] += value;\n\t\tdata[1] += value;\n\t\tdata[2] += value;\n\t}",
"public double add(double num1, double num2) {\n return num1 + num2;\n }",
"@Override\r\n\tpublic void add(float var) {\n\t\t\r\n\t}",
"public void addDif() {\n this.polyAddSolve();\n int dd2 = 0, dd3 = 0;\n String d1 = \"\", d2 = \"\", d3 = \"\";\n this.daa = 3 * this.aadd;\n this.dba = 2 * this.badd;\n this.dca = this.cadd;\n if (this.adddegree == 3) {\n d1 = \"dy/dx = \" + this.daa + \"x^2 \";\n if (this.badd == 0) {\n dd2 = 1;\n } else {\n if (this.dba > 0) {\n d2 = \"+ \" + this.dba + \"x \";\n } else {\n d2 = \"- \" + -this.dba + \"x \";\n }\n }\n if (this.cadd == 0) {\n dd3 = 1;\n } else {\n if (this.dca > 0) {\n d3 = \"+ \" + this.dca;\n } else {\n d3 = \"- \" + -this.dca;\n }\n }\n if (dd2 == 0 && dd3 == 0) {\n this.adddiff = d1 + d2 + d3;\n }\n if (dd2 == 0 && dd3 == 1) {\n this.adddiff = d1 + d2;\n }\n if (dd2 == 1 && dd3 == 1) {\n this.adddiff = d1;\n }\n if (dd2 == 1 && dd3 == 0) {\n this.adddiff = d1 + d3;\n }\n\n }\n if (this.adddegree == 2) {\n d1 = \"dy/dx = \" + this.db + \"x \";\n if (this.dca == 0) {\n this.adddiff = d1;\n } else {\n if (this.dca > 0) {\n this.adddiff = d1 + \"+\" + this.dca;\n } else {\n this.adddiff = d1 + \"-\" + -this.dca;\n }\n }\n }\n if (this.adddegree == 1) {\n this.adddiff = \"dy/dx = \" + this.cadd;\n }\n if (this.adddegree == 0) {\n this.adddiff = \"dy/dx = \" + 0;\n }\n\n }",
"@Override\r\n\tpublic double extra() {\n\t\treturn 0.05;\r\n\t}",
"public void testPlus() {\n \tMeasurement a = new Measurement(1,10);\n \tMeasurement b = new Measurement(1,13);\n \tMeasurement c = a.plus(b);\n \t\n assertTrue(a.getFeet() == 1);\n assertTrue(a.getInches() == 10);\n assertTrue(b.getFeet() == 2);\n assertTrue(b.getInches() == 1);\n \n assertTrue(c.getFeet() == 3);\n assertTrue(c.getInches() == 11);\n }",
"public double add(double x, double y) {\n\t\treturn x+y;\n\t}",
"public void visitDADD(DADD o){\n\t\tif (stack().peek() != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack top is not of type 'double', but of type '\"+stack().peek()+\"'.\");\n\t\t}\n\t\tif (stack().peek(1) != Type.DOUBLE){\n\t\t\tconstraintViolated(o, \"The value at the stack next-to-top is not of type 'double', but of type '\"+stack().peek(1)+\"'.\");\n\t\t}\n\t}",
"public void testAdd() {\r\n System.out.println(\"Add\");\r\n Double [][] n = new Double[][]{{-3., -2.5, -1., 0., 1., 2., 3.4, 3.5, 1.1E300, -1.1E300}, \r\n {-3., 2.5, 0., 0., 1., -2., 3., 3.7, 1.1E300, -1.1E300}, \r\n {-6., 0., -1., 0., 2., 0., 6.4, 7.2, 2.2E300, -2.2E300}};\r\n for(int i = 0; i < 10; i++){\r\n Double x = n[0][i];\r\n Double y = n[1][i];\r\n double expResult = n[2][i];\r\n double result = MathOp.Add(x, y);\r\n assertEquals(expResult, result, 0.001);\r\n }\r\n }",
"@Override\n public Float plus(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs + rhs;\n\treturn res;\t\n }",
"public void AddMoneySaved(double moneySaved){\n MoneySaved += moneySaved;\n }",
"void add(double a, double b) {\n\t\tdouble sum = a + b;\n\t\tSystem.out.println(\"Sum of a+b is \" + sum);\n\t}",
"@Parameters({\"12, 2, 14\", \"3, 4, 7\", \"4, 4, 8\", \"1, 2, 3\", \"1, 2, 3\", \"10, 4, 14\", \"100, 100, 200\", \"50, 25, 75\",\n \"50, 25, 75\", \"30, 30, 60\", \"0, 0, 0\", \"2147483646, 1, 2147483647\"})\n public void testAddMethod(double a, double b, double result) {\n assertEquals(result, calc.add(a, b), 0.1);\n }",
"static void add() {\r\n\t\t\r\n\t\tint a = 500;\r\n\t\tint b = 300;\r\n\t\t\r\n\t\tint s = a +b;\r\n\t\tSystem.out.println(s);\r\n\t}",
"public static double Add(double x, double y) \n\t{\n\t\treturn x + y;\n\t\t\n\t}",
"private void addition()\n\t{\n\t\tFun = Function.ADD;\t//Function set to determine what action should be taken later. \n\t\t\n\t\t\tsetLeftValue();\n\t\t\tentry.grabFocus();\n\t\t\n\t}",
"public double addToSpent(double addAmount){\r\n\t\tspent +=addAmount;\r\n\t\treturn spent;\r\n\t}",
"public void add(double val) {\n sum += val;\n sumQ += val * val;\n count++;\n if (val < min) min = val;\n if (val > max) max = val;\n }",
"@Override\n public void addNumbers() {\n calculator.add(2, 2);\n }",
"@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}",
"public void add(double a, double b)\n\t{\n\t\tdouble c = a+b;\n\t\tSystem.out.println(\"Sum of numbers is \"+c);\n\t\t\n\t}",
"public void add (double a , int b) {\n\t\tdouble c=a+b;\r\n\t\tSystem.out.println(\"Sum of numbers is : \" + c);\r\n\t}",
"@Override\r\n\tpublic double calculate() {\n\r\n\t\treturn n1 + n2;\r\n\t}",
"public final void plus (Unit unit) throws ArithmeticException {\n\t\tboolean error = false;\n\t\tif (((mksa|unit.mksa)&_abs)!=0) {\t// Special dates\n\t\t\tif (mksa != (_abs^unit.mksa)) error = true;\n\t\t\telse mksa |= _abs;\t\t\t// Result is a date\n\t\t}\n\t\telse error = (mksa&(~_pic)) != (unit.mksa&(~_pic));\n\t\tif (error) throw new ArithmeticException\n\t\t(\"****Unit: can't combine: \" + symbol + \" + \" + unit.symbol);\n\t\t/* Addition in log scale: a+b=a+f*log(1.+10^((b-a)/f)) */\n\t\tvalue += (unit.value*unit.factor)/factor;\n\t}",
"void add(int idx, float incr);",
"@Test\n public void addTest() {\n double expected = 5.5;\n double actual = calculatorApp.add();\n Assert.assertThat(\"Addition function in CalculatorApp: Expected != Real\", actual, is(expected));\n }",
"public void add(int index, double value) {\n\t\t\n\t}",
"public MutableDouble add(double value) {\n\t\tmDouble += value;\n\t\treturn this;\n\t}",
"@Override\n\t\tpublic Double fazCalculo(Double num1, Double num2) {\n\t\t\treturn num1 + num2;\n\t\t}",
"double getSum();",
"double getSum();",
"long getAndAdd(long delta);",
"public void add (int b , double a) {\n\t\tdouble c=a+b;\r\n\t\tSystem.out.println(\"Sum of numbers is : \" + c);\r\n\t}",
"BaseNumber add(BaseNumber operand);",
"public final void add() {\n\t\tif (size > 1) {\n\n\t\t\tdouble topMostValue = pop();\n\t\t\tdouble secondTopMostValue = pop();\n\t\t\tpush(secondTopMostValue + topMostValue);\n\t\t}\n\t}",
"public T plus( double b ) {\n T ret = createLike();\n ops.plus(mat, b, ret.mat);\n return ret;\n }",
"@Override\n\tpublic void visit(Addition arg0) {\n\n\t}",
"boolean isAdditionAllowed();",
"@Override\r\n\tprotected Integer add(Integer x1, Integer x2) {\n\t\treturn x2+x1;\r\n\t}",
"public static double dAdd(double i, double j) {\n \t\treturn i + j;\n \t}",
"public void addFuel(double fuelToAdd){\n\n fuelRemaining = fuelRemaining + fuelToAdd;\n }",
"@Override\n\tpublic double multiply(double in1, double in2) {\n\t\treturn 0;\n\t}",
"private static double addOneAndHalf(int x) {\n return x + 1.5;\n }",
"@Override\n public Tuple3<Long, Double, Double> add(Tuple3<Long, Double, Double> tuple, Tuple3<Long, Double, Double> acc) {\n acc.f0 = tuple.f0;\n acc.f1 += tuple.f1;\n acc.f2 += tuple.f2;\n return acc;\n }",
"public void add(final Double e) {\n data.add(e);\n }",
"public static void add(float a,int b){ }",
"protected void add() {\n\t\tfinal float previous = value;\n\t\tvalue = Math.min(max, value + incrementStep);\n\n\t\tif (value != previous) {\n\t\t\tupdateAndAlertListener();\n\t\t}\n\n\t\treturn;\n\t}",
"public int addValue(double f) {\n return foldIn(Double.doubleToLongBits(f));\n }",
"@Override\r\n\tpublic int numCurrentsToAdd() {\n\t\treturn 2;\r\n\t}",
"static public Object add(Object a, Object b) throws Exception {\r\n\t\t//\r\n\t\tif (a instanceof String || b instanceof String)\r\n\t\t\treturn asString(a) + asString(b);\r\n\t\treturn new Double(asNumber(a) + asNumber(b));\r\n\t}",
"@Override\n public InterpreterValue add(InterpreterValue v) {\n\n // If the given value is a IntegerValue create a new DoubleValue from\n // the addition-result\n if(v instanceof IntegerValue) return new DoubleValue(getValue() + ((IntegerValue) v).getValue());\n\n // If the given value is a DoubleValue create a new DoubleValue from\n // the addition-result\n if(v instanceof DoubleValue) return new DoubleValue(getValue() + ((DoubleValue) v).getValue());\n\n // In other case just throw an error\n throw new Error(\"Operator '+' is not defined for type double and \" + v.getName());\n\n }",
"protected boolean performAdd(Triple e) {\n return wrapped.add(e);\n }",
"@Test\n\tpublic void testAddition() {\n\t\tint tmpRndVal = 0;\n\t\tint tmpRndVal2 = 0;\n\t\tint tmpResult = 0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = RandomNegativeNumbers();\n\t\t\ttmpRndVal2 = RandomNegativeNumbers();\n\t\t\ttmpResult = tmpRndVal + tmpRndVal2;\n\t\t\tassertEquals(bc.addition(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = RandomPositiveNumbers();\n\t\t\ttmpRndVal2 = RandomPositiveNumbers();\n\t\t\ttmpResult = tmpRndVal + tmpRndVal2;\n\t\t\tassertEquals(bc.addition(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tint zero = 0;\n\t\tint tmpVal = 7;\t\t\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tassertTrue( ((bc.addition(tmpVal, zero) == zero) \n\t\t\t\t\t|| (bc.addition(zero, zero) == zero)\n\t\t\t\t\t|| (bc.addition(zero, tmpVal) == zero) ));\n\t\t}\n\t\t\n\t}",
"public void add(int add) {\r\n value += add;\r\n }",
"public static void add(int a,float b){ }",
"@Test\n public void testSumActualAddedModifiedSizeSquared()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSizeSquared(), 7604693.0, 0.01);\n }",
"@Override\n\tpublic double calc(double d1, double d2) {\n\t\treturn 0;\n\t}",
"@Override\n\tpublic int add(int x, int y) {\n\t\treturn x * y;\n\t}",
"@Test\n\tpublic void addWorksForModeNone() {\n\t\tfinal FloatTimeSeries t0 = new FloatTreeTimeSeries();\n\t\tt0.addValues(TimeSeriesUtils.createStepFunction(10, 0, 10, 10, 0)); // constant function = 10\n\t\tfinal FloatTimeSeries t1 = new FloatTreeTimeSeries();\n\t\tt1.addValues(TimeSeriesUtils.createStepFunction(5, 20, 25, 20, 0)); // constant function = 20\n\t\tfinal ReadOnlyTimeSeries sum = MultiTimeSeriesUtils.add(Arrays.<ReadOnlyTimeSeries> asList(t0, t1), 0, 120, true, null, false);\n\t\tAssert.assertEquals(\"Time series sum has wrong number of data points\", 13, sum.size());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 30, sum.getValue(20).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 20, sum.getValue(45).getValue().getIntegerValue());\n\t\tAssert.assertEquals(\"Unexpected value in time series sum\", 10, sum.getValue(80).getValue().getIntegerValue());\n\t}",
"private static BigInteger forceAdd(BigInteger first, BigInteger second) {\n\t\tBigInteger i = new BigInteger();\n\t\tint sign1 = first.sign(), sign2 = second.sign();\n\t\ti.front = new DigitNode(0, null); // dummy\n\t\tfor(DigitNode n1 = first.front, n2 = second.front, n = i.front; n1 != null || n2 !=null; n = n.next) {\n\t\t\tint value = 0;\n\t\t\tif (n1 != null) {\n\t\t\t\tvalue += n1.digit*sign1;\n\t\t\t\tn1 = n1.next;\n\t\t\t}\n\t\t\tif (n2 != null) {\n\t\t\t\tvalue += n2.digit*sign2;\n\t\t\t\tn2 = n2.next;\n\t\t\t}\n\t\t\tn.next = new DigitNode(value, null);\n\t\t\tif (value != 0) i.negative = (value < 0);\n\t\t\ti.numDigits++;\n\t\t}\n\t\ti.front = i.front.next; //skip the dummy\n\t\treturn i;\n\t}",
"void addToAmount(double amount) {\n this.currentAmount += amount;\n }",
"void addDistance(float distanceToAdd);",
"Point add (double x, double y, Point result);",
"public void add(double sthis, Vec vthat, double sthat);",
"@Test\n public void test01() {\n\n float a = 0.1f;\n float b = 0.2f;\n float c = 0.4f;\n float d = 0.6f;\n\n\n System.out.println(a+b);\n System.out.println(c+d);\n\n System.out.println(a+b == 0.3d);\n System.out.println(c+d == 1.0d);\n }",
"@Test\n public void testSumActualAddedModifiedSize()\n {\n assertEquals(this.linealRegressionCalculator.sumActualAddedModifiedSize(), 6389.0, 0.01);\n }",
"@Override\r\n\tpublic int add(int a,int b) {\n\t\treturn a+b;\r\n\t}",
"public void add(int arg0, int arg1, double arg2) {\n\t\tif (Math.max(0, arg1 - hbw_) <= arg0 && arg0 <= arg1)\n\t\t\tmat_[arg0][arg1 - arg0] += arg2;\n\t}",
"private static double totalPrice(double price_interest, double dwnpymnt) {\n \treturn price_interest + dwnpymnt;\n }",
"@Test\n\tpublic void addTest() {\n\t\t\n\t\tFraction expected = new Fraction(120, 200);\n\t\tFraction actual = x.add(y);\n\t\t\n\t\tassertEquals(expected.getNumerator(), actual.getNumerator());\n\t\tassertEquals(expected.getDenominator(), actual.getDenominator());\n\t\tassertEquals(expected.toString(), actual.toString());\n\t\t\n\t}",
"@Override\n\tpublic int add(int a, int b) {\n\t\treturn a+b;\n\t}",
"public strictfp double sum() {\n double num1 = 10e+10;\n double num2 = 6e+08;\n return (num1 + num2);\n }",
"@Override\r\n\t\tvoid calculate() {\r\n\t\t\tnum3=num1+num2;\r\n\t\t\t\r\n\t\t}",
"public double add(double firstNumber, double secondNUmber){\n\t\treturn firstNumber + secondNUmber;\n\t}",
"@Override\r\n\tpublic int add() {\n\t\treturn 0;\r\n\t}",
"public void add(Number v)\n\t{ total = total + v.doubleValue(); }",
"@Override\r\n\tpublic double alapterulet() {\n\t\treturn 0;\r\n\t}",
"@Override\r\n\tpublic int plus(int left, int right) {\n\t\treturn left + right; \r\n\t\t//return 0;\r\n\t}",
"private String doAddition(String answer)\n\t{\n\t\tint signSpot;\n\t\tString stringToDelete;\n\t\tdouble number1;\n\t\tdouble number2;\n\t\tint minValue = 0;\n\t\tint maxValue = 0;\n\n\t\twhile (answer.contains(\"+\"))\n\t\t{\n\t\t\tsignSpot = answer.indexOf(\"+\");\n\n\t\t\t// start\n\t\t\tfor (int count = signSpot - 1; count >= 0; count -= 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count, count + 1)) == true\n\t\t\t\t\t\t|| answer.substring(count, count + 1).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tminValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// finish\n\t\t\tfor (int count = signSpot + 2; count <= answer.length(); count += 1)\n\t\t\t{\n\t\t\t\tif (isNumeric(answer.substring(count - 1, count)) == true\n\t\t\t\t\t\t|| answer.substring(count - 1, count).equals(\".\"))\n\t\t\t\t{\n\t\t\t\t\tmaxValue = count;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstringToDelete = answer.substring(minValue, maxValue);\n\t\t\tString myString = answer.substring(minValue, signSpot);\n\t\t\tnumber1 = Double.parseDouble(myString);\n\t\t\tmyString = answer.substring(signSpot + 1, maxValue);\n\t\t\tnumber2 = Double.parseDouble(myString);\n\t\t\tDouble numberAnswer1 = number1 + number2;\n\t\t\tanswer = answer.replace(stringToDelete, \"\" + numberAnswer1);\n\t\t\tSystem.out.println(answer);\n\t\t}\n\t\treturn answer;\n\t}",
"@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}",
"public void addPrice(float add) {\n price += add;\n totalPrizeLabel.setText(String.format(\"£%.02f\", price));\n }",
"public static void add(Double[] vector, Double adder) {\r\n // ...\r\n for (int i = 0; i < vector.length; i++){\r\n vector[i] = vector[i] + adder;\r\n }\r\n }"
]
| [
"0.7498091",
"0.7243579",
"0.7154469",
"0.71069074",
"0.694341",
"0.6879942",
"0.674453",
"0.6598903",
"0.6566361",
"0.6556864",
"0.64059687",
"0.64015454",
"0.6376668",
"0.63438666",
"0.63360614",
"0.6283175",
"0.62240297",
"0.61955094",
"0.6194916",
"0.6188527",
"0.61861956",
"0.6157468",
"0.6143743",
"0.6126752",
"0.61239415",
"0.6099193",
"0.6069857",
"0.60677826",
"0.60637116",
"0.60630745",
"0.60361594",
"0.60261",
"0.5994817",
"0.5980164",
"0.5965226",
"0.59521145",
"0.593785",
"0.5927868",
"0.5924252",
"0.59192586",
"0.5905592",
"0.5904532",
"0.58986866",
"0.5894881",
"0.58948016",
"0.58944285",
"0.5893964",
"0.58939534",
"0.5891565",
"0.5891565",
"0.5880672",
"0.58759266",
"0.58717334",
"0.5870896",
"0.5865996",
"0.58656126",
"0.5861552",
"0.586078",
"0.5858918",
"0.5846708",
"0.58350307",
"0.5832318",
"0.58289164",
"0.581243",
"0.58118534",
"0.58068955",
"0.5803649",
"0.58035934",
"0.57936317",
"0.57875514",
"0.5784375",
"0.57835895",
"0.57831824",
"0.5779296",
"0.5773953",
"0.5764542",
"0.57446",
"0.5741909",
"0.5741284",
"0.5718734",
"0.5718594",
"0.5712964",
"0.5691974",
"0.5686337",
"0.5678854",
"0.5669844",
"0.56635165",
"0.5661779",
"0.565887",
"0.56576145",
"0.56574816",
"0.5650653",
"0.56503224",
"0.56406593",
"0.5627938",
"0.5623538",
"0.5622895",
"0.5616553",
"0.5615622",
"0.5614214",
"0.5613843"
]
| 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.